discoveryv2

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package discoveryv2 : Operations and models for the DiscoveryV2 service

Index

Constants

View Source
const (
	ComponentSettingsAggregationVisualizationTypeAutoConst       = "auto"
	ComponentSettingsAggregationVisualizationTypeFacetTableConst = "facet_table"
	ComponentSettingsAggregationVisualizationTypeMapConst        = "map"
	ComponentSettingsAggregationVisualizationTypeWordCloudConst  = "word_cloud"
)

Constants associated with the ComponentSettingsAggregation.VisualizationType property. Type of visualization to use when rendering the aggregation.

View Source
const (
	CreateEnrichmentTypeDictionaryConst                 = "dictionary"
	CreateEnrichmentTypeRegularExpressionConst          = "regular_expression"
	CreateEnrichmentTypeRuleBasedConst                  = "rule_based"
	CreateEnrichmentTypeUimaAnnotatorConst              = "uima_annotator"
	CreateEnrichmentTypeWatsonKnowledgeStudioModelConst = "watson_knowledge_studio_model"
)

Constants associated with the CreateEnrichment.Type property. The type of this enrichment.

View Source
const (
	CreateProjectOptionsTypeContentIntelligenceConst  = "content_intelligence"
	CreateProjectOptionsTypeContentMiningConst        = "content_mining"
	CreateProjectOptionsTypeConversationalSearchConst = "conversational_search"
	CreateProjectOptionsTypeDocumentRetrievalConst    = "document_retrieval"
	CreateProjectOptionsTypeOtherConst                = "other"
)

Constants associated with the CreateProjectOptions.Type property. The type of project.

The `content_intelligence` type is a *Document Retrieval for Contracts* project and the `other` type is a *Custom* project.

The `content_mining` and `content_intelligence` types are available with Premium plan managed deployments and installed deployments only.

View Source
const (
	DocumentAcceptedStatusPendingConst    = "pending"
	DocumentAcceptedStatusProcessingConst = "processing"
)

Constants associated with the DocumentAccepted.Status property. Status of the document in the ingestion process. A status of `processing` is returned for documents that are ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others.

View Source
const (
	EnrichmentTypeDictionaryConst                   = "dictionary"
	EnrichmentTypeNaturalLanguageUnderstandingConst = "natural_language_understanding"
	EnrichmentTypePartOfSpeechConst                 = "part_of_speech"
	EnrichmentTypeRegularExpressionConst            = "regular_expression"
	EnrichmentTypeRuleBasedConst                    = "rule_based"
	EnrichmentTypeSentimentConst                    = "sentiment"
	EnrichmentTypeUimaAnnotatorConst                = "uima_annotator"
	EnrichmentTypeWatsonKnowledgeStudioModelConst   = "watson_knowledge_studio_model"
)

Constants associated with the Enrichment.Type property. The type of this enrichment.

View Source
const (
	FieldTypeBinaryConst  = "binary"
	FieldTypeBooleanConst = "boolean"
	FieldTypeByteConst    = "byte"
	FieldTypeDateConst    = "date"
	FieldTypeDoubleConst  = "double"
	FieldTypeFloatConst   = "float"
	FieldTypeIntegerConst = "integer"
	FieldTypeLongConst    = "long"
	FieldTypeNestedConst  = "nested"
	FieldTypeShortConst   = "short"
	FieldTypeStringConst  = "string"
)

Constants associated with the Field.Type property. The type of the field.

View Source
const (
	NoticeSeverityErrorConst   = "error"
	NoticeSeverityWarningConst = "warning"
)

Constants associated with the Notice.Severity property. Severity level of the notice.

View Source
const (
	ProjectDetailsTypeContentIntelligenceConst  = "content_intelligence"
	ProjectDetailsTypeContentMiningConst        = "content_mining"
	ProjectDetailsTypeConversationalSearchConst = "conversational_search"
	ProjectDetailsTypeDocumentRetrievalConst    = "document_retrieval"
	ProjectDetailsTypeOtherConst                = "other"
)

Constants associated with the ProjectDetails.Type property. The type of project.

The `content_intelligence` type is a *Document Retrieval for Contracts* project and the `other` type is a *Custom* project.

The `content_mining` and `content_intelligence` types are available with Premium plan managed deployments and installed deployments only.

View Source
const (
	ProjectListDetailsTypeContentIntelligenceConst  = "content_intelligence"
	ProjectListDetailsTypeContentMiningConst        = "content_mining"
	ProjectListDetailsTypeConversationalSearchConst = "conversational_search"
	ProjectListDetailsTypeDocumentRetrievalConst    = "document_retrieval"
	ProjectListDetailsTypeOtherConst                = "other"
)

Constants associated with the ProjectListDetails.Type property. The type of project.

The `content_intelligence` type is a *Document Retrieval for Contracts* project and the `other` type is a *Custom* project.

The `content_mining` and `content_intelligence` types are available with Premium plan managed deployments and installed deployments only.

View Source
const (
	QueryResultMetadataDocumentRetrievalSourceCurationConst = "curation"
	QueryResultMetadataDocumentRetrievalSourceSearchConst   = "search"
)

Constants associated with the QueryResultMetadata.DocumentRetrievalSource property. The document retrieval source that produced this search result.

View Source
const (
	RetrievalDetailsDocumentRetrievalStrategyRelevancyTrainingConst = "relevancy_training"
	RetrievalDetailsDocumentRetrievalStrategyUntrainedConst         = "untrained"
)

Constants associated with the RetrievalDetails.DocumentRetrievalStrategy property. Identifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results were returned using a relevancy trained model.

**Note**: In the event of trained collections being queried, but the trained model is not used to return results, the **document_retrieval_strategy** is listed as `untrained`.

View Source
const DefaultServiceName = "discovery"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://api.us-south.discovery.watson.cloud.ibm.com"

DefaultServiceURL is the default URL to make service requests to.

View Source
const (
	DeleteDocumentResponseStatusDeletedConst = "deleted"
)

Constants associated with the DeleteDocumentResponse.Status property. Status of the document. A deleted document has the status deleted.

Variables

This section is empty.

Functions

func GetServiceURLForRegion

func GetServiceURLForRegion(region string) (string, error)

GetServiceURLForRegion returns the service URL to be used for the specified region

func UnmarshalAnalyzedDocument

func UnmarshalAnalyzedDocument(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAnalyzedDocument unmarshals an instance of AnalyzedDocument from the specified map of raw messages.

func UnmarshalAnalyzedResult

func UnmarshalAnalyzedResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalAnalyzedResult unmarshals an instance of AnalyzedResult from the specified map of raw messages.

func UnmarshalCollection

func UnmarshalCollection(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCollection unmarshals an instance of Collection from the specified map of raw messages.

func UnmarshalCollectionDetails

func UnmarshalCollectionDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCollectionDetails unmarshals an instance of CollectionDetails from the specified map of raw messages.

func UnmarshalCollectionEnrichment

func UnmarshalCollectionEnrichment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCollectionEnrichment unmarshals an instance of CollectionEnrichment from the specified map of raw messages.

func UnmarshalCompletions

func UnmarshalCompletions(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCompletions unmarshals an instance of Completions from the specified map of raw messages.

func UnmarshalComponentSettingsAggregation

func UnmarshalComponentSettingsAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalComponentSettingsAggregation unmarshals an instance of ComponentSettingsAggregation from the specified map of raw messages.

func UnmarshalComponentSettingsFieldsShown

func UnmarshalComponentSettingsFieldsShown(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalComponentSettingsFieldsShown unmarshals an instance of ComponentSettingsFieldsShown from the specified map of raw messages.

func UnmarshalComponentSettingsFieldsShownBody

func UnmarshalComponentSettingsFieldsShownBody(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalComponentSettingsFieldsShownBody unmarshals an instance of ComponentSettingsFieldsShownBody from the specified map of raw messages.

func UnmarshalComponentSettingsFieldsShownTitle

func UnmarshalComponentSettingsFieldsShownTitle(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalComponentSettingsFieldsShownTitle unmarshals an instance of ComponentSettingsFieldsShownTitle from the specified map of raw messages.

func UnmarshalComponentSettingsResponse

func UnmarshalComponentSettingsResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalComponentSettingsResponse unmarshals an instance of ComponentSettingsResponse from the specified map of raw messages.

func UnmarshalCreateEnrichment

func UnmarshalCreateEnrichment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalCreateEnrichment unmarshals an instance of CreateEnrichment from the specified map of raw messages.

func UnmarshalDefaultQueryParams

func UnmarshalDefaultQueryParams(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDefaultQueryParams unmarshals an instance of DefaultQueryParams from the specified map of raw messages.

func UnmarshalDefaultQueryParamsPassages

func UnmarshalDefaultQueryParamsPassages(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDefaultQueryParamsPassages unmarshals an instance of DefaultQueryParamsPassages from the specified map of raw messages.

func UnmarshalDefaultQueryParamsSuggestedRefinements

func UnmarshalDefaultQueryParamsSuggestedRefinements(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDefaultQueryParamsSuggestedRefinements unmarshals an instance of DefaultQueryParamsSuggestedRefinements from the specified map of raw messages.

func UnmarshalDefaultQueryParamsTableResults

func UnmarshalDefaultQueryParamsTableResults(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDefaultQueryParamsTableResults unmarshals an instance of DefaultQueryParamsTableResults from the specified map of raw messages.

func UnmarshalDeleteDocumentResponse

func UnmarshalDeleteDocumentResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDeleteDocumentResponse unmarshals an instance of DeleteDocumentResponse from the specified map of raw messages.

func UnmarshalDocumentAccepted

func UnmarshalDocumentAccepted(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDocumentAccepted unmarshals an instance of DocumentAccepted from the specified map of raw messages.

func UnmarshalDocumentAttribute

func UnmarshalDocumentAttribute(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalDocumentAttribute unmarshals an instance of DocumentAttribute from the specified map of raw messages.

func UnmarshalEnrichment

func UnmarshalEnrichment(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnrichment unmarshals an instance of Enrichment from the specified map of raw messages.

func UnmarshalEnrichmentOptions

func UnmarshalEnrichmentOptions(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnrichmentOptions unmarshals an instance of EnrichmentOptions from the specified map of raw messages.

func UnmarshalEnrichments

func UnmarshalEnrichments(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalEnrichments unmarshals an instance of Enrichments from the specified map of raw messages.

func UnmarshalField

func UnmarshalField(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalField unmarshals an instance of Field from the specified map of raw messages.

func UnmarshalListCollectionsResponse

func UnmarshalListCollectionsResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListCollectionsResponse unmarshals an instance of ListCollectionsResponse from the specified map of raw messages.

func UnmarshalListFieldsResponse

func UnmarshalListFieldsResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListFieldsResponse unmarshals an instance of ListFieldsResponse from the specified map of raw messages.

func UnmarshalListProjectsResponse

func UnmarshalListProjectsResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalListProjectsResponse unmarshals an instance of ListProjectsResponse from the specified map of raw messages.

func UnmarshalNotice

func UnmarshalNotice(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalNotice unmarshals an instance of Notice from the specified map of raw messages.

func UnmarshalProjectDetails

func UnmarshalProjectDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalProjectDetails unmarshals an instance of ProjectDetails from the specified map of raw messages.

func UnmarshalProjectListDetails

func UnmarshalProjectListDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalProjectListDetails unmarshals an instance of ProjectListDetails from the specified map of raw messages.

func UnmarshalProjectListDetailsRelevancyTrainingStatus

func UnmarshalProjectListDetailsRelevancyTrainingStatus(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalProjectListDetailsRelevancyTrainingStatus unmarshals an instance of ProjectListDetailsRelevancyTrainingStatus from the specified map of raw messages.

func UnmarshalQueryAggregation

func UnmarshalQueryAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryAggregation unmarshals an instance of QueryAggregation from the specified map of raw messages.

func UnmarshalQueryCalculationAggregation

func UnmarshalQueryCalculationAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryCalculationAggregation unmarshals an instance of QueryCalculationAggregation from the specified map of raw messages.

func UnmarshalQueryFilterAggregation

func UnmarshalQueryFilterAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryFilterAggregation unmarshals an instance of QueryFilterAggregation from the specified map of raw messages.

func UnmarshalQueryGroupByAggregation

func UnmarshalQueryGroupByAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryGroupByAggregation unmarshals an instance of QueryGroupByAggregation from the specified map of raw messages.

func UnmarshalQueryGroupByAggregationResult

func UnmarshalQueryGroupByAggregationResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryGroupByAggregationResult unmarshals an instance of QueryGroupByAggregationResult from the specified map of raw messages.

func UnmarshalQueryHistogramAggregation

func UnmarshalQueryHistogramAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryHistogramAggregation unmarshals an instance of QueryHistogramAggregation from the specified map of raw messages.

func UnmarshalQueryHistogramAggregationResult

func UnmarshalQueryHistogramAggregationResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryHistogramAggregationResult unmarshals an instance of QueryHistogramAggregationResult from the specified map of raw messages.

func UnmarshalQueryLargePassages

func UnmarshalQueryLargePassages(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryLargePassages unmarshals an instance of QueryLargePassages from the specified map of raw messages.

func UnmarshalQueryLargeSuggestedRefinements

func UnmarshalQueryLargeSuggestedRefinements(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryLargeSuggestedRefinements unmarshals an instance of QueryLargeSuggestedRefinements from the specified map of raw messages.

func UnmarshalQueryLargeTableResults

func UnmarshalQueryLargeTableResults(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryLargeTableResults unmarshals an instance of QueryLargeTableResults from the specified map of raw messages.

func UnmarshalQueryNestedAggregation

func UnmarshalQueryNestedAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryNestedAggregation unmarshals an instance of QueryNestedAggregation from the specified map of raw messages.

func UnmarshalQueryNoticesResponse

func UnmarshalQueryNoticesResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryNoticesResponse unmarshals an instance of QueryNoticesResponse from the specified map of raw messages.

func UnmarshalQueryResponse

func UnmarshalQueryResponse(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryResponse unmarshals an instance of QueryResponse from the specified map of raw messages.

func UnmarshalQueryResponsePassage

func UnmarshalQueryResponsePassage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryResponsePassage unmarshals an instance of QueryResponsePassage from the specified map of raw messages.

func UnmarshalQueryResult

func UnmarshalQueryResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryResult unmarshals an instance of QueryResult from the specified map of raw messages.

func UnmarshalQueryResultMetadata

func UnmarshalQueryResultMetadata(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryResultMetadata unmarshals an instance of QueryResultMetadata from the specified map of raw messages.

func UnmarshalQueryResultPassage

func UnmarshalQueryResultPassage(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryResultPassage unmarshals an instance of QueryResultPassage from the specified map of raw messages.

func UnmarshalQuerySuggestedRefinement

func UnmarshalQuerySuggestedRefinement(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQuerySuggestedRefinement unmarshals an instance of QuerySuggestedRefinement from the specified map of raw messages.

func UnmarshalQueryTableResult

func UnmarshalQueryTableResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTableResult unmarshals an instance of QueryTableResult from the specified map of raw messages.

func UnmarshalQueryTermAggregation

func UnmarshalQueryTermAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTermAggregation unmarshals an instance of QueryTermAggregation from the specified map of raw messages.

func UnmarshalQueryTermAggregationResult

func UnmarshalQueryTermAggregationResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTermAggregationResult unmarshals an instance of QueryTermAggregationResult from the specified map of raw messages.

func UnmarshalQueryTimesliceAggregation

func UnmarshalQueryTimesliceAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTimesliceAggregation unmarshals an instance of QueryTimesliceAggregation from the specified map of raw messages.

func UnmarshalQueryTimesliceAggregationResult

func UnmarshalQueryTimesliceAggregationResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTimesliceAggregationResult unmarshals an instance of QueryTimesliceAggregationResult from the specified map of raw messages.

func UnmarshalQueryTopHitsAggregation

func UnmarshalQueryTopHitsAggregation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTopHitsAggregation unmarshals an instance of QueryTopHitsAggregation from the specified map of raw messages.

func UnmarshalQueryTopHitsAggregationResult

func UnmarshalQueryTopHitsAggregationResult(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalQueryTopHitsAggregationResult unmarshals an instance of QueryTopHitsAggregationResult from the specified map of raw messages.

func UnmarshalResultPassageAnswer added in v2.1.0

func UnmarshalResultPassageAnswer(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalResultPassageAnswer unmarshals an instance of ResultPassageAnswer from the specified map of raw messages.

func UnmarshalRetrievalDetails

func UnmarshalRetrievalDetails(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalRetrievalDetails unmarshals an instance of RetrievalDetails from the specified map of raw messages.

func UnmarshalTableBodyCells

func UnmarshalTableBodyCells(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableBodyCells unmarshals an instance of TableBodyCells from the specified map of raw messages.

func UnmarshalTableCellKey

func UnmarshalTableCellKey(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableCellKey unmarshals an instance of TableCellKey from the specified map of raw messages.

func UnmarshalTableCellValues

func UnmarshalTableCellValues(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableCellValues unmarshals an instance of TableCellValues from the specified map of raw messages.

func UnmarshalTableColumnHeaderIds

func UnmarshalTableColumnHeaderIds(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableColumnHeaderIds unmarshals an instance of TableColumnHeaderIds from the specified map of raw messages.

func UnmarshalTableColumnHeaderTexts

func UnmarshalTableColumnHeaderTexts(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableColumnHeaderTexts unmarshals an instance of TableColumnHeaderTexts from the specified map of raw messages.

func UnmarshalTableColumnHeaderTextsNormalized

func UnmarshalTableColumnHeaderTextsNormalized(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableColumnHeaderTextsNormalized unmarshals an instance of TableColumnHeaderTextsNormalized from the specified map of raw messages.

func UnmarshalTableColumnHeaders

func UnmarshalTableColumnHeaders(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableColumnHeaders unmarshals an instance of TableColumnHeaders from the specified map of raw messages.

func UnmarshalTableElementLocation

func UnmarshalTableElementLocation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableElementLocation unmarshals an instance of TableElementLocation from the specified map of raw messages.

func UnmarshalTableHeaders

func UnmarshalTableHeaders(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableHeaders unmarshals an instance of TableHeaders from the specified map of raw messages.

func UnmarshalTableKeyValuePairs

func UnmarshalTableKeyValuePairs(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableKeyValuePairs unmarshals an instance of TableKeyValuePairs from the specified map of raw messages.

func UnmarshalTableResultTable

func UnmarshalTableResultTable(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableResultTable unmarshals an instance of TableResultTable from the specified map of raw messages.

func UnmarshalTableRowHeaderIds

func UnmarshalTableRowHeaderIds(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableRowHeaderIds unmarshals an instance of TableRowHeaderIds from the specified map of raw messages.

func UnmarshalTableRowHeaderTexts

func UnmarshalTableRowHeaderTexts(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableRowHeaderTexts unmarshals an instance of TableRowHeaderTexts from the specified map of raw messages.

func UnmarshalTableRowHeaderTextsNormalized

func UnmarshalTableRowHeaderTextsNormalized(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableRowHeaderTextsNormalized unmarshals an instance of TableRowHeaderTextsNormalized from the specified map of raw messages.

func UnmarshalTableRowHeaders

func UnmarshalTableRowHeaders(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableRowHeaders unmarshals an instance of TableRowHeaders from the specified map of raw messages.

func UnmarshalTableTextLocation

func UnmarshalTableTextLocation(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTableTextLocation unmarshals an instance of TableTextLocation from the specified map of raw messages.

func UnmarshalTrainingExample

func UnmarshalTrainingExample(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTrainingExample unmarshals an instance of TrainingExample from the specified map of raw messages.

func UnmarshalTrainingQuery

func UnmarshalTrainingQuery(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTrainingQuery unmarshals an instance of TrainingQuery from the specified map of raw messages.

func UnmarshalTrainingQuerySet

func UnmarshalTrainingQuerySet(m map[string]json.RawMessage, result interface{}) (err error)

UnmarshalTrainingQuerySet unmarshals an instance of TrainingQuerySet from the specified map of raw messages.

Types

type AddDocumentOptions

type AddDocumentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// The content of the document to ingest. For maximum supported file size limits, see [the
	// documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits).
	File io.ReadCloser `json:"-"`

	// The filename for file.
	Filename *string `json:"-"`

	// The content type of file.
	FileContentType *string `json:"-"`

	// The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.
	//
	//
	// Example:  “` {
	//   "Creator": "Johnny Appleseed",
	//   "Subject": "Apples"
	// } “`.
	Metadata *string `json:"-"`

	// When `true`, the uploaded document is added to the collection even if the data for that collection is shared with
	// other collections.
	XWatsonDiscoveryForce *bool `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

AddDocumentOptions : The AddDocument options.

func (*AddDocumentOptions) SetCollectionID

func (_options *AddDocumentOptions) SetCollectionID(collectionID string) *AddDocumentOptions

SetCollectionID : Allow user to set CollectionID

func (*AddDocumentOptions) SetFile

func (_options *AddDocumentOptions) SetFile(file io.ReadCloser) *AddDocumentOptions

SetFile : Allow user to set File

func (*AddDocumentOptions) SetFileContentType

func (_options *AddDocumentOptions) SetFileContentType(fileContentType string) *AddDocumentOptions

SetFileContentType : Allow user to set FileContentType

func (*AddDocumentOptions) SetFilename

func (_options *AddDocumentOptions) SetFilename(filename string) *AddDocumentOptions

SetFilename : Allow user to set Filename

func (*AddDocumentOptions) SetHeaders

func (options *AddDocumentOptions) SetHeaders(param map[string]string) *AddDocumentOptions

SetHeaders : Allow user to set Headers

func (*AddDocumentOptions) SetMetadata

func (_options *AddDocumentOptions) SetMetadata(metadata string) *AddDocumentOptions

SetMetadata : Allow user to set Metadata

func (*AddDocumentOptions) SetProjectID

func (_options *AddDocumentOptions) SetProjectID(projectID string) *AddDocumentOptions

SetProjectID : Allow user to set ProjectID

func (*AddDocumentOptions) SetXWatsonDiscoveryForce

func (_options *AddDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *AddDocumentOptions

SetXWatsonDiscoveryForce : Allow user to set XWatsonDiscoveryForce

type AnalyzeDocumentOptions

type AnalyzeDocumentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// The content of the document to ingest. For maximum supported file size limits, see [the
	// documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits).
	File io.ReadCloser `json:"-"`

	// The filename for file.
	Filename *string `json:"-"`

	// The content type of file.
	FileContentType *string `json:"-"`

	// The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.
	//
	//
	// Example:  “` {
	//   "Creator": "Johnny Appleseed",
	//   "Subject": "Apples"
	// } “`.
	Metadata *string `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

AnalyzeDocumentOptions : The AnalyzeDocument options.

func (*AnalyzeDocumentOptions) SetCollectionID

func (_options *AnalyzeDocumentOptions) SetCollectionID(collectionID string) *AnalyzeDocumentOptions

SetCollectionID : Allow user to set CollectionID

func (*AnalyzeDocumentOptions) SetFile

SetFile : Allow user to set File

func (*AnalyzeDocumentOptions) SetFileContentType

func (_options *AnalyzeDocumentOptions) SetFileContentType(fileContentType string) *AnalyzeDocumentOptions

SetFileContentType : Allow user to set FileContentType

func (*AnalyzeDocumentOptions) SetFilename

func (_options *AnalyzeDocumentOptions) SetFilename(filename string) *AnalyzeDocumentOptions

SetFilename : Allow user to set Filename

func (*AnalyzeDocumentOptions) SetHeaders

func (options *AnalyzeDocumentOptions) SetHeaders(param map[string]string) *AnalyzeDocumentOptions

SetHeaders : Allow user to set Headers

func (*AnalyzeDocumentOptions) SetMetadata

func (_options *AnalyzeDocumentOptions) SetMetadata(metadata string) *AnalyzeDocumentOptions

SetMetadata : Allow user to set Metadata

func (*AnalyzeDocumentOptions) SetProjectID

func (_options *AnalyzeDocumentOptions) SetProjectID(projectID string) *AnalyzeDocumentOptions

SetProjectID : Allow user to set ProjectID

type AnalyzedDocument

type AnalyzedDocument struct {
	// Array of document results that match the query.
	Notices []Notice `json:"notices,omitempty"`

	// Result of the document analysis.
	Result *AnalyzedResult `json:"result,omitempty"`
}

AnalyzedDocument : An object that contains the converted document and any identified enrichments.

type AnalyzedResult

type AnalyzedResult struct {
	// Metadata of the document.
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

AnalyzedResult : Result of the document analysis.

func (*AnalyzedResult) GetProperties

func (o *AnalyzedResult) GetProperties() map[string]interface{}

GetProperties allows the user to retrieve the map of arbitrary properties from an instance of AnalyzedResult

func (*AnalyzedResult) GetProperty

func (o *AnalyzedResult) GetProperty(key string) interface{}

GetProperty allows the user to retrieve an arbitrary property from an instance of AnalyzedResult

func (*AnalyzedResult) MarshalJSON

func (o *AnalyzedResult) MarshalJSON() (buffer []byte, err error)

MarshalJSON performs custom serialization for instances of AnalyzedResult

func (*AnalyzedResult) SetProperties added in v2.2.0

func (o *AnalyzedResult) SetProperties(m map[string]interface{})

SetProperties allows the user to set a map of arbitrary properties on an instance of AnalyzedResult

func (*AnalyzedResult) SetProperty

func (o *AnalyzedResult) SetProperty(key string, value interface{})

SetProperty allows the user to set an arbitrary property on an instance of AnalyzedResult

type Collection

type Collection struct {
	// The unique identifier of the collection.
	CollectionID *string `json:"collection_id,omitempty"`

	// The name of the collection.
	Name *string `json:"name,omitempty"`
}

Collection : A collection for storing documents.

type CollectionDetails

type CollectionDetails struct {
	// The unique identifier of the collection.
	CollectionID *string `json:"collection_id,omitempty"`

	// The name of the collection.
	Name *string `json:"name" validate:"required"`

	// A description of the collection.
	Description *string `json:"description,omitempty"`

	// The date that the collection was created.
	Created *strfmt.DateTime `json:"created,omitempty"`

	// The language of the collection.
	Language *string `json:"language,omitempty"`

	// An array of enrichments that are applied to this collection.
	Enrichments []CollectionEnrichment `json:"enrichments,omitempty"`
}

CollectionDetails : A collection for storing documents.

type CollectionEnrichment

type CollectionEnrichment struct {
	// The unique identifier of this enrichment.
	EnrichmentID *string `json:"enrichment_id,omitempty"`

	// An array of field names that the enrichment is applied to.
	//
	// If you apply an enrichment to a field from a JSON file, the data is converted to an array automatically, even if the
	// field contains a single value.
	Fields []string `json:"fields,omitempty"`
}

CollectionEnrichment : An object describing an Enrichment for a collection.

type Completions

type Completions struct {
	// Array of autocomplete suggestion based on the provided prefix.
	Completions []string `json:"completions,omitempty"`
}

Completions : An object that contains an array of autocompletion suggestions.

type ComponentSettingsAggregation

type ComponentSettingsAggregation struct {
	// Identifier used to map aggregation settings to aggregation configuration.
	Name *string `json:"name,omitempty"`

	// User-friendly alias for the aggregation.
	Label *string `json:"label,omitempty"`

	// Whether users is allowed to select more than one of the aggregation terms.
	MultipleSelectionsAllowed *bool `json:"multiple_selections_allowed,omitempty"`

	// Type of visualization to use when rendering the aggregation.
	VisualizationType *string `json:"visualization_type,omitempty"`
}

ComponentSettingsAggregation : Display settings for aggregations.

type ComponentSettingsFieldsShown

type ComponentSettingsFieldsShown struct {
	// Body label.
	Body *ComponentSettingsFieldsShownBody `json:"body,omitempty"`

	// Title label.
	Title *ComponentSettingsFieldsShownTitle `json:"title,omitempty"`
}

ComponentSettingsFieldsShown : Fields shown in the results section of the UI.

type ComponentSettingsFieldsShownBody

type ComponentSettingsFieldsShownBody struct {
	// Use the whole passage as the body.
	UsePassage *bool `json:"use_passage,omitempty"`

	// Use a specific field as the title.
	Field *string `json:"field,omitempty"`
}

ComponentSettingsFieldsShownBody : Body label.

type ComponentSettingsFieldsShownTitle

type ComponentSettingsFieldsShownTitle struct {
	// Use a specific field as the title.
	Field *string `json:"field,omitempty"`
}

ComponentSettingsFieldsShownTitle : Title label.

type ComponentSettingsResponse

type ComponentSettingsResponse struct {
	// Fields shown in the results section of the UI.
	FieldsShown *ComponentSettingsFieldsShown `json:"fields_shown,omitempty"`

	// Whether or not autocomplete is enabled.
	Autocomplete *bool `json:"autocomplete,omitempty"`

	// Whether or not structured search is enabled.
	StructuredSearch *bool `json:"structured_search,omitempty"`

	// Number or results shown per page.
	ResultsPerPage *int64 `json:"results_per_page,omitempty"`

	// a list of component setting aggregations.
	Aggregations []ComponentSettingsAggregation `json:"aggregations,omitempty"`
}

ComponentSettingsResponse : The default component settings for this project.

type CreateCollectionOptions

type CreateCollectionOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The name of the collection.
	Name *string `json:"name" validate:"required"`

	// A description of the collection.
	Description *string `json:"description,omitempty"`

	// The language of the collection.
	Language *string `json:"language,omitempty"`

	// An array of enrichments that are applied to this collection.
	Enrichments []CollectionEnrichment `json:"enrichments,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateCollectionOptions : The CreateCollection options.

func (*CreateCollectionOptions) SetDescription

func (_options *CreateCollectionOptions) SetDescription(description string) *CreateCollectionOptions

SetDescription : Allow user to set Description

func (*CreateCollectionOptions) SetEnrichments

func (_options *CreateCollectionOptions) SetEnrichments(enrichments []CollectionEnrichment) *CreateCollectionOptions

SetEnrichments : Allow user to set Enrichments

func (*CreateCollectionOptions) SetHeaders

func (options *CreateCollectionOptions) SetHeaders(param map[string]string) *CreateCollectionOptions

SetHeaders : Allow user to set Headers

func (*CreateCollectionOptions) SetLanguage

func (_options *CreateCollectionOptions) SetLanguage(language string) *CreateCollectionOptions

SetLanguage : Allow user to set Language

func (*CreateCollectionOptions) SetName

func (_options *CreateCollectionOptions) SetName(name string) *CreateCollectionOptions

SetName : Allow user to set Name

func (*CreateCollectionOptions) SetProjectID

func (_options *CreateCollectionOptions) SetProjectID(projectID string) *CreateCollectionOptions

SetProjectID : Allow user to set ProjectID

type CreateEnrichment

type CreateEnrichment struct {
	// The human readable name for this enrichment.
	Name *string `json:"name,omitempty"`

	// The description of this enrichment.
	Description *string `json:"description,omitempty"`

	// The type of this enrichment.
	Type *string `json:"type,omitempty"`

	// An object that contains options for the current enrichment. Starting with version `2020-08-30`, the enrichment
	// options are not included in responses from the List Enrichments method.
	Options *EnrichmentOptions `json:"options,omitempty"`
}

CreateEnrichment : Information about a specific enrichment.

type CreateEnrichmentOptions

type CreateEnrichmentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Information about a specific enrichment.
	Enrichment *CreateEnrichment `json:"-" validate:"required"`

	// The enrichment file to upload.
	File io.ReadCloser `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateEnrichmentOptions : The CreateEnrichment options.

func (*CreateEnrichmentOptions) SetEnrichment

func (_options *CreateEnrichmentOptions) SetEnrichment(enrichment *CreateEnrichment) *CreateEnrichmentOptions

SetEnrichment : Allow user to set Enrichment

func (*CreateEnrichmentOptions) SetFile

SetFile : Allow user to set File

func (*CreateEnrichmentOptions) SetHeaders

func (options *CreateEnrichmentOptions) SetHeaders(param map[string]string) *CreateEnrichmentOptions

SetHeaders : Allow user to set Headers

func (*CreateEnrichmentOptions) SetProjectID

func (_options *CreateEnrichmentOptions) SetProjectID(projectID string) *CreateEnrichmentOptions

SetProjectID : Allow user to set ProjectID

type CreateProjectOptions

type CreateProjectOptions struct {
	// The human readable name of this project.
	Name *string `json:"name" validate:"required"`

	// The type of project.
	//
	// The `content_intelligence` type is a *Document Retrieval for Contracts* project and the `other` type is a *Custom*
	// project.
	//
	// The `content_mining` and `content_intelligence` types are available with Premium plan managed deployments and
	// installed deployments only.
	Type *string `json:"type" validate:"required"`

	// Default query parameters for this project.
	DefaultQueryParameters *DefaultQueryParams `json:"default_query_parameters,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateProjectOptions : The CreateProject options.

func (*CreateProjectOptions) SetDefaultQueryParameters

func (_options *CreateProjectOptions) SetDefaultQueryParameters(defaultQueryParameters *DefaultQueryParams) *CreateProjectOptions

SetDefaultQueryParameters : Allow user to set DefaultQueryParameters

func (*CreateProjectOptions) SetHeaders

func (options *CreateProjectOptions) SetHeaders(param map[string]string) *CreateProjectOptions

SetHeaders : Allow user to set Headers

func (*CreateProjectOptions) SetName

func (_options *CreateProjectOptions) SetName(name string) *CreateProjectOptions

SetName : Allow user to set Name

func (*CreateProjectOptions) SetType

func (_options *CreateProjectOptions) SetType(typeVar string) *CreateProjectOptions

SetType : Allow user to set Type

type CreateTrainingQueryOptions

type CreateTrainingQueryOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The natural text query for the training query.
	NaturalLanguageQuery *string `json:"natural_language_query" validate:"required"`

	// Array of training examples.
	Examples []TrainingExample `json:"examples" validate:"required"`

	// The filter used on the collection before the **natural_language_query** is applied.
	Filter *string `json:"filter,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

CreateTrainingQueryOptions : The CreateTrainingQuery options.

func (*CreateTrainingQueryOptions) SetExamples

func (_options *CreateTrainingQueryOptions) SetExamples(examples []TrainingExample) *CreateTrainingQueryOptions

SetExamples : Allow user to set Examples

func (*CreateTrainingQueryOptions) SetFilter

func (_options *CreateTrainingQueryOptions) SetFilter(filter string) *CreateTrainingQueryOptions

SetFilter : Allow user to set Filter

func (*CreateTrainingQueryOptions) SetHeaders

func (options *CreateTrainingQueryOptions) SetHeaders(param map[string]string) *CreateTrainingQueryOptions

SetHeaders : Allow user to set Headers

func (*CreateTrainingQueryOptions) SetNaturalLanguageQuery

func (_options *CreateTrainingQueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *CreateTrainingQueryOptions

SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery

func (*CreateTrainingQueryOptions) SetProjectID

func (_options *CreateTrainingQueryOptions) SetProjectID(projectID string) *CreateTrainingQueryOptions

SetProjectID : Allow user to set ProjectID

type DefaultQueryParams

type DefaultQueryParams struct {
	// An array of collection identifiers to query. If empty or omitted all collections in the project are queried.
	CollectionIds []string `json:"collection_ids,omitempty"`

	// Default settings configuration for passage search options.
	Passages *DefaultQueryParamsPassages `json:"passages,omitempty"`

	// Default project query settings for table results.
	TableResults *DefaultQueryParamsTableResults `json:"table_results,omitempty"`

	// A string representing the default aggregation query for the project.
	Aggregation *string `json:"aggregation,omitempty"`

	// Object that contains suggested refinement settings. Available with Premium plans only.
	SuggestedRefinements *DefaultQueryParamsSuggestedRefinements `json:"suggested_refinements,omitempty"`

	// When `true`, a spelling suggestions for the query are returned by default.
	SpellingSuggestions *bool `json:"spelling_suggestions,omitempty"`

	// When `true`, a highlights for the query are returned by default.
	Highlight *bool `json:"highlight,omitempty"`

	// The number of document results returned by default.
	Count *int64 `json:"count,omitempty"`

	// A comma separated list of document fields to sort results by default.
	Sort *string `json:"sort,omitempty"`

	// An array of field names to return in document results if present by default.
	Return []string `json:"return,omitempty"`
}

DefaultQueryParams : Default query parameters for this project.

type DefaultQueryParamsPassages

type DefaultQueryParamsPassages struct {
	// When `true`, a passage search is performed by default.
	Enabled *bool `json:"enabled,omitempty"`

	// The number of passages to return.
	Count *int64 `json:"count,omitempty"`

	// An array of field names to perform the passage search on.
	Fields []string `json:"fields,omitempty"`

	// The approximate number of characters that each returned passage will contain.
	Characters *int64 `json:"characters,omitempty"`

	// When `true` the number of passages that can be returned from a single document is restricted to the
	// *max_per_document* value.
	PerDocument *bool `json:"per_document,omitempty"`

	// The default maximum number of passages that can be taken from a single document as the result of a passage query.
	MaxPerDocument *int64 `json:"max_per_document,omitempty"`
}

DefaultQueryParamsPassages : Default settings configuration for passage search options.

type DefaultQueryParamsSuggestedRefinements

type DefaultQueryParamsSuggestedRefinements struct {
	// When `true`, suggested refinements for the query are returned by default.
	Enabled *bool `json:"enabled,omitempty"`

	// The number of suggested refinements to return by default.
	Count *int64 `json:"count,omitempty"`
}

DefaultQueryParamsSuggestedRefinements : Object that contains suggested refinement settings. Available with Premium plans only.

type DefaultQueryParamsTableResults

type DefaultQueryParamsTableResults struct {
	// When `true`, a table results for the query are returned by default.
	Enabled *bool `json:"enabled,omitempty"`

	// The number of table results to return by default.
	Count *int64 `json:"count,omitempty"`

	// The number of table results to include in each result document.
	PerDocument *int64 `json:"per_document,omitempty"`
}

DefaultQueryParamsTableResults : Default project query settings for table results.

type DeleteCollectionOptions

type DeleteCollectionOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteCollectionOptions : The DeleteCollection options.

func (*DeleteCollectionOptions) SetCollectionID

func (_options *DeleteCollectionOptions) SetCollectionID(collectionID string) *DeleteCollectionOptions

SetCollectionID : Allow user to set CollectionID

func (*DeleteCollectionOptions) SetHeaders

func (options *DeleteCollectionOptions) SetHeaders(param map[string]string) *DeleteCollectionOptions

SetHeaders : Allow user to set Headers

func (*DeleteCollectionOptions) SetProjectID

func (_options *DeleteCollectionOptions) SetProjectID(projectID string) *DeleteCollectionOptions

SetProjectID : Allow user to set ProjectID

type DeleteDocumentOptions

type DeleteDocumentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// The ID of the document.
	DocumentID *string `json:"-" validate:"required,ne="`

	// When `true`, the uploaded document is added to the collection even if the data for that collection is shared with
	// other collections.
	XWatsonDiscoveryForce *bool `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteDocumentOptions : The DeleteDocument options.

func (*DeleteDocumentOptions) SetCollectionID

func (_options *DeleteDocumentOptions) SetCollectionID(collectionID string) *DeleteDocumentOptions

SetCollectionID : Allow user to set CollectionID

func (*DeleteDocumentOptions) SetDocumentID

func (_options *DeleteDocumentOptions) SetDocumentID(documentID string) *DeleteDocumentOptions

SetDocumentID : Allow user to set DocumentID

func (*DeleteDocumentOptions) SetHeaders

func (options *DeleteDocumentOptions) SetHeaders(param map[string]string) *DeleteDocumentOptions

SetHeaders : Allow user to set Headers

func (*DeleteDocumentOptions) SetProjectID

func (_options *DeleteDocumentOptions) SetProjectID(projectID string) *DeleteDocumentOptions

SetProjectID : Allow user to set ProjectID

func (*DeleteDocumentOptions) SetXWatsonDiscoveryForce

func (_options *DeleteDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *DeleteDocumentOptions

SetXWatsonDiscoveryForce : Allow user to set XWatsonDiscoveryForce

type DeleteDocumentResponse

type DeleteDocumentResponse struct {
	// The unique identifier of the document.
	DocumentID *string `json:"document_id,omitempty"`

	// Status of the document. A deleted document has the status deleted.
	Status *string `json:"status,omitempty"`
}

DeleteDocumentResponse : Information returned when a document is deleted.

type DeleteEnrichmentOptions

type DeleteEnrichmentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the enrichment.
	EnrichmentID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteEnrichmentOptions : The DeleteEnrichment options.

func (*DeleteEnrichmentOptions) SetEnrichmentID

func (_options *DeleteEnrichmentOptions) SetEnrichmentID(enrichmentID string) *DeleteEnrichmentOptions

SetEnrichmentID : Allow user to set EnrichmentID

func (*DeleteEnrichmentOptions) SetHeaders

func (options *DeleteEnrichmentOptions) SetHeaders(param map[string]string) *DeleteEnrichmentOptions

SetHeaders : Allow user to set Headers

func (*DeleteEnrichmentOptions) SetProjectID

func (_options *DeleteEnrichmentOptions) SetProjectID(projectID string) *DeleteEnrichmentOptions

SetProjectID : Allow user to set ProjectID

type DeleteProjectOptions

type DeleteProjectOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteProjectOptions : The DeleteProject options.

func (*DeleteProjectOptions) SetHeaders

func (options *DeleteProjectOptions) SetHeaders(param map[string]string) *DeleteProjectOptions

SetHeaders : Allow user to set Headers

func (*DeleteProjectOptions) SetProjectID

func (_options *DeleteProjectOptions) SetProjectID(projectID string) *DeleteProjectOptions

SetProjectID : Allow user to set ProjectID

type DeleteTrainingQueriesOptions

type DeleteTrainingQueriesOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteTrainingQueriesOptions : The DeleteTrainingQueries options.

func (*DeleteTrainingQueriesOptions) SetHeaders

SetHeaders : Allow user to set Headers

func (*DeleteTrainingQueriesOptions) SetProjectID

func (_options *DeleteTrainingQueriesOptions) SetProjectID(projectID string) *DeleteTrainingQueriesOptions

SetProjectID : Allow user to set ProjectID

type DeleteTrainingQueryOptions added in v2.1.0

type DeleteTrainingQueryOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the query used for training.
	QueryID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteTrainingQueryOptions : The DeleteTrainingQuery options.

func (*DeleteTrainingQueryOptions) SetHeaders added in v2.1.0

func (options *DeleteTrainingQueryOptions) SetHeaders(param map[string]string) *DeleteTrainingQueryOptions

SetHeaders : Allow user to set Headers

func (*DeleteTrainingQueryOptions) SetProjectID added in v2.1.0

func (_options *DeleteTrainingQueryOptions) SetProjectID(projectID string) *DeleteTrainingQueryOptions

SetProjectID : Allow user to set ProjectID

func (*DeleteTrainingQueryOptions) SetQueryID added in v2.1.0

func (_options *DeleteTrainingQueryOptions) SetQueryID(queryID string) *DeleteTrainingQueryOptions

SetQueryID : Allow user to set QueryID

type DeleteUserDataOptions

type DeleteUserDataOptions struct {
	// The customer ID for which all data is to be deleted.
	CustomerID *string `json:"-" validate:"required"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

DeleteUserDataOptions : The DeleteUserData options.

func (*DeleteUserDataOptions) SetCustomerID

func (_options *DeleteUserDataOptions) SetCustomerID(customerID string) *DeleteUserDataOptions

SetCustomerID : Allow user to set CustomerID

func (*DeleteUserDataOptions) SetHeaders

func (options *DeleteUserDataOptions) SetHeaders(param map[string]string) *DeleteUserDataOptions

SetHeaders : Allow user to set Headers

type DiscoveryV2

type DiscoveryV2 struct {
	Service *core.BaseService

	// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is
	// `2020-08-30`.
	Version *string
}

DiscoveryV2 : IBM Watson™ Discovery is a cognitive search and content analytics engine that you can add to applications to identify patterns, trends and actionable insights to drive better decision-making. Securely unify structured and unstructured data with pre-enriched content, and use a simplified query language to eliminate the need for manual filtering of results.

API Version: 2.0 See: https://cloud.ibm.com/docs/discovery-data

func NewDiscoveryV2

func NewDiscoveryV2(options *DiscoveryV2Options) (service *DiscoveryV2, err error)

NewDiscoveryV2 : constructs an instance of DiscoveryV2 with passed in options.

func (*DiscoveryV2) AddDocument

func (discovery *DiscoveryV2) AddDocument(addDocumentOptions *AddDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)

AddDocument : Add a document Add a document to a collection with optional metadata.

Returns immediately after the system has accepted the document for processing.

  • The user must provide document content, metadata, or both. If the request is missing both document content and

metadata, it is rejected.

  • You can set the **Content-Type** parameter on the **file** part to indicate the media type of the document. If

the **Content-Type** parameter is missing or is one of the generic media types (for example, `application/octet-stream`), then the service attempts to automatically detect the document's media type.

  • The following field names are reserved and are filtered out if present after normalization: `id`, `score`,

`highlight`, and any field with the prefix of: `_`, `+`, or `-`

  • Fields with empty name values after normalization are filtered out before indexing.

  • Fields that contain the following characters after normalization are filtered out before indexing: `#` and `,`

    If the document is uploaded to a collection that shares its data with another collection, the

**X-Watson-Discovery-Force** header must be set to `true`.

**Note:** You can assign an ID to a document that you add by appending the ID to the endpoint (`/v2/projects/{project_id}/collections/{collection_id}/documents/{document_id}`). If a document already exists with the specified ID, it is replaced.

**Note:** This operation works with a file upload collection. It cannot be used to modify a collection that crawls an external data source.

func (*DiscoveryV2) AddDocumentWithContext

func (discovery *DiscoveryV2) AddDocumentWithContext(ctx context.Context, addDocumentOptions *AddDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)

AddDocumentWithContext is an alternate form of the AddDocument method which supports a Context parameter

func (*DiscoveryV2) AnalyzeDocument

func (discovery *DiscoveryV2) AnalyzeDocument(analyzeDocumentOptions *AnalyzeDocumentOptions) (result *AnalyzedDocument, response *core.DetailedResponse, err error)

AnalyzeDocument : Analyze a Document Process a document and return it for realtime use. Supports JSON files only.

The document is processed according to the collection's configuration settings but is not stored in the collection.

**Note:** This method is supported on installed instances of Discovery only.

func (*DiscoveryV2) AnalyzeDocumentWithContext

func (discovery *DiscoveryV2) AnalyzeDocumentWithContext(ctx context.Context, analyzeDocumentOptions *AnalyzeDocumentOptions) (result *AnalyzedDocument, response *core.DetailedResponse, err error)

AnalyzeDocumentWithContext is an alternate form of the AnalyzeDocument method which supports a Context parameter

func (*DiscoveryV2) Clone

func (discovery *DiscoveryV2) Clone() *DiscoveryV2

Clone makes a copy of "discovery" suitable for processing requests.

func (*DiscoveryV2) CreateCollection

func (discovery *DiscoveryV2) CreateCollection(createCollectionOptions *CreateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)

CreateCollection : Create a collection Create a new collection in the specified project.

func (*DiscoveryV2) CreateCollectionWithContext

func (discovery *DiscoveryV2) CreateCollectionWithContext(ctx context.Context, createCollectionOptions *CreateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)

CreateCollectionWithContext is an alternate form of the CreateCollection method which supports a Context parameter

func (*DiscoveryV2) CreateEnrichment

func (discovery *DiscoveryV2) CreateEnrichment(createEnrichmentOptions *CreateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)

CreateEnrichment : Create an enrichment Create an enrichment for use with the specified project.

func (*DiscoveryV2) CreateEnrichmentWithContext

func (discovery *DiscoveryV2) CreateEnrichmentWithContext(ctx context.Context, createEnrichmentOptions *CreateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)

CreateEnrichmentWithContext is an alternate form of the CreateEnrichment method which supports a Context parameter

func (*DiscoveryV2) CreateProject

func (discovery *DiscoveryV2) CreateProject(createProjectOptions *CreateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)

CreateProject : Create a Project Create a new project for this instance.

func (*DiscoveryV2) CreateProjectWithContext

func (discovery *DiscoveryV2) CreateProjectWithContext(ctx context.Context, createProjectOptions *CreateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)

CreateProjectWithContext is an alternate form of the CreateProject method which supports a Context parameter

func (*DiscoveryV2) CreateTrainingQuery

func (discovery *DiscoveryV2) CreateTrainingQuery(createTrainingQueryOptions *CreateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)

CreateTrainingQuery : Create training query Add a query to the training data for this project. The query can contain a filter and natural language query.

func (*DiscoveryV2) CreateTrainingQueryWithContext

func (discovery *DiscoveryV2) CreateTrainingQueryWithContext(ctx context.Context, createTrainingQueryOptions *CreateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)

CreateTrainingQueryWithContext is an alternate form of the CreateTrainingQuery method which supports a Context parameter

func (*DiscoveryV2) DeleteCollection

func (discovery *DiscoveryV2) DeleteCollection(deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)

DeleteCollection : Delete a collection Deletes the specified collection from the project. All documents stored in the specified collection and not shared is also deleted.

func (*DiscoveryV2) DeleteCollectionWithContext

func (discovery *DiscoveryV2) DeleteCollectionWithContext(ctx context.Context, deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)

DeleteCollectionWithContext is an alternate form of the DeleteCollection method which supports a Context parameter

func (*DiscoveryV2) DeleteDocument

func (discovery *DiscoveryV2) DeleteDocument(deleteDocumentOptions *DeleteDocumentOptions) (result *DeleteDocumentResponse, response *core.DetailedResponse, err error)

DeleteDocument : Delete a document If the given document ID is invalid, or if the document is not found, then the a success response is returned (HTTP status code `200`) with the status set to 'deleted'.

**Note:** This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.

**Note:** Segments of an uploaded document cannot be deleted individually. Delete all segments by deleting using the `parent_document_id` of a segment result.

func (*DiscoveryV2) DeleteDocumentWithContext

func (discovery *DiscoveryV2) DeleteDocumentWithContext(ctx context.Context, deleteDocumentOptions *DeleteDocumentOptions) (result *DeleteDocumentResponse, response *core.DetailedResponse, err error)

DeleteDocumentWithContext is an alternate form of the DeleteDocument method which supports a Context parameter

func (*DiscoveryV2) DeleteEnrichment

func (discovery *DiscoveryV2) DeleteEnrichment(deleteEnrichmentOptions *DeleteEnrichmentOptions) (response *core.DetailedResponse, err error)

DeleteEnrichment : Delete an enrichment Deletes an existing enrichment from the specified project.

**Note:** Only enrichments that have been manually created can be deleted.

func (*DiscoveryV2) DeleteEnrichmentWithContext

func (discovery *DiscoveryV2) DeleteEnrichmentWithContext(ctx context.Context, deleteEnrichmentOptions *DeleteEnrichmentOptions) (response *core.DetailedResponse, err error)

DeleteEnrichmentWithContext is an alternate form of the DeleteEnrichment method which supports a Context parameter

func (*DiscoveryV2) DeleteProject

func (discovery *DiscoveryV2) DeleteProject(deleteProjectOptions *DeleteProjectOptions) (response *core.DetailedResponse, err error)

DeleteProject : Delete a project Deletes the specified project.

**Important:** Deleting a project deletes everything that is part of the specified project, including all collections.

func (*DiscoveryV2) DeleteProjectWithContext

func (discovery *DiscoveryV2) DeleteProjectWithContext(ctx context.Context, deleteProjectOptions *DeleteProjectOptions) (response *core.DetailedResponse, err error)

DeleteProjectWithContext is an alternate form of the DeleteProject method which supports a Context parameter

func (*DiscoveryV2) DeleteTrainingQueries

func (discovery *DiscoveryV2) DeleteTrainingQueries(deleteTrainingQueriesOptions *DeleteTrainingQueriesOptions) (response *core.DetailedResponse, err error)

DeleteTrainingQueries : Delete training queries Removes all training queries for the specified project.

func (*DiscoveryV2) DeleteTrainingQueriesWithContext

func (discovery *DiscoveryV2) DeleteTrainingQueriesWithContext(ctx context.Context, deleteTrainingQueriesOptions *DeleteTrainingQueriesOptions) (response *core.DetailedResponse, err error)

DeleteTrainingQueriesWithContext is an alternate form of the DeleteTrainingQueries method which supports a Context parameter

func (*DiscoveryV2) DeleteTrainingQuery added in v2.1.0

func (discovery *DiscoveryV2) DeleteTrainingQuery(deleteTrainingQueryOptions *DeleteTrainingQueryOptions) (response *core.DetailedResponse, err error)

DeleteTrainingQuery : Delete a training data query Removes details from a training data query, including the query string and all examples.

func (*DiscoveryV2) DeleteTrainingQueryWithContext added in v2.1.0

func (discovery *DiscoveryV2) DeleteTrainingQueryWithContext(ctx context.Context, deleteTrainingQueryOptions *DeleteTrainingQueryOptions) (response *core.DetailedResponse, err error)

DeleteTrainingQueryWithContext is an alternate form of the DeleteTrainingQuery method which supports a Context parameter

func (*DiscoveryV2) DeleteUserData

func (discovery *DiscoveryV2) DeleteUserData(deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)

DeleteUserData : Delete labeled data Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with the customer ID.

You associate a customer ID with data by passing the **X-Watson-Metadata** header with a request that passes data. For more information about personal data and customer IDs, see [Information security](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-information-security#information-security).

**Note:** This method is only supported on IBM Cloud instances of Discovery.

func (*DiscoveryV2) DeleteUserDataWithContext

func (discovery *DiscoveryV2) DeleteUserDataWithContext(ctx context.Context, deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)

DeleteUserDataWithContext is an alternate form of the DeleteUserData method which supports a Context parameter

func (*DiscoveryV2) DisableRetries

func (discovery *DiscoveryV2) DisableRetries()

DisableRetries disables automatic retries for requests invoked for this service instance.

func (*DiscoveryV2) DisableSSLVerification

func (discovery *DiscoveryV2) DisableSSLVerification()

DisableSSLVerification bypasses verification of the server's SSL certificate

func (*DiscoveryV2) EnableRetries

func (discovery *DiscoveryV2) EnableRetries(maxRetries int, maxRetryInterval time.Duration)

EnableRetries enables automatic retries for requests invoked for this service instance. If either parameter is specified as 0, then a default value is used instead.

func (*DiscoveryV2) GetAutocompletion

func (discovery *DiscoveryV2) GetAutocompletion(getAutocompletionOptions *GetAutocompletionOptions) (result *Completions, response *core.DetailedResponse, err error)

GetAutocompletion : Get Autocomplete Suggestions Returns completion query suggestions for the specified prefix.

func (*DiscoveryV2) GetAutocompletionWithContext

func (discovery *DiscoveryV2) GetAutocompletionWithContext(ctx context.Context, getAutocompletionOptions *GetAutocompletionOptions) (result *Completions, response *core.DetailedResponse, err error)

GetAutocompletionWithContext is an alternate form of the GetAutocompletion method which supports a Context parameter

func (*DiscoveryV2) GetCollection

func (discovery *DiscoveryV2) GetCollection(getCollectionOptions *GetCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)

GetCollection : Get collection Get details about the specified collection.

func (*DiscoveryV2) GetCollectionWithContext

func (discovery *DiscoveryV2) GetCollectionWithContext(ctx context.Context, getCollectionOptions *GetCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)

GetCollectionWithContext is an alternate form of the GetCollection method which supports a Context parameter

func (*DiscoveryV2) GetComponentSettings

func (discovery *DiscoveryV2) GetComponentSettings(getComponentSettingsOptions *GetComponentSettingsOptions) (result *ComponentSettingsResponse, response *core.DetailedResponse, err error)

GetComponentSettings : List component settings Returns default configuration settings for components.

func (*DiscoveryV2) GetComponentSettingsWithContext

func (discovery *DiscoveryV2) GetComponentSettingsWithContext(ctx context.Context, getComponentSettingsOptions *GetComponentSettingsOptions) (result *ComponentSettingsResponse, response *core.DetailedResponse, err error)

GetComponentSettingsWithContext is an alternate form of the GetComponentSettings method which supports a Context parameter

func (*DiscoveryV2) GetEnableGzipCompression

func (discovery *DiscoveryV2) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*DiscoveryV2) GetEnrichment

func (discovery *DiscoveryV2) GetEnrichment(getEnrichmentOptions *GetEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)

GetEnrichment : Get enrichment Get details about a specific enrichment.

func (*DiscoveryV2) GetEnrichmentWithContext

func (discovery *DiscoveryV2) GetEnrichmentWithContext(ctx context.Context, getEnrichmentOptions *GetEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)

GetEnrichmentWithContext is an alternate form of the GetEnrichment method which supports a Context parameter

func (*DiscoveryV2) GetProject

func (discovery *DiscoveryV2) GetProject(getProjectOptions *GetProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)

GetProject : Get project Get details on the specified project.

func (*DiscoveryV2) GetProjectWithContext

func (discovery *DiscoveryV2) GetProjectWithContext(ctx context.Context, getProjectOptions *GetProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)

GetProjectWithContext is an alternate form of the GetProject method which supports a Context parameter

func (*DiscoveryV2) GetServiceURL

func (discovery *DiscoveryV2) GetServiceURL() string

GetServiceURL returns the service URL

func (*DiscoveryV2) GetTrainingQuery

func (discovery *DiscoveryV2) GetTrainingQuery(getTrainingQueryOptions *GetTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)

GetTrainingQuery : Get a training data query Get details for a specific training data query, including the query string and all examples.

func (*DiscoveryV2) GetTrainingQueryWithContext

func (discovery *DiscoveryV2) GetTrainingQueryWithContext(ctx context.Context, getTrainingQueryOptions *GetTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)

GetTrainingQueryWithContext is an alternate form of the GetTrainingQuery method which supports a Context parameter

func (*DiscoveryV2) ListCollections

func (discovery *DiscoveryV2) ListCollections(listCollectionsOptions *ListCollectionsOptions) (result *ListCollectionsResponse, response *core.DetailedResponse, err error)

ListCollections : List collections Lists existing collections for the specified project.

func (*DiscoveryV2) ListCollectionsWithContext

func (discovery *DiscoveryV2) ListCollectionsWithContext(ctx context.Context, listCollectionsOptions *ListCollectionsOptions) (result *ListCollectionsResponse, response *core.DetailedResponse, err error)

ListCollectionsWithContext is an alternate form of the ListCollections method which supports a Context parameter

func (*DiscoveryV2) ListEnrichments

func (discovery *DiscoveryV2) ListEnrichments(listEnrichmentsOptions *ListEnrichmentsOptions) (result *Enrichments, response *core.DetailedResponse, err error)

ListEnrichments : List Enrichments Lists the enrichments available to this project. The *Part of Speech* and *Sentiment of Phrases* enrichments might be listed, but are reserved for internal use only.

func (*DiscoveryV2) ListEnrichmentsWithContext

func (discovery *DiscoveryV2) ListEnrichmentsWithContext(ctx context.Context, listEnrichmentsOptions *ListEnrichmentsOptions) (result *Enrichments, response *core.DetailedResponse, err error)

ListEnrichmentsWithContext is an alternate form of the ListEnrichments method which supports a Context parameter

func (*DiscoveryV2) ListFields

func (discovery *DiscoveryV2) ListFields(listFieldsOptions *ListFieldsOptions) (result *ListFieldsResponse, response *core.DetailedResponse, err error)

ListFields : List fields Gets a list of the unique fields (and their types) stored in the the specified collections.

func (*DiscoveryV2) ListFieldsWithContext

func (discovery *DiscoveryV2) ListFieldsWithContext(ctx context.Context, listFieldsOptions *ListFieldsOptions) (result *ListFieldsResponse, response *core.DetailedResponse, err error)

ListFieldsWithContext is an alternate form of the ListFields method which supports a Context parameter

func (*DiscoveryV2) ListProjects

func (discovery *DiscoveryV2) ListProjects(listProjectsOptions *ListProjectsOptions) (result *ListProjectsResponse, response *core.DetailedResponse, err error)

ListProjects : List projects Lists existing projects for this instance.

func (*DiscoveryV2) ListProjectsWithContext

func (discovery *DiscoveryV2) ListProjectsWithContext(ctx context.Context, listProjectsOptions *ListProjectsOptions) (result *ListProjectsResponse, response *core.DetailedResponse, err error)

ListProjectsWithContext is an alternate form of the ListProjects method which supports a Context parameter

func (*DiscoveryV2) ListTrainingQueries

func (discovery *DiscoveryV2) ListTrainingQueries(listTrainingQueriesOptions *ListTrainingQueriesOptions) (result *TrainingQuerySet, response *core.DetailedResponse, err error)

ListTrainingQueries : List training queries List the training queries for the specified project.

func (*DiscoveryV2) ListTrainingQueriesWithContext

func (discovery *DiscoveryV2) ListTrainingQueriesWithContext(ctx context.Context, listTrainingQueriesOptions *ListTrainingQueriesOptions) (result *TrainingQuerySet, response *core.DetailedResponse, err error)

ListTrainingQueriesWithContext is an alternate form of the ListTrainingQueries method which supports a Context parameter

func (*DiscoveryV2) NewAddDocumentOptions

func (*DiscoveryV2) NewAddDocumentOptions(projectID string, collectionID string) *AddDocumentOptions

NewAddDocumentOptions : Instantiate AddDocumentOptions

func (*DiscoveryV2) NewAnalyzeDocumentOptions

func (*DiscoveryV2) NewAnalyzeDocumentOptions(projectID string, collectionID string) *AnalyzeDocumentOptions

NewAnalyzeDocumentOptions : Instantiate AnalyzeDocumentOptions

func (*DiscoveryV2) NewCollectionDetails

func (*DiscoveryV2) NewCollectionDetails(name string) (_model *CollectionDetails, err error)

NewCollectionDetails : Instantiate CollectionDetails (Generic Model Constructor)

func (*DiscoveryV2) NewCreateCollectionOptions

func (*DiscoveryV2) NewCreateCollectionOptions(projectID string, name string) *CreateCollectionOptions

NewCreateCollectionOptions : Instantiate CreateCollectionOptions

func (*DiscoveryV2) NewCreateEnrichmentOptions

func (*DiscoveryV2) NewCreateEnrichmentOptions(projectID string, enrichment *CreateEnrichment) *CreateEnrichmentOptions

NewCreateEnrichmentOptions : Instantiate CreateEnrichmentOptions

func (*DiscoveryV2) NewCreateProjectOptions

func (*DiscoveryV2) NewCreateProjectOptions(name string, typeVar string) *CreateProjectOptions

NewCreateProjectOptions : Instantiate CreateProjectOptions

func (*DiscoveryV2) NewCreateTrainingQueryOptions

func (*DiscoveryV2) NewCreateTrainingQueryOptions(projectID string, naturalLanguageQuery string, examples []TrainingExample) *CreateTrainingQueryOptions

NewCreateTrainingQueryOptions : Instantiate CreateTrainingQueryOptions

func (*DiscoveryV2) NewDeleteCollectionOptions

func (*DiscoveryV2) NewDeleteCollectionOptions(projectID string, collectionID string) *DeleteCollectionOptions

NewDeleteCollectionOptions : Instantiate DeleteCollectionOptions

func (*DiscoveryV2) NewDeleteDocumentOptions

func (*DiscoveryV2) NewDeleteDocumentOptions(projectID string, collectionID string, documentID string) *DeleteDocumentOptions

NewDeleteDocumentOptions : Instantiate DeleteDocumentOptions

func (*DiscoveryV2) NewDeleteEnrichmentOptions

func (*DiscoveryV2) NewDeleteEnrichmentOptions(projectID string, enrichmentID string) *DeleteEnrichmentOptions

NewDeleteEnrichmentOptions : Instantiate DeleteEnrichmentOptions

func (*DiscoveryV2) NewDeleteProjectOptions

func (*DiscoveryV2) NewDeleteProjectOptions(projectID string) *DeleteProjectOptions

NewDeleteProjectOptions : Instantiate DeleteProjectOptions

func (*DiscoveryV2) NewDeleteTrainingQueriesOptions

func (*DiscoveryV2) NewDeleteTrainingQueriesOptions(projectID string) *DeleteTrainingQueriesOptions

NewDeleteTrainingQueriesOptions : Instantiate DeleteTrainingQueriesOptions

func (*DiscoveryV2) NewDeleteTrainingQueryOptions added in v2.1.0

func (*DiscoveryV2) NewDeleteTrainingQueryOptions(projectID string, queryID string) *DeleteTrainingQueryOptions

NewDeleteTrainingQueryOptions : Instantiate DeleteTrainingQueryOptions

func (*DiscoveryV2) NewDeleteUserDataOptions

func (*DiscoveryV2) NewDeleteUserDataOptions(customerID string) *DeleteUserDataOptions

NewDeleteUserDataOptions : Instantiate DeleteUserDataOptions

func (*DiscoveryV2) NewGetAutocompletionOptions

func (*DiscoveryV2) NewGetAutocompletionOptions(projectID string, prefix string) *GetAutocompletionOptions

NewGetAutocompletionOptions : Instantiate GetAutocompletionOptions

func (*DiscoveryV2) NewGetCollectionOptions

func (*DiscoveryV2) NewGetCollectionOptions(projectID string, collectionID string) *GetCollectionOptions

NewGetCollectionOptions : Instantiate GetCollectionOptions

func (*DiscoveryV2) NewGetComponentSettingsOptions

func (*DiscoveryV2) NewGetComponentSettingsOptions(projectID string) *GetComponentSettingsOptions

NewGetComponentSettingsOptions : Instantiate GetComponentSettingsOptions

func (*DiscoveryV2) NewGetEnrichmentOptions

func (*DiscoveryV2) NewGetEnrichmentOptions(projectID string, enrichmentID string) *GetEnrichmentOptions

NewGetEnrichmentOptions : Instantiate GetEnrichmentOptions

func (*DiscoveryV2) NewGetProjectOptions

func (*DiscoveryV2) NewGetProjectOptions(projectID string) *GetProjectOptions

NewGetProjectOptions : Instantiate GetProjectOptions

func (*DiscoveryV2) NewGetTrainingQueryOptions

func (*DiscoveryV2) NewGetTrainingQueryOptions(projectID string, queryID string) *GetTrainingQueryOptions

NewGetTrainingQueryOptions : Instantiate GetTrainingQueryOptions

func (*DiscoveryV2) NewListCollectionsOptions

func (*DiscoveryV2) NewListCollectionsOptions(projectID string) *ListCollectionsOptions

NewListCollectionsOptions : Instantiate ListCollectionsOptions

func (*DiscoveryV2) NewListEnrichmentsOptions

func (*DiscoveryV2) NewListEnrichmentsOptions(projectID string) *ListEnrichmentsOptions

NewListEnrichmentsOptions : Instantiate ListEnrichmentsOptions

func (*DiscoveryV2) NewListFieldsOptions

func (*DiscoveryV2) NewListFieldsOptions(projectID string) *ListFieldsOptions

NewListFieldsOptions : Instantiate ListFieldsOptions

func (*DiscoveryV2) NewListProjectsOptions

func (*DiscoveryV2) NewListProjectsOptions() *ListProjectsOptions

NewListProjectsOptions : Instantiate ListProjectsOptions

func (*DiscoveryV2) NewListTrainingQueriesOptions

func (*DiscoveryV2) NewListTrainingQueriesOptions(projectID string) *ListTrainingQueriesOptions

NewListTrainingQueriesOptions : Instantiate ListTrainingQueriesOptions

func (*DiscoveryV2) NewQueryCollectionNoticesOptions added in v2.1.0

func (*DiscoveryV2) NewQueryCollectionNoticesOptions(projectID string, collectionID string) *QueryCollectionNoticesOptions

NewQueryCollectionNoticesOptions : Instantiate QueryCollectionNoticesOptions

func (*DiscoveryV2) NewQueryNoticesOptions

func (*DiscoveryV2) NewQueryNoticesOptions(projectID string) *QueryNoticesOptions

NewQueryNoticesOptions : Instantiate QueryNoticesOptions

func (*DiscoveryV2) NewQueryOptions

func (*DiscoveryV2) NewQueryOptions(projectID string) *QueryOptions

NewQueryOptions : Instantiate QueryOptions

func (*DiscoveryV2) NewTrainingExample

func (*DiscoveryV2) NewTrainingExample(documentID string, collectionID string, relevance int64) (_model *TrainingExample, err error)

NewTrainingExample : Instantiate TrainingExample (Generic Model Constructor)

func (*DiscoveryV2) NewTrainingQuery

func (*DiscoveryV2) NewTrainingQuery(naturalLanguageQuery string, examples []TrainingExample) (_model *TrainingQuery, err error)

NewTrainingQuery : Instantiate TrainingQuery (Generic Model Constructor)

func (*DiscoveryV2) NewUpdateCollectionOptions

func (*DiscoveryV2) NewUpdateCollectionOptions(projectID string, collectionID string) *UpdateCollectionOptions

NewUpdateCollectionOptions : Instantiate UpdateCollectionOptions

func (*DiscoveryV2) NewUpdateDocumentOptions

func (*DiscoveryV2) NewUpdateDocumentOptions(projectID string, collectionID string, documentID string) *UpdateDocumentOptions

NewUpdateDocumentOptions : Instantiate UpdateDocumentOptions

func (*DiscoveryV2) NewUpdateEnrichmentOptions

func (*DiscoveryV2) NewUpdateEnrichmentOptions(projectID string, enrichmentID string, name string) *UpdateEnrichmentOptions

NewUpdateEnrichmentOptions : Instantiate UpdateEnrichmentOptions

func (*DiscoveryV2) NewUpdateProjectOptions

func (*DiscoveryV2) NewUpdateProjectOptions(projectID string) *UpdateProjectOptions

NewUpdateProjectOptions : Instantiate UpdateProjectOptions

func (*DiscoveryV2) NewUpdateTrainingQueryOptions

func (*DiscoveryV2) NewUpdateTrainingQueryOptions(projectID string, queryID string, naturalLanguageQuery string, examples []TrainingExample) *UpdateTrainingQueryOptions

NewUpdateTrainingQueryOptions : Instantiate UpdateTrainingQueryOptions

func (*DiscoveryV2) Query

func (discovery *DiscoveryV2) Query(queryOptions *QueryOptions) (result *QueryResponse, response *core.DetailedResponse, err error)

Query : Query a project By using this method, you can construct queries. For details, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-query-concepts). The default query parameters are defined by the settings for this project, see the [Discovery documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-project-defaults) for an overview of the standard default settings, and see [the Projects API documentation](#create-project) for details about how to set custom default query settings.

func (*DiscoveryV2) QueryCollectionNotices added in v2.1.0

func (discovery *DiscoveryV2) QueryCollectionNotices(queryCollectionNoticesOptions *QueryCollectionNoticesOptions) (result *QueryNoticesResponse, response *core.DetailedResponse, err error)

QueryCollectionNotices : Query collection notices Finds collection-level notices (errors and warnings) that are generated when documents are ingested.

func (*DiscoveryV2) QueryCollectionNoticesWithContext added in v2.1.0

func (discovery *DiscoveryV2) QueryCollectionNoticesWithContext(ctx context.Context, queryCollectionNoticesOptions *QueryCollectionNoticesOptions) (result *QueryNoticesResponse, response *core.DetailedResponse, err error)

QueryCollectionNoticesWithContext is an alternate form of the QueryCollectionNotices method which supports a Context parameter

func (*DiscoveryV2) QueryNotices

func (discovery *DiscoveryV2) QueryNotices(queryNoticesOptions *QueryNoticesOptions) (result *QueryNoticesResponse, response *core.DetailedResponse, err error)

QueryNotices : Query project notices Finds project-level notices (errors and warnings). Currently, project-level notices are generated by relevancy training.

func (*DiscoveryV2) QueryNoticesWithContext

func (discovery *DiscoveryV2) QueryNoticesWithContext(ctx context.Context, queryNoticesOptions *QueryNoticesOptions) (result *QueryNoticesResponse, response *core.DetailedResponse, err error)

QueryNoticesWithContext is an alternate form of the QueryNotices method which supports a Context parameter

func (*DiscoveryV2) QueryWithContext

func (discovery *DiscoveryV2) QueryWithContext(ctx context.Context, queryOptions *QueryOptions) (result *QueryResponse, response *core.DetailedResponse, err error)

QueryWithContext is an alternate form of the Query method which supports a Context parameter

func (*DiscoveryV2) SetDefaultHeaders

func (discovery *DiscoveryV2) SetDefaultHeaders(headers http.Header)

SetDefaultHeaders sets HTTP headers to be sent in every request

func (*DiscoveryV2) SetEnableGzipCompression

func (discovery *DiscoveryV2) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*DiscoveryV2) SetServiceURL

func (discovery *DiscoveryV2) SetServiceURL(url string) error

SetServiceURL sets the service URL

func (*DiscoveryV2) UpdateCollection

func (discovery *DiscoveryV2) UpdateCollection(updateCollectionOptions *UpdateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)

UpdateCollection : Update a collection Updates the specified collection's name, description, and enrichments.

func (*DiscoveryV2) UpdateCollectionWithContext

func (discovery *DiscoveryV2) UpdateCollectionWithContext(ctx context.Context, updateCollectionOptions *UpdateCollectionOptions) (result *CollectionDetails, response *core.DetailedResponse, err error)

UpdateCollectionWithContext is an alternate form of the UpdateCollection method which supports a Context parameter

func (*DiscoveryV2) UpdateDocument

func (discovery *DiscoveryV2) UpdateDocument(updateDocumentOptions *UpdateDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)

UpdateDocument : Update a document Replace an existing document or add a document with a specified **document_id**. Starts ingesting a document with optional metadata.

If the document is uploaded to a collection that shares its data with another collection, the **X-Watson-Discovery-Force** header must be set to `true`.

**Note:** When uploading a new document with this method it automatically replaces any document stored with the same **document_id** if it exists.

**Note:** This operation only works on collections created to accept direct file uploads. It cannot be used to modify a collection that connects to an external source such as Microsoft SharePoint.

**Note:** If an uploaded document is segmented, all segments are overwritten, even if the updated version of the document has fewer segments.

func (*DiscoveryV2) UpdateDocumentWithContext

func (discovery *DiscoveryV2) UpdateDocumentWithContext(ctx context.Context, updateDocumentOptions *UpdateDocumentOptions) (result *DocumentAccepted, response *core.DetailedResponse, err error)

UpdateDocumentWithContext is an alternate form of the UpdateDocument method which supports a Context parameter

func (*DiscoveryV2) UpdateEnrichment

func (discovery *DiscoveryV2) UpdateEnrichment(updateEnrichmentOptions *UpdateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)

UpdateEnrichment : Update an enrichment Updates an existing enrichment's name and description.

func (*DiscoveryV2) UpdateEnrichmentWithContext

func (discovery *DiscoveryV2) UpdateEnrichmentWithContext(ctx context.Context, updateEnrichmentOptions *UpdateEnrichmentOptions) (result *Enrichment, response *core.DetailedResponse, err error)

UpdateEnrichmentWithContext is an alternate form of the UpdateEnrichment method which supports a Context parameter

func (*DiscoveryV2) UpdateProject

func (discovery *DiscoveryV2) UpdateProject(updateProjectOptions *UpdateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)

UpdateProject : Update a project Update the specified project's name.

func (*DiscoveryV2) UpdateProjectWithContext

func (discovery *DiscoveryV2) UpdateProjectWithContext(ctx context.Context, updateProjectOptions *UpdateProjectOptions) (result *ProjectDetails, response *core.DetailedResponse, err error)

UpdateProjectWithContext is an alternate form of the UpdateProject method which supports a Context parameter

func (*DiscoveryV2) UpdateTrainingQuery

func (discovery *DiscoveryV2) UpdateTrainingQuery(updateTrainingQueryOptions *UpdateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)

UpdateTrainingQuery : Update a training query Updates an existing training query and it's examples.

func (*DiscoveryV2) UpdateTrainingQueryWithContext

func (discovery *DiscoveryV2) UpdateTrainingQueryWithContext(ctx context.Context, updateTrainingQueryOptions *UpdateTrainingQueryOptions) (result *TrainingQuery, response *core.DetailedResponse, err error)

UpdateTrainingQueryWithContext is an alternate form of the UpdateTrainingQuery method which supports a Context parameter

type DiscoveryV2Options

type DiscoveryV2Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator

	// Release date of the version of the API you want to use. Specify dates in YYYY-MM-DD format. The current version is
	// `2020-08-30`.
	Version *string `validate:"required"`
}

DiscoveryV2Options : Service options

type DocumentAccepted

type DocumentAccepted struct {
	// The unique identifier of the ingested document.
	DocumentID *string `json:"document_id,omitempty"`

	// Status of the document in the ingestion process. A status of `processing` is returned for documents that are
	// ingested with a *version* date before `2019-01-01`. The `pending` status is returned for all others.
	Status *string `json:"status,omitempty"`
}

DocumentAccepted : Information returned after an uploaded document is accepted.

type DocumentAttribute

type DocumentAttribute struct {
	// The type of attribute.
	Type *string `json:"type,omitempty"`

	// The text associated with the attribute.
	Text *string `json:"text,omitempty"`

	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`
}

DocumentAttribute : List of document attributes.

type Enrichment

type Enrichment struct {
	// The unique identifier of this enrichment.
	EnrichmentID *string `json:"enrichment_id,omitempty"`

	// The human readable name for this enrichment.
	Name *string `json:"name,omitempty"`

	// The description of this enrichment.
	Description *string `json:"description,omitempty"`

	// The type of this enrichment.
	Type *string `json:"type,omitempty"`

	// An object that contains options for the current enrichment. Starting with version `2020-08-30`, the enrichment
	// options are not included in responses from the List Enrichments method.
	Options *EnrichmentOptions `json:"options,omitempty"`
}

Enrichment : Information about a specific enrichment.

type EnrichmentOptions

type EnrichmentOptions struct {
	// An array of supported languages for this enrichment. Required when `type` is `dictionary`. Optional when `type` is
	// `rule_based`. Not valid when creating any other type of enrichment.
	Languages []string `json:"languages,omitempty"`

	// The name of the entity type. This value is used as the field name in the index. Required when `type` is `dictionary`
	// or `regular_expression`. Not valid when creating any other type of enrichment.
	EntityType *string `json:"entity_type,omitempty"`

	// The regular expression to apply for this enrichment. Required when `type` is `regular_expression`. Not valid when
	// creating any other type of enrichment.
	RegularExpression *string `json:"regular_expression,omitempty"`

	// The name of the result document field that this enrichment creates. Required when `type` is `rule_based`. Not valid
	// when creating any other type of enrichment.
	ResultField *string `json:"result_field,omitempty"`
}

EnrichmentOptions : An object that contains options for the current enrichment. Starting with version `2020-08-30`, the enrichment options are not included in responses from the List Enrichments method.

type Enrichments

type Enrichments struct {
	// An array of enrichment definitions.
	Enrichments []Enrichment `json:"enrichments,omitempty"`
}

Enrichments : An object that contains an array of enrichment definitions.

type Field

type Field struct {
	// The name of the field.
	Field *string `json:"field,omitempty"`

	// The type of the field.
	Type *string `json:"type,omitempty"`

	// The collection Id of the collection where the field was found.
	CollectionID *string `json:"collection_id,omitempty"`
}

Field : Object that contains field details.

type GetAutocompletionOptions

type GetAutocompletionOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The prefix to use for autocompletion. For example, the prefix `Ho` could autocomplete to `hot`, `housing`, or `how`.
	Prefix *string `json:"-" validate:"required"`

	// Comma separated list of the collection IDs. If this parameter is not specified, all collections in the project are
	// used.
	CollectionIds []string `json:"-"`

	// The field in the result documents that autocompletion suggestions are identified from.
	Field *string `json:"-"`

	// The number of autocompletion suggestions to return.
	Count *int64 `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetAutocompletionOptions : The GetAutocompletion options.

func (*GetAutocompletionOptions) SetCollectionIds

func (_options *GetAutocompletionOptions) SetCollectionIds(collectionIds []string) *GetAutocompletionOptions

SetCollectionIds : Allow user to set CollectionIds

func (*GetAutocompletionOptions) SetCount

func (_options *GetAutocompletionOptions) SetCount(count int64) *GetAutocompletionOptions

SetCount : Allow user to set Count

func (*GetAutocompletionOptions) SetField

func (_options *GetAutocompletionOptions) SetField(field string) *GetAutocompletionOptions

SetField : Allow user to set Field

func (*GetAutocompletionOptions) SetHeaders

func (options *GetAutocompletionOptions) SetHeaders(param map[string]string) *GetAutocompletionOptions

SetHeaders : Allow user to set Headers

func (*GetAutocompletionOptions) SetPrefix

func (_options *GetAutocompletionOptions) SetPrefix(prefix string) *GetAutocompletionOptions

SetPrefix : Allow user to set Prefix

func (*GetAutocompletionOptions) SetProjectID

func (_options *GetAutocompletionOptions) SetProjectID(projectID string) *GetAutocompletionOptions

SetProjectID : Allow user to set ProjectID

type GetCollectionOptions

type GetCollectionOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetCollectionOptions : The GetCollection options.

func (*GetCollectionOptions) SetCollectionID

func (_options *GetCollectionOptions) SetCollectionID(collectionID string) *GetCollectionOptions

SetCollectionID : Allow user to set CollectionID

func (*GetCollectionOptions) SetHeaders

func (options *GetCollectionOptions) SetHeaders(param map[string]string) *GetCollectionOptions

SetHeaders : Allow user to set Headers

func (*GetCollectionOptions) SetProjectID

func (_options *GetCollectionOptions) SetProjectID(projectID string) *GetCollectionOptions

SetProjectID : Allow user to set ProjectID

type GetComponentSettingsOptions

type GetComponentSettingsOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetComponentSettingsOptions : The GetComponentSettings options.

func (*GetComponentSettingsOptions) SetHeaders

func (options *GetComponentSettingsOptions) SetHeaders(param map[string]string) *GetComponentSettingsOptions

SetHeaders : Allow user to set Headers

func (*GetComponentSettingsOptions) SetProjectID

func (_options *GetComponentSettingsOptions) SetProjectID(projectID string) *GetComponentSettingsOptions

SetProjectID : Allow user to set ProjectID

type GetEnrichmentOptions

type GetEnrichmentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the enrichment.
	EnrichmentID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetEnrichmentOptions : The GetEnrichment options.

func (*GetEnrichmentOptions) SetEnrichmentID

func (_options *GetEnrichmentOptions) SetEnrichmentID(enrichmentID string) *GetEnrichmentOptions

SetEnrichmentID : Allow user to set EnrichmentID

func (*GetEnrichmentOptions) SetHeaders

func (options *GetEnrichmentOptions) SetHeaders(param map[string]string) *GetEnrichmentOptions

SetHeaders : Allow user to set Headers

func (*GetEnrichmentOptions) SetProjectID

func (_options *GetEnrichmentOptions) SetProjectID(projectID string) *GetEnrichmentOptions

SetProjectID : Allow user to set ProjectID

type GetProjectOptions

type GetProjectOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetProjectOptions : The GetProject options.

func (*GetProjectOptions) SetHeaders

func (options *GetProjectOptions) SetHeaders(param map[string]string) *GetProjectOptions

SetHeaders : Allow user to set Headers

func (*GetProjectOptions) SetProjectID

func (_options *GetProjectOptions) SetProjectID(projectID string) *GetProjectOptions

SetProjectID : Allow user to set ProjectID

type GetTrainingQueryOptions

type GetTrainingQueryOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the query used for training.
	QueryID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetTrainingQueryOptions : The GetTrainingQuery options.

func (*GetTrainingQueryOptions) SetHeaders

func (options *GetTrainingQueryOptions) SetHeaders(param map[string]string) *GetTrainingQueryOptions

SetHeaders : Allow user to set Headers

func (*GetTrainingQueryOptions) SetProjectID

func (_options *GetTrainingQueryOptions) SetProjectID(projectID string) *GetTrainingQueryOptions

SetProjectID : Allow user to set ProjectID

func (*GetTrainingQueryOptions) SetQueryID

func (_options *GetTrainingQueryOptions) SetQueryID(queryID string) *GetTrainingQueryOptions

SetQueryID : Allow user to set QueryID

type ListCollectionsOptions

type ListCollectionsOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListCollectionsOptions : The ListCollections options.

func (*ListCollectionsOptions) SetHeaders

func (options *ListCollectionsOptions) SetHeaders(param map[string]string) *ListCollectionsOptions

SetHeaders : Allow user to set Headers

func (*ListCollectionsOptions) SetProjectID

func (_options *ListCollectionsOptions) SetProjectID(projectID string) *ListCollectionsOptions

SetProjectID : Allow user to set ProjectID

type ListCollectionsResponse

type ListCollectionsResponse struct {
	// An array that contains information about each collection in the project.
	Collections []Collection `json:"collections,omitempty"`
}

ListCollectionsResponse : Response object that contains an array of collection details.

type ListEnrichmentsOptions

type ListEnrichmentsOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListEnrichmentsOptions : The ListEnrichments options.

func (*ListEnrichmentsOptions) SetHeaders

func (options *ListEnrichmentsOptions) SetHeaders(param map[string]string) *ListEnrichmentsOptions

SetHeaders : Allow user to set Headers

func (*ListEnrichmentsOptions) SetProjectID

func (_options *ListEnrichmentsOptions) SetProjectID(projectID string) *ListEnrichmentsOptions

SetProjectID : Allow user to set ProjectID

type ListFieldsOptions

type ListFieldsOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Comma separated list of the collection IDs. If this parameter is not specified, all collections in the project are
	// used.
	CollectionIds []string `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListFieldsOptions : The ListFields options.

func (*ListFieldsOptions) SetCollectionIds

func (_options *ListFieldsOptions) SetCollectionIds(collectionIds []string) *ListFieldsOptions

SetCollectionIds : Allow user to set CollectionIds

func (*ListFieldsOptions) SetHeaders

func (options *ListFieldsOptions) SetHeaders(param map[string]string) *ListFieldsOptions

SetHeaders : Allow user to set Headers

func (*ListFieldsOptions) SetProjectID

func (_options *ListFieldsOptions) SetProjectID(projectID string) *ListFieldsOptions

SetProjectID : Allow user to set ProjectID

type ListFieldsResponse

type ListFieldsResponse struct {
	// An array that contains information about each field in the collections.
	Fields []Field `json:"fields,omitempty"`
}

ListFieldsResponse : The list of fetched fields.

The fields are returned using a fully qualified name format, however, the format differs slightly from that used by the query operations.

  • Fields which contain nested objects are assigned a type of "nested".

  • Fields which belong to a nested object are prefixed with `.properties` (for example,

`warnings.properties.severity` means that the `warnings` object has a property called `severity`).

type ListProjectsOptions

type ListProjectsOptions struct {

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListProjectsOptions : The ListProjects options.

func (*ListProjectsOptions) SetHeaders

func (options *ListProjectsOptions) SetHeaders(param map[string]string) *ListProjectsOptions

SetHeaders : Allow user to set Headers

type ListProjectsResponse

type ListProjectsResponse struct {
	// An array of project details.
	Projects []ProjectListDetails `json:"projects,omitempty"`
}

ListProjectsResponse : A list of projects in this instance.

type ListTrainingQueriesOptions

type ListTrainingQueriesOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListTrainingQueriesOptions : The ListTrainingQueries options.

func (*ListTrainingQueriesOptions) SetHeaders

func (options *ListTrainingQueriesOptions) SetHeaders(param map[string]string) *ListTrainingQueriesOptions

SetHeaders : Allow user to set Headers

func (*ListTrainingQueriesOptions) SetProjectID

func (_options *ListTrainingQueriesOptions) SetProjectID(projectID string) *ListTrainingQueriesOptions

SetProjectID : Allow user to set ProjectID

type Notice

type Notice struct {
	// Identifies the notice. Many notices might have the same ID. This field exists so that user applications can
	// programmatically identify a notice and take automatic corrective action. Typical notice IDs include: `index_failed`,
	// `index_failed_too_many_requests`, `index_failed_incompatible_field`, `index_failed_cluster_unavailable`,
	// `ingestion_timeout`, `ingestion_error`, `bad_request`, `internal_error`, `missing_model`, `unsupported_model`,
	// `smart_document_understanding_failed_incompatible_field`, `smart_document_understanding_failed_internal_error`,
	// `smart_document_understanding_failed_internal_error`, `smart_document_understanding_failed_warning`,
	// `smart_document_understanding_page_error`, `smart_document_understanding_page_warning`. **Note:** This is not a
	// complete list, other values might be returned.
	NoticeID *string `json:"notice_id,omitempty"`

	// The creation date of the collection in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z'.
	Created *strfmt.DateTime `json:"created,omitempty"`

	// Unique identifier of the document.
	DocumentID *string `json:"document_id,omitempty"`

	// Unique identifier of the collection.
	CollectionID *string `json:"collection_id,omitempty"`

	// Unique identifier of the query used for relevance training.
	QueryID *string `json:"query_id,omitempty"`

	// Severity level of the notice.
	Severity *string `json:"severity,omitempty"`

	// Ingestion or training step in which the notice occurred.
	Step *string `json:"step,omitempty"`

	// The description of the notice.
	Description *string `json:"description,omitempty"`
}

Notice : A notice produced for the collection.

type ProjectDetails

type ProjectDetails struct {
	// The unique identifier of this project.
	ProjectID *string `json:"project_id,omitempty"`

	// The human readable name of this project.
	Name *string `json:"name,omitempty"`

	// The type of project.
	//
	// The `content_intelligence` type is a *Document Retrieval for Contracts* project and the `other` type is a *Custom*
	// project.
	//
	// The `content_mining` and `content_intelligence` types are available with Premium plan managed deployments and
	// installed deployments only.
	Type *string `json:"type,omitempty"`

	// Relevancy training status information for this project.
	RelevancyTrainingStatus *ProjectListDetailsRelevancyTrainingStatus `json:"relevancy_training_status,omitempty"`

	// The number of collections configured in this project.
	CollectionCount *int64 `json:"collection_count,omitempty"`

	// Default query parameters for this project.
	DefaultQueryParameters *DefaultQueryParams `json:"default_query_parameters,omitempty"`
}

ProjectDetails : Detailed information about the specified project.

type ProjectListDetails

type ProjectListDetails struct {
	// The unique identifier of this project.
	ProjectID *string `json:"project_id,omitempty"`

	// The human readable name of this project.
	Name *string `json:"name,omitempty"`

	// The type of project.
	//
	// The `content_intelligence` type is a *Document Retrieval for Contracts* project and the `other` type is a *Custom*
	// project.
	//
	// The `content_mining` and `content_intelligence` types are available with Premium plan managed deployments and
	// installed deployments only.
	Type *string `json:"type,omitempty"`

	// Relevancy training status information for this project.
	RelevancyTrainingStatus *ProjectListDetailsRelevancyTrainingStatus `json:"relevancy_training_status,omitempty"`

	// The number of collections configured in this project.
	CollectionCount *int64 `json:"collection_count,omitempty"`
}

ProjectListDetails : Details about a specific project.

type ProjectListDetailsRelevancyTrainingStatus

type ProjectListDetailsRelevancyTrainingStatus struct {
	// When the training data was updated.
	DataUpdated *string `json:"data_updated,omitempty"`

	// The total number of examples.
	TotalExamples *int64 `json:"total_examples,omitempty"`

	// When `true`, sufficient label diversity is present to allow training for this project.
	SufficientLabelDiversity *bool `json:"sufficient_label_diversity,omitempty"`

	// When `true`, the relevancy training is in processing.
	Processing *bool `json:"processing,omitempty"`

	// When `true`, the minimum number of examples required to train has been met.
	MinimumExamplesAdded *bool `json:"minimum_examples_added,omitempty"`

	// The time that the most recent successful training occurred.
	SuccessfullyTrained *string `json:"successfully_trained,omitempty"`

	// When `true`, relevancy training is available when querying collections in the project.
	Available *bool `json:"available,omitempty"`

	// The number of notices generated during the relevancy training.
	Notices *int64 `json:"notices,omitempty"`

	// When `true`, the minimum number of queries required to train has been met.
	MinimumQueriesAdded *bool `json:"minimum_queries_added,omitempty"`
}

ProjectListDetailsRelevancyTrainingStatus : Relevancy training status information for this project.

type QueryAggregation

type QueryAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`
}

QueryAggregation : An abstract aggregation type produced by Discovery to analyze the input provided.

type QueryAggregationIntf

type QueryAggregationIntf interface {
	// contains filtered or unexported methods
}

type QueryCalculationAggregation

type QueryCalculationAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The field to perform the calculation on.
	Field *string `json:"field" validate:"required"`

	// The value of the calculation.
	Value *float64 `json:"value,omitempty"`
}

QueryCalculationAggregation : Returns a scalar calculation across all documents for the field specified. Possible calculations include min, max, sum, average, and unique_count. This model "extends" QueryAggregation

type QueryCollectionNoticesOptions added in v2.1.0

type QueryCollectionNoticesOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// A cacheable query that excludes documents that don't mention the query content. Filter searches are better for
	// metadata-type searches and for assessing the concepts in the data set.
	Filter *string `json:"-"`

	// A query search returns all documents in your data set with full enrichments and full text, but with the most
	// relevant documents listed first.
	Query *string `json:"-"`

	// A natural language query that returns relevant documents by utilizing training data and natural language
	// understanding.
	NaturalLanguageQuery *string `json:"-"`

	// Number of results to return. The maximum for the **count** and **offset** values together in any one query is
	// **10000**.
	Count *int64 `json:"-"`

	// The number of query results to skip at the beginning. For example, if the total number of results that are returned
	// is 10 and the offset is 8, it returns the last two results. The maximum for the **count** and **offset** values
	// together in any one query is **10000**.
	Offset *int64 `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

QueryCollectionNoticesOptions : The QueryCollectionNotices options.

func (*QueryCollectionNoticesOptions) SetCollectionID added in v2.1.0

func (_options *QueryCollectionNoticesOptions) SetCollectionID(collectionID string) *QueryCollectionNoticesOptions

SetCollectionID : Allow user to set CollectionID

func (*QueryCollectionNoticesOptions) SetCount added in v2.1.0

SetCount : Allow user to set Count

func (*QueryCollectionNoticesOptions) SetFilter added in v2.1.0

SetFilter : Allow user to set Filter

func (*QueryCollectionNoticesOptions) SetHeaders added in v2.1.0

SetHeaders : Allow user to set Headers

func (*QueryCollectionNoticesOptions) SetNaturalLanguageQuery added in v2.1.0

func (_options *QueryCollectionNoticesOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryCollectionNoticesOptions

SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery

func (*QueryCollectionNoticesOptions) SetOffset added in v2.1.0

SetOffset : Allow user to set Offset

func (*QueryCollectionNoticesOptions) SetProjectID added in v2.1.0

func (_options *QueryCollectionNoticesOptions) SetProjectID(projectID string) *QueryCollectionNoticesOptions

SetProjectID : Allow user to set ProjectID

func (*QueryCollectionNoticesOptions) SetQuery added in v2.1.0

SetQuery : Allow user to set Query

type QueryFilterAggregation

type QueryFilterAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The filter that is written in Discovery Query Language syntax and is applied to the documents before
	// sub-aggregations are run.
	Match *string `json:"match" validate:"required"`

	// Number of documents that match the filter.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// An array of sub-aggregations.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`
}

QueryFilterAggregation : A modifier that narrows the document set of the sub-aggregations it precedes. This model "extends" QueryAggregation

type QueryGroupByAggregation

type QueryGroupByAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// Array of top values for the field.
	Results []QueryGroupByAggregationResult `json:"results,omitempty"`
}

QueryGroupByAggregation : Returns the top values for the field specified. This model "extends" QueryAggregation

type QueryGroupByAggregationResult

type QueryGroupByAggregationResult struct {
	// Value of the field with a non-zero frequency in the document set.
	Key *string `json:"key" validate:"required"`

	// Number of documents that contain the 'key'.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// The relevancy for this group.
	Relevancy *float64 `json:"relevancy,omitempty"`

	// The number of documents which have the group as the value of specified field in the whole set of documents in this
	// collection. Returned only when the `relevancy` parameter is set to `true`.
	TotalMatchingDocuments *int64 `json:"total_matching_documents,omitempty"`

	// The estimated number of documents which would match the query and also meet the condition. Returned only when the
	// `relevancy` parameter is set to `true`.
	EstimatedMatchingDocuments *int64 `json:"estimated_matching_documents,omitempty"`

	// An array of sub-aggregations.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`
}

QueryGroupByAggregationResult : Top value result for the term aggregation.

type QueryHistogramAggregation

type QueryHistogramAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The numeric field name used to create the histogram.
	Field *string `json:"field" validate:"required"`

	// The size of the sections that the results are split into.
	Interval *int64 `json:"interval" validate:"required"`

	// Identifier specified in the query request of this aggregation.
	Name *string `json:"name,omitempty"`

	// Array of numeric intervals.
	Results []QueryHistogramAggregationResult `json:"results,omitempty"`
}

QueryHistogramAggregation : Numeric interval segments to categorize documents by using field values from a single numeric field to describe the category. This model "extends" QueryAggregation

type QueryHistogramAggregationResult

type QueryHistogramAggregationResult struct {
	// The value of the upper bound for the numeric segment.
	Key *int64 `json:"key" validate:"required"`

	// Number of documents with the specified key as the upper bound.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// An array of sub-aggregations.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`
}

QueryHistogramAggregationResult : Histogram numeric interval result.

type QueryLargePassages

type QueryLargePassages struct {
	// A passages query that returns the most relevant passages from the results.
	Enabled *bool `json:"enabled,omitempty"`

	// If `true`, ranks the documents by document quality, and then returns the highest-ranked passages per document in a
	// `document_passages` field for each document entry in the results list of the response.
	//
	// If `false`, ranks the passages from all of the documents by passage quality regardless of the document quality and
	// returns them in a separate `passages` field in the response.
	PerDocument *bool `json:"per_document,omitempty"`

	// Maximum number of passages to return per document in the result. Ignored if `passages.per_document` is `false`.
	MaxPerDocument *int64 `json:"max_per_document,omitempty"`

	// A list of fields to extract passages from. If this parameter is an empty list, then all root-level fields are
	// included.
	Fields []string `json:"fields,omitempty"`

	// The maximum number of passages to return. Ignored if `passages.per_document` is `true`.
	Count *int64 `json:"count,omitempty"`

	// The approximate number of characters that any one passage will have.
	Characters *int64 `json:"characters,omitempty"`

	// When true, `answer` objects are returned as part of each passage in the query results. The primary difference
	// between an `answer` and a `passage` is that the length of a passage is defined by the query, where the length of an
	// `answer` is calculated by Discovery based on how much text is needed to answer the question.
	//
	// This parameter is ignored if passages are not enabled for the query, or no **natural_language_query** is specified.
	//
	// If the **find_answers** parameter is set to `true` and **per_document** parameter is also set to `true`, then the
	// document search results and the passage search results within each document are reordered using the answer
	// confidences. The goal of this reordering is to place the best answer as the first answer of the first passage of the
	// first document. Similarly, if the **find_answers** parameter is set to `true` and **per_document** parameter is set
	// to `false`, then the passage search results are reordered in decreasing order of the highest confidence answer for
	// each document and passage.
	//
	// The **find_answers** parameter is available only on managed instances of Discovery.
	FindAnswers *bool `json:"find_answers,omitempty"`

	// The number of `answer` objects to return per passage if the **find_answers** parmeter is specified as `true`.
	MaxAnswersPerPassage *int64 `json:"max_answers_per_passage,omitempty"`
}

QueryLargePassages : Configuration for passage retrieval.

type QueryLargeSuggestedRefinements

type QueryLargeSuggestedRefinements struct {
	// Whether to perform suggested refinements.
	Enabled *bool `json:"enabled,omitempty"`

	// Maximum number of suggested refinements texts to be returned. The maximum is `100`.
	Count *int64 `json:"count,omitempty"`
}

QueryLargeSuggestedRefinements : Configuration for suggested refinements. Available with Premium plans only.

type QueryLargeTableResults

type QueryLargeTableResults struct {
	// Whether to enable table retrieval.
	Enabled *bool `json:"enabled,omitempty"`

	// Maximum number of tables to return.
	Count *int64 `json:"count,omitempty"`
}

QueryLargeTableResults : Configuration for table retrieval.

type QueryNestedAggregation

type QueryNestedAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The path to the document field to scope sub-aggregations to.
	Path *string `json:"path" validate:"required"`

	// Number of nested documents found in the specified field.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// An array of sub-aggregations.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`
}

QueryNestedAggregation : A restriction that alters the document set that is used for sub-aggregations it precedes to nested documents found in the field specified. This model "extends" QueryAggregation

type QueryNoticesOptions

type QueryNoticesOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// A cacheable query that excludes documents that don't mention the query content. Filter searches are better for
	// metadata-type searches and for assessing the concepts in the data set.
	Filter *string `json:"-"`

	// A query search returns all documents in your data set with full enrichments and full text, but with the most
	// relevant documents listed first.
	Query *string `json:"-"`

	// A natural language query that returns relevant documents by utilizing training data and natural language
	// understanding.
	NaturalLanguageQuery *string `json:"-"`

	// Number of results to return. The maximum for the **count** and **offset** values together in any one query is
	// **10000**.
	Count *int64 `json:"-"`

	// The number of query results to skip at the beginning. For example, if the total number of results that are returned
	// is 10 and the offset is 8, it returns the last two results. The maximum for the **count** and **offset** values
	// together in any one query is **10000**.
	Offset *int64 `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

QueryNoticesOptions : The QueryNotices options.

func (*QueryNoticesOptions) SetCount

func (_options *QueryNoticesOptions) SetCount(count int64) *QueryNoticesOptions

SetCount : Allow user to set Count

func (*QueryNoticesOptions) SetFilter

func (_options *QueryNoticesOptions) SetFilter(filter string) *QueryNoticesOptions

SetFilter : Allow user to set Filter

func (*QueryNoticesOptions) SetHeaders

func (options *QueryNoticesOptions) SetHeaders(param map[string]string) *QueryNoticesOptions

SetHeaders : Allow user to set Headers

func (*QueryNoticesOptions) SetNaturalLanguageQuery

func (_options *QueryNoticesOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryNoticesOptions

SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery

func (*QueryNoticesOptions) SetOffset

func (_options *QueryNoticesOptions) SetOffset(offset int64) *QueryNoticesOptions

SetOffset : Allow user to set Offset

func (*QueryNoticesOptions) SetProjectID

func (_options *QueryNoticesOptions) SetProjectID(projectID string) *QueryNoticesOptions

SetProjectID : Allow user to set ProjectID

func (*QueryNoticesOptions) SetQuery

func (_options *QueryNoticesOptions) SetQuery(query string) *QueryNoticesOptions

SetQuery : Allow user to set Query

type QueryNoticesResponse

type QueryNoticesResponse struct {
	// The number of matching results.
	MatchingResults *int64 `json:"matching_results,omitempty"`

	// Array of document results that match the query.
	Notices []Notice `json:"notices,omitempty"`
}

QueryNoticesResponse : Object that contains notice query results.

type QueryOptions

type QueryOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// A comma-separated list of collection IDs to be queried against.
	CollectionIds []string `json:"collection_ids,omitempty"`

	// A cacheable query that excludes documents that don't mention the query content. Filter searches are better for
	// metadata-type searches and for assessing the concepts in the data set.
	Filter *string `json:"filter,omitempty"`

	// A query search returns all documents in your data set with full enrichments and full text, but with the most
	// relevant documents listed first. Use a query search when you want to find the most relevant search results.
	Query *string `json:"query,omitempty"`

	// A natural language query that returns relevant documents by utilizing training data and natural language
	// understanding.
	NaturalLanguageQuery *string `json:"natural_language_query,omitempty"`

	// An aggregation search that returns an exact answer by combining query search with filters. Useful for applications
	// to build lists, tables, and time series. For a full list of possible aggregations, see the Query reference.
	Aggregation *string `json:"aggregation,omitempty"`

	// Number of results to return.
	Count *int64 `json:"count,omitempty"`

	// A list of the fields in the document hierarchy to return. If this parameter is an empty list, then all fields are
	// returned.
	Return []string `json:"return,omitempty"`

	// The number of query results to skip at the beginning. For example, if the total number of results that are returned
	// is 10 and the offset is 8, it returns the last two results.
	Offset *int64 `json:"offset,omitempty"`

	// A comma-separated list of fields in the document to sort on. You can optionally specify a sort direction by
	// prefixing the field with `-` for descending or `+` for ascending. Ascending is the default sort direction if no
	// prefix is specified.
	Sort *string `json:"sort,omitempty"`

	// When `true`, a highlight field is returned for each result which contains the fields which match the query with
	// `<em></em>` tags around the matching query terms.
	Highlight *bool `json:"highlight,omitempty"`

	// When `true` and the **natural_language_query** parameter is used, the **natural_language_query** parameter is spell
	// checked. The most likely correction is returned in the **suggested_query** field of the response (if one exists).
	SpellingSuggestions *bool `json:"spelling_suggestions,omitempty"`

	// Configuration for table retrieval.
	TableResults *QueryLargeTableResults `json:"table_results,omitempty"`

	// Configuration for suggested refinements. Available with Premium plans only.
	SuggestedRefinements *QueryLargeSuggestedRefinements `json:"suggested_refinements,omitempty"`

	// Configuration for passage retrieval.
	Passages *QueryLargePassages `json:"passages,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

QueryOptions : The Query options.

func (*QueryOptions) SetAggregation

func (_options *QueryOptions) SetAggregation(aggregation string) *QueryOptions

SetAggregation : Allow user to set Aggregation

func (*QueryOptions) SetCollectionIds

func (_options *QueryOptions) SetCollectionIds(collectionIds []string) *QueryOptions

SetCollectionIds : Allow user to set CollectionIds

func (*QueryOptions) SetCount

func (_options *QueryOptions) SetCount(count int64) *QueryOptions

SetCount : Allow user to set Count

func (*QueryOptions) SetFilter

func (_options *QueryOptions) SetFilter(filter string) *QueryOptions

SetFilter : Allow user to set Filter

func (*QueryOptions) SetHeaders

func (options *QueryOptions) SetHeaders(param map[string]string) *QueryOptions

SetHeaders : Allow user to set Headers

func (*QueryOptions) SetHighlight

func (_options *QueryOptions) SetHighlight(highlight bool) *QueryOptions

SetHighlight : Allow user to set Highlight

func (*QueryOptions) SetNaturalLanguageQuery

func (_options *QueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *QueryOptions

SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery

func (*QueryOptions) SetOffset

func (_options *QueryOptions) SetOffset(offset int64) *QueryOptions

SetOffset : Allow user to set Offset

func (*QueryOptions) SetPassages

func (_options *QueryOptions) SetPassages(passages *QueryLargePassages) *QueryOptions

SetPassages : Allow user to set Passages

func (*QueryOptions) SetProjectID

func (_options *QueryOptions) SetProjectID(projectID string) *QueryOptions

SetProjectID : Allow user to set ProjectID

func (*QueryOptions) SetQuery

func (_options *QueryOptions) SetQuery(query string) *QueryOptions

SetQuery : Allow user to set Query

func (*QueryOptions) SetReturn

func (_options *QueryOptions) SetReturn(returnVar []string) *QueryOptions

SetReturn : Allow user to set Return

func (*QueryOptions) SetSort

func (_options *QueryOptions) SetSort(sort string) *QueryOptions

SetSort : Allow user to set Sort

func (*QueryOptions) SetSpellingSuggestions

func (_options *QueryOptions) SetSpellingSuggestions(spellingSuggestions bool) *QueryOptions

SetSpellingSuggestions : Allow user to set SpellingSuggestions

func (*QueryOptions) SetSuggestedRefinements

func (_options *QueryOptions) SetSuggestedRefinements(suggestedRefinements *QueryLargeSuggestedRefinements) *QueryOptions

SetSuggestedRefinements : Allow user to set SuggestedRefinements

func (*QueryOptions) SetTableResults

func (_options *QueryOptions) SetTableResults(tableResults *QueryLargeTableResults) *QueryOptions

SetTableResults : Allow user to set TableResults

type QueryResponse

type QueryResponse struct {
	// The number of matching results for the query. Results that match due to a curation only are not counted in the
	// total.
	MatchingResults *int64 `json:"matching_results,omitempty"`

	// Array of document results for the query.
	Results []QueryResult `json:"results,omitempty"`

	// Array of aggregations for the query.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`

	// An object contain retrieval type information.
	RetrievalDetails *RetrievalDetails `json:"retrieval_details,omitempty"`

	// Suggested correction to the submitted **natural_language_query** value.
	SuggestedQuery *string `json:"suggested_query,omitempty"`

	// Array of suggested refinements.
	SuggestedRefinements []QuerySuggestedRefinement `json:"suggested_refinements,omitempty"`

	// Array of table results.
	TableResults []QueryTableResult `json:"table_results,omitempty"`

	// Passages that best match the query from across all of the collections in the project.
	Passages []QueryResponsePassage `json:"passages,omitempty"`
}

QueryResponse : A response that contains the documents and aggregations for the query.

type QueryResponsePassage

type QueryResponsePassage struct {
	// The content of the extracted passage.
	PassageText *string `json:"passage_text,omitempty"`

	// The confidence score of the passage's analysis. A higher score indicates greater confidence.
	PassageScore *float64 `json:"passage_score,omitempty"`

	// The unique identifier of the ingested document.
	DocumentID *string `json:"document_id,omitempty"`

	// The unique identifier of the collection.
	CollectionID *string `json:"collection_id,omitempty"`

	// The position of the first character of the extracted passage in the originating field.
	StartOffset *int64 `json:"start_offset,omitempty"`

	// The position after the last character of the extracted passage in the originating field.
	EndOffset *int64 `json:"end_offset,omitempty"`

	// The label of the field from which the passage has been extracted.
	Field *string `json:"field,omitempty"`

	// An estimate of the probability that the passage is relevant.
	Confidence *float64 `json:"confidence,omitempty"`

	// An array of extracted answers to the specified query.
	Answers []ResultPassageAnswer `json:"answers,omitempty"`
}

QueryResponsePassage : A passage query response.

type QueryResult

type QueryResult struct {
	// The unique identifier of the document.
	DocumentID *string `json:"document_id" validate:"required"`

	// Metadata of the document.
	Metadata map[string]interface{} `json:"metadata,omitempty"`

	// Metadata of a query result.
	ResultMetadata *QueryResultMetadata `json:"result_metadata" validate:"required"`

	// Passages from the document that best matches the query.
	DocumentPassages []QueryResultPassage `json:"document_passages,omitempty"`
	// contains filtered or unexported fields
}

QueryResult : Result document for the specified query.

func (*QueryResult) GetProperties

func (o *QueryResult) GetProperties() map[string]interface{}

GetProperties allows the user to retrieve the map of arbitrary properties from an instance of QueryResult

func (*QueryResult) GetProperty

func (o *QueryResult) GetProperty(key string) interface{}

GetProperty allows the user to retrieve an arbitrary property from an instance of QueryResult

func (*QueryResult) MarshalJSON

func (o *QueryResult) MarshalJSON() (buffer []byte, err error)

MarshalJSON performs custom serialization for instances of QueryResult

func (*QueryResult) SetProperties added in v2.2.0

func (o *QueryResult) SetProperties(m map[string]interface{})

SetProperties allows the user to set a map of arbitrary properties on an instance of QueryResult

func (*QueryResult) SetProperty

func (o *QueryResult) SetProperty(key string, value interface{})

SetProperty allows the user to set an arbitrary property on an instance of QueryResult

type QueryResultMetadata

type QueryResultMetadata struct {
	// The document retrieval source that produced this search result.
	DocumentRetrievalSource *string `json:"document_retrieval_source,omitempty"`

	// The collection id associated with this training data set.
	CollectionID *string `json:"collection_id" validate:"required"`

	// The confidence score for the given result. Calculated based on how relevant the result is estimated to be.
	// confidence can range from `0.0` to `1.0`. The higher the number, the more relevant the document. The `confidence`
	// value for a result was calculated using the model specified in the `document_retrieval_strategy` field of the result
	// set. This field is only returned if the **natural_language_query** parameter is specified in the query.
	Confidence *float64 `json:"confidence,omitempty"`
}

QueryResultMetadata : Metadata of a query result.

type QueryResultPassage

type QueryResultPassage struct {
	// The content of the extracted passage.
	PassageText *string `json:"passage_text,omitempty"`

	// The position of the first character of the extracted passage in the originating field.
	StartOffset *int64 `json:"start_offset,omitempty"`

	// The position after the last character of the extracted passage in the originating field.
	EndOffset *int64 `json:"end_offset,omitempty"`

	// The label of the field from which the passage has been extracted.
	Field *string `json:"field,omitempty"`

	// Estimate of the probability that the passage is relevant.
	Confidence *float64 `json:"confidence,omitempty"`

	// An arry of extracted answers to the specified query.
	Answers []ResultPassageAnswer `json:"answers,omitempty"`
}

QueryResultPassage : A passage query result.

type QuerySuggestedRefinement

type QuerySuggestedRefinement struct {
	// The text used to filter.
	Text *string `json:"text,omitempty"`
}

QuerySuggestedRefinement : A suggested additional query term or terms user to filter results.

type QueryTableResult

type QueryTableResult struct {
	// The identifier for the retrieved table.
	TableID *string `json:"table_id,omitempty"`

	// The identifier of the document the table was retrieved from.
	SourceDocumentID *string `json:"source_document_id,omitempty"`

	// The identifier of the collection the table was retrieved from.
	CollectionID *string `json:"collection_id,omitempty"`

	// HTML snippet of the table info.
	TableHTML *string `json:"table_html,omitempty"`

	// The offset of the table html snippet in the original document html.
	TableHTMLOffset *int64 `json:"table_html_offset,omitempty"`

	// Full table object retrieved from Table Understanding Enrichment.
	Table *TableResultTable `json:"table,omitempty"`
}

QueryTableResult : A tables whose content or context match a search query.

type QueryTermAggregation

type QueryTermAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The field in the document used to generate top values from.
	Field *string `json:"field" validate:"required"`

	// The number of top values returned.
	Count *int64 `json:"count,omitempty"`

	// Identifier specified in the query request of this aggregation.
	Name *string `json:"name,omitempty"`

	// Array of top values for the field.
	Results []QueryTermAggregationResult `json:"results,omitempty"`
}

QueryTermAggregation : Returns the top values for the field specified. This model "extends" QueryAggregation

type QueryTermAggregationResult

type QueryTermAggregationResult struct {
	// Value of the field with a non-zero frequency in the document set.
	Key *string `json:"key" validate:"required"`

	// Number of documents that contain the 'key'.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// The relevancy for this term.
	Relevancy *float64 `json:"relevancy,omitempty"`

	// The number of documents which have the term as the value of specified field in the whole set of documents in this
	// collection. Returned only when the `relevancy` parameter is set to `true`.
	TotalMatchingDocuments *int64 `json:"total_matching_documents,omitempty"`

	// The estimated number of documents which would match the query and also meet the condition. Returned only when the
	// `relevancy` parameter is set to `true`.
	EstimatedMatchingDocuments *int64 `json:"estimated_matching_documents,omitempty"`

	// An array of sub-aggregations.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`
}

QueryTermAggregationResult : Top value result for the term aggregation.

type QueryTimesliceAggregation

type QueryTimesliceAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The date field name used to create the timeslice.
	Field *string `json:"field" validate:"required"`

	// The date interval value. Valid values are seconds, minutes, hours, days, weeks, and years.
	Interval *string `json:"interval" validate:"required"`

	// Identifier specified in the query request of this aggregation.
	Name *string `json:"name,omitempty"`

	// Array of aggregation results.
	Results []QueryTimesliceAggregationResult `json:"results,omitempty"`
}

QueryTimesliceAggregation : A specialized histogram aggregation that uses dates to create interval segments. This model "extends" QueryAggregation

type QueryTimesliceAggregationResult

type QueryTimesliceAggregationResult struct {
	// String date value of the upper bound for the timeslice interval in ISO-8601 format.
	KeyAsString *string `json:"key_as_string" validate:"required"`

	// Numeric date value of the upper bound for the timeslice interval in UNIX milliseconds since epoch.
	Key *int64 `json:"key" validate:"required"`

	// Number of documents with the specified key as the upper bound.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// An array of sub-aggregations.
	Aggregations []QueryAggregationIntf `json:"aggregations,omitempty"`
}

QueryTimesliceAggregationResult : A timeslice interval segment.

type QueryTopHitsAggregation

type QueryTopHitsAggregation struct {
	// The type of aggregation command used. Options include: term, histogram, timeslice, nested, filter, min, max, sum,
	// average, unique_count, and top_hits.
	Type *string `json:"type" validate:"required"`

	// The number of documents to return.
	Size *int64 `json:"size" validate:"required"`

	// Identifier specified in the query request of this aggregation.
	Name *string `json:"name,omitempty"`

	Hits *QueryTopHitsAggregationResult `json:"hits,omitempty"`
}

QueryTopHitsAggregation : Returns the top documents ranked by the score of the query. This model "extends" QueryAggregation

type QueryTopHitsAggregationResult

type QueryTopHitsAggregationResult struct {
	// Number of matching results.
	MatchingResults *int64 `json:"matching_results" validate:"required"`

	// An array of the document results.
	Hits []map[string]interface{} `json:"hits,omitempty"`
}

QueryTopHitsAggregationResult : A query response that contains the matching documents for the preceding aggregations.

type ResultPassageAnswer added in v2.1.0

type ResultPassageAnswer struct {
	// Answer text for the specified query as identified by Discovery.
	AnswerText *string `json:"answer_text,omitempty"`

	// The position of the first character of the extracted answer in the originating field.
	StartOffset *int64 `json:"start_offset,omitempty"`

	// The position after the last character of the extracted answer in the originating field.
	EndOffset *int64 `json:"end_offset,omitempty"`

	// An estimate of the probability that the answer is relevant.
	Confidence *float64 `json:"confidence,omitempty"`
}

ResultPassageAnswer : Object that contains a potential answer to the specified query.

type RetrievalDetails

type RetrievalDetails struct {
	// Identifies the document retrieval strategy used for this query. `relevancy_training` indicates that the results were
	// returned using a relevancy trained model.
	//
	// **Note**: In the event of trained collections being queried, but the trained model is not used to return results,
	// the **document_retrieval_strategy** is listed as `untrained`.
	DocumentRetrievalStrategy *string `json:"document_retrieval_strategy,omitempty"`
}

RetrievalDetails : An object contain retrieval type information.

type TableBodyCells

type TableBodyCells struct {
	// The unique ID of the cell in the current table.
	CellID *string `json:"cell_id,omitempty"`

	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`

	// The textual contents of this cell from the input document without associated markup content.
	Text *string `json:"text,omitempty"`

	// The `begin` index of this cell's `row` location in the current table.
	RowIndexBegin *int64 `json:"row_index_begin,omitempty"`

	// The `end` index of this cell's `row` location in the current table.
	RowIndexEnd *int64 `json:"row_index_end,omitempty"`

	// The `begin` index of this cell's `column` location in the current table.
	ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`

	// The `end` index of this cell's `column` location in the current table.
	ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`

	// A list of table row header ids.
	RowHeaderIds []TableRowHeaderIds `json:"row_header_ids,omitempty"`

	// A list of table row header texts.
	RowHeaderTexts []TableRowHeaderTexts `json:"row_header_texts,omitempty"`

	// A list of table row header texts normalized.
	RowHeaderTextsNormalized []TableRowHeaderTextsNormalized `json:"row_header_texts_normalized,omitempty"`

	// A list of table column header ids.
	ColumnHeaderIds []TableColumnHeaderIds `json:"column_header_ids,omitempty"`

	// A list of table column header texts.
	ColumnHeaderTexts []TableColumnHeaderTexts `json:"column_header_texts,omitempty"`

	// A list of table column header texts normalized.
	ColumnHeaderTextsNormalized []TableColumnHeaderTextsNormalized `json:"column_header_texts_normalized,omitempty"`

	// A list of document attributes.
	Attributes []DocumentAttribute `json:"attributes,omitempty"`
}

TableBodyCells : Cells that are not table header, column header, or row header cells.

type TableCellKey

type TableCellKey struct {
	// The unique ID of the key in the table.
	CellID *string `json:"cell_id,omitempty"`

	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`

	// The text content of the table cell without HTML markup.
	Text *string `json:"text,omitempty"`
}

TableCellKey : A key in a key-value pair.

type TableCellValues

type TableCellValues struct {
	// The unique ID of the value in the table.
	CellID *string `json:"cell_id,omitempty"`

	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`

	// The text content of the table cell without HTML markup.
	Text *string `json:"text,omitempty"`
}

TableCellValues : A value in a key-value pair.

type TableColumnHeaderIds

type TableColumnHeaderIds struct {
	// The `id` value of a column header.
	ID *string `json:"id,omitempty"`
}

TableColumnHeaderIds : An array of values, each being the `id` value of a column header that is applicable to the current cell.

type TableColumnHeaderTexts

type TableColumnHeaderTexts struct {
	// The `text` value of a column header.
	Text *string `json:"text,omitempty"`
}

TableColumnHeaderTexts : An array of values, each being the `text` value of a column header that is applicable to the current cell.

type TableColumnHeaderTextsNormalized

type TableColumnHeaderTextsNormalized struct {
	// The normalized version of a column header text.
	TextNormalized *string `json:"text_normalized,omitempty"`
}

TableColumnHeaderTextsNormalized : If you provide customization input, the normalized version of the column header texts according to the customization; otherwise, the same value as `column_header_texts`.

type TableColumnHeaders

type TableColumnHeaders struct {
	// The unique ID of the cell in the current table.
	CellID *string `json:"cell_id,omitempty"`

	// The location of the column header cell in the current table as defined by its `begin` and `end` offsets,
	// respectfully, in the input document.
	Location interface{} `json:"location,omitempty"`

	// The textual contents of this cell from the input document without associated markup content.
	Text *string `json:"text,omitempty"`

	// If you provide customization input, the normalized version of the cell text according to the customization;
	// otherwise, the same value as `text`.
	TextNormalized *string `json:"text_normalized,omitempty"`

	// The `begin` index of this cell's `row` location in the current table.
	RowIndexBegin *int64 `json:"row_index_begin,omitempty"`

	// The `end` index of this cell's `row` location in the current table.
	RowIndexEnd *int64 `json:"row_index_end,omitempty"`

	// The `begin` index of this cell's `column` location in the current table.
	ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`

	// The `end` index of this cell's `column` location in the current table.
	ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}

TableColumnHeaders : Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.

type TableElementLocation

type TableElementLocation struct {
	// The element's `begin` index.
	Begin *int64 `json:"begin" validate:"required"`

	// The element's `end` index.
	End *int64 `json:"end" validate:"required"`
}

TableElementLocation : The numeric location of the identified element in the document, represented with two integers labeled `begin` and `end`.

type TableHeaders

type TableHeaders struct {
	// The unique ID of the cell in the current table.
	CellID *string `json:"cell_id,omitempty"`

	// The location of the table header cell in the current table as defined by its `begin` and `end` offsets,
	// respectfully, in the input document.
	Location interface{} `json:"location,omitempty"`

	// The textual contents of the cell from the input document without associated markup content.
	Text *string `json:"text,omitempty"`

	// The `begin` index of this cell's `row` location in the current table.
	RowIndexBegin *int64 `json:"row_index_begin,omitempty"`

	// The `end` index of this cell's `row` location in the current table.
	RowIndexEnd *int64 `json:"row_index_end,omitempty"`

	// The `begin` index of this cell's `column` location in the current table.
	ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`

	// The `end` index of this cell's `column` location in the current table.
	ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}

TableHeaders : The contents of the current table's header.

type TableKeyValuePairs

type TableKeyValuePairs struct {
	// A key in a key-value pair.
	Key *TableCellKey `json:"key,omitempty"`

	// A list of values in a key-value pair.
	Value []TableCellValues `json:"value,omitempty"`
}

TableKeyValuePairs : Key-value pairs detected across cell boundaries.

type TableResultTable

type TableResultTable struct {
	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`

	// The textual contents of the current table from the input document without associated markup content.
	Text *string `json:"text,omitempty"`

	// Text and associated location within a table.
	SectionTitle *TableTextLocation `json:"section_title,omitempty"`

	// Text and associated location within a table.
	Title *TableTextLocation `json:"title,omitempty"`

	// An array of table-level cells that apply as headers to all the other cells in the current table.
	TableHeaders []TableHeaders `json:"table_headers,omitempty"`

	// An array of row-level cells, each applicable as a header to other cells in the same row as itself, of the current
	// table.
	RowHeaders []TableRowHeaders `json:"row_headers,omitempty"`

	// An array of column-level cells, each applicable as a header to other cells in the same column as itself, of the
	// current table.
	ColumnHeaders []TableColumnHeaders `json:"column_headers,omitempty"`

	// An array of key-value pairs identified in the current table.
	KeyValuePairs []TableKeyValuePairs `json:"key_value_pairs,omitempty"`

	// An array of cells that are neither table header nor column header nor row header cells, of the current table with
	// corresponding row and column header associations.
	BodyCells []TableBodyCells `json:"body_cells,omitempty"`

	// An array of lists of textual entries across the document related to the current table being parsed.
	Contexts []TableTextLocation `json:"contexts,omitempty"`
}

TableResultTable : Full table object retrieved from Table Understanding Enrichment.

type TableRowHeaderIds

type TableRowHeaderIds struct {
	// The `id` values of a row header.
	ID *string `json:"id,omitempty"`
}

TableRowHeaderIds : An array of values, each being the `id` value of a row header that is applicable to this body cell.

type TableRowHeaderTexts

type TableRowHeaderTexts struct {
	// The `text` value of a row header.
	Text *string `json:"text,omitempty"`
}

TableRowHeaderTexts : An array of values, each being the `text` value of a row header that is applicable to this body cell.

type TableRowHeaderTextsNormalized

type TableRowHeaderTextsNormalized struct {
	// The normalized version of a row header text.
	TextNormalized *string `json:"text_normalized,omitempty"`
}

TableRowHeaderTextsNormalized : If you provide customization input, the normalized version of the row header texts according to the customization; otherwise, the same value as `row_header_texts`.

type TableRowHeaders

type TableRowHeaders struct {
	// The unique ID of the cell in the current table.
	CellID *string `json:"cell_id,omitempty"`

	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`

	// The textual contents of this cell from the input document without associated markup content.
	Text *string `json:"text,omitempty"`

	// If you provide customization input, the normalized version of the cell text according to the customization;
	// otherwise, the same value as `text`.
	TextNormalized *string `json:"text_normalized,omitempty"`

	// The `begin` index of this cell's `row` location in the current table.
	RowIndexBegin *int64 `json:"row_index_begin,omitempty"`

	// The `end` index of this cell's `row` location in the current table.
	RowIndexEnd *int64 `json:"row_index_end,omitempty"`

	// The `begin` index of this cell's `column` location in the current table.
	ColumnIndexBegin *int64 `json:"column_index_begin,omitempty"`

	// The `end` index of this cell's `column` location in the current table.
	ColumnIndexEnd *int64 `json:"column_index_end,omitempty"`
}

TableRowHeaders : Row-level cells, each applicable as a header to other cells in the same row as itself, of the current table.

type TableTextLocation

type TableTextLocation struct {
	// The text retrieved.
	Text *string `json:"text,omitempty"`

	// The numeric location of the identified element in the document, represented with two integers labeled `begin` and
	// `end`.
	Location *TableElementLocation `json:"location,omitempty"`
}

TableTextLocation : Text and associated location within a table.

type TrainingExample

type TrainingExample struct {
	// The document ID associated with this training example.
	DocumentID *string `json:"document_id" validate:"required"`

	// The collection ID associated with this training example.
	CollectionID *string `json:"collection_id" validate:"required"`

	// The relevance of the training example.
	Relevance *int64 `json:"relevance" validate:"required"`

	// The date and time the example was created.
	Created *strfmt.DateTime `json:"created,omitempty"`

	// The date and time the example was updated.
	Updated *strfmt.DateTime `json:"updated,omitempty"`
}

TrainingExample : Object that contains example response details for a training query.

type TrainingQuery

type TrainingQuery struct {
	// The query ID associated with the training query.
	QueryID *string `json:"query_id,omitempty"`

	// The natural text query for the training query.
	NaturalLanguageQuery *string `json:"natural_language_query" validate:"required"`

	// The filter used on the collection before the **natural_language_query** is applied.
	Filter *string `json:"filter,omitempty"`

	// The date and time the query was created.
	Created *strfmt.DateTime `json:"created,omitempty"`

	// The date and time the query was updated.
	Updated *strfmt.DateTime `json:"updated,omitempty"`

	// Array of training examples.
	Examples []TrainingExample `json:"examples" validate:"required"`
}

TrainingQuery : Object that contains training query details.

type TrainingQuerySet

type TrainingQuerySet struct {
	// Array of training queries.
	Queries []TrainingQuery `json:"queries,omitempty"`
}

TrainingQuerySet : Object specifying the training queries contained in the identified training set.

type UpdateCollectionOptions

type UpdateCollectionOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// The name of the collection.
	Name *string `json:"name,omitempty"`

	// A description of the collection.
	Description *string `json:"description,omitempty"`

	// An array of enrichments that are applied to this collection.
	Enrichments []CollectionEnrichment `json:"enrichments,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateCollectionOptions : The UpdateCollection options.

func (*UpdateCollectionOptions) SetCollectionID

func (_options *UpdateCollectionOptions) SetCollectionID(collectionID string) *UpdateCollectionOptions

SetCollectionID : Allow user to set CollectionID

func (*UpdateCollectionOptions) SetDescription

func (_options *UpdateCollectionOptions) SetDescription(description string) *UpdateCollectionOptions

SetDescription : Allow user to set Description

func (*UpdateCollectionOptions) SetEnrichments

func (_options *UpdateCollectionOptions) SetEnrichments(enrichments []CollectionEnrichment) *UpdateCollectionOptions

SetEnrichments : Allow user to set Enrichments

func (*UpdateCollectionOptions) SetHeaders

func (options *UpdateCollectionOptions) SetHeaders(param map[string]string) *UpdateCollectionOptions

SetHeaders : Allow user to set Headers

func (*UpdateCollectionOptions) SetName

func (_options *UpdateCollectionOptions) SetName(name string) *UpdateCollectionOptions

SetName : Allow user to set Name

func (*UpdateCollectionOptions) SetProjectID

func (_options *UpdateCollectionOptions) SetProjectID(projectID string) *UpdateCollectionOptions

SetProjectID : Allow user to set ProjectID

type UpdateDocumentOptions

type UpdateDocumentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the collection.
	CollectionID *string `json:"-" validate:"required,ne="`

	// The ID of the document.
	DocumentID *string `json:"-" validate:"required,ne="`

	// The content of the document to ingest. For maximum supported file size limits, see [the
	// documentation](https://cloud.ibm.com/docs/discovery-data?topic=discovery-data-collections#collections-doc-limits).
	File io.ReadCloser `json:"-"`

	// The filename for file.
	Filename *string `json:"-"`

	// The content type of file.
	FileContentType *string `json:"-"`

	// The maximum supported metadata file size is 1 MB. Metadata parts larger than 1 MB are rejected.
	//
	//
	// Example:  “` {
	//   "Creator": "Johnny Appleseed",
	//   "Subject": "Apples"
	// } “`.
	Metadata *string `json:"-"`

	// When `true`, the uploaded document is added to the collection even if the data for that collection is shared with
	// other collections.
	XWatsonDiscoveryForce *bool `json:"-"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateDocumentOptions : The UpdateDocument options.

func (*UpdateDocumentOptions) SetCollectionID

func (_options *UpdateDocumentOptions) SetCollectionID(collectionID string) *UpdateDocumentOptions

SetCollectionID : Allow user to set CollectionID

func (*UpdateDocumentOptions) SetDocumentID

func (_options *UpdateDocumentOptions) SetDocumentID(documentID string) *UpdateDocumentOptions

SetDocumentID : Allow user to set DocumentID

func (*UpdateDocumentOptions) SetFile

func (_options *UpdateDocumentOptions) SetFile(file io.ReadCloser) *UpdateDocumentOptions

SetFile : Allow user to set File

func (*UpdateDocumentOptions) SetFileContentType

func (_options *UpdateDocumentOptions) SetFileContentType(fileContentType string) *UpdateDocumentOptions

SetFileContentType : Allow user to set FileContentType

func (*UpdateDocumentOptions) SetFilename

func (_options *UpdateDocumentOptions) SetFilename(filename string) *UpdateDocumentOptions

SetFilename : Allow user to set Filename

func (*UpdateDocumentOptions) SetHeaders

func (options *UpdateDocumentOptions) SetHeaders(param map[string]string) *UpdateDocumentOptions

SetHeaders : Allow user to set Headers

func (*UpdateDocumentOptions) SetMetadata

func (_options *UpdateDocumentOptions) SetMetadata(metadata string) *UpdateDocumentOptions

SetMetadata : Allow user to set Metadata

func (*UpdateDocumentOptions) SetProjectID

func (_options *UpdateDocumentOptions) SetProjectID(projectID string) *UpdateDocumentOptions

SetProjectID : Allow user to set ProjectID

func (*UpdateDocumentOptions) SetXWatsonDiscoveryForce

func (_options *UpdateDocumentOptions) SetXWatsonDiscoveryForce(xWatsonDiscoveryForce bool) *UpdateDocumentOptions

SetXWatsonDiscoveryForce : Allow user to set XWatsonDiscoveryForce

type UpdateEnrichmentOptions

type UpdateEnrichmentOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the enrichment.
	EnrichmentID *string `json:"-" validate:"required,ne="`

	// A new name for the enrichment.
	Name *string `json:"name" validate:"required"`

	// A new description for the enrichment.
	Description *string `json:"description,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateEnrichmentOptions : The UpdateEnrichment options.

func (*UpdateEnrichmentOptions) SetDescription

func (_options *UpdateEnrichmentOptions) SetDescription(description string) *UpdateEnrichmentOptions

SetDescription : Allow user to set Description

func (*UpdateEnrichmentOptions) SetEnrichmentID

func (_options *UpdateEnrichmentOptions) SetEnrichmentID(enrichmentID string) *UpdateEnrichmentOptions

SetEnrichmentID : Allow user to set EnrichmentID

func (*UpdateEnrichmentOptions) SetHeaders

func (options *UpdateEnrichmentOptions) SetHeaders(param map[string]string) *UpdateEnrichmentOptions

SetHeaders : Allow user to set Headers

func (*UpdateEnrichmentOptions) SetName

func (_options *UpdateEnrichmentOptions) SetName(name string) *UpdateEnrichmentOptions

SetName : Allow user to set Name

func (*UpdateEnrichmentOptions) SetProjectID

func (_options *UpdateEnrichmentOptions) SetProjectID(projectID string) *UpdateEnrichmentOptions

SetProjectID : Allow user to set ProjectID

type UpdateProjectOptions

type UpdateProjectOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The new name to give this project.
	Name *string `json:"name,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateProjectOptions : The UpdateProject options.

func (*UpdateProjectOptions) SetHeaders

func (options *UpdateProjectOptions) SetHeaders(param map[string]string) *UpdateProjectOptions

SetHeaders : Allow user to set Headers

func (*UpdateProjectOptions) SetName

func (_options *UpdateProjectOptions) SetName(name string) *UpdateProjectOptions

SetName : Allow user to set Name

func (*UpdateProjectOptions) SetProjectID

func (_options *UpdateProjectOptions) SetProjectID(projectID string) *UpdateProjectOptions

SetProjectID : Allow user to set ProjectID

type UpdateTrainingQueryOptions

type UpdateTrainingQueryOptions struct {
	// The ID of the project. This information can be found from the *Integrate and Deploy* page in Discovery.
	ProjectID *string `json:"-" validate:"required,ne="`

	// The ID of the query used for training.
	QueryID *string `json:"-" validate:"required,ne="`

	// The natural text query for the training query.
	NaturalLanguageQuery *string `json:"natural_language_query" validate:"required"`

	// Array of training examples.
	Examples []TrainingExample `json:"examples" validate:"required"`

	// The filter used on the collection before the **natural_language_query** is applied.
	Filter *string `json:"filter,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

UpdateTrainingQueryOptions : The UpdateTrainingQuery options.

func (*UpdateTrainingQueryOptions) SetExamples

func (_options *UpdateTrainingQueryOptions) SetExamples(examples []TrainingExample) *UpdateTrainingQueryOptions

SetExamples : Allow user to set Examples

func (*UpdateTrainingQueryOptions) SetFilter

func (_options *UpdateTrainingQueryOptions) SetFilter(filter string) *UpdateTrainingQueryOptions

SetFilter : Allow user to set Filter

func (*UpdateTrainingQueryOptions) SetHeaders

func (options *UpdateTrainingQueryOptions) SetHeaders(param map[string]string) *UpdateTrainingQueryOptions

SetHeaders : Allow user to set Headers

func (*UpdateTrainingQueryOptions) SetNaturalLanguageQuery

func (_options *UpdateTrainingQueryOptions) SetNaturalLanguageQuery(naturalLanguageQuery string) *UpdateTrainingQueryOptions

SetNaturalLanguageQuery : Allow user to set NaturalLanguageQuery

func (*UpdateTrainingQueryOptions) SetProjectID

func (_options *UpdateTrainingQueryOptions) SetProjectID(projectID string) *UpdateTrainingQueryOptions

SetProjectID : Allow user to set ProjectID

func (*UpdateTrainingQueryOptions) SetQueryID

func (_options *UpdateTrainingQueryOptions) SetQueryID(queryID string) *UpdateTrainingQueryOptions

SetQueryID : Allow user to set QueryID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL