public abstract class CatalogServiceClient
Reference documentation and code samples for the Retail v2 API class CatalogServiceClient.
CatalogService client wrapper, for convenient use.
Derived Types
Namespace
GoogleCloudGoogle.Cloud.RetailV2Assembly
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 | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default CatalogService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default CatalogService scopes are:
GrpcClient
public virtual CatalogService.CatalogServiceClient GrpcClient { get; }
The underlying gRPC CatalogService client
Property Value | |
---|---|
Type | Description |
CatalogServiceCatalogServiceClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | AddCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | AddCatalogAttributeRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | AddCatalogAttributeRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Type | Description |
CatalogServiceClient | The created CatalogServiceClient. |
CreateAsync(CancellationToken)
public static Task<CatalogServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a CatalogServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CatalogServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskCatalogServiceClient | 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 | |
---|---|
Name | Description |
name | AttributesConfigName Required. Full AttributesConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetAttributesConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. Full AttributesConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
AttributesConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | AttributesConfigName Required. Full AttributesConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | AttributesConfigName Required. Full AttributesConfig resource name. Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetAttributesConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetAttributesConfigRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. Full AttributesConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. Full AttributesConfig resource name. Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskAttributesConfig | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | CompletionConfigName Required. Full CompletionConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CompletionConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetCompletionConfigRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CompletionConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. Full CompletionConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
CompletionConfig | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | CompletionConfigName Required. Full CompletionConfig resource name. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskCompletionConfig | A Task containing the RPC response. |
// Create client
CatalogServiceClient catalogServiceClient = await CatalogServiceClient.CreateAsync();
// Initialize request argument(s)
CompletionConfigName name = CompletionConfigName.FromProjectLocationCatalog("[PROJECT]", "[LOCATION]", &qu