blob: 9e5347e16417f83d8c8d83a04addd739d4d6a2f9 [file] [log] [blame]
{
"clientLibrary": {
"name": "cloud.google.com/go/retail/apiv2",
"version": "1.16.1",
"language": "GO",
"apis": [
{
"id": "google.cloud.retail.v2",
"version": "v2"
}
]
},
"snippets": [
{
"regionTag": "retail_v2_generated_AnalyticsService_ExportAnalyticsMetrics_sync",
"title": "retail ExportAnalyticsMetrics Sample",
"description": "ExportAnalyticsMetrics exports analytics metrics.\n\n`Operation.response` is of type `ExportAnalyticsMetricsResponse`.\n`Operation.metadata` is of type `ExportMetadata`.",
"file": "AnalyticsClient/ExportAnalyticsMetrics/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ExportAnalyticsMetrics",
"fullName": "google.cloud.retail.v2.AnalyticsClient.ExportAnalyticsMetrics",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ExportAnalyticsMetricsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ExportAnalyticsMetricsOperation",
"client": {
"shortName": "AnalyticsClient",
"fullName": "google.cloud.retail.v2.AnalyticsClient"
},
"method": {
"shortName": "ExportAnalyticsMetrics",
"fullName": "google.cloud.retail.v2.AnalyticsService.ExportAnalyticsMetrics",
"service": {
"shortName": "AnalyticsService",
"fullName": "google.cloud.retail.v2.AnalyticsService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_AnalyticsService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "AnalyticsClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.AnalyticsClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "AnalyticsClient",
"fullName": "google.cloud.retail.v2.AnalyticsClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_AnalyticsService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "AnalyticsClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.AnalyticsClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "AnalyticsClient",
"fullName": "google.cloud.retail.v2.AnalyticsClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_AddCatalogAttribute_sync",
"title": "retail AddCatalogAttribute Sample",
"description": "AddCatalogAttribute adds the specified\n[CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the\n[AttributesConfig][google.cloud.retail.v2.AttributesConfig].\n\nIf the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add\nalready exists, an ALREADY_EXISTS error is returned.",
"file": "CatalogClient/AddCatalogAttribute/main.go",
"language": "GO",
"clientMethod": {
"shortName": "AddCatalogAttribute",
"fullName": "google.cloud.retail.v2.CatalogClient.AddCatalogAttribute",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.AddCatalogAttributeRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.AttributesConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "AddCatalogAttribute",
"fullName": "google.cloud.retail.v2.CatalogService.AddCatalogAttribute",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_GetAttributesConfig_sync",
"title": "retail GetAttributesConfig Sample",
"description": "GetAttributesConfig gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].",
"file": "CatalogClient/GetAttributesConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetAttributesConfig",
"fullName": "google.cloud.retail.v2.CatalogClient.GetAttributesConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetAttributesConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.AttributesConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "GetAttributesConfig",
"fullName": "google.cloud.retail.v2.CatalogService.GetAttributesConfig",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_GetCompletionConfig_sync",
"title": "retail GetCompletionConfig Sample",
"description": "GetCompletionConfig gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].",
"file": "CatalogClient/GetCompletionConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetCompletionConfig",
"fullName": "google.cloud.retail.v2.CatalogClient.GetCompletionConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetCompletionConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.CompletionConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "GetCompletionConfig",
"fullName": "google.cloud.retail.v2.CatalogService.GetCompletionConfig",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_GetDefaultBranch_sync",
"title": "retail GetDefaultBranch Sample",
"description": "GetDefaultBranch get which branch is currently default branch set by\n[CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch]\nmethod under a specified parent catalog.",
"file": "CatalogClient/GetDefaultBranch/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetDefaultBranch",
"fullName": "google.cloud.retail.v2.CatalogClient.GetDefaultBranch",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetDefaultBranchRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.GetDefaultBranchResponse",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "GetDefaultBranch",
"fullName": "google.cloud.retail.v2.CatalogService.GetDefaultBranch",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "CatalogClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.CatalogClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_ListCatalogs_sync",
"title": "retail ListCatalogs Sample",
"description": "ListCatalogs lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with\nthe project.",
"file": "CatalogClient/ListCatalogs/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListCatalogs",
"fullName": "google.cloud.retail.v2.CatalogClient.ListCatalogs",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ListCatalogsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "CatalogIterator",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "ListCatalogs",
"fullName": "google.cloud.retail.v2.CatalogService.ListCatalogs",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "CatalogClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.CatalogClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_RemoveCatalogAttribute_sync",
"title": "retail RemoveCatalogAttribute Sample",
"description": "RemoveCatalogAttribute removes the specified\n[CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the\n[AttributesConfig][google.cloud.retail.v2.AttributesConfig].\n\nIf the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to\nremove does not exist, a NOT_FOUND error is returned.",
"file": "CatalogClient/RemoveCatalogAttribute/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RemoveCatalogAttribute",
"fullName": "google.cloud.retail.v2.CatalogClient.RemoveCatalogAttribute",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.RemoveCatalogAttributeRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.AttributesConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "RemoveCatalogAttribute",
"fullName": "google.cloud.retail.v2.CatalogService.RemoveCatalogAttribute",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_ReplaceCatalogAttribute_sync",
"title": "retail ReplaceCatalogAttribute Sample",
"description": "ReplaceCatalogAttribute replaces the specified\n[CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the\n[AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the\ncatalog attribute with the same\n[CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key].\n\nIf the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to\nreplace does not exist, a NOT_FOUND error is returned.",
"file": "CatalogClient/ReplaceCatalogAttribute/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ReplaceCatalogAttribute",
"fullName": "google.cloud.retail.v2.CatalogClient.ReplaceCatalogAttribute",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ReplaceCatalogAttributeRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.AttributesConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "ReplaceCatalogAttribute",
"fullName": "google.cloud.retail.v2.CatalogService.ReplaceCatalogAttribute",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_SetDefaultBranch_sync",
"title": "retail SetDefaultBranch Sample",
"description": "SetDefaultBranch set a specified branch id as default branch. API methods such as\n[SearchService.Search][google.cloud.retail.v2.SearchService.Search],\n[ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct],\n[ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts]\nwill treat requests using \"default_branch\" to the actual branch id set as\ndefault.\n\nFor example, if `projects/*/locations/*/catalogs/*/branches/1` is set as\ndefault, setting\n[SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to\n`projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent\nto setting\n[SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to\n`projects/*/locations/*/catalogs/*/branches/1`.\n\nUsing multiple branches can be useful when developers would like\nto have a staging branch to test and verify for future usage. When it\nbecomes ready, developers switch on the staging branch using this API while\nkeeping using `projects/*/locations/*/catalogs/*/branches/default_branch`\nas [SearchRequest.branch][google.cloud.retail.v2.SearchRequest.branch] to\nroute the traffic to this staging branch.\n\nCAUTION: If you have live predict/search traffic, switching the default\nbranch could potentially cause outages if the ID space of the new branch is\nvery different from the old one.\n\nMore specifically: \n\n* PredictionService will only return product IDs from branch {newBranch}.\n* SearchService will only return product IDs from branch {newBranch}\n(if branch is not explicitly set).\n* UserEventService will only join events with products from branch\n{newBranch}.",
"file": "CatalogClient/SetDefaultBranch/main.go",
"language": "GO",
"clientMethod": {
"shortName": "SetDefaultBranch",
"fullName": "google.cloud.retail.v2.CatalogClient.SetDefaultBranch",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.SetDefaultBranchRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "SetDefaultBranch",
"fullName": "google.cloud.retail.v2.CatalogService.SetDefaultBranch",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_UpdateAttributesConfig_sync",
"title": "retail UpdateAttributesConfig Sample",
"description": "UpdateAttributesConfig updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].\n\nThe catalog attributes in the request will be updated in the catalog, or\ninserted if they do not exist. Existing catalog attributes not included in\nthe request will remain unchanged. Attributes that are assigned to\nproducts, but do not exist at the catalog level, are always included in the\nresponse. The product attribute is assigned default values for missing\ncatalog attribute fields, e.g., searchable and dynamic facetable options.",
"file": "CatalogClient/UpdateAttributesConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateAttributesConfig",
"fullName": "google.cloud.retail.v2.CatalogClient.UpdateAttributesConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateAttributesConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.AttributesConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "UpdateAttributesConfig",
"fullName": "google.cloud.retail.v2.CatalogService.UpdateAttributesConfig",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_UpdateCatalog_sync",
"title": "retail UpdateCatalog Sample",
"description": "UpdateCatalog updates the [Catalog][google.cloud.retail.v2.Catalog]s.",
"file": "CatalogClient/UpdateCatalog/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateCatalog",
"fullName": "google.cloud.retail.v2.CatalogClient.UpdateCatalog",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateCatalogRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Catalog",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "UpdateCatalog",
"fullName": "google.cloud.retail.v2.CatalogService.UpdateCatalog",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CatalogService_UpdateCompletionConfig_sync",
"title": "retail UpdateCompletionConfig Sample",
"description": "UpdateCompletionConfig updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.",
"file": "CatalogClient/UpdateCompletionConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateCompletionConfig",
"fullName": "google.cloud.retail.v2.CatalogClient.UpdateCompletionConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateCompletionConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.CompletionConfig",
"client": {
"shortName": "CatalogClient",
"fullName": "google.cloud.retail.v2.CatalogClient"
},
"method": {
"shortName": "UpdateCompletionConfig",
"fullName": "google.cloud.retail.v2.CatalogService.UpdateCompletionConfig",
"service": {
"shortName": "CatalogService",
"fullName": "google.cloud.retail.v2.CatalogService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CompletionService_CompleteQuery_sync",
"title": "retail CompleteQuery Sample",
"description": "CompleteQuery completes the specified prefix with keyword suggestions.\n\nThis feature is only available for users who have Retail Search enabled.\nEnable Retail Search on Cloud Console before using this feature.",
"file": "CompletionClient/CompleteQuery/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CompleteQuery",
"fullName": "google.cloud.retail.v2.CompletionClient.CompleteQuery",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.CompleteQueryRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.CompleteQueryResponse",
"client": {
"shortName": "CompletionClient",
"fullName": "google.cloud.retail.v2.CompletionClient"
},
"method": {
"shortName": "CompleteQuery",
"fullName": "google.cloud.retail.v2.CompletionService.CompleteQuery",
"service": {
"shortName": "CompletionService",
"fullName": "google.cloud.retail.v2.CompletionService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CompletionService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "CompletionClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.CompletionClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "CompletionClient",
"fullName": "google.cloud.retail.v2.CompletionClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CompletionService_ImportCompletionData_sync",
"title": "retail ImportCompletionData Sample",
"description": "ImportCompletionData bulk import of processed completion dataset.\n\nRequest processing is asynchronous. Partial updating is not supported.\n\nThe operation is successfully finished only after the imported suggestions\nare indexed successfully and ready for serving. The process takes hours.\n\nThis feature is only available for users who have Retail Search enabled.\nEnable Retail Search on Cloud Console before using this feature.",
"file": "CompletionClient/ImportCompletionData/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ImportCompletionData",
"fullName": "google.cloud.retail.v2.CompletionClient.ImportCompletionData",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ImportCompletionDataRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ImportCompletionDataOperation",
"client": {
"shortName": "CompletionClient",
"fullName": "google.cloud.retail.v2.CompletionClient"
},
"method": {
"shortName": "ImportCompletionData",
"fullName": "google.cloud.retail.v2.CompletionService.ImportCompletionData",
"service": {
"shortName": "CompletionService",
"fullName": "google.cloud.retail.v2.CompletionService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_CompletionService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "CompletionClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.CompletionClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "CompletionClient",
"fullName": "google.cloud.retail.v2.CompletionClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_CreateControl_sync",
"title": "retail CreateControl Sample",
"description": "CreateControl creates a Control.\n\nIf the [Control][google.cloud.retail.v2.Control] to create already exists,\nan ALREADY_EXISTS error is returned.",
"file": "ControlClient/CreateControl/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateControl",
"fullName": "google.cloud.retail.v2.ControlClient.CreateControl",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.CreateControlRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Control",
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "CreateControl",
"fullName": "google.cloud.retail.v2.ControlService.CreateControl",
"service": {
"shortName": "ControlService",
"fullName": "google.cloud.retail.v2.ControlService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_DeleteControl_sync",
"title": "retail DeleteControl Sample",
"description": "DeleteControl deletes a Control.\n\nIf the [Control][google.cloud.retail.v2.Control] to delete does not exist,\na NOT_FOUND error is returned.",
"file": "ControlClient/DeleteControl/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteControl",
"fullName": "google.cloud.retail.v2.ControlClient.DeleteControl",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.DeleteControlRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "DeleteControl",
"fullName": "google.cloud.retail.v2.ControlService.DeleteControl",
"service": {
"shortName": "ControlService",
"fullName": "google.cloud.retail.v2.ControlService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_GetControl_sync",
"title": "retail GetControl Sample",
"description": "GetControl gets a Control.",
"file": "ControlClient/GetControl/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetControl",
"fullName": "google.cloud.retail.v2.ControlClient.GetControl",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetControlRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Control",
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "GetControl",
"fullName": "google.cloud.retail.v2.ControlService.GetControl",
"service": {
"shortName": "ControlService",
"fullName": "google.cloud.retail.v2.ControlService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "ControlClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.ControlClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_ListControls_sync",
"title": "retail ListControls Sample",
"description": "ListControls lists all Controls by their parent\n[Catalog][google.cloud.retail.v2.Catalog].",
"file": "ControlClient/ListControls/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListControls",
"fullName": "google.cloud.retail.v2.ControlClient.ListControls",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ListControlsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ControlIterator",
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "ListControls",
"fullName": "google.cloud.retail.v2.ControlService.ListControls",
"service": {
"shortName": "ControlService",
"fullName": "google.cloud.retail.v2.ControlService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "ControlClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.ControlClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ControlService_UpdateControl_sync",
"title": "retail UpdateControl Sample",
"description": "UpdateControl updates a Control.\n\n[Control][google.cloud.retail.v2.Control] cannot be set to a different\noneof field, if so an INVALID_ARGUMENT is returned. If the\n[Control][google.cloud.retail.v2.Control] to update does not exist, a\nNOT_FOUND error is returned.",
"file": "ControlClient/UpdateControl/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateControl",
"fullName": "google.cloud.retail.v2.ControlClient.UpdateControl",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateControlRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Control",
"client": {
"shortName": "ControlClient",
"fullName": "google.cloud.retail.v2.ControlClient"
},
"method": {
"shortName": "UpdateControl",
"fullName": "google.cloud.retail.v2.ControlService.UpdateControl",
"service": {
"shortName": "ControlService",
"fullName": "google.cloud.retail.v2.ControlService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_CreateModel_sync",
"title": "retail CreateModel Sample",
"description": "CreateModel creates a new model.",
"file": "ModelClient/CreateModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateModel",
"fullName": "google.cloud.retail.v2.ModelClient.CreateModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.CreateModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "CreateModelOperation",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "CreateModel",
"fullName": "google.cloud.retail.v2.ModelService.CreateModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_DeleteModel_sync",
"title": "retail DeleteModel Sample",
"description": "DeleteModel deletes an existing model.",
"file": "ModelClient/DeleteModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteModel",
"fullName": "google.cloud.retail.v2.ModelClient.DeleteModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.DeleteModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "DeleteModel",
"fullName": "google.cloud.retail.v2.ModelService.DeleteModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_GetModel_sync",
"title": "retail GetModel Sample",
"description": "GetModel gets a model.",
"file": "ModelClient/GetModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetModel",
"fullName": "google.cloud.retail.v2.ModelClient.GetModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Model",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "GetModel",
"fullName": "google.cloud.retail.v2.ModelService.GetModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "ModelClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.ModelClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_ListModels_sync",
"title": "retail ListModels Sample",
"description": "ListModels lists all the models linked to this event store.",
"file": "ModelClient/ListModels/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListModels",
"fullName": "google.cloud.retail.v2.ModelClient.ListModels",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ListModelsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ModelIterator",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "ListModels",
"fullName": "google.cloud.retail.v2.ModelService.ListModels",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "ModelClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.ModelClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_PauseModel_sync",
"title": "retail PauseModel Sample",
"description": "PauseModel pauses the training of an existing model.",
"file": "ModelClient/PauseModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "PauseModel",
"fullName": "google.cloud.retail.v2.ModelClient.PauseModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.PauseModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Model",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "PauseModel",
"fullName": "google.cloud.retail.v2.ModelService.PauseModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_ResumeModel_sync",
"title": "retail ResumeModel Sample",
"description": "ResumeModel resumes the training of an existing model.",
"file": "ModelClient/ResumeModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ResumeModel",
"fullName": "google.cloud.retail.v2.ModelClient.ResumeModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ResumeModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Model",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "ResumeModel",
"fullName": "google.cloud.retail.v2.ModelService.ResumeModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_TuneModel_sync",
"title": "retail TuneModel Sample",
"description": "TuneModel tunes an existing model.",
"file": "ModelClient/TuneModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "TuneModel",
"fullName": "google.cloud.retail.v2.ModelClient.TuneModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.TuneModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "TuneModelOperation",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "TuneModel",
"fullName": "google.cloud.retail.v2.ModelService.TuneModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ModelService_UpdateModel_sync",
"title": "retail UpdateModel Sample",
"description": "UpdateModel update of model metadata. Only fields that\ncurrently can be updated are: `filtering_option` and\n`periodic_tuning_state`.\nIf other values are provided, this API method ignores them.",
"file": "ModelClient/UpdateModel/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateModel",
"fullName": "google.cloud.retail.v2.ModelClient.UpdateModel",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateModelRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Model",
"client": {
"shortName": "ModelClient",
"fullName": "google.cloud.retail.v2.ModelClient"
},
"method": {
"shortName": "UpdateModel",
"fullName": "google.cloud.retail.v2.ModelService.UpdateModel",
"service": {
"shortName": "ModelService",
"fullName": "google.cloud.retail.v2.ModelService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_PredictionService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "PredictionClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.PredictionClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "PredictionClient",
"fullName": "google.cloud.retail.v2.PredictionClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_PredictionService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "PredictionClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.PredictionClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "PredictionClient",
"fullName": "google.cloud.retail.v2.PredictionClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_PredictionService_Predict_sync",
"title": "retail Predict Sample",
"description": "Predict makes a recommendation prediction.",
"file": "PredictionClient/Predict/main.go",
"language": "GO",
"clientMethod": {
"shortName": "Predict",
"fullName": "google.cloud.retail.v2.PredictionClient.Predict",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.PredictRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.PredictResponse",
"client": {
"shortName": "PredictionClient",
"fullName": "google.cloud.retail.v2.PredictionClient"
},
"method": {
"shortName": "Predict",
"fullName": "google.cloud.retail.v2.PredictionService.Predict",
"service": {
"shortName": "PredictionService",
"fullName": "google.cloud.retail.v2.PredictionService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_AddFulfillmentPlaces_sync",
"title": "retail AddFulfillmentPlaces Sample",
"description": "AddFulfillmentPlaces it is recommended to use the\n[ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]\nmethod instead of\n[ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces].\n[ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories]\nachieves the same results but provides more fine-grained control over\ningesting local inventory data.\n\nIncrementally adds place IDs to\n[Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].\n\nThis process is asynchronous and does not require the\n[Product][google.cloud.retail.v2.Product] to exist before updating\nfulfillment information. If the request is valid, the update will be\nenqueued and processed downstream. As a consequence, when a response is\nreturned, the added place IDs are not immediately manifested in the\n[Product][google.cloud.retail.v2.Product] queried by\n[ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]\nor\n[ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].\n\nThe returned [Operation][google.longrunning.Operation]s will be obsolete\nafter 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]\nAPI will return NOT_FOUND afterwards.\n\nIf conflicting updates are issued, the\n[Operation][google.longrunning.Operation]s associated with the stale\nupdates will not be marked as [done][google.longrunning.Operation.done]\nuntil being obsolete.",
"file": "ProductClient/AddFulfillmentPlaces/main.go",
"language": "GO",
"clientMethod": {
"shortName": "AddFulfillmentPlaces",
"fullName": "google.cloud.retail.v2.ProductClient.AddFulfillmentPlaces",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.AddFulfillmentPlacesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "AddFulfillmentPlacesOperation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "AddFulfillmentPlaces",
"fullName": "google.cloud.retail.v2.ProductService.AddFulfillmentPlaces",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_AddLocalInventories_sync",
"title": "retail AddLocalInventories Sample",
"description": "AddLocalInventories updates local inventory information for a\n[Product][google.cloud.retail.v2.Product] at a list of places, while\nrespecting the last update timestamps of each inventory field.\n\nThis process is asynchronous and does not require the\n[Product][google.cloud.retail.v2.Product] to exist before updating\ninventory information. If the request is valid, the update will be enqueued\nand processed downstream. As a consequence, when a response is returned,\nupdates are not immediately manifested in the\n[Product][google.cloud.retail.v2.Product] queried by\n[ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]\nor\n[ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].\n\nLocal inventory information can only be modified using this method.\n[ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]\nand\n[ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]\nhas no effect on local inventories.\n\nThe returned [Operation][google.longrunning.Operation]s will be obsolete\nafter 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]\nAPI will return NOT_FOUND afterwards.\n\nIf conflicting updates are issued, the\n[Operation][google.longrunning.Operation]s associated with the stale\nupdates will not be marked as [done][google.longrunning.Operation.done]\nuntil being obsolete.",
"file": "ProductClient/AddLocalInventories/main.go",
"language": "GO",
"clientMethod": {
"shortName": "AddLocalInventories",
"fullName": "google.cloud.retail.v2.ProductClient.AddLocalInventories",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.AddLocalInventoriesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "AddLocalInventoriesOperation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "AddLocalInventories",
"fullName": "google.cloud.retail.v2.ProductService.AddLocalInventories",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_CreateProduct_sync",
"title": "retail CreateProduct Sample",
"description": "CreateProduct creates a [Product][google.cloud.retail.v2.Product].",
"file": "ProductClient/CreateProduct/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateProduct",
"fullName": "google.cloud.retail.v2.ProductClient.CreateProduct",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.CreateProductRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Product",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "CreateProduct",
"fullName": "google.cloud.retail.v2.ProductService.CreateProduct",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_DeleteProduct_sync",
"title": "retail DeleteProduct Sample",
"description": "DeleteProduct deletes a [Product][google.cloud.retail.v2.Product].",
"file": "ProductClient/DeleteProduct/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteProduct",
"fullName": "google.cloud.retail.v2.ProductClient.DeleteProduct",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.DeleteProductRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "DeleteProduct",
"fullName": "google.cloud.retail.v2.ProductService.DeleteProduct",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "ProductClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.ProductClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_GetProduct_sync",
"title": "retail GetProduct Sample",
"description": "GetProduct gets a [Product][google.cloud.retail.v2.Product].",
"file": "ProductClient/GetProduct/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetProduct",
"fullName": "google.cloud.retail.v2.ProductClient.GetProduct",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetProductRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Product",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "GetProduct",
"fullName": "google.cloud.retail.v2.ProductService.GetProduct",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_ImportProducts_sync",
"title": "retail ImportProducts Sample",
"description": "ImportProducts bulk import of multiple [Product][google.cloud.retail.v2.Product]s.\n\nRequest processing may be synchronous.\nNon-existing items are created.\n\nNote that it is possible for a subset of the\n[Product][google.cloud.retail.v2.Product]s to be successfully updated.",
"file": "ProductClient/ImportProducts/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ImportProducts",
"fullName": "google.cloud.retail.v2.ProductClient.ImportProducts",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ImportProductsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ImportProductsOperation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "ImportProducts",
"fullName": "google.cloud.retail.v2.ProductService.ImportProducts",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "ProductClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.ProductClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_ListProducts_sync",
"title": "retail ListProducts Sample",
"description": "ListProducts gets a list of [Product][google.cloud.retail.v2.Product]s.",
"file": "ProductClient/ListProducts/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListProducts",
"fullName": "google.cloud.retail.v2.ProductClient.ListProducts",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ListProductsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ProductIterator",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "ListProducts",
"fullName": "google.cloud.retail.v2.ProductService.ListProducts",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_RemoveFulfillmentPlaces_sync",
"title": "retail RemoveFulfillmentPlaces Sample",
"description": "RemoveFulfillmentPlaces it is recommended to use the\n[ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]\nmethod instead of\n[ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].\n[ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories]\nachieves the same results but provides more fine-grained control over\ningesting local inventory data.\n\nIncrementally removes place IDs from a\n[Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].\n\nThis process is asynchronous and does not require the\n[Product][google.cloud.retail.v2.Product] to exist before updating\nfulfillment information. If the request is valid, the update will be\nenqueued and processed downstream. As a consequence, when a response is\nreturned, the removed place IDs are not immediately manifested in the\n[Product][google.cloud.retail.v2.Product] queried by\n[ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]\nor\n[ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].\n\nThe returned [Operation][google.longrunning.Operation]s will be obsolete\nafter 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]\nAPI will return NOT_FOUND afterwards.\n\nIf conflicting updates are issued, the\n[Operation][google.longrunning.Operation]s associated with the stale\nupdates will not be marked as [done][google.longrunning.Operation.done]\nuntil being obsolete.",
"file": "ProductClient/RemoveFulfillmentPlaces/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RemoveFulfillmentPlaces",
"fullName": "google.cloud.retail.v2.ProductClient.RemoveFulfillmentPlaces",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.RemoveFulfillmentPlacesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "RemoveFulfillmentPlacesOperation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "RemoveFulfillmentPlaces",
"fullName": "google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_RemoveLocalInventories_sync",
"title": "retail RemoveLocalInventories Sample",
"description": "RemoveLocalInventories remove local inventory information for a\n[Product][google.cloud.retail.v2.Product] at a list of places at a removal\ntimestamp.\n\nThis process is asynchronous. If the request is valid, the removal will be\nenqueued and processed downstream. As a consequence, when a response is\nreturned, removals are not immediately manifested in the\n[Product][google.cloud.retail.v2.Product] queried by\n[ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]\nor\n[ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].\n\nLocal inventory information can only be removed using this method.\n[ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]\nand\n[ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]\nhas no effect on local inventories.\n\nThe returned [Operation][google.longrunning.Operation]s will be obsolete\nafter 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]\nAPI will return NOT_FOUND afterwards.\n\nIf conflicting updates are issued, the\n[Operation][google.longrunning.Operation]s associated with the stale\nupdates will not be marked as [done][google.longrunning.Operation.done]\nuntil being obsolete.",
"file": "ProductClient/RemoveLocalInventories/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RemoveLocalInventories",
"fullName": "google.cloud.retail.v2.ProductClient.RemoveLocalInventories",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.RemoveLocalInventoriesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "RemoveLocalInventoriesOperation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "RemoveLocalInventories",
"fullName": "google.cloud.retail.v2.ProductService.RemoveLocalInventories",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_SetInventory_sync",
"title": "retail SetInventory Sample",
"description": "SetInventory updates inventory information for a\n[Product][google.cloud.retail.v2.Product] while respecting the last update\ntimestamps of each inventory field.\n\nThis process is asynchronous and does not require the\n[Product][google.cloud.retail.v2.Product] to exist before updating\nfulfillment information. If the request is valid, the update is enqueued\nand processed downstream. As a consequence, when a response is returned,\nupdates are not immediately manifested in the\n[Product][google.cloud.retail.v2.Product] queried by\n[ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct]\nor\n[ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].\n\nWhen inventory is updated with\n[ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]\nand\n[ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct],\nthe specified inventory field value(s) overwrite any existing value(s)\nwhile ignoring the last update time for this field. Furthermore, the last\nupdate times for the specified inventory fields are overwritten by the\ntimes of the\n[ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct]\nor\n[ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct]\nrequest.\n\nIf no inventory fields are set in\n[CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product],\nthen any pre-existing inventory information for this product is used.\n\nIf no inventory fields are set in\n[SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask],\nthen any existing inventory information is preserved.\n\nPre-existing inventory information can only be updated with\n[ProductService.SetInventory][google.cloud.retail.v2.ProductService.SetInventory],\n[ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces],\nand\n[ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].\n\nThe returned [Operation][google.longrunning.Operation]s is obsolete after\none day, and the [GetOperation][google.longrunning.Operations.GetOperation]\nAPI returns `NOT_FOUND` afterwards.\n\nIf conflicting updates are issued, the\n[Operation][google.longrunning.Operation]s associated with the stale\nupdates are not marked as [done][google.longrunning.Operation.done] until\nthey are obsolete.",
"file": "ProductClient/SetInventory/main.go",
"language": "GO",
"clientMethod": {
"shortName": "SetInventory",
"fullName": "google.cloud.retail.v2.ProductClient.SetInventory",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.SetInventoryRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "SetInventoryOperation",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "SetInventory",
"fullName": "google.cloud.retail.v2.ProductService.SetInventory",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ProductService_UpdateProduct_sync",
"title": "retail UpdateProduct Sample",
"description": "UpdateProduct updates a [Product][google.cloud.retail.v2.Product].",
"file": "ProductClient/UpdateProduct/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateProduct",
"fullName": "google.cloud.retail.v2.ProductClient.UpdateProduct",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateProductRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.Product",
"client": {
"shortName": "ProductClient",
"fullName": "google.cloud.retail.v2.ProductClient"
},
"method": {
"shortName": "UpdateProduct",
"fullName": "google.cloud.retail.v2.ProductService.UpdateProduct",
"service": {
"shortName": "ProductService",
"fullName": "google.cloud.retail.v2.ProductService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_SearchService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "SearchClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.SearchClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "SearchClient",
"fullName": "google.cloud.retail.v2.SearchClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_SearchService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "SearchClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.SearchClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "SearchClient",
"fullName": "google.cloud.retail.v2.SearchClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_SearchService_Search_sync",
"title": "retail Search Sample",
"description": "Search performs a search.\n\nThis feature is only available for users who have Retail Search enabled.\nEnable Retail Search on Cloud Console before using this feature.",
"file": "SearchClient/Search/main.go",
"language": "GO",
"clientMethod": {
"shortName": "Search",
"fullName": "google.cloud.retail.v2.SearchClient.Search",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.SearchRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "SearchResponse_SearchResultIterator",
"client": {
"shortName": "SearchClient",
"fullName": "google.cloud.retail.v2.SearchClient"
},
"method": {
"shortName": "Search",
"fullName": "google.cloud.retail.v2.SearchService.Search",
"service": {
"shortName": "SearchService",
"fullName": "google.cloud.retail.v2.SearchService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_AddControl_sync",
"title": "retail AddControl Sample",
"description": "AddControl enables a Control on the specified ServingConfig.\nThe control is added in the last position of the list of controls\nit belongs to (e.g. if it's a facet spec control it will be applied\nin the last position of servingConfig.facetSpecIds)\nReturns a ALREADY_EXISTS error if the control has already been applied.\nReturns a FAILED_PRECONDITION error if the addition could exceed maximum\nnumber of control allowed for that type of control.",
"file": "ServingConfigClient/AddControl/main.go",
"language": "GO",
"clientMethod": {
"shortName": "AddControl",
"fullName": "google.cloud.retail.v2.ServingConfigClient.AddControl",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.AddControlRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.ServingConfig",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "AddControl",
"fullName": "google.cloud.retail.v2.ServingConfigService.AddControl",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_CreateServingConfig_sync",
"title": "retail CreateServingConfig Sample",
"description": "CreateServingConfig creates a ServingConfig.\n\nA maximum of 100 [ServingConfig][google.cloud.retail.v2.ServingConfig]s are\nallowed in a [Catalog][google.cloud.retail.v2.Catalog], otherwise a\nFAILED_PRECONDITION error is returned.",
"file": "ServingConfigClient/CreateServingConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CreateServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigClient.CreateServingConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.CreateServingConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.ServingConfig",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "CreateServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigService.CreateServingConfig",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_DeleteServingConfig_sync",
"title": "retail DeleteServingConfig Sample",
"description": "DeleteServingConfig deletes a ServingConfig.\n\nReturns a NotFound error if the ServingConfig does not exist.",
"file": "ServingConfigClient/DeleteServingConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "DeleteServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigClient.DeleteServingConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.DeleteServingConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "DeleteServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigService.DeleteServingConfig",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 51,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "ServingConfigClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.ServingConfigClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_GetServingConfig_sync",
"title": "retail GetServingConfig Sample",
"description": "GetServingConfig gets a ServingConfig.\n\nReturns a NotFound error if the ServingConfig does not exist.",
"file": "ServingConfigClient/GetServingConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigClient.GetServingConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.GetServingConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.ServingConfig",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "GetServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigService.GetServingConfig",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "ServingConfigClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.ServingConfigClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_ListServingConfigs_sync",
"title": "retail ListServingConfigs Sample",
"description": "ListServingConfigs lists all ServingConfigs linked to this catalog.",
"file": "ServingConfigClient/ListServingConfigs/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListServingConfigs",
"fullName": "google.cloud.retail.v2.ServingConfigClient.ListServingConfigs",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ListServingConfigsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ServingConfigIterator",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "ListServingConfigs",
"fullName": "google.cloud.retail.v2.ServingConfigService.ListServingConfigs",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_RemoveControl_sync",
"title": "retail RemoveControl Sample",
"description": "RemoveControl disables a Control on the specified ServingConfig.\nThe control is removed from the ServingConfig.\nReturns a NOT_FOUND error if the Control is not enabled for the\nServingConfig.",
"file": "ServingConfigClient/RemoveControl/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RemoveControl",
"fullName": "google.cloud.retail.v2.ServingConfigClient.RemoveControl",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.RemoveControlRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.ServingConfig",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "RemoveControl",
"fullName": "google.cloud.retail.v2.ServingConfigService.RemoveControl",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_ServingConfigService_UpdateServingConfig_sync",
"title": "retail UpdateServingConfig Sample",
"description": "UpdateServingConfig updates a ServingConfig.",
"file": "ServingConfigClient/UpdateServingConfig/main.go",
"language": "GO",
"clientMethod": {
"shortName": "UpdateServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigClient.UpdateServingConfig",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.UpdateServingConfigRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.ServingConfig",
"client": {
"shortName": "ServingConfigClient",
"fullName": "google.cloud.retail.v2.ServingConfigClient"
},
"method": {
"shortName": "UpdateServingConfig",
"fullName": "google.cloud.retail.v2.ServingConfigService.UpdateServingConfig",
"service": {
"shortName": "ServingConfigService",
"fullName": "google.cloud.retail.v2.ServingConfigService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_CollectUserEvent_sync",
"title": "retail CollectUserEvent Sample",
"description": "CollectUserEvent writes a single user event from the browser. This uses a GET request to\ndue to browser restriction of POST-ing to a 3rd party domain.\n\nThis method is used only by the Retail API JavaScript pixel and Google Tag\nManager. Users should not call this method directly.",
"file": "UserEventClient/CollectUserEvent/main.go",
"language": "GO",
"clientMethod": {
"shortName": "CollectUserEvent",
"fullName": "google.cloud.retail.v2.UserEventClient.CollectUserEvent",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.CollectUserEventRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*httpbodypb.HttpBody",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "CollectUserEvent",
"fullName": "google.cloud.retail.v2.UserEventService.CollectUserEvent",
"service": {
"shortName": "UserEventService",
"fullName": "google.cloud.retail.v2.UserEventService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_GetOperation_sync",
"title": "retail GetOperation Sample",
"description": "GetOperation is a utility method from google.longrunning.Operations.",
"file": "UserEventClient/GetOperation/main.go",
"language": "GO",
"clientMethod": {
"shortName": "GetOperation",
"fullName": "google.cloud.retail.v2.UserEventClient.GetOperation",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.GetOperationRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*longrunningpb.Operation",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "GetOperation",
"fullName": "google.longrunning.Operations.GetOperation",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_ImportUserEvents_sync",
"title": "retail ImportUserEvents Sample",
"description": "ImportUserEvents bulk import of User events. Request processing might be\nsynchronous. Events that already exist are skipped.\nUse this method for backfilling historical user events.\n\n`Operation.response` is of type `ImportResponse`. Note that it is\npossible for a subset of the items to be successfully inserted.\n`Operation.metadata` is of type `ImportMetadata`.",
"file": "UserEventClient/ImportUserEvents/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ImportUserEvents",
"fullName": "google.cloud.retail.v2.UserEventClient.ImportUserEvents",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.ImportUserEventsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "ImportUserEventsOperation",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "ImportUserEvents",
"fullName": "google.cloud.retail.v2.UserEventService.ImportUserEvents",
"service": {
"shortName": "UserEventService",
"fullName": "google.cloud.retail.v2.UserEventService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_ListOperations_sync",
"title": "retail ListOperations Sample",
"description": "ListOperations is a utility method from google.longrunning.Operations.",
"file": "UserEventClient/ListOperations/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ListOperations",
"fullName": "google.cloud.retail.v2.UserEventClient.ListOperations",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "longrunningpb.ListOperationsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "OperationIterator",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "ListOperations",
"fullName": "google.longrunning.Operations.ListOperations",
"service": {
"shortName": "Operations",
"fullName": "google.longrunning.Operations"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 66,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_PurgeUserEvents_sync",
"title": "retail PurgeUserEvents Sample",
"description": "PurgeUserEvents deletes permanently all user events specified by the filter provided.\nDepending on the number of events specified by the filter, this operation\ncould take hours or days to complete. To test a filter, use the list\ncommand first.",
"file": "UserEventClient/PurgeUserEvents/main.go",
"language": "GO",
"clientMethod": {
"shortName": "PurgeUserEvents",
"fullName": "google.cloud.retail.v2.UserEventClient.PurgeUserEvents",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.PurgeUserEventsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "PurgeUserEventsOperation",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "PurgeUserEvents",
"fullName": "google.cloud.retail.v2.UserEventService.PurgeUserEvents",
"service": {
"shortName": "UserEventService",
"fullName": "google.cloud.retail.v2.UserEventService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_RejoinUserEvents_sync",
"title": "retail RejoinUserEvents Sample",
"description": "RejoinUserEvents starts a user-event rejoin operation with latest product catalog. Events\nare not annotated with detailed product information for products that are\nmissing from the catalog when the user event is ingested. These\nevents are stored as unjoined events with limited usage on training and\nserving. You can use this method to start a join operation on specified\nevents with the latest version of product catalog. You can also use this\nmethod to correct events joined with the wrong product catalog. A rejoin\noperation can take hours or days to complete.",
"file": "UserEventClient/RejoinUserEvents/main.go",
"language": "GO",
"clientMethod": {
"shortName": "RejoinUserEvents",
"fullName": "google.cloud.retail.v2.UserEventClient.RejoinUserEvents",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.RejoinUserEventsRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "RejoinUserEventsOperation",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "RejoinUserEvents",
"fullName": "google.cloud.retail.v2.UserEventService.RejoinUserEvents",
"service": {
"shortName": "UserEventService",
"fullName": "google.cloud.retail.v2.UserEventService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 58,
"type": "FULL"
}
]
},
{
"regionTag": "retail_v2_generated_UserEventService_WriteUserEvent_sync",
"title": "retail WriteUserEvent Sample",
"description": "WriteUserEvent writes a single user event.",
"file": "UserEventClient/WriteUserEvent/main.go",
"language": "GO",
"clientMethod": {
"shortName": "WriteUserEvent",
"fullName": "google.cloud.retail.v2.UserEventClient.WriteUserEvent",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "retailpb.WriteUserEventRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*retailpb.UserEvent",
"client": {
"shortName": "UserEventClient",
"fullName": "google.cloud.retail.v2.UserEventClient"
},
"method": {
"shortName": "WriteUserEvent",
"fullName": "google.cloud.retail.v2.UserEventService.WriteUserEvent",
"service": {
"shortName": "UserEventService",
"fullName": "google.cloud.retail.v2.UserEventService"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
}
]
}