Class CatalogServiceClient (2.2.0)

Stay organized with collections Save and categorize content based on your preferences.
public abstract class CatalogServiceClient

CatalogService client wrapper, for convenient use.

Inheritance

Object > CatalogServiceClient

Derived Types

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

Service for managing catalog configuration.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the CatalogService service, which is a host of "retail.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default CatalogService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default CatalogService scopes are:

GrpcClient

public virtual CatalogService.CatalogServiceClient GrpcClient { get; }

The underlying gRPC CatalogService client

Property Value
TypeDescription
CatalogService.CatalogServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

AddCatalogAttribute(AddCatalogAttributeRequest, CallSettings)

public virtual AttributesConfig AddCatalogAttribute(AddCatalogAttributeRequest request, CallSettings callSettings = null)

Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestAddCatalogAttributeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
AddCatalogAttributeRequest request = new AddCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    CatalogAttribute = new CatalogAttribute(),
};
// Make the request
AttributesConfig response = catalogServiceClient.AddCatalogAttribute(request);

AddCatalogAttributeAsync(AddCatalogAttributeRequest, CallSettings)

public virtual Task<AttributesConfig> AddCatalogAttributeAsync(AddCatalogAttributeRequest request, CallSettings callSettings = null)

Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestAddCatalogAttributeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
AddCatalogAttributeRequest request = new AddCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    CatalogAttribute = new CatalogAttribute(),
};
// Make the request
AttributesConfig response = await catalogServiceClient.AddCatalogAttributeAsync(request);

AddCatalogAttributeAsync(AddCatalogAttributeRequest, CancellationToken)

public virtual Task<AttributesConfig> AddCatalogAttributeAsync(AddCatalogAttributeRequest request, CancellationToken cancellationToken)

Adds the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to add already exists, an ALREADY_EXISTS error is returned.

Parameters
NameDescription
requestAddCatalogAttributeRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
AddCatalogAttributeRequest request = new AddCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    CatalogAttribute = new CatalogAttribute(),
};
// Make the request
AttributesConfig response = await catalogServiceClient.AddCatalogAttributeAsync(request);

Create()

public static CatalogServiceClient Create()

Synchronously creates a CatalogServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CatalogServiceClientBuilder.

Returns
TypeDescription
CatalogServiceClient

The created CatalogServiceClient.

CreateAsync(CancellationToken)

public static Task<CatalogServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a CatalogServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CatalogServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<CatalogServiceClient>

The task representing the created CatalogServiceClient.

GetAttributesConfig(AttributesConfigName, CallSettings)

public virtual AttributesConfig GetAttributesConfig(AttributesConfigName name, CallSettings callSettings = null)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
nameAttributesConfigName

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
AttributesConfigName name = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
AttributesConfig response = catalogServiceClient.GetAttributesConfig(name);

GetAttributesConfig(GetAttributesConfigRequest, CallSettings)

public virtual AttributesConfig GetAttributesConfig(GetAttributesConfigRequest request, CallSettings callSettings = null)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
GetAttributesConfigRequest request = new GetAttributesConfigRequest
{
    AttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
AttributesConfig response = catalogServiceClient.GetAttributesConfig(request);

GetAttributesConfig(String, CallSettings)

public virtual AttributesConfig GetAttributesConfig(string name, CallSettings callSettings = null)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
nameString

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/attributesConfig";
// Make the request
AttributesConfig response = catalogServiceClient.GetAttributesConfig(name);

GetAttributesConfigAsync(AttributesConfigName, CallSettings)

public virtual Task<AttributesConfig> GetAttributesConfigAsync(AttributesConfigName name, CallSettings callSettings = null)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
nameAttributesConfigName

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
AttributesConfigName name = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
AttributesConfig response = await catalogServiceClient.GetAttributesConfigAsync(name);

GetAttributesConfigAsync(AttributesConfigName, CancellationToken)

public virtual Task<AttributesConfig> GetAttributesConfigAsync(AttributesConfigName name, CancellationToken cancellationToken)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
nameAttributesConfigName

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
AttributesConfigName name = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
AttributesConfig response = await catalogServiceClient.GetAttributesConfigAsync(name);

GetAttributesConfigAsync(GetAttributesConfigRequest, CallSettings)

public virtual Task<AttributesConfig> GetAttributesConfigAsync(GetAttributesConfigRequest request, CallSettings callSettings = null)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
GetAttributesConfigRequest request = new GetAttributesConfigRequest
{
    AttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
AttributesConfig response = await catalogServiceClient.GetAttributesConfigAsync(request);

GetAttributesConfigAsync(GetAttributesConfigRequest, CancellationToken)

public virtual Task<AttributesConfig> GetAttributesConfigAsync(GetAttributesConfigRequest request, CancellationToken cancellationToken)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
requestGetAttributesConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
GetAttributesConfigRequest request = new GetAttributesConfigRequest
{
    AttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
AttributesConfig response = await catalogServiceClient.GetAttributesConfigAsync(request);

GetAttributesConfigAsync(String, CallSettings)

public virtual Task<AttributesConfig> GetAttributesConfigAsync(string name, CallSettings callSettings = null)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
nameString

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/attributesConfig";
// Make the request
AttributesConfig response = await catalogServiceClient.GetAttributesConfigAsync(name);

GetAttributesConfigAsync(String, CancellationToken)

public virtual Task<AttributesConfig> GetAttributesConfigAsync(string name, CancellationToken cancellationToken)

Gets an [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

Parameters
NameDescription
nameString

Required. Full AttributesConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/attributesConfig";
// Make the request
AttributesConfig response = await catalogServiceClient.GetAttributesConfigAsync(name);

GetCompletionConfig(CompletionConfigName, CallSettings)

public virtual CompletionConfig GetCompletionConfig(CompletionConfigName name, CallSettings callSettings = null)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
nameCompletionConfigName

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CompletionConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
CompletionConfigName name = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
CompletionConfig response = catalogServiceClient.GetCompletionConfig(name);

GetCompletionConfig(GetCompletionConfigRequest, CallSettings)

public virtual CompletionConfig GetCompletionConfig(GetCompletionConfigRequest request, CallSettings callSettings = null)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CompletionConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
GetCompletionConfigRequest request = new GetCompletionConfigRequest
{
    CompletionConfigName = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
CompletionConfig response = catalogServiceClient.GetCompletionConfig(request);

GetCompletionConfig(String, CallSettings)

public virtual CompletionConfig GetCompletionConfig(string name, CallSettings callSettings = null)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
nameString

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CompletionConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/completionConfig";
// Make the request
CompletionConfig response = catalogServiceClient.GetCompletionConfig(name);

GetCompletionConfigAsync(CompletionConfigName, CallSettings)

public virtual Task<CompletionConfig> GetCompletionConfigAsync(CompletionConfigName name, CallSettings callSettings = null)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
nameCompletionConfigName

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CompletionConfigName name = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
CompletionConfig response = await catalogServiceClient.GetCompletionConfigAsync(name);

GetCompletionConfigAsync(CompletionConfigName, CancellationToken)

public virtual Task<CompletionConfig> GetCompletionConfigAsync(CompletionConfigName name, CancellationToken cancellationToken)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
nameCompletionConfigName

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CompletionConfigName name = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
CompletionConfig response = await catalogServiceClient.GetCompletionConfigAsync(name);

GetCompletionConfigAsync(GetCompletionConfigRequest, CallSettings)

public virtual Task<CompletionConfig> GetCompletionConfigAsync(GetCompletionConfigRequest request, CallSettings callSettings = null)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
GetCompletionConfigRequest request = new GetCompletionConfigRequest
{
    CompletionConfigName = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
CompletionConfig response = await catalogServiceClient.GetCompletionConfigAsync(request);

GetCompletionConfigAsync(GetCompletionConfigRequest, CancellationToken)

public virtual Task<CompletionConfig> GetCompletionConfigAsync(GetCompletionConfigRequest request, CancellationToken cancellationToken)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
requestGetCompletionConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
GetCompletionConfigRequest request = new GetCompletionConfigRequest
{
    CompletionConfigName = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
CompletionConfig response = await catalogServiceClient.GetCompletionConfigAsync(request);

GetCompletionConfigAsync(String, CallSettings)

public virtual Task<CompletionConfig> GetCompletionConfigAsync(string name, CallSettings callSettings = null)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
nameString

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/completionConfig";
// Make the request
CompletionConfig response = await catalogServiceClient.GetCompletionConfigAsync(name);

GetCompletionConfigAsync(String, CancellationToken)

public virtual Task<CompletionConfig> GetCompletionConfigAsync(string name, CancellationToken cancellationToken)

Gets a [CompletionConfig][google.cloud.retail.v2.CompletionConfig].

Parameters
NameDescription
nameString

Required. Full CompletionConfig resource name. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/completionConfig";
// Make the request
CompletionConfig response = await catalogServiceClient.GetCompletionConfigAsync(name);

GetDefaultBranch(CatalogName, CallSettings)

public virtual GetDefaultBranchResponse GetDefaultBranch(CatalogName catalog, CallSettings callSettings = null)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
catalogCatalogName

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GetDefaultBranchResponse

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
GetDefaultBranchResponse response = catalogServiceClient.GetDefaultBranch(catalog);

GetDefaultBranch(GetDefaultBranchRequest, CallSettings)

public virtual GetDefaultBranchResponse GetDefaultBranch(GetDefaultBranchRequest request, CallSettings callSettings = null)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
requestGetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GetDefaultBranchResponse

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
GetDefaultBranchRequest request = new GetDefaultBranchRequest
{
    CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
GetDefaultBranchResponse response = catalogServiceClient.GetDefaultBranch(request);

GetDefaultBranch(String, CallSettings)

public virtual GetDefaultBranchResponse GetDefaultBranch(string catalog, CallSettings callSettings = null)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
catalogString

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
GetDefaultBranchResponse

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]";
// Make the request
GetDefaultBranchResponse response = catalogServiceClient.GetDefaultBranch(catalog);

GetDefaultBranchAsync(CatalogName, CallSettings)

public virtual Task<GetDefaultBranchResponse> GetDefaultBranchAsync(CatalogName catalog, CallSettings callSettings = null)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
catalogCatalogName

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
GetDefaultBranchResponse response = await catalogServiceClient.GetDefaultBranchAsync(catalog);

GetDefaultBranchAsync(CatalogName, CancellationToken)

public virtual Task<GetDefaultBranchResponse> GetDefaultBranchAsync(CatalogName catalog, CancellationToken cancellationToken)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
catalogCatalogName

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
GetDefaultBranchResponse response = await catalogServiceClient.GetDefaultBranchAsync(catalog);

GetDefaultBranchAsync(GetDefaultBranchRequest, CallSettings)

public virtual Task<GetDefaultBranchResponse> GetDefaultBranchAsync(GetDefaultBranchRequest request, CallSettings callSettings = null)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
requestGetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
GetDefaultBranchRequest request = new GetDefaultBranchRequest
{
    CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
GetDefaultBranchResponse response = await catalogServiceClient.GetDefaultBranchAsync(request);

GetDefaultBranchAsync(GetDefaultBranchRequest, CancellationToken)

public virtual Task<GetDefaultBranchResponse> GetDefaultBranchAsync(GetDefaultBranchRequest request, CancellationToken cancellationToken)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
requestGetDefaultBranchRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
GetDefaultBranchRequest request = new GetDefaultBranchRequest
{
    CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
};
// Make the request
GetDefaultBranchResponse response = await catalogServiceClient.GetDefaultBranchAsync(request);

GetDefaultBranchAsync(String, CallSettings)

public virtual Task<GetDefaultBranchResponse> GetDefaultBranchAsync(string catalog, CallSettings callSettings = null)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
catalogString

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]";
// Make the request
GetDefaultBranchResponse response = await catalogServiceClient.GetDefaultBranchAsync(catalog);

GetDefaultBranchAsync(String, CancellationToken)

public virtual Task<GetDefaultBranchResponse> GetDefaultBranchAsync(string catalog, CancellationToken cancellationToken)

Get which branch is currently default branch set by [CatalogService.SetDefaultBranch][google.cloud.retail.v2.CatalogService.SetDefaultBranch] method under a specified parent catalog.

Parameters
NameDescription
catalogString

The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<GetDefaultBranchResponse>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]";
// Make the request
GetDefaultBranchResponse response = await catalogServiceClient.GetDefaultBranchAsync(catalog);

ListCatalogs(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListCatalogsResponse, Catalog> ListCatalogs(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

Parameters
NameDescription
parentLocationName

Required. The account resource name with an associated location.

If the caller does not have permission to list [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCatalogsResponse, Catalog>

A pageable sequence of Catalog resources.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListCatalogsResponse, Catalog> response = catalogServiceClient.ListCatalogs(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Catalog item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListCatalogsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Catalog item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Catalog> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Catalog item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCatalogs(ListCatalogsRequest, CallSettings)

public virtual PagedEnumerable<ListCatalogsResponse, Catalog> ListCatalogs(ListCatalogsRequest request, CallSettings callSettings = null)

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

Parameters
NameDescription
requestListCatalogsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCatalogsResponse, Catalog>

A pageable sequence of Catalog resources.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
ListCatalogsRequest request = new ListCatalogsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListCatalogsResponse, Catalog> response = catalogServiceClient.ListCatalogs(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Catalog item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListCatalogsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Catalog item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Catalog> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Catalog item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCatalogs(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListCatalogsResponse, Catalog> ListCatalogs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

Parameters
NameDescription
parentString

Required. The account resource name with an associated location.

If the caller does not have permission to list [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListCatalogsResponse, Catalog>

A pageable sequence of Catalog resources.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListCatalogsResponse, Catalog> response = catalogServiceClient.ListCatalogs(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Catalog item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListCatalogsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Catalog item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Catalog> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Catalog item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCatalogsAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListCatalogsResponse, Catalog> ListCatalogsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

Parameters
NameDescription
parentLocationName

Required. The account resource name with an associated location.

If the caller does not have permission to list [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCatalogsResponse, Catalog>

A pageable asynchronous sequence of Catalog resources.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListCatalogsResponse, Catalog> response = catalogServiceClient.ListCatalogsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Catalog item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListCatalogsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Catalog item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Catalog> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Catalog item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCatalogsAsync(ListCatalogsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListCatalogsResponse, Catalog> ListCatalogsAsync(ListCatalogsRequest request, CallSettings callSettings = null)

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

Parameters
NameDescription
requestListCatalogsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCatalogsResponse, Catalog>

A pageable asynchronous sequence of Catalog resources.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
ListCatalogsRequest request = new ListCatalogsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListCatalogsResponse, Catalog> response = catalogServiceClient.ListCatalogsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Catalog item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListCatalogsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Catalog item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Catalog> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Catalog item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListCatalogsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListCatalogsResponse, Catalog> ListCatalogsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all the [Catalog][google.cloud.retail.v2.Catalog]s associated with the project.

Parameters
NameDescription
parentString

Required. The account resource name with an associated location.

If the caller does not have permission to list [Catalog][google.cloud.retail.v2.Catalog]s under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListCatalogsResponse, Catalog>

A pageable asynchronous sequence of Catalog resources.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListCatalogsResponse, Catalog> response = catalogServiceClient.ListCatalogsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Catalog item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListCatalogsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Catalog item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Catalog> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Catalog item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

RemoveCatalogAttribute(RemoveCatalogAttributeRequest, CallSettings)

public virtual AttributesConfig RemoveCatalogAttribute(RemoveCatalogAttributeRequest request, CallSettings callSettings = null)

Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestRemoveCatalogAttributeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
RemoveCatalogAttributeRequest request = new RemoveCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    Key = "",
};
// Make the request
AttributesConfig response = catalogServiceClient.RemoveCatalogAttribute(request);

RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest, CallSettings)

public virtual Task<AttributesConfig> RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest request, CallSettings callSettings = null)

Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestRemoveCatalogAttributeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveCatalogAttributeRequest request = new RemoveCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    Key = "",
};
// Make the request
AttributesConfig response = await catalogServiceClient.RemoveCatalogAttributeAsync(request);

RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest, CancellationToken)

public virtual Task<AttributesConfig> RemoveCatalogAttributeAsync(RemoveCatalogAttributeRequest request, CancellationToken cancellationToken)

Removes the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] from the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to remove does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestRemoveCatalogAttributeRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
RemoveCatalogAttributeRequest request = new RemoveCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    Key = "",
};
// Make the request
AttributesConfig response = await catalogServiceClient.RemoveCatalogAttributeAsync(request);

ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest, CallSettings)

public virtual AttributesConfig ReplaceCatalogAttribute(ReplaceCatalogAttributeRequest request, CallSettings callSettings = null)

Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestReplaceCatalogAttributeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
ReplaceCatalogAttributeRequest request = new ReplaceCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    CatalogAttribute = new CatalogAttribute(),
    UpdateMask = new FieldMask(),
};
// Make the request
AttributesConfig response = catalogServiceClient.ReplaceCatalogAttribute(request);

ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest, CallSettings)

public virtual Task<AttributesConfig> ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest request, CallSettings callSettings = null)

Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestReplaceCatalogAttributeRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
ReplaceCatalogAttributeRequest request = new ReplaceCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    CatalogAttribute = new CatalogAttribute(),
    UpdateMask = new FieldMask(),
};
// Make the request
AttributesConfig response = await catalogServiceClient.ReplaceCatalogAttributeAsync(request);

ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest, CancellationToken)

public virtual Task<AttributesConfig> ReplaceCatalogAttributeAsync(ReplaceCatalogAttributeRequest request, CancellationToken cancellationToken)

Replaces the specified [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] in the [AttributesConfig][google.cloud.retail.v2.AttributesConfig] by updating the catalog attribute with the same [CatalogAttribute.key][google.cloud.retail.v2.CatalogAttribute.key].

If the [CatalogAttribute][google.cloud.retail.v2.CatalogAttribute] to replace does not exist, a NOT_FOUND error is returned.

Parameters
NameDescription
requestReplaceCatalogAttributeRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
ReplaceCatalogAttributeRequest request = new ReplaceCatalogAttributeRequest
{
    AttributesConfigAsAttributesConfigName = AttributesConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    CatalogAttribute = new CatalogAttribute(),
    UpdateMask = new FieldMask(),
};
// Make the request
AttributesConfig response = await catalogServiceClient.ReplaceCatalogAttributeAsync(request);

SetDefaultBranch(CatalogName, CallSettings)

public virtual void SetDefaultBranch(CatalogName catalog, CallSettings callSettings = null)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
catalogCatalogName

Full resource name of the catalog, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
catalogServiceClient.SetDefaultBranch(catalog);

SetDefaultBranch(SetDefaultBranchRequest, CallSettings)

public virtual void SetDefaultBranch(SetDefaultBranchRequest request, CallSettings callSettings = null)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
requestSetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
SetDefaultBranchRequest request = new SetDefaultBranchRequest
{
    CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    BranchIdAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
    Note = "",
    Force = false,
};
// Make the request
catalogServiceClient.SetDefaultBranch(request);

SetDefaultBranch(String, CallSettings)

public virtual void SetDefaultBranch(string catalog, CallSettings callSettings = null)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
catalogString

Full resource name of the catalog, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]";
// Make the request
catalogServiceClient.SetDefaultBranch(catalog);

SetDefaultBranchAsync(CatalogName, CallSettings)

public virtual Task SetDefaultBranchAsync(CatalogName catalog, CallSettings callSettings = null)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
catalogCatalogName

Full resource name of the catalog, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
await catalogServiceClient.SetDefaultBranchAsync(catalog);

SetDefaultBranchAsync(CatalogName, CancellationToken)

public virtual Task SetDefaultBranchAsync(CatalogName catalog, CancellationToken cancellationToken)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
catalogCatalogName

Full resource name of the catalog, such as projects/*/locations/global/catalogs/default_catalog.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CatalogName catalog = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]");
// Make the request
await catalogServiceClient.SetDefaultBranchAsync(catalog);

SetDefaultBranchAsync(SetDefaultBranchRequest, CallSettings)

public virtual Task SetDefaultBranchAsync(SetDefaultBranchRequest request, CallSettings callSettings = null)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
requestSetDefaultBranchRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
SetDefaultBranchRequest request = new SetDefaultBranchRequest
{
    CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    BranchIdAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
    Note = "",
    Force = false,
};
// Make the request
await catalogServiceClient.SetDefaultBranchAsync(request);

SetDefaultBranchAsync(SetDefaultBranchRequest, CancellationToken)

public virtual Task SetDefaultBranchAsync(SetDefaultBranchRequest request, CancellationToken cancellationToken)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
requestSetDefaultBranchRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
SetDefaultBranchRequest request = new SetDefaultBranchRequest
{
    CatalogAsCatalogName = CatalogName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", "[CATALOG]"),
    BranchIdAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
    Note = "",
    Force = false,
};
// Make the request
await catalogServiceClient.SetDefaultBranchAsync(request);

SetDefaultBranchAsync(String, CallSettings)

public virtual Task SetDefaultBranchAsync(string catalog, CallSettings callSettings = null)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
catalogString

Full resource name of the catalog, such as projects/*/locations/global/catalogs/default_catalog.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]";
// Make the request
await catalogServiceClient.SetDefaultBranchAsync(catalog);

SetDefaultBranchAsync(String, CancellationToken)

public virtual Task SetDefaultBranchAsync(string catalog, CancellationToken cancellationToken)

Set a specified branch id as default branch. API methods such as [SearchService.Search][google.cloud.retail.v2.SearchService.Search], [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct], [ProductService.ListProducts][google.cloud.retail.v2.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][google.cloud.retail.v2.SearchRequest.branch] to projects/*/locations/*/catalogs/*/branches/default_branch is equivalent to setting [SearchRequest.branch][google.cloud.retail.v2.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][google.cloud.retail.v2.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}.
Parameters
NameDescription
catalogString

Full resource name of the catalog, such as projects/*/locations/global/catalogs/default_catalog.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
string catalog = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]";
// Make the request
await catalogServiceClient.SetDefaultBranchAsync(catalog);

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateAttributesConfig(AttributesConfig, FieldMask, CallSettings)

public virtual AttributesConfig UpdateAttributesConfig(AttributesConfig attributesConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters
NameDescription
attributesConfigAttributesConfig

Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update.

updateMaskFieldMask

Indicates which fields in the provided [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The following is the only supported field:

  • [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]

If not set, all supported fields are updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
AttributesConfig attributesConfig = new AttributesConfig();
FieldMask updateMask = new FieldMask();
// Make the request
AttributesConfig response = catalogServiceClient.UpdateAttributesConfig(attributesConfig, updateMask);

UpdateAttributesConfig(UpdateAttributesConfigRequest, CallSettings)

public virtual AttributesConfig UpdateAttributesConfig(UpdateAttributesConfigRequest request, CallSettings callSettings = null)

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters
NameDescription
requestUpdateAttributesConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
AttributesConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
UpdateAttributesConfigRequest request = new UpdateAttributesConfigRequest
{
    AttributesConfig = new AttributesConfig(),
    UpdateMask = new FieldMask(),
};
// Make the request
AttributesConfig response = catalogServiceClient.UpdateAttributesConfig(request);

UpdateAttributesConfigAsync(AttributesConfig, FieldMask, CallSettings)

public virtual Task<AttributesConfig> UpdateAttributesConfigAsync(AttributesConfig attributesConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters
NameDescription
attributesConfigAttributesConfig

Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update.

updateMaskFieldMask

Indicates which fields in the provided [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The following is the only supported field:

  • [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]

If not set, all supported fields are updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
AttributesConfig attributesConfig = new AttributesConfig();
FieldMask updateMask = new FieldMask();
// Make the request
AttributesConfig response = await catalogServiceClient.UpdateAttributesConfigAsync(attributesConfig, updateMask);

UpdateAttributesConfigAsync(AttributesConfig, FieldMask, CancellationToken)

public virtual Task<AttributesConfig> UpdateAttributesConfigAsync(AttributesConfig attributesConfig, FieldMask updateMask, CancellationToken cancellationToken)

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters
NameDescription
attributesConfigAttributesConfig

Required. The [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update.

updateMaskFieldMask

Indicates which fields in the provided [AttributesConfig][google.cloud.retail.v2.AttributesConfig] to update. The following is the only supported field:

  • [AttributesConfig.catalog_attributes][google.cloud.retail.v2.AttributesConfig.catalog_attributes]

If not set, all supported fields are updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
AttributesConfig attributesConfig = new AttributesConfig();
FieldMask updateMask = new FieldMask();
// Make the request
AttributesConfig response = await catalogServiceClient.UpdateAttributesConfigAsync(attributesConfig, updateMask);

UpdateAttributesConfigAsync(UpdateAttributesConfigRequest, CallSettings)

public virtual Task<AttributesConfig> UpdateAttributesConfigAsync(UpdateAttributesConfigRequest request, CallSettings callSettings = null)

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters
NameDescription
requestUpdateAttributesConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAttributesConfigRequest request = new UpdateAttributesConfigRequest
{
    AttributesConfig = new AttributesConfig(),
    UpdateMask = new FieldMask(),
};
// Make the request
AttributesConfig response = await catalogServiceClient.UpdateAttributesConfigAsync(request);

UpdateAttributesConfigAsync(UpdateAttributesConfigRequest, CancellationToken)

public virtual Task<AttributesConfig> UpdateAttributesConfigAsync(UpdateAttributesConfigRequest request, CancellationToken cancellationToken)

Updates the [AttributesConfig][google.cloud.retail.v2.AttributesConfig].

The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.

Parameters
NameDescription
requestUpdateAttributesConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<AttributesConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateAttributesConfigRequest request = new UpdateAttributesConfigRequest
{
    AttributesConfig = new AttributesConfig(),
    UpdateMask = new FieldMask(),
};
// Make the request
AttributesConfig response = await catalogServiceClient.UpdateAttributesConfigAsync(request);

UpdateCatalog(Catalog, FieldMask, CallSettings)

public virtual Catalog UpdateCatalog(Catalog catalog, FieldMask updateMask, CallSettings callSettings = null)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
catalogCatalog

Required. The [Catalog][google.cloud.retail.v2.Catalog] to update.

If the caller does not have permission to update the [Catalog][google.cloud.retail.v2.Catalog], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [Catalog][google.cloud.retail.v2.Catalog] to update does not exist, a NOT_FOUND error is returned.

updateMaskFieldMask

Indicates which fields in the provided [Catalog][google.cloud.retail.v2.Catalog] to update.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Catalog

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
Catalog catalog = new Catalog();
FieldMask updateMask = new FieldMask();
// Make the request
Catalog response = catalogServiceClient.UpdateCatalog(catalog, updateMask);

UpdateCatalog(UpdateCatalogRequest, CallSettings)

public virtual Catalog UpdateCatalog(UpdateCatalogRequest request, CallSettings callSettings = null)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
requestUpdateCatalogRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Catalog

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
UpdateCatalogRequest request = new UpdateCatalogRequest
{
    Catalog = new Catalog(),
    UpdateMask = new FieldMask(),
};
// Make the request
Catalog response = catalogServiceClient.UpdateCatalog(request);

UpdateCatalogAsync(Catalog, FieldMask, CallSettings)

public virtual Task<Catalog> UpdateCatalogAsync(Catalog catalog, FieldMask updateMask, CallSettings callSettings = null)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
catalogCatalog

Required. The [Catalog][google.cloud.retail.v2.Catalog] to update.

If the caller does not have permission to update the [Catalog][google.cloud.retail.v2.Catalog], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [Catalog][google.cloud.retail.v2.Catalog] to update does not exist, a NOT_FOUND error is returned.

updateMaskFieldMask

Indicates which fields in the provided [Catalog][google.cloud.retail.v2.Catalog] to update.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Catalog>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
Catalog catalog = new Catalog();
FieldMask updateMask = new FieldMask();
// Make the request
Catalog response = await catalogServiceClient.UpdateCatalogAsync(catalog, updateMask);

UpdateCatalogAsync(Catalog, FieldMask, CancellationToken)

public virtual Task<Catalog> UpdateCatalogAsync(Catalog catalog, FieldMask updateMask, CancellationToken cancellationToken)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
catalogCatalog

Required. The [Catalog][google.cloud.retail.v2.Catalog] to update.

If the caller does not have permission to update the [Catalog][google.cloud.retail.v2.Catalog], regardless of whether or not it exists, a PERMISSION_DENIED error is returned.

If the [Catalog][google.cloud.retail.v2.Catalog] to update does not exist, a NOT_FOUND error is returned.

updateMaskFieldMask

Indicates which fields in the provided [Catalog][google.cloud.retail.v2.Catalog] to update.

If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Catalog>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
Catalog catalog = new Catalog();
FieldMask updateMask = new FieldMask();
// Make the request
Catalog response = await catalogServiceClient.UpdateCatalogAsync(catalog, updateMask);

UpdateCatalogAsync(UpdateCatalogRequest, CallSettings)

public virtual Task<Catalog> UpdateCatalogAsync(UpdateCatalogRequest request, CallSettings callSettings = null)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
requestUpdateCatalogRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Catalog>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCatalogRequest request = new UpdateCatalogRequest
{
    Catalog = new Catalog(),
    UpdateMask = new FieldMask(),
};
// Make the request
Catalog response = await catalogServiceClient.UpdateCatalogAsync(request);

UpdateCatalogAsync(UpdateCatalogRequest, CancellationToken)

public virtual Task<Catalog> UpdateCatalogAsync(UpdateCatalogRequest request, CancellationToken cancellationToken)

Updates the [Catalog][google.cloud.retail.v2.Catalog]s.

Parameters
NameDescription
requestUpdateCatalogRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Catalog>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCatalogRequest request = new UpdateCatalogRequest
{
    Catalog = new Catalog(),
    UpdateMask = new FieldMask(),
};
// Make the request
Catalog response = await catalogServiceClient.UpdateCatalogAsync(request);

UpdateCompletionConfig(CompletionConfig, FieldMask, CallSettings)

public virtual CompletionConfig UpdateCompletionConfig(CompletionConfig completionConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

Parameters
NameDescription
completionConfigCompletionConfig

Required. The [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update.

If the caller does not have permission to update the [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a PERMISSION_DENIED error is returned.

If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update does not exist, a NOT_FOUND error is returned.

updateMaskFieldMask

Indicates which fields in the provided [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The following are the only supported fields:

  • [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
  • [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
  • [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
  • [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]

If not set, all supported fields are updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CompletionConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
CompletionConfig completionConfig = new CompletionConfig();
FieldMask updateMask = new FieldMask();
// Make the request
CompletionConfig response = catalogServiceClient.UpdateCompletionConfig(completionConfig, updateMask);

UpdateCompletionConfig(UpdateCompletionConfigRequest, CallSettings)

public virtual CompletionConfig UpdateCompletionConfig(UpdateCompletionConfigRequest request, CallSettings callSettings = null)

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
CompletionConfig

The RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = CatalogServiceClient.Create();
// Initialize request argument(s)
UpdateCompletionConfigRequest request = new UpdateCompletionConfigRequest
{
    CompletionConfig = new CompletionConfig(),
    UpdateMask = new FieldMask(),
};
// Make the request
CompletionConfig response = catalogServiceClient.UpdateCompletionConfig(request);

UpdateCompletionConfigAsync(CompletionConfig, FieldMask, CallSettings)

public virtual Task<CompletionConfig> UpdateCompletionConfigAsync(CompletionConfig completionConfig, FieldMask updateMask, CallSettings callSettings = null)

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

Parameters
NameDescription
completionConfigCompletionConfig

Required. The [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update.

If the caller does not have permission to update the [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a PERMISSION_DENIED error is returned.

If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update does not exist, a NOT_FOUND error is returned.

updateMaskFieldMask

Indicates which fields in the provided [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The following are the only supported fields:

  • [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
  • [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
  • [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
  • [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]

If not set, all supported fields are updated.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CompletionConfig completionConfig = new CompletionConfig();
FieldMask updateMask = new FieldMask();
// Make the request
CompletionConfig response = await catalogServiceClient.UpdateCompletionConfigAsync(completionConfig, updateMask);

UpdateCompletionConfigAsync(CompletionConfig, FieldMask, CancellationToken)

public virtual Task<CompletionConfig> UpdateCompletionConfigAsync(CompletionConfig completionConfig, FieldMask updateMask, CancellationToken cancellationToken)

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

Parameters
NameDescription
completionConfigCompletionConfig

Required. The [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update.

If the caller does not have permission to update the [CompletionConfig][google.cloud.retail.v2.CompletionConfig], then a PERMISSION_DENIED error is returned.

If the [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update does not exist, a NOT_FOUND error is returned.

updateMaskFieldMask

Indicates which fields in the provided [CompletionConfig][google.cloud.retail.v2.CompletionConfig] to update. The following are the only supported fields:

  • [CompletionConfig.matching_order][google.cloud.retail.v2.CompletionConfig.matching_order]
  • [CompletionConfig.max_suggestions][google.cloud.retail.v2.CompletionConfig.max_suggestions]
  • [CompletionConfig.min_prefix_length][google.cloud.retail.v2.CompletionConfig.min_prefix_length]
  • [CompletionConfig.auto_learning][google.cloud.retail.v2.CompletionConfig.auto_learning]

If not set, all supported fields are updated.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CompletionConfig completionConfig = new CompletionConfig();
FieldMask updateMask = new FieldMask();
// Make the request
CompletionConfig response = await catalogServiceClient.UpdateCompletionConfigAsync(completionConfig, updateMask);

UpdateCompletionConfigAsync(UpdateCompletionConfigRequest, CallSettings)

public virtual Task<CompletionConfig> UpdateCompletionConfigAsync(UpdateCompletionConfigRequest request, CallSettings callSettings = null)

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCompletionConfigRequest request = new UpdateCompletionConfigRequest
{
    CompletionConfig = new CompletionConfig(),
    UpdateMask = new FieldMask(),
};
// Make the request
CompletionConfig response = await catalogServiceClient.UpdateCompletionConfigAsync(request);

UpdateCompletionConfigAsync(UpdateCompletionConfigRequest, CancellationToken)

public virtual Task<CompletionConfig> UpdateCompletionConfigAsync(UpdateCompletionConfigRequest request, CancellationToken cancellationToken)

Updates the [CompletionConfig][google.cloud.retail.v2.CompletionConfig]s.

Parameters
NameDescription
requestUpdateCompletionConfigRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<CompletionConfig>

A Task containing the RPC response.

Example
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateCompletionConfigRequest request = new UpdateCompletionConfigRequest
{
    CompletionConfig = new CompletionConfig(),
    UpdateMask = new FieldMask(),
};
// Make the request
CompletionConfig response = await catalogServiceClient.UpdateCompletionConfigAsync(request);