public abstract class FeedServiceClient
Reference documentation and code samples for the Google Cloud Support v2beta API class FeedServiceClient.
FeedService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Support.V2BetaAssembly
Google.Cloud.Support.V2Beta.dll
Remarks
A service to view case feed items.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the FeedService service, which is a host of "cloudsupport.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default FeedService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default FeedService scopes are:
GrpcClient
public virtual FeedService.FeedServiceClient GrpcClient { get; }
The underlying gRPC FeedService client
Property Value | |
---|---|
Type | Description |
FeedServiceFeedServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
Create()
public static FeedServiceClient Create()
Synchronously creates a FeedServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FeedServiceClientBuilder.
Returns | |
---|---|
Type | Description |
FeedServiceClient |
The created FeedServiceClient. |
CreateAsync(CancellationToken)
public static Task<FeedServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a FeedServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use FeedServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken |
CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskFeedServiceClient |
The task representing the created FeedServiceClient. |
ShowFeed(CaseName, string, int?, CallSettings)
public virtual PagedEnumerable<ShowFeedResponse, FeedItem> ShowFeed(CaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Show items in the feed of this case, including case emails, attachments, and comments.
Parameters | |
---|---|
Name | Description |
parent |
CaseName Required. The resource name of the case for which feed items should be listed. |
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 |
PagedEnumerableShowFeedResponseFeedItem |
A pageable sequence of FeedItem resources. |
// Create client
FeedServiceClient feedServiceClient = FeedServiceClient.Create();
// Initialize request argument(s)
CaseName parent = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]");
// Make the request
PagedEnumerable<ShowFeedResponse, FeedItem> response = feedServiceClient.ShowFeed(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (FeedItem 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 (ShowFeedResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FeedItem 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<FeedItem> 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 (FeedItem 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;
ShowFeed(ShowFeedRequest, CallSettings)
public virtual PagedEnumerable<ShowFeedResponse, FeedItem> ShowFeed(ShowFeedRequest request, CallSettings callSettings = null)
Show items in the feed of this case, including case emails, attachments, and comments.
Parameters | |
---|---|
Name | Description |
request |
ShowFeedRequest 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 |
PagedEnumerableShowFeedResponseFeedItem |
A pageable sequence of FeedItem resources. |
// Create client
FeedServiceClient feedServiceClient = FeedServiceClient.Create();
// Initialize request argument(s)
ShowFeedRequest request = new ShowFeedRequest
{
ParentAsCaseName = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]"),
OrderBy = "",
};
// Make the request
PagedEnumerable<ShowFeedResponse, FeedItem> response = feedServiceClient.ShowFeed(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (FeedItem 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 (ShowFeedResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FeedItem 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<FeedItem> 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 (FeedItem 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;
ShowFeed(string, string, int?, CallSettings)
public virtual PagedEnumerable<ShowFeedResponse, FeedItem> ShowFeed(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Show items in the feed of this case, including case emails, attachments, and comments.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the case for which feed items should be listed. |
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 |
PagedEnumerableShowFeedResponseFeedItem |
A pageable sequence of FeedItem resources. |
// Create client
FeedServiceClient feedServiceClient = FeedServiceClient.Create();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/cases/[CASE]";
// Make the request
PagedEnumerable<ShowFeedResponse, FeedItem> response = feedServiceClient.ShowFeed(parent);
// Iterate over all response items, lazily performing RPCs as required
foreach (FeedItem 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 (ShowFeedResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FeedItem 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<FeedItem> 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 (FeedItem 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;
ShowFeedAsync(CaseName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ShowFeedResponse, FeedItem> ShowFeedAsync(CaseName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Show items in the feed of this case, including case emails, attachments, and comments.
Parameters | |
---|---|
Name | Description |
parent |
CaseName Required. The resource name of the case for which feed items should be listed. |
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 |
PagedAsyncEnumerableShowFeedResponseFeedItem |
A pageable asynchronous sequence of FeedItem resources. |
// Create client
FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();
// Initialize request argument(s)
CaseName parent = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]");
// Make the request
PagedAsyncEnumerable<ShowFeedResponse, FeedItem> response = feedServiceClient.ShowFeedAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FeedItem 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((ShowFeedResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FeedItem 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<FeedItem> 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 (FeedItem 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;
ShowFeedAsync(ShowFeedRequest, CallSettings)
public virtual PagedAsyncEnumerable<ShowFeedResponse, FeedItem> ShowFeedAsync(ShowFeedRequest request, CallSettings callSettings = null)
Show items in the feed of this case, including case emails, attachments, and comments.
Parameters | |
---|---|
Name | Description |
request |
ShowFeedRequest 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 |
PagedAsyncEnumerableShowFeedResponseFeedItem |
A pageable asynchronous sequence of FeedItem resources. |
// Create client
FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();
// Initialize request argument(s)
ShowFeedRequest request = new ShowFeedRequest
{
ParentAsCaseName = CaseName.FromOrganizationCase("[ORGANIZATION]", "[CASE]"),
OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ShowFeedResponse, FeedItem> response = feedServiceClient.ShowFeedAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FeedItem 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((ShowFeedResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FeedItem 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<FeedItem> 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 (FeedItem 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;
ShowFeedAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ShowFeedResponse, FeedItem> ShowFeedAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Show items in the feed of this case, including case emails, attachments, and comments.
Parameters | |
---|---|
Name | Description |
parent |
string Required. The resource name of the case for which feed items should be listed. |
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 |
PagedAsyncEnumerableShowFeedResponseFeedItem |
A pageable asynchronous sequence of FeedItem resources. |
// Create client
FeedServiceClient feedServiceClient = await FeedServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "organizations/[ORGANIZATION]/cases/[CASE]";
// Make the request
PagedAsyncEnumerable<ShowFeedResponse, FeedItem> response = feedServiceClient.ShowFeedAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((FeedItem 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((ShowFeedResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (FeedItem 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<FeedItem> 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 (FeedItem 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.