public abstract class EntityServiceClient
Reference documentation and code samples for the Chronicle v1 API class EntityServiceClient.
EntityService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Chronicle.V1Assembly
Google.Cloud.Chronicle.V1.dll
Remarks
EntityService contains apis for finding entities.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the EntityService service, which is a host of "chronicle.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default EntityService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default EntityService scopes are:
GrpcClient
public virtual EntityService.EntityServiceClient GrpcClient { get; }
The underlying gRPC EntityService client
Property Value | |
---|---|
Type | Description |
EntityServiceEntityServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static EntityServiceClient Create()
Synchronously creates a EntityServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EntityServiceClientBuilder.
Returns | |
---|---|
Type | Description |
EntityServiceClient |
The created EntityServiceClient. |
CreateAsync(CancellationToken)
public static Task<EntityServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a EntityServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EntityServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskEntityServiceClient |
The task representing the created EntityServiceClient. |
CreateWatchlist(CreateWatchlistRequest, CallSettings)
public virtual Watchlist CreateWatchlist(CreateWatchlistRequest request, CallSettings callSettings = null)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
request |
CreateWatchlistRequest 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 |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
CreateWatchlistRequest request = new CreateWatchlistRequest
{
ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
WatchlistId = "",
Watchlist = new Watchlist(),
};
// Make the request
Watchlist response = entityServiceClient.CreateWatchlist(request);
CreateWatchlist(InstanceName, Watchlist, string, CallSettings)
public virtual Watchlist CreateWatchlist(InstanceName parent, Watchlist watchlist, string watchlistId, CallSettings callSettings = null)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
parent |
InstanceName Required. The parent resource where this watchlist will be created.
Format: |
watchlist |
Watchlist Required. The watchlist to create. |
watchlistId |
string Optional. The ID to use for the watchlist, which will become the final component of the watchlist's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Watchlist watchlist = new Watchlist();
string watchlistId = "";
// Make the request
Watchlist response = entityServiceClient.CreateWatchlist(parent, watchlist, watchlistId);
CreateWatchlist(string, Watchlist, string, CallSettings)
public virtual Watchlist CreateWatchlist(string parent, Watchlist watchlist, string watchlistId, CallSettings callSettings = null)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource where this watchlist will be created.
Format: |
watchlist |
Watchlist Required. The watchlist to create. |
watchlistId |
string Optional. The ID to use for the watchlist, which will become the final component of the watchlist's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
Watchlist watchlist = new Watchlist();
string watchlistId = "";
// Make the request
Watchlist response = entityServiceClient.CreateWatchlist(parent, watchlist, watchlistId);
CreateWatchlistAsync(CreateWatchlistRequest, CallSettings)
public virtual Task<Watchlist> CreateWatchlistAsync(CreateWatchlistRequest request, CallSettings callSettings = null)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
request |
CreateWatchlistRequest 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 |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
CreateWatchlistRequest request = new CreateWatchlistRequest
{
ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
WatchlistId = "",
Watchlist = new Watchlist(),
};
// Make the request
Watchlist response = await entityServiceClient.CreateWatchlistAsync(request);
CreateWatchlistAsync(CreateWatchlistRequest, CancellationToken)
public virtual Task<Watchlist> CreateWatchlistAsync(CreateWatchlistRequest request, CancellationToken cancellationToken)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
request |
CreateWatchlistRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
CreateWatchlistRequest request = new CreateWatchlistRequest
{
ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
WatchlistId = "",
Watchlist = new Watchlist(),
};
// Make the request
Watchlist response = await entityServiceClient.CreateWatchlistAsync(request);
CreateWatchlistAsync(InstanceName, Watchlist, string, CallSettings)
public virtual Task<Watchlist> CreateWatchlistAsync(InstanceName parent, Watchlist watchlist, string watchlistId, CallSettings callSettings = null)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
parent |
InstanceName Required. The parent resource where this watchlist will be created.
Format: |
watchlist |
Watchlist Required. The watchlist to create. |
watchlistId |
string Optional. The ID to use for the watchlist, which will become the final component of the watchlist's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Watchlist watchlist = new Watchlist();
string watchlistId = "";
// Make the request
Watchlist response = await entityServiceClient.CreateWatchlistAsync(parent, watchlist, watchlistId);
CreateWatchlistAsync(InstanceName, Watchlist, string, CancellationToken)
public virtual Task<Watchlist> CreateWatchlistAsync(InstanceName parent, Watchlist watchlist, string watchlistId, CancellationToken cancellationToken)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
parent |
InstanceName Required. The parent resource where this watchlist will be created.
Format: |
watchlist |
Watchlist Required. The watchlist to create. |
watchlistId |
string Optional. The ID to use for the watchlist, which will become the final component of the watchlist's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
Watchlist watchlist = new Watchlist();
string watchlistId = "";
// Make the request
Watchlist response = await entityServiceClient.CreateWatchlistAsync(parent, watchlist, watchlistId);
CreateWatchlistAsync(string, Watchlist, string, CallSettings)
public virtual Task<Watchlist> CreateWatchlistAsync(string parent, Watchlist watchlist, string watchlistId, CallSettings callSettings = null)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource where this watchlist will be created.
Format: |
watchlist |
Watchlist Required. The watchlist to create. |
watchlistId |
string Optional. The ID to use for the watchlist, which will become the final component of the watchlist's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
Watchlist watchlist = new Watchlist();
string watchlistId = "";
// Make the request
Watchlist response = await entityServiceClient.CreateWatchlistAsync(parent, watchlist, watchlistId);
CreateWatchlistAsync(string, Watchlist, string, CancellationToken)
public virtual Task<Watchlist> CreateWatchlistAsync(string parent, Watchlist watchlist, string watchlistId, CancellationToken cancellationToken)
Creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent resource where this watchlist will be created.
Format: |
watchlist |
Watchlist Required. The watchlist to create. |
watchlistId |
string Optional. The ID to use for the watchlist, which will become the final component of the watchlist's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
Watchlist watchlist = new Watchlist();
string watchlistId = "";
// Make the request
Watchlist response = await entityServiceClient.CreateWatchlistAsync(parent, watchlist, watchlistId);
DeleteWatchlist(DeleteWatchlistRequest, CallSettings)
public virtual void DeleteWatchlist(DeleteWatchlistRequest request, CallSettings callSettings = null)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
request |
DeleteWatchlistRequest The request object containing all of the parameters for the API call. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
DeleteWatchlistRequest request = new DeleteWatchlistRequest
{
WatchlistName = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]"),
Force = false,
};
// Make the request
entityServiceClient.DeleteWatchlist(request);
DeleteWatchlist(WatchlistName, bool, CallSettings)
public virtual void DeleteWatchlist(WatchlistName name, bool force, CallSettings callSettings = null)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
name |
WatchlistName Required. The name of the watchlist to delete.
Format:
|
force |
bool Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.) |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
WatchlistName name = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]");
bool force = false;
// Make the request
entityServiceClient.DeleteWatchlist(name, force);
DeleteWatchlist(string, bool, CallSettings)
public virtual void DeleteWatchlist(string name, bool force, CallSettings callSettings = null)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the watchlist to delete.
Format:
|
force |
bool Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.) |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]/watchlists/[WATCHLIST]";
bool force = false;
// Make the request
entityServiceClient.DeleteWatchlist(name, force);
DeleteWatchlistAsync(DeleteWatchlistRequest, CallSettings)
public virtual Task DeleteWatchlistAsync(DeleteWatchlistRequest request, CallSettings callSettings = null)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
request |
DeleteWatchlistRequest 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 |
Task |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteWatchlistRequest request = new DeleteWatchlistRequest
{
WatchlistName = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]"),
Force = false,
};
// Make the request
await entityServiceClient.DeleteWatchlistAsync(request);
DeleteWatchlistAsync(DeleteWatchlistRequest, CancellationToken)
public virtual Task DeleteWatchlistAsync(DeleteWatchlistRequest request, CancellationToken cancellationToken)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
request |
DeleteWatchlistRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteWatchlistRequest request = new DeleteWatchlistRequest
{
WatchlistName = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]"),
Force = false,
};
// Make the request
await entityServiceClient.DeleteWatchlistAsync(request);
DeleteWatchlistAsync(WatchlistName, bool, CallSettings)
public virtual Task DeleteWatchlistAsync(WatchlistName name, bool force, CallSettings callSettings = null)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
name |
WatchlistName Required. The name of the watchlist to delete.
Format:
|
force |
bool Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.) |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
WatchlistName name = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]");
bool force = false;
// Make the request
await entityServiceClient.DeleteWatchlistAsync(name, force);
DeleteWatchlistAsync(WatchlistName, bool, CancellationToken)
public virtual Task DeleteWatchlistAsync(WatchlistName name, bool force, CancellationToken cancellationToken)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
name |
WatchlistName Required. The name of the watchlist to delete.
Format:
|
force |
bool Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.) |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
WatchlistName name = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]");
bool force = false;
// Make the request
await entityServiceClient.DeleteWatchlistAsync(name, force);
DeleteWatchlistAsync(string, bool, CallSettings)
public virtual Task DeleteWatchlistAsync(string name, bool force, CallSettings callSettings = null)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the watchlist to delete.
Format:
|
force |
bool Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.) |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]/watchlists/[WATCHLIST]";
bool force = false;
// Make the request
await entityServiceClient.DeleteWatchlistAsync(name, force);
DeleteWatchlistAsync(string, bool, CancellationToken)
public virtual Task DeleteWatchlistAsync(string name, bool force, CancellationToken cancellationToken)
Deletes the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
name |
string Required. The name of the watchlist to delete.
Format:
|
force |
bool Optional. If set to true, any entities under this watchlist will also be deleted. (Otherwise, the request will only work if the watchlist has no entities.) |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]/watchlists/[WATCHLIST]";
bool force = false;
// Make the request
await entityServiceClient.DeleteWatchlistAsync(name, force);
GetWatchlist(GetWatchlistRequest, CallSettings)
public virtual Watchlist GetWatchlist(GetWatchlistRequest request, CallSettings callSettings = null)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
request |
GetWatchlistRequest 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 |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
GetWatchlistRequest request = new GetWatchlistRequest
{
WatchlistName = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]"),
};
// Make the request
Watchlist response = entityServiceClient.GetWatchlist(request);
GetWatchlist(WatchlistName, CallSettings)
public virtual Watchlist GetWatchlist(WatchlistName name, CallSettings callSettings = null)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
name |
WatchlistName Required. The parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
WatchlistName name = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]");
// Make the request
Watchlist response = entityServiceClient.GetWatchlist(name);
GetWatchlist(string, CallSettings)
public virtual Watchlist GetWatchlist(string name, CallSettings callSettings = null)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
name |
string Required. The parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]/watchlists/[WATCHLIST]";
// Make the request
Watchlist response = entityServiceClient.GetWatchlist(name);
GetWatchlistAsync(GetWatchlistRequest, CallSettings)
public virtual Task<Watchlist> GetWatchlistAsync(GetWatchlistRequest request, CallSettings callSettings = null)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
request |
GetWatchlistRequest 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 |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
GetWatchlistRequest request = new GetWatchlistRequest
{
WatchlistName = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]"),
};
// Make the request
Watchlist response = await entityServiceClient.GetWatchlistAsync(request);
GetWatchlistAsync(GetWatchlistRequest, CancellationToken)
public virtual Task<Watchlist> GetWatchlistAsync(GetWatchlistRequest request, CancellationToken cancellationToken)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
request |
GetWatchlistRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
GetWatchlistRequest request = new GetWatchlistRequest
{
WatchlistName = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]"),
};
// Make the request
Watchlist response = await entityServiceClient.GetWatchlistAsync(request);
GetWatchlistAsync(WatchlistName, CallSettings)
public virtual Task<Watchlist> GetWatchlistAsync(WatchlistName name, CallSettings callSettings = null)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
name |
WatchlistName Required. The parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
WatchlistName name = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]");
// Make the request
Watchlist response = await entityServiceClient.GetWatchlistAsync(name);
GetWatchlistAsync(WatchlistName, CancellationToken)
public virtual Task<Watchlist> GetWatchlistAsync(WatchlistName name, CancellationToken cancellationToken)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
name |
WatchlistName Required. The parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
WatchlistName name = WatchlistName.FromProjectLocationInstanceWatchlist("[PROJECT]", "[LOCATION]", "[INSTANCE]", "[WATCHLIST]");
// Make the request
Watchlist response = await entityServiceClient.GetWatchlistAsync(name);
GetWatchlistAsync(string, CallSettings)
public virtual Task<Watchlist> GetWatchlistAsync(string name, CallSettings callSettings = null)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
name |
string Required. The parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]/watchlists/[WATCHLIST]";
// Make the request
Watchlist response = await entityServiceClient.GetWatchlistAsync(name);
GetWatchlistAsync(string, CancellationToken)
public virtual Task<Watchlist> GetWatchlistAsync(string name, CancellationToken cancellationToken)
Gets watchlist details for the given watchlist ID.
Parameters | |
---|---|
Name | Description |
name |
string Required. The parent, which owns this collection of watchlists.
The name of the watchlist to retrieve.
Format:
|
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]/watchlists/[WATCHLIST]";
// Make the request
Watchlist response = await entityServiceClient.GetWatchlistAsync(name);
ListWatchlists(InstanceName, string, int?, CallSettings)
public virtual PagedEnumerable<ListWatchlistsResponse, Watchlist> ListWatchlists(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all watchlists for the given instance.
Parameters | |
---|---|
Name | Description |
parent |
InstanceName Required. The parent, which owns this collection of watchlists.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListWatchlistsResponseWatchlist |
A pageable sequence of Watchlist resources. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
PagedEnumerable<ListWatchlistsResponse, Watchlist> response = entityServiceClient.ListWatchlists(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Watchlist 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 (ListWatchlistsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Watchlist 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<Watchlist> 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 (Watchlist 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;
ListWatchlists(ListWatchlistsRequest, CallSettings)
public virtual PagedEnumerable<ListWatchlistsResponse, Watchlist> ListWatchlists(ListWatchlistsRequest request, CallSettings callSettings = null)
Lists all watchlists for the given instance.
Parameters | |
---|---|
Name | Description |
request |
ListWatchlistsRequest 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 |
PagedEnumerableListWatchlistsResponseWatchlist |
A pageable sequence of Watchlist resources. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
ListWatchlistsRequest request = new ListWatchlistsRequest
{
ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
Filter = "",
};
// Make the request
PagedEnumerable<ListWatchlistsResponse, Watchlist> response = entityServiceClient.ListWatchlists(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Watchlist 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 (ListWatchlistsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Watchlist 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<Watchlist> 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 (Watchlist 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;
ListWatchlists(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListWatchlistsResponse, Watchlist> ListWatchlists(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all watchlists for the given instance.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent, which owns this collection of watchlists.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListWatchlistsResponseWatchlist |
A pageable sequence of Watchlist resources. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
PagedEnumerable<ListWatchlistsResponse, Watchlist> response = entityServiceClient.ListWatchlists(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (Watchlist 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 (ListWatchlistsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Watchlist 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<Watchlist> 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 (Watchlist 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;
ListWatchlistsAsync(InstanceName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListWatchlistsResponse, Watchlist> ListWatchlistsAsync(InstanceName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all watchlists for the given instance.
Parameters | |
---|---|
Name | Description |
parent |
InstanceName Required. The parent, which owns this collection of watchlists.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListWatchlistsResponseWatchlist |
A pageable asynchronous sequence of Watchlist resources. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
InstanceName parent = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
// Make the request
PagedAsyncEnumerable<ListWatchlistsResponse, Watchlist> response = entityServiceClient.ListWatchlistsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Watchlist 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((ListWatchlistsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Watchlist 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<Watchlist> 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 (Watchlist 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;
ListWatchlistsAsync(ListWatchlistsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListWatchlistsResponse, Watchlist> ListWatchlistsAsync(ListWatchlistsRequest request, CallSettings callSettings = null)
Lists all watchlists for the given instance.
Parameters | |
---|---|
Name | Description |
request |
ListWatchlistsRequest 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 |
PagedAsyncEnumerableListWatchlistsResponseWatchlist |
A pageable asynchronous sequence of Watchlist resources. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
ListWatchlistsRequest request = new ListWatchlistsRequest
{
ParentAsInstanceName = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]"),
Filter = "",
};
// Make the request
PagedAsyncEnumerable<ListWatchlistsResponse, Watchlist> response = entityServiceClient.ListWatchlistsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Watchlist 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((ListWatchlistsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Watchlist 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<Watchlist> 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 (Watchlist 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;
ListWatchlistsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListWatchlistsResponse, Watchlist> ListWatchlistsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Lists all watchlists for the given instance.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The parent, which owns this collection of watchlists.
Format: |
pageToken |
string The token returned from the previous request. A value of |
pageSize |
int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListWatchlistsResponseWatchlist |
A pageable asynchronous sequence of Watchlist resources. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/instances/[INSTANCE]";
// Make the request
PagedAsyncEnumerable<ListWatchlistsResponse, Watchlist> response = entityServiceClient.ListWatchlistsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Watchlist 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((ListWatchlistsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Watchlist 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<Watchlist> 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 (Watchlist 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;
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.
UpdateWatchlist(UpdateWatchlistRequest, CallSettings)
public virtual Watchlist UpdateWatchlist(UpdateWatchlistRequest request, CallSettings callSettings = null)
Updates the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
request |
UpdateWatchlistRequest 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 |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
UpdateWatchlistRequest request = new UpdateWatchlistRequest
{
Watchlist = new Watchlist(),
UpdateMask = new FieldMask(),
};
// Make the request
Watchlist response = entityServiceClient.UpdateWatchlist(request);
UpdateWatchlist(Watchlist, FieldMask, CallSettings)
public virtual Watchlist UpdateWatchlist(Watchlist watchlist, FieldMask updateMask, CallSettings callSettings = null)
Updates the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
watchlist |
Watchlist Required. The watchlist to update. The watchlist's |
updateMask |
FieldMask Optional. The list of fields to update. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Watchlist |
The RPC response. |
// Create client
EntityServiceClient entityServiceClient = EntityServiceClient.Create();
// Initialize request argument(s)
Watchlist watchlist = new Watchlist();
FieldMask updateMask = new FieldMask();
// Make the request
Watchlist response = entityServiceClient.UpdateWatchlist(watchlist, updateMask);
UpdateWatchlistAsync(UpdateWatchlistRequest, CallSettings)
public virtual Task<Watchlist> UpdateWatchlistAsync(UpdateWatchlistRequest request, CallSettings callSettings = null)
Updates the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
request |
UpdateWatchlistRequest 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 |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateWatchlistRequest request = new UpdateWatchlistRequest
{
Watchlist = new Watchlist(),
UpdateMask = new FieldMask(),
};
// Make the request
Watchlist response = await entityServiceClient.UpdateWatchlistAsync(request);
UpdateWatchlistAsync(UpdateWatchlistRequest, CancellationToken)
public virtual Task<Watchlist> UpdateWatchlistAsync(UpdateWatchlistRequest request, CancellationToken cancellationToken)
Updates the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
request |
UpdateWatchlistRequest The request object containing all of the parameters for the API call. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateWatchlistRequest request = new UpdateWatchlistRequest
{
Watchlist = new Watchlist(),
UpdateMask = new FieldMask(),
};
// Make the request
Watchlist response = await entityServiceClient.UpdateWatchlistAsync(request);
UpdateWatchlistAsync(Watchlist, FieldMask, CallSettings)
public virtual Task<Watchlist> UpdateWatchlistAsync(Watchlist watchlist, FieldMask updateMask, CallSettings callSettings = null)
Updates the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
watchlist |
Watchlist Required. The watchlist to update. The watchlist's |
updateMask |
FieldMask Optional. The list of fields to update. |
callSettings |
CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
Watchlist watchlist = new Watchlist();
FieldMask updateMask = new FieldMask();
// Make the request
Watchlist response = await entityServiceClient.UpdateWatchlistAsync(watchlist, updateMask);
UpdateWatchlistAsync(Watchlist, FieldMask, CancellationToken)
public virtual Task<Watchlist> UpdateWatchlistAsync(Watchlist watchlist, FieldMask updateMask, CancellationToken cancellationToken)
Updates the watchlist for the given instance.
Parameters | |
---|---|
Name | Description |
watchlist |
Watchlist Required. The watchlist to update. The watchlist's |
updateMask |
FieldMask Optional. The list of fields to update. |
cancellationToken |
CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskWatchlist |
A Task containing the RPC response. |
// Create client
EntityServiceClient entityServiceClient = await EntityServiceClient.CreateAsync();
// Initialize request argument(s)
Watchlist watchlist = new Watchlist();
FieldMask updateMask = new FieldMask();
// Make the request
Watchlist response = await entityServiceClient.UpdateWatchlistAsync(watchlist, updateMask);