NAME
Google::Cloud::Retail::V2alpha - Client library for Google Cloud Services
SYNOPSIS
use Google::Cloud::Retail::V2alpha;
use Google::Auth;
my $auth = Google::Auth->default();
# 1. High-performance gRPC Transport (Default)
my $grpc_client = Google::Cloud::Retail::V2alpha->new(
credentials => $auth,
transport => 'grpc', # Optional: 'grpc' is default
);
# 2. HTTP/REST Transport
my $rest_client = Google::Cloud::Retail::V2alpha->new(
credentials => $auth,
transport => 'rest',
);
# Execute service methods
my $res = $grpc_client->some_method( %params );
DESCRIPTION
Google::Cloud::Retail::V2alpha is an auto-generated client library for Google Cloud Services.
It provides a unified client interface supporting both high-performance HTTP/2 gRPC and HTTP/REST transports, with automatic Google Cloud Application Default Credentials (ADC) resolution and typed Protocol Buffers message handling.
SOURCE
Generated from the following Protocol Buffers schemas:
googleapis/google/cloud/retail/v2alpha/analytics_service.protogoogleapis/google/cloud/retail/v2alpha/branch.protogoogleapis/google/cloud/retail/v2alpha/branch_service.protogoogleapis/google/cloud/retail/v2alpha/catalog.protogoogleapis/google/cloud/retail/v2alpha/catalog_service.protogoogleapis/google/cloud/retail/v2alpha/common.protogoogleapis/google/cloud/retail/v2alpha/completion_service.protogoogleapis/google/cloud/retail/v2alpha/control.protogoogleapis/google/cloud/retail/v2alpha/control_service.protogoogleapis/google/cloud/retail/v2alpha/conversational_search_service.protogoogleapis/google/cloud/retail/v2alpha/export_config.protogoogleapis/google/cloud/retail/v2alpha/generative_question.protogoogleapis/google/cloud/retail/v2alpha/generative_question_service.protogoogleapis/google/cloud/retail/v2alpha/import_config.protogoogleapis/google/cloud/retail/v2alpha/merchant_center_account_link.protogoogleapis/google/cloud/retail/v2alpha/merchant_center_account_link_service.protogoogleapis/google/cloud/retail/v2alpha/model.protogoogleapis/google/cloud/retail/v2alpha/model_service.protogoogleapis/google/cloud/retail/v2alpha/prediction_service.protogoogleapis/google/cloud/retail/v2alpha/product.protogoogleapis/google/cloud/retail/v2alpha/product_service.protogoogleapis/google/cloud/retail/v2alpha/project.protogoogleapis/google/cloud/retail/v2alpha/project_service.protogoogleapis/google/cloud/retail/v2alpha/promotion.protogoogleapis/google/cloud/retail/v2alpha/purge_config.protogoogleapis/google/cloud/retail/v2alpha/safety.protogoogleapis/google/cloud/retail/v2alpha/search_service.protogoogleapis/google/cloud/retail/v2alpha/serving_config.protogoogleapis/google/cloud/retail/v2alpha/serving_config_service.protogoogleapis/google/cloud/retail/v2alpha/user_event.protogoogleapis/google/cloud/retail/v2alpha/user_event_service.proto
CONSTRUCTOR
new
my $client = Google::Cloud::Retail::V2alpha->new(
credentials => $auth, # Optional: Google::Auth object (defaults to ADC)
transport => 'grpc', # Optional: 'grpc' (default) or 'rest'
);
ATTRIBUTES
credentials
Returns or accepts the Google::Auth credentials object.
transport
Returns or accepts the active transport object (Google::gRPC::Client or Google::Cloud::REST::Client).
METHODS
METHODS
The following RPC methods are available in this client:
export_analytics_metrics
my $response = $client->export_analytics_metrics( catalog => $catalog, output_config => $output_config, filter => $filter, );Calls the RPC method
ExportAnalyticsMetricsongoogle.cloud.retail.v2alpha.AnalyticsService.Request: Google::Cloud::Retail::V2alpha::ExportConfig::ExportAnalyticsMetricsRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
catalog-stringoutput_config- Google::Cloud::Retail::V2alpha::ExportConfig::OutputConfigfilter-string
list_branches
my $response = $client->list_branches( parent => $parent, view => $view, );Calls the RPC method
ListBranchesongoogle.cloud.retail.v2alpha.BranchService.Request: Google::Cloud::Retail::V2alpha::BranchService::ListBranchesRequest
Returns: Google::Cloud::Retail::V2alpha::BranchService::ListBranchesResponse
Parameters:
parent-stringview- Google::Cloud::Retail::V2alpha::BranchService::BranchView
list_catalogs
my $response = $client->list_catalogs( parent => $parent, page_size => $page_size, page_token => $page_token, );Calls the RPC method
ListCatalogsongoogle.cloud.retail.v2alpha.CatalogService.Request: Google::Cloud::Retail::V2alpha::CatalogService::ListCatalogsRequest
Returns: Google::Cloud::Retail::V2alpha::CatalogService::ListCatalogsResponse
Parameters:
parent-stringpage_size-int32page_token-string
update_completion_config
my $response = $client->update_completion_config( completion_config => $completion_config, update_mask => $update_mask, );Calls the RPC method
UpdateCompletionConfigongoogle.cloud.retail.v2alpha.CatalogService.Request: Google::Cloud::Retail::V2alpha::CatalogService::UpdateCompletionConfigRequest
Returns: Google::Cloud::Retail::V2alpha::Catalog::CompletionConfig
Parameters:
completion_config- Google::Cloud::Retail::V2alpha::Catalog::CompletionConfigupdate_mask- Google::Protobuf::FieldMask::FieldMask
update_attributes_config
my $response = $client->update_attributes_config( attributes_config => $attributes_config, update_mask => $update_mask, );Calls the RPC method
UpdateAttributesConfigongoogle.cloud.retail.v2alpha.CatalogService.Request: Google::Cloud::Retail::V2alpha::CatalogService::UpdateAttributesConfigRequest
Returns: Google::Cloud::Retail::V2alpha::Catalog::AttributesConfig
Parameters:
attributes_config- Google::Cloud::Retail::V2alpha::Catalog::AttributesConfigupdate_mask- Google::Protobuf::FieldMask::FieldMask
remove_catalog_attribute
my $response = $client->remove_catalog_attribute( attributes_config => $attributes_config, key => $key, );Calls the RPC method
RemoveCatalogAttributeongoogle.cloud.retail.v2alpha.CatalogService.Request: Google::Cloud::Retail::V2alpha::CatalogService::RemoveCatalogAttributeRequest
Returns: Google::Cloud::Retail::V2alpha::Catalog::AttributesConfig
Parameters:
attributes_config-stringkey-string
replace_catalog_attribute
my $response = $client->replace_catalog_attribute( attributes_config => $attributes_config, catalog_attribute => $catalog_attribute, update_mask => $update_mask, );Calls the RPC method
ReplaceCatalogAttributeongoogle.cloud.retail.v2alpha.CatalogService.Request: Google::Cloud::Retail::V2alpha::CatalogService::ReplaceCatalogAttributeRequest
Returns: Google::Cloud::Retail::V2alpha::Catalog::AttributesConfig
Parameters:
attributes_config-stringcatalog_attribute- Google::Cloud::Retail::V2alpha::Catalog::CatalogAttributeupdate_mask- Google::Protobuf::FieldMask::FieldMask
complete_query
my $response = $client->complete_query( catalog => $catalog, query => $query, visitor_id => $visitor_id, language_codes => [ ... ], device_type => $device_type, dataset => $dataset, max_suggestions => $max_suggestions, enable_attribute_suggestions => $enable_attribute_suggestions, entity => $entity, );Calls the RPC method
CompleteQueryongoogle.cloud.retail.v2alpha.CompletionService.Request: Google::Cloud::Retail::V2alpha::CompletionService::CompleteQueryRequest
Returns: Google::Cloud::Retail::V2alpha::CompletionService::CompleteQueryResponse
Parameters:
catalog-stringquery-stringvisitor_id-stringlanguage_codes- ArrayRef ofstringdevice_type-stringdataset-stringmax_suggestions-int32enable_attribute_suggestions-boolentity-string
create_control
my $response = $client->create_control( parent => $parent, control => $control, control_id => $control_id, );Calls the RPC method
CreateControlongoogle.cloud.retail.v2alpha.ControlService.Request: Google::Cloud::Retail::V2alpha::ControlService::CreateControlRequest
Returns: Google::Cloud::Retail::V2alpha::Control::Control
Parameters:
parent-stringcontrol_id-string
conversational_search
my $response = $client->conversational_search( placement => $placement, branch => $branch, query => $query, page_categories => [ ... ], conversation_id => $conversation_id, search_params => $search_params, visitor_id => $visitor_id, user_info => $user_info, conversational_filtering_spec => $conversational_filtering_spec, user_labels => { ... }, safety_settings => [ ... ], );Calls the RPC method
ConversationalSearchongoogle.cloud.retail.v2alpha.ConversationalSearchService.Request: Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchRequest
Returns: Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalSearchResponse
Parameters:
placement-stringbranch-stringquery-stringpage_categories- ArrayRef ofstringconversation_id-stringsearch_params- Google::Cloud::Retail::V2alpha::ConversationalSearchService::SearchParamsvisitor_id-stringuser_info- Google::Cloud::Retail::V2alpha::Common::UserInfoconversational_filtering_spec- Google::Cloud::Retail::V2alpha::ConversationalSearchService::ConversationalFilteringSpecuser_labels-map<string, string> (HashRef)safety_settings- ArrayRef of Google::Cloud::Retail::V2alpha::Safety::SafetySetting
update_generative_questions_feature_config
my $response = $client->update_generative_questions_feature_config( generative_questions_feature_config => $generative_questions_feature_config, update_mask => $update_mask, );Calls the RPC method
UpdateGenerativeQuestionsFeatureConfigongoogle.cloud.retail.v2alpha.GenerativeQuestionService.Returns: Google::Cloud::Retail::V2alpha::GenerativeQuestion::GenerativeQuestionsFeatureConfig
Parameters:
generative_questions_feature_config- Google::Cloud::Retail::V2alpha::GenerativeQuestion::GenerativeQuestionsFeatureConfigupdate_mask- Google::Protobuf::FieldMask::FieldMask
list_merchant_center_account_links
my $response = $client->list_merchant_center_account_links( parent => $parent, );Calls the RPC method
ListMerchantCenterAccountLinksongoogle.cloud.retail.v2alpha.MerchantCenterAccountLinkService.Parameters:
parent-string
create_model
my $response = $client->create_model( parent => $parent, model => $model, dry_run => $dry_run, );Calls the RPC method
CreateModelongoogle.cloud.retail.v2alpha.ModelService.Request: Google::Cloud::Retail::V2alpha::ModelService::CreateModelRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
parent-stringdry_run-bool
predict
my $response = $client->predict( placement => $placement, user_event => $user_event, page_size => $page_size, page_token => $page_token, filter => $filter, validate_only => $validate_only, params => { ... }, labels => { ... }, );Calls the RPC method
Predictongoogle.cloud.retail.v2alpha.PredictionService.Request: Google::Cloud::Retail::V2alpha::PredictionService::PredictRequest
Returns: Google::Cloud::Retail::V2alpha::PredictionService::PredictResponse
Parameters:
placement-stringuser_event- Google::Cloud::Retail::V2alpha::UserEvent::UserEventpage_size-int32page_token-stringfilter-stringvalidate_only-boolparams-map<string, google.protobuf.Value> (HashRef)labels-map<string, string> (HashRef)
create_product
my $response = $client->create_product( parent => $parent, product => $product, product_id => $product_id, );Calls the RPC method
CreateProductongoogle.cloud.retail.v2alpha.ProductService.Request: Google::Cloud::Retail::V2alpha::ProductService::CreateProductRequest
Returns: Google::Cloud::Retail::V2alpha::Product::Product
Parameters:
parent-stringproduct_id-string
get_project
my $response = $client->get_project( name => $name, );Calls the RPC method
GetProjectongoogle.cloud.retail.v2alpha.ProjectService.Request: Google::Cloud::Retail::V2alpha::ProjectService::GetProjectRequest
Returns: Google::Cloud::Retail::V2alpha::Project::Project
Parameters:
name-string
enroll_solution
my $response = $client->enroll_solution( project => $project, solution => $solution, );Calls the RPC method
EnrollSolutionongoogle.cloud.retail.v2alpha.ProjectService.Request: Google::Cloud::Retail::V2alpha::ProjectService::EnrollSolutionRequest
Returns: Google::Longrunning::Operations::Operation
Parameters:
project-stringsolution- Google::Cloud::Retail::V2alpha::ProjectService::SolutionType
update_logging_config
my $response = $client->update_logging_config( logging_config => $logging_config, update_mask => $update_mask, );Calls the RPC method
UpdateLoggingConfigongoogle.cloud.retail.v2alpha.ProjectService.Request: Google::Cloud::Retail::V2alpha::ProjectService::UpdateLoggingConfigRequest
Returns: Google::Cloud::Retail::V2alpha::Project::LoggingConfig
Parameters:
logging_config- Google::Cloud::Retail::V2alpha::Project::LoggingConfigupdate_mask- Google::Protobuf::FieldMask::FieldMask
update_alert_config
my $response = $client->update_alert_config( alert_config => $alert_config, update_mask => $update_mask, );Calls the RPC method
UpdateAlertConfigongoogle.cloud.retail.v2alpha.ProjectService.Request: Google::Cloud::Retail::V2alpha::ProjectService::UpdateAlertConfigRequest
Returns: Google::Cloud::Retail::V2alpha::Project::AlertConfig
Parameters:
alert_config- Google::Cloud::Retail::V2alpha::Project::AlertConfigupdate_mask- Google::Protobuf::FieldMask::FieldMask
search
my $response = $client->search( placement => $placement, branch => $branch, query => $query, visitor_id => $visitor_id, user_info => $user_info, page_size => $page_size, page_token => $page_token, offset => $offset, filter => $filter, canonical_filter => $canonical_filter, order_by => $order_by, facet_specs => [ ... ], dynamic_facet_spec => $dynamic_facet_spec, boost_spec => $boost_spec, query_expansion_spec => $query_expansion_spec, relevance_threshold => $relevance_threshold, variant_rollup_keys => [ ... ], experiment_id => $experiment_id, page_categories => [ ... ], search_mode => $search_mode, personalization_spec => $personalization_spec, labels => { ... }, spell_correction_spec => $spell_correction_spec, entity => $entity, conversational_search_spec => $conversational_search_spec, tile_navigation_spec => $tile_navigation_spec, language_code => $language_code, region_code => $region_code, place_id => $place_id, user_attributes => { ... }, );Calls the RPC method
Searchongoogle.cloud.retail.v2alpha.SearchService.Request: Google::Cloud::Retail::V2alpha::SearchService::SearchRequest
Returns: Google::Cloud::Retail::V2alpha::SearchService::SearchResponse
Parameters:
placement-stringbranch-stringquery-stringvisitor_id-stringuser_info- Google::Cloud::Retail::V2alpha::Common::UserInfopage_size-int32page_token-stringoffset-int32filter-stringcanonical_filter-stringorder_by-stringfacet_specs- ArrayRef of Google::Cloud::Retail::V2alpha::SearchService::FacetSpecdynamic_facet_spec- Google::Cloud::Retail::V2alpha::SearchService::DynamicFacetSpecboost_spec- Google::Cloud::Retail::V2alpha::SearchService::BoostSpecquery_expansion_spec- Google::Cloud::Retail::V2alpha::SearchService::QueryExpansionSpecrelevance_threshold- Google::Cloud::Retail::V2alpha::SearchService::RelevanceThresholdvariant_rollup_keys- ArrayRef ofstringexperiment_id-stringpage_categories- ArrayRef ofstringsearch_mode- Google::Cloud::Retail::V2alpha::SearchService::SearchModepersonalization_spec- Google::Cloud::Retail::V2alpha::SearchService::PersonalizationSpeclabels-map<string, string> (HashRef)spell_correction_spec- Google::Cloud::Retail::V2alpha::SearchService::SpellCorrectionSpecentity-stringconversational_search_spec- Google::Cloud::Retail::V2alpha::SearchService::ConversationalSearchSpectile_navigation_spec- Google::Cloud::Retail::V2alpha::SearchService::TileNavigationSpeclanguage_code-stringregion_code-stringplace_id-stringuser_attributes-map<string, StringList> (HashRef)
create_serving_config
my $response = $client->create_serving_config( parent => $parent, serving_config => $serving_config, serving_config_id => $serving_config_id, );Calls the RPC method
CreateServingConfigongoogle.cloud.retail.v2alpha.ServingConfigService.Request: Google::Cloud::Retail::V2alpha::ServingConfigService::CreateServingConfigRequest
Returns: Google::Cloud::Retail::V2alpha::ServingConfig::ServingConfig
Parameters:
parent-stringserving_config- Google::Cloud::Retail::V2alpha::ServingConfig::ServingConfigserving_config_id-string
write_user_event
my $response = $client->write_user_event( parent => $parent, user_event => $user_event, write_async => $write_async, );Calls the RPC method
WriteUserEventongoogle.cloud.retail.v2alpha.UserEventService.Request: Google::Cloud::Retail::V2alpha::UserEventService::WriteUserEventRequest
Returns: Google::Cloud::Retail::V2alpha::UserEvent::UserEvent
Parameters:
parent-stringuser_event- Google::Cloud::Retail::V2alpha::UserEvent::UserEventwrite_async-bool
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.