public abstract class WidgetConfigServiceClientReference documentation and code samples for the Discovery Engine v1 API class WidgetConfigServiceClient.
WidgetConfigService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.DiscoveryEngine.V1Assembly
Google.Cloud.DiscoveryEngine.V1.dll
Remarks
Service for managing [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] configuration.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }The default endpoint for the WidgetConfigService service, which is a host of "discoveryengine.googleapis.com" and a port of 443.
| Property Value | |
|---|---|
| Type | Description |
string |
|
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }The default WidgetConfigService scopes.
| Property Value | |
|---|---|
| Type | Description |
IReadOnlyListstring |
|
The default WidgetConfigService scopes are:
GrpcClient
public virtual WidgetConfigService.WidgetConfigServiceClient GrpcClient { get; }The underlying gRPC WidgetConfigService client
| Property Value | |
|---|---|
| Type | Description |
WidgetConfigServiceWidgetConfigServiceClient |
|
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
Create()
public static WidgetConfigServiceClient Create()Synchronously creates a WidgetConfigServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WidgetConfigServiceClientBuilder.
| Returns | |
|---|---|
| Type | Description |
WidgetConfigServiceClient |
The created WidgetConfigServiceClient. |
CreateAsync(CancellationToken)
public static Task<WidgetConfigServiceClient> CreateAsync(CancellationToken cancellationToken = default)Asynchronously creates a WidgetConfigServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use WidgetConfigServiceClientBuilder.
| Parameter | |
|---|---|
| Name | Description |
cancellationToken |
CancellationTokenThe CancellationToken to use while creating the client. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfigServiceClient |
The task representing the created WidgetConfigServiceClient. |
GetWidgetConfig(GetWidgetConfigRequest, CallSettings)
public virtual WidgetConfig GetWidgetConfig(GetWidgetConfigRequest request, CallSettings callSettings = null)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
request |
GetWidgetConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WidgetConfig |
The RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = WidgetConfigServiceClient.Create();
// Initialize request argument(s)
GetWidgetConfigRequest request = new GetWidgetConfigRequest
{
WidgetConfigName = WidgetConfigName.FromProjectLocationDataStoreWidgetConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[WIDGET_CONFIG]"),
AcceptCache = false,
GetWidgetConfigRequestOption = new GetWidgetConfigRequest.Types.GetWidgetConfigRequestOption(),
LanguageCode = "",
ModelInfoView = ModelInfoView.Unspecified,
};
// Make the request
WidgetConfig response = widgetConfigServiceClient.GetWidgetConfig(request);
GetWidgetConfig(WidgetConfigName, CallSettings)
public virtual WidgetConfig GetWidgetConfig(WidgetConfigName name, CallSettings callSettings = null)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
name |
WidgetConfigNameRequired. Full WidgetConfig resource name. Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WidgetConfig |
The RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = WidgetConfigServiceClient.Create();
// Initialize request argument(s)
WidgetConfigName name = WidgetConfigName.FromProjectLocationDataStoreWidgetConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[WIDGET_CONFIG]");
// Make the request
WidgetConfig response = widgetConfigServiceClient.GetWidgetConfig(name);
GetWidgetConfig(string, CallSettings)
public virtual WidgetConfig GetWidgetConfig(string name, CallSettings callSettings = null)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Full WidgetConfig resource name. Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WidgetConfig |
The RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = WidgetConfigServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/widgetConfigs/[WIDGET_CONFIG]";
// Make the request
WidgetConfig response = widgetConfigServiceClient.GetWidgetConfig(name);
GetWidgetConfigAsync(GetWidgetConfigRequest, CallSettings)
public virtual Task<WidgetConfig> GetWidgetConfigAsync(GetWidgetConfigRequest request, CallSettings callSettings = null)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
request |
GetWidgetConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
GetWidgetConfigRequest request = new GetWidgetConfigRequest
{
WidgetConfigName = WidgetConfigName.FromProjectLocationDataStoreWidgetConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[WIDGET_CONFIG]"),
AcceptCache = false,
GetWidgetConfigRequestOption = new GetWidgetConfigRequest.Types.GetWidgetConfigRequestOption(),
LanguageCode = "",
ModelInfoView = ModelInfoView.Unspecified,
};
// Make the request
WidgetConfig response = await widgetConfigServiceClient.GetWidgetConfigAsync(request);
GetWidgetConfigAsync(GetWidgetConfigRequest, CancellationToken)
public virtual Task<WidgetConfig> GetWidgetConfigAsync(GetWidgetConfigRequest request, CancellationToken cancellationToken)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
request |
GetWidgetConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
GetWidgetConfigRequest request = new GetWidgetConfigRequest
{
WidgetConfigName = WidgetConfigName.FromProjectLocationDataStoreWidgetConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[WIDGET_CONFIG]"),
AcceptCache = false,
GetWidgetConfigRequestOption = new GetWidgetConfigRequest.Types.GetWidgetConfigRequestOption(),
LanguageCode = "",
ModelInfoView = ModelInfoView.Unspecified,
};
// Make the request
WidgetConfig response = await widgetConfigServiceClient.GetWidgetConfigAsync(request);
GetWidgetConfigAsync(WidgetConfigName, CallSettings)
public virtual Task<WidgetConfig> GetWidgetConfigAsync(WidgetConfigName name, CallSettings callSettings = null)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
name |
WidgetConfigNameRequired. Full WidgetConfig resource name. Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
WidgetConfigName name = WidgetConfigName.FromProjectLocationDataStoreWidgetConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[WIDGET_CONFIG]");
// Make the request
WidgetConfig response = await widgetConfigServiceClient.GetWidgetConfigAsync(name);
GetWidgetConfigAsync(WidgetConfigName, CancellationToken)
public virtual Task<WidgetConfig> GetWidgetConfigAsync(WidgetConfigName name, CancellationToken cancellationToken)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
name |
WidgetConfigNameRequired. Full WidgetConfig resource name. Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
WidgetConfigName name = WidgetConfigName.FromProjectLocationDataStoreWidgetConfig("[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[WIDGET_CONFIG]");
// Make the request
WidgetConfig response = await widgetConfigServiceClient.GetWidgetConfigAsync(name);
GetWidgetConfigAsync(string, CallSettings)
public virtual Task<WidgetConfig> GetWidgetConfigAsync(string name, CallSettings callSettings = null)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Full WidgetConfig resource name. Format:
|
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/widgetConfigs/[WIDGET_CONFIG]";
// Make the request
WidgetConfig response = await widgetConfigServiceClient.GetWidgetConfigAsync(name);
GetWidgetConfigAsync(string, CancellationToken)
public virtual Task<WidgetConfig> GetWidgetConfigAsync(string name, CancellationToken cancellationToken)Gets a [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig].
| Parameters | |
|---|---|
| Name | Description |
name |
stringRequired. Full WidgetConfig resource name. Format:
|
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/dataStores/[DATA_STORE]/widgetConfigs/[WIDGET_CONFIG]";
// Make the request
WidgetConfig response = await widgetConfigServiceClient.GetWidgetConfigAsync(name);
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 | |
|---|---|
| Type | Description |
Task |
A task representing the asynchronous shutdown operation. |
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.
UpdateWidgetConfig(UpdateWidgetConfigRequest, CallSettings)
public virtual WidgetConfig UpdateWidgetConfig(UpdateWidgetConfigRequest request, CallSettings callSettings = null)Update a WidgetConfig.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateWidgetConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WidgetConfig |
The RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = WidgetConfigServiceClient.Create();
// Initialize request argument(s)
UpdateWidgetConfigRequest request = new UpdateWidgetConfigRequest
{
WidgetConfig = new WidgetConfig(),
UpdateMask = new FieldMask(),
};
// Make the request
WidgetConfig response = widgetConfigServiceClient.UpdateWidgetConfig(request);
UpdateWidgetConfig(WidgetConfig, FieldMask, CallSettings)
public virtual WidgetConfig UpdateWidgetConfig(WidgetConfig widgetConfig, FieldMask updateMask, CallSettings callSettings = null)Update a WidgetConfig.
| Parameters | |
|---|---|
| Name | Description |
widgetConfig |
WidgetConfigRequired. The [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update. If the caller does not have permission to update the [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig], then a PERMISSION_DENIED error is returned. If the [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update does not exist, a NOT_FOUND error is returned. |
updateMask |
FieldMaskIndicates which fields in the provided [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update. The following are the only supported fields:
If not set, all supported fields are updated. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
WidgetConfig |
The RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = WidgetConfigServiceClient.Create();
// Initialize request argument(s)
WidgetConfig widgetConfig = new WidgetConfig();
FieldMask updateMask = new FieldMask();
// Make the request
WidgetConfig response = widgetConfigServiceClient.UpdateWidgetConfig(widgetConfig, updateMask);
UpdateWidgetConfigAsync(UpdateWidgetConfigRequest, CallSettings)
public virtual Task<WidgetConfig> UpdateWidgetConfigAsync(UpdateWidgetConfigRequest request, CallSettings callSettings = null)Update a WidgetConfig.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateWidgetConfigRequestThe request object containing all of the parameters for the API call. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateWidgetConfigRequest request = new UpdateWidgetConfigRequest
{
WidgetConfig = new WidgetConfig(),
UpdateMask = new FieldMask(),
};
// Make the request
WidgetConfig response = await widgetConfigServiceClient.UpdateWidgetConfigAsync(request);
UpdateWidgetConfigAsync(UpdateWidgetConfigRequest, CancellationToken)
public virtual Task<WidgetConfig> UpdateWidgetConfigAsync(UpdateWidgetConfigRequest request, CancellationToken cancellationToken)Update a WidgetConfig.
| Parameters | |
|---|---|
| Name | Description |
request |
UpdateWidgetConfigRequestThe request object containing all of the parameters for the API call. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateWidgetConfigRequest request = new UpdateWidgetConfigRequest
{
WidgetConfig = new WidgetConfig(),
UpdateMask = new FieldMask(),
};
// Make the request
WidgetConfig response = await widgetConfigServiceClient.UpdateWidgetConfigAsync(request);
UpdateWidgetConfigAsync(WidgetConfig, FieldMask, CallSettings)
public virtual Task<WidgetConfig> UpdateWidgetConfigAsync(WidgetConfig widgetConfig, FieldMask updateMask, CallSettings callSettings = null)Update a WidgetConfig.
| Parameters | |
|---|---|
| Name | Description |
widgetConfig |
WidgetConfigRequired. The [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update. If the caller does not have permission to update the [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig], then a PERMISSION_DENIED error is returned. If the [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update does not exist, a NOT_FOUND error is returned. |
updateMask |
FieldMaskIndicates which fields in the provided [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update. The following are the only supported fields:
If not set, all supported fields are updated. |
callSettings |
CallSettingsIf not null, applies overrides to this RPC call. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
WidgetConfig widgetConfig = new WidgetConfig();
FieldMask updateMask = new FieldMask();
// Make the request
WidgetConfig response = await widgetConfigServiceClient.UpdateWidgetConfigAsync(widgetConfig, updateMask);
UpdateWidgetConfigAsync(WidgetConfig, FieldMask, CancellationToken)
public virtual Task<WidgetConfig> UpdateWidgetConfigAsync(WidgetConfig widgetConfig, FieldMask updateMask, CancellationToken cancellationToken)Update a WidgetConfig.
| Parameters | |
|---|---|
| Name | Description |
widgetConfig |
WidgetConfigRequired. The [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update. If the caller does not have permission to update the [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig], then a PERMISSION_DENIED error is returned. If the [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update does not exist, a NOT_FOUND error is returned. |
updateMask |
FieldMaskIndicates which fields in the provided [WidgetConfig][google.cloud.discoveryengine.v1.WidgetConfig] to update. The following are the only supported fields:
If not set, all supported fields are updated. |
cancellationToken |
CancellationTokenA CancellationToken to use for this RPC. |
| Returns | |
|---|---|
| Type | Description |
TaskWidgetConfig |
A Task containing the RPC response. |
// Create client
WidgetConfigServiceClient widgetConfigServiceClient = await WidgetConfigServiceClient.CreateAsync();
// Initialize request argument(s)
WidgetConfig widgetConfig = new WidgetConfig();
FieldMask updateMask = new FieldMask();
// Make the request
WidgetConfig response = await widgetConfigServiceClient.UpdateWidgetConfigAsync(widgetConfig, updateMask);