public class CollectionService.CollectionServiceClient : ClientBase<CollectionService.CollectionServiceClient>Reference documentation and code samples for the Discovery Engine v1 API class CollectionService.CollectionServiceClient.
Client for CollectionService
Inheritance
object > ClientBase > ClientBaseCollectionServiceCollectionServiceClient > CollectionService.CollectionServiceClientNamespace
Google.Cloud.DiscoveryEngine.V1Assembly
Google.Cloud.DiscoveryEngine.V1.dll
Constructors
CollectionServiceClient()
protected CollectionServiceClient()Protected parameterless constructor to allow creation of test doubles.
CollectionServiceClient(CallInvoker)
public CollectionServiceClient(CallInvoker callInvoker)Creates a new client for CollectionService that uses a custom CallInvoker.
| Parameter | |
|---|---|
| Name | Description |
callInvoker |
CallInvokerThe callInvoker to use to make remote calls. |
CollectionServiceClient(ChannelBase)
public CollectionServiceClient(ChannelBase channel)Creates a new client for CollectionService
| Parameter | |
|---|---|
| Name | Description |
channel |
ChannelBaseThe channel to use to make remote calls. |
CollectionServiceClient(ClientBaseConfiguration)
protected CollectionServiceClient(ClientBase.ClientBaseConfiguration configuration)Protected constructor to allow creation of configured clients.
| Parameter | |
|---|---|
| Name | Description |
configuration |
ClientBaseClientBaseConfigurationThe client configuration. |
Methods
CreateLocationsClient()
public virtual Locations.LocationsClient CreateLocationsClient()Creates a new instance of Locations.LocationsClient using the same call invoker as this client.
| Returns | |
|---|---|
| Type | Description |
LocationsLocationsClient |
A new Locations.LocationsClient for the same target as this client. |
CreateOperationsClient()
public virtual Operations.OperationsClient CreateOperationsClient()Creates a new instance of Operations.OperationsClient using the same call invoker as this client.
| Returns | |
|---|---|
| Type | Description |
OperationsOperationsClient |
A new Operations client for the same target as this client. |
DeleteCollection(DeleteCollectionRequest, CallOptions)
public virtual Operation DeleteCollection(DeleteCollectionRequest request, CallOptions options)Deletes a [Collection][google.cloud.discoveryengine.v1.Collection].
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
Operation |
The response received from the server. |
DeleteCollection(DeleteCollectionRequest, Metadata, DateTime?, CancellationToken)
public virtual Operation DeleteCollection(DeleteCollectionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Deletes a [Collection][google.cloud.discoveryengine.v1.Collection].
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
Operation |
The response received from the server. |
DeleteCollectionAsync(DeleteCollectionRequest, CallOptions)
public virtual AsyncUnaryCall<Operation> DeleteCollectionAsync(DeleteCollectionRequest request, CallOptions options)Deletes a [Collection][google.cloud.discoveryengine.v1.Collection].
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallOperation |
The call object. |
DeleteCollectionAsync(DeleteCollectionRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<Operation> DeleteCollectionAsync(DeleteCollectionRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Deletes a [Collection][google.cloud.discoveryengine.v1.Collection].
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteCollectionRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallOperation |
The call object. |
GetIamPolicy(GetIamPolicyRequest, CallOptions)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)Gets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist. An empty policy is
returned if the resource exists but does not have a policy set on it.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIamPolicyRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
Policy |
The response received from the server. |
GetIamPolicy(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Gets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist. An empty policy is
returned if the resource exists but does not have a policy set on it.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIamPolicyRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
Policy |
The response received from the server. |
GetIamPolicyAsync(GetIamPolicyRequest, CallOptions)
public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallOptions options)Gets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist. An empty policy is
returned if the resource exists but does not have a policy set on it.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIamPolicyRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallPolicy |
The call object. |
GetIamPolicyAsync(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Gets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist. An empty policy is
returned if the resource exists but does not have a policy set on it.
| Parameters | |
|---|---|
| Name | Description |
request |
GetIamPolicyRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallPolicy |
The call object. |
NewInstance(ClientBaseConfiguration)
protected override CollectionService.CollectionServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)Creates a new instance of client from given ClientBaseConfiguration.
| Parameter | |
|---|---|
| Name | Description |
configuration |
ClientBaseClientBaseConfiguration |
| Returns | |
|---|---|
| Type | Description |
CollectionServiceCollectionServiceClient |
|
SetIamPolicy(SetIamPolicyRequest, CallOptions)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)Sets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist.
Important: When setting a policy directly on a Collection resource,
the only recommended roles in the bindings are:
roles/discoveryengine.admin
roles/discoveryengine.agentspaceAdmin
roles/discoveryengine.viewer
roles/discoveryengine.agentspaceViewer
roles/discoveryengine.user
roles/discoveryengine.agentspaceUser
Attempting to grant any other role will result in a warning in logging.
| Parameters | |
|---|---|
| Name | Description |
request |
SetIamPolicyRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
Policy |
The response received from the server. |
SetIamPolicy(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)
public virtual Policy SetIamPolicy(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Sets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist.
Important: When setting a policy directly on a Collection resource,
the only recommended roles in the bindings are:
roles/discoveryengine.admin
roles/discoveryengine.agentspaceAdmin
roles/discoveryengine.viewer
roles/discoveryengine.agentspaceViewer
roles/discoveryengine.user
roles/discoveryengine.agentspaceUser
Attempting to grant any other role will result in a warning in logging.
| Parameters | |
|---|---|
| Name | Description |
request |
SetIamPolicyRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
Policy |
The response received from the server. |
SetIamPolicyAsync(SetIamPolicyRequest, CallOptions)
public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallOptions options)Sets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist.
Important: When setting a policy directly on a Collection resource,
the only recommended roles in the bindings are:
roles/discoveryengine.admin
roles/discoveryengine.agentspaceAdmin
roles/discoveryengine.viewer
roles/discoveryengine.agentspaceViewer
roles/discoveryengine.user
roles/discoveryengine.agentspaceUser
Attempting to grant any other role will result in a warning in logging.
| Parameters | |
|---|---|
| Name | Description |
request |
SetIamPolicyRequestThe request to send to the server. |
options |
CallOptionsThe options for the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallPolicy |
The call object. |
SetIamPolicyAsync(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)
public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)Sets the IAM access control policy for a
[Collection][google.cloud.discoveryengine.v1.Collection]. A NOT_FOUND
error is returned if the resource does not exist.
Important: When setting a policy directly on a Collection resource,
the only recommended roles in the bindings are:
roles/discoveryengine.admin
roles/discoveryengine.agentspaceAdmin
roles/discoveryengine.viewer
roles/discoveryengine.agentspaceViewer
roles/discoveryengine.user
roles/discoveryengine.agentspaceUser
Attempting to grant any other role will result in a warning in logging.
| Parameters | |
|---|---|
| Name | Description |
request |
SetIamPolicyRequestThe request to send to the server. |
headers |
MetadataThe initial metadata to send with the call. This parameter is optional. |
deadline |
System.DateTimeAn optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken |
CancellationTokenAn optional token for canceling the call. |
| Returns | |
|---|---|
| Type | Description |
AsyncUnaryCallPolicy |
The call object. |