Class ProjectsResource.LocationsResource.CatalogsResource.SetDefaultBranchRequest
Set a specified branch id as default branch. API methods such as SearchService.Search,
ProductService.GetProduct, ProductService.ListProducts will treat requests using "default_branch" to
the actual branch id set as default. For example, if projects/*/locations/*/catalogs/*/branches/1
is set as default, setting SearchRequest.branch to
projects/*/locations/*/catalogs/*/branches/default_branch
is equivalent to setting
SearchRequest.branch to projects/*/locations/*/catalogs/*/branches/1
. Using multiple branches can
be useful when developers would like to have a staging branch to test and verify for future usage.
When it becomes ready, developers switch on the staging branch using this API while keeping using
projects/*/locations/*/catalogs/*/branches/default_branch
as SearchRequest.branch to route the
traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the
default branch could potentially cause outages if the ID space of the new branch is very different
from the old one. More specifically: * PredictionService will only return product IDs from branch
{newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not
explicitly set). * UserEventService will only join events with products from branch {newBranch}.
Inheritance
Inherited Members
Namespace: Google.Apis.CloudRetail.v2beta
Assembly: Google.Apis.CloudRetail.v2beta.dll
Syntax
public class ProjectsResource.LocationsResource.CatalogsResource.SetDefaultBranchRequest : CloudRetailBaseServiceRequest<GoogleProtobufEmpty>, IClientServiceRequest<GoogleProtobufEmpty>, IClientServiceRequest
Constructors
SetDefaultBranchRequest(IClientService, GoogleCloudRetailV2betaSetDefaultBranchRequest, string)
Constructs a new SetDefaultBranch request.
Declaration
public SetDefaultBranchRequest(IClientService service, GoogleCloudRetailV2betaSetDefaultBranchRequest body, string catalog)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
GoogleCloudRetailV2betaSetDefaultBranchRequest | body | |
string | catalog |
Properties
Catalog
Full resource name of the catalog, such as
projects/*/locations/global/catalogs/default_catalog
.
Declaration
[RequestParameter("catalog", RequestParameterType.Path)]
public virtual string Catalog { get; }
Property Value
Type | Description |
---|---|
string |
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes SetDefaultBranch parameter list.
Declaration
protected override void InitParameters()