Show / Hide Table of Contents

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
object
ClientServiceRequest
ClientServiceRequest<GoogleProtobufEmpty>
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>
ProjectsResource.LocationsResource.CatalogsResource.SetDefaultBranchRequest
Implements
IClientServiceRequest<GoogleProtobufEmpty>
IClientServiceRequest
Inherited Members
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.Xgafv
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.AccessToken
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.Alt
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.Callback
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.Fields
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.Key
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.OauthToken
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.PrettyPrint
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.QuotaUser
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.UploadType
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.UploadProtocol
ClientServiceRequest<GoogleProtobufEmpty>.Execute()
ClientServiceRequest<GoogleProtobufEmpty>.ExecuteAsStream()
ClientServiceRequest<GoogleProtobufEmpty>.ExecuteAsync()
ClientServiceRequest<GoogleProtobufEmpty>.ExecuteAsync(CancellationToken)
ClientServiceRequest<GoogleProtobufEmpty>.ExecuteAsStreamAsync()
ClientServiceRequest<GoogleProtobufEmpty>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<GoogleProtobufEmpty>.CreateRequest(bool?)
ClientServiceRequest<GoogleProtobufEmpty>.GenerateRequestUri()
ClientServiceRequest<GoogleProtobufEmpty>.GetDefaultETagAction(string)
ClientServiceRequest<GoogleProtobufEmpty>.ETagAction
ClientServiceRequest<GoogleProtobufEmpty>.ModifyRequest
ClientServiceRequest<GoogleProtobufEmpty>.ValidateParameters
ClientServiceRequest<GoogleProtobufEmpty>.ApiVersion
ClientServiceRequest<GoogleProtobufEmpty>.RequestParameters
ClientServiceRequest<GoogleProtobufEmpty>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
ClientServiceRequest.Credential
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.CloudRetail.v2
Assembly: Google.Apis.CloudRetail.v2.dll
Syntax
public class ProjectsResource.LocationsResource.CatalogsResource.SetDefaultBranchRequest : CloudRetailBaseServiceRequest<GoogleProtobufEmpty>, IClientServiceRequest<GoogleProtobufEmpty>, IClientServiceRequest

Constructors

SetDefaultBranchRequest(IClientService, GoogleCloudRetailV2SetDefaultBranchRequest, string)

Constructs a new SetDefaultBranch request.

Declaration
public SetDefaultBranchRequest(IClientService service, GoogleCloudRetailV2SetDefaultBranchRequest body, string catalog)
Parameters
Type Name Description
IClientService service
GoogleCloudRetailV2SetDefaultBranchRequest 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
ClientServiceRequest<GoogleProtobufEmpty>.HttpMethod

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<GoogleProtobufEmpty>.MethodName

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
string
Overrides
ClientServiceRequest<GoogleProtobufEmpty>.RestPath

Methods

GetBody()

Returns the body of the request.

Declaration
protected override object GetBody()
Returns
Type Description
object
Overrides
ClientServiceRequest<GoogleProtobufEmpty>.GetBody()

InitParameters()

Initializes SetDefaultBranch parameter list.

Declaration
protected override void InitParameters()
Overrides
CloudRetailBaseServiceRequest<GoogleProtobufEmpty>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
In this article
Back to top Generated by DocFX