Retail v2 API - Class CatalogServiceClient (2.4.0)

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

Reference documentation and code samples for the Retail v2 API 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