Class SubscriptionsServiceClient
SubscriptionsService client wrapper, for convenient use.
Namespace: Google.Apps.Events.Subscriptions.V1
Assembly: Google.Apps.Events.Subscriptions.V1.dll
Syntax
public abstract class SubscriptionsServiceClient
Remarks
A service that manages subscriptions to Google Workspace events.
Properties
CreateSubscriptionOperationsClient
The long-running operations client for CreateSubscription
.
Declaration
public virtual OperationsClient CreateSubscriptionOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
DefaultEndpoint
The default endpoint for the SubscriptionsService service, which is a host of "workspaceevents.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
string |
DefaultScopes
The default SubscriptionsService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<string> |
Remarks
The default SubscriptionsService scopes are:
- https://www.googleapis.com/auth/chat.bot
- https://www.googleapis.com/auth/chat.memberships
- https://www.googleapis.com/auth/chat.memberships.readonly
- https://www.googleapis.com/auth/chat.messages
- https://www.googleapis.com/auth/chat.messages.reactions
- https://www.googleapis.com/auth/chat.messages.reactions.readonly
- https://www.googleapis.com/auth/chat.messages.readonly
- https://www.googleapis.com/auth/chat.spaces
- https://www.googleapis.com/auth/chat.spaces.readonly
- https://www.googleapis.com/auth/meetings.space.created
- https://www.googleapis.com/auth/meetings.space.readonly
DeleteSubscriptionOperationsClient
The long-running operations client for DeleteSubscription
.
Declaration
public virtual OperationsClient DeleteSubscriptionOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
GrpcClient
The underlying gRPC SubscriptionsService client
Declaration
public virtual SubscriptionsService.SubscriptionsServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
SubscriptionsService.SubscriptionsServiceClient |
ReactivateSubscriptionOperationsClient
The long-running operations client for ReactivateSubscription
.
Declaration
public virtual OperationsClient ReactivateSubscriptionOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
ServiceMetadata
The service metadata associated with this client type.
Declaration
public static ServiceMetadata ServiceMetadata { get; }
Property Value
Type | Description |
---|---|
ServiceMetadata |
UpdateSubscriptionOperationsClient
The long-running operations client for UpdateSubscription
.
Declaration
public virtual OperationsClient UpdateSubscriptionOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
Methods
Create()
Synchronously creates a SubscriptionsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SubscriptionsServiceClientBuilder.
Declaration
public static SubscriptionsServiceClient Create()
Returns
Type | Description |
---|---|
SubscriptionsServiceClient | The created SubscriptionsServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a SubscriptionsServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use SubscriptionsServiceClientBuilder.
Declaration
public static Task<SubscriptionsServiceClient> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
Task<SubscriptionsServiceClient> | The task representing the created SubscriptionsServiceClient. |
CreateSubscription(CreateSubscriptionRequest, CallSettings)
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
Declaration
public virtual Operation<Subscription, CreateSubscriptionMetadata> CreateSubscription(CreateSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateSubscriptionRequest | request | 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 |
---|---|
Operation<Subscription, CreateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
CreateSubscriptionRequest request = new CreateSubscriptionRequest
{
Subscription = new Subscription(),
ValidateOnly = false,
};
// Make the request
Operation<Subscription, CreateSubscriptionMetadata> response = subscriptionsServiceClient.CreateSubscription(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, CreateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, CreateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceCreateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
CreateSubscription(Subscription, CallSettings)
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
Declaration
public virtual Operation<Subscription, CreateSubscriptionMetadata> CreateSubscription(Subscription subscription, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Required. The subscription resource to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, CreateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
Subscription subscription = new Subscription();
// Make the request
Operation<Subscription, CreateSubscriptionMetadata> response = subscriptionsServiceClient.CreateSubscription(subscription);
// Poll until the returned long-running operation is complete
Operation<Subscription, CreateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, CreateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceCreateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
CreateSubscriptionAsync(CreateSubscriptionRequest, CallSettings)
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, CreateSubscriptionMetadata>> CreateSubscriptionAsync(CreateSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateSubscriptionRequest | request | 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<Operation<Subscription, CreateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSubscriptionRequest request = new CreateSubscriptionRequest
{
Subscription = new Subscription(),
ValidateOnly = false,
};
// Make the request
Operation<Subscription, CreateSubscriptionMetadata> response = await subscriptionsServiceClient.CreateSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, CreateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, CreateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceCreateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
CreateSubscriptionAsync(CreateSubscriptionRequest, CancellationToken)
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, CreateSubscriptionMetadata>> CreateSubscriptionAsync(CreateSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateSubscriptionRequest | request | 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<Operation<Subscription, CreateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSubscriptionRequest request = new CreateSubscriptionRequest
{
Subscription = new Subscription(),
ValidateOnly = false,
};
// Make the request
Operation<Subscription, CreateSubscriptionMetadata> response = await subscriptionsServiceClient.CreateSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, CreateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, CreateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceCreateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
CreateSubscriptionAsync(Subscription, CallSettings)
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, CreateSubscriptionMetadata>> CreateSubscriptionAsync(Subscription subscription, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Required. The subscription resource to create. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, CreateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
Subscription subscription = new Subscription();
// Make the request
Operation<Subscription, CreateSubscriptionMetadata> response = await subscriptionsServiceClient.CreateSubscriptionAsync(subscription);
// Poll until the returned long-running operation is complete
Operation<Subscription, CreateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, CreateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceCreateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
CreateSubscriptionAsync(Subscription, CancellationToken)
Creates a Google Workspace subscription. To learn how to use this method, see Create a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, CreateSubscriptionMetadata>> CreateSubscriptionAsync(Subscription subscription, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Required. The subscription resource to create. |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, CreateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
Subscription subscription = new Subscription();
// Make the request
Operation<Subscription, CreateSubscriptionMetadata> response = await subscriptionsServiceClient.CreateSubscriptionAsync(subscription);
// Poll until the returned long-running operation is complete
Operation<Subscription, CreateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, CreateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceCreateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
DeleteSubscription(DeleteSubscriptionRequest, CallSettings)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Operation<Empty, DeleteSubscriptionMetadata> DeleteSubscription(DeleteSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteSubscriptionRequest | request | 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 |
---|---|
Operation<Empty, DeleteSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
DeleteSubscriptionRequest request = new DeleteSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
ValidateOnly = false,
AllowMissing = false,
Etag = "",
};
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = subscriptionsServiceClient.DeleteSubscription(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceDeleteSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscription(SubscriptionName, CallSettings)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Operation<Empty, DeleteSubscriptionMetadata> DeleteSubscription(SubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription to delete. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, DeleteSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = subscriptionsServiceClient.DeleteSubscription(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceDeleteSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscription(string, CallSettings)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Operation<Empty, DeleteSubscriptionMetadata> DeleteSubscription(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription to delete. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, DeleteSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = subscriptionsServiceClient.DeleteSubscription(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceDeleteSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscriptionAsync(DeleteSubscriptionRequest, CallSettings)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> DeleteSubscriptionAsync(DeleteSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteSubscriptionRequest | request | 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<Operation<Empty, DeleteSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSubscriptionRequest request = new DeleteSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
ValidateOnly = false,
AllowMissing = false,
Etag = "",
};
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = await subscriptionsServiceClient.DeleteSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscriptionAsync(DeleteSubscriptionRequest, CancellationToken)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> DeleteSubscriptionAsync(DeleteSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteSubscriptionRequest | request | 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<Operation<Empty, DeleteSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSubscriptionRequest request = new DeleteSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
ValidateOnly = false,
AllowMissing = false,
Etag = "",
};
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = await subscriptionsServiceClient.DeleteSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscriptionAsync(SubscriptionName, CallSettings)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> DeleteSubscriptionAsync(SubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription to delete. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, DeleteSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = await subscriptionsServiceClient.DeleteSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscriptionAsync(SubscriptionName, CancellationToken)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> DeleteSubscriptionAsync(SubscriptionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription to delete. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, DeleteSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = await subscriptionsServiceClient.DeleteSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscriptionAsync(string, CallSettings)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> DeleteSubscriptionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription to delete. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, DeleteSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = await subscriptionsServiceClient.DeleteSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
DeleteSubscriptionAsync(string, CancellationToken)
Deletes a Google Workspace subscription. To learn how to use this method, see Delete a Google Workspace subscription.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> DeleteSubscriptionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription to delete. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, DeleteSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Empty, DeleteSubscriptionMetadata> response = await subscriptionsServiceClient.DeleteSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Empty, DeleteSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceDeleteSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Empty retrievedResult = retrievedResponse.Result;
}
GetSubscription(GetSubscriptionRequest, CallSettings)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Subscription GetSubscription(GetSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetSubscriptionRequest | request | 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 |
---|---|
Subscription | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
GetSubscriptionRequest request = new GetSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
};
// Make the request
Subscription response = subscriptionsServiceClient.GetSubscription(request);
GetSubscription(SubscriptionName, CallSettings)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Subscription GetSubscription(SubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Subscription | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Subscription response = subscriptionsServiceClient.GetSubscription(name);
GetSubscription(string, CallSettings)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Subscription GetSubscription(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Subscription | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Subscription response = subscriptionsServiceClient.GetSubscription(name);
GetSubscriptionAsync(GetSubscriptionRequest, CallSettings)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Task<Subscription> GetSubscriptionAsync(GetSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetSubscriptionRequest | request | 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<Subscription> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
GetSubscriptionRequest request = new GetSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
};
// Make the request
Subscription response = await subscriptionsServiceClient.GetSubscriptionAsync(request);
GetSubscriptionAsync(GetSubscriptionRequest, CancellationToken)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Task<Subscription> GetSubscriptionAsync(GetSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetSubscriptionRequest | request | 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<Subscription> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
GetSubscriptionRequest request = new GetSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
};
// Make the request
Subscription response = await subscriptionsServiceClient.GetSubscriptionAsync(request);
GetSubscriptionAsync(SubscriptionName, CallSettings)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Task<Subscription> GetSubscriptionAsync(SubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Subscription> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Subscription response = await subscriptionsServiceClient.GetSubscriptionAsync(name);
GetSubscriptionAsync(SubscriptionName, CancellationToken)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Task<Subscription> GetSubscriptionAsync(SubscriptionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Subscription> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Subscription response = await subscriptionsServiceClient.GetSubscriptionAsync(name);
GetSubscriptionAsync(string, CallSettings)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Task<Subscription> GetSubscriptionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Subscription> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Subscription response = await subscriptionsServiceClient.GetSubscriptionAsync(name);
GetSubscriptionAsync(string, CancellationToken)
Gets details about a Google Workspace subscription. To learn how to use this method, see Get details about a Google Workspace subscription.
Declaration
public virtual Task<Subscription> GetSubscriptionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Subscription> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Subscription response = await subscriptionsServiceClient.GetSubscriptionAsync(name);
ListSubscriptions(ListSubscriptionsRequest, CallSettings)
Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.
Declaration
public virtual PagedEnumerable<ListSubscriptionsResponse, Subscription> ListSubscriptions(ListSubscriptionsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListSubscriptionsRequest | request | 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 |
---|---|
PagedEnumerable<ListSubscriptionsResponse, Subscription> | A pageable sequence of Subscription resources. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
ListSubscriptionsRequest request = new ListSubscriptionsRequest { Filter = "", };
// Make the request
PagedEnumerable<ListSubscriptionsResponse, Subscription> response = subscriptionsServiceClient.ListSubscriptions(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (Subscription 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 (ListSubscriptionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Subscription 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<Subscription> 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 (Subscription 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;
ListSubscriptions(string, string, int?, CallSettings)
Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.
Declaration
public virtual PagedEnumerable<ListSubscriptionsResponse, Subscription> ListSubscriptions(string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | filter | Required. A query filter. You can filter subscriptions by event type ( You must specify at least one event type in your query. To filter for
multiple event types, use the To filter by both event type and target resource, use the For example, the following queries are valid:
The server rejects invalid queries with an |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedEnumerable<ListSubscriptionsResponse, Subscription> | A pageable sequence of Subscription resources. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
string filter = "";
// Make the request
PagedEnumerable<ListSubscriptionsResponse, Subscription> response = subscriptionsServiceClient.ListSubscriptions(filter);
// Iterate over all response items, lazily performing RPCs as required
foreach (Subscription 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 (ListSubscriptionsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Subscription 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<Subscription> 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 (Subscription 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;
ListSubscriptionsAsync(ListSubscriptionsRequest, CallSettings)
Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.
Declaration
public virtual PagedAsyncEnumerable<ListSubscriptionsResponse, Subscription> ListSubscriptionsAsync(ListSubscriptionsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ListSubscriptionsRequest | request | 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 |
---|---|
PagedAsyncEnumerable<ListSubscriptionsResponse, Subscription> | A pageable asynchronous sequence of Subscription resources. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
ListSubscriptionsRequest request = new ListSubscriptionsRequest { Filter = "", };
// Make the request
PagedAsyncEnumerable<ListSubscriptionsResponse, Subscription> response = subscriptionsServiceClient.ListSubscriptionsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Subscription 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((ListSubscriptionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Subscription 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<Subscription> 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 (Subscription 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;
ListSubscriptionsAsync(string, string, int?, CallSettings)
Lists Google Workspace subscriptions. To learn how to use this method, see List Google Workspace subscriptions.
Declaration
public virtual PagedAsyncEnumerable<ListSubscriptionsResponse, Subscription> ListSubscriptionsAsync(string filter, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | filter | Required. A query filter. You can filter subscriptions by event type ( You must specify at least one event type in your query. To filter for
multiple event types, use the To filter by both event type and target resource, use the For example, the following queries are valid:
The server rejects invalid queries with an |
string | pageToken | The token returned from the previous request. A value of |
int? | pageSize | 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 |
---|---|
PagedAsyncEnumerable<ListSubscriptionsResponse, Subscription> | A pageable asynchronous sequence of Subscription resources. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string filter = "";
// Make the request
PagedAsyncEnumerable<ListSubscriptionsResponse, Subscription> response = subscriptionsServiceClient.ListSubscriptionsAsync(filter);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Subscription 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((ListSubscriptionsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (Subscription 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<Subscription> 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 (Subscription 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;
PollOnceCreateSubscription(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of CreateSubscription
.
Declaration
public virtual Operation<Subscription, CreateSubscriptionMetadata> PollOnceCreateSubscription(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, CreateSubscriptionMetadata> | The result of polling the operation. |
PollOnceCreateSubscriptionAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
CreateSubscription
.
Declaration
public virtual Task<Operation<Subscription, CreateSubscriptionMetadata>> PollOnceCreateSubscriptionAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, CreateSubscriptionMetadata>> | A task representing the result of polling the operation. |
PollOnceDeleteSubscription(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of DeleteSubscription
.
Declaration
public virtual Operation<Empty, DeleteSubscriptionMetadata> PollOnceDeleteSubscription(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Empty, DeleteSubscriptionMetadata> | The result of polling the operation. |
PollOnceDeleteSubscriptionAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteSubscription
.
Declaration
public virtual Task<Operation<Empty, DeleteSubscriptionMetadata>> PollOnceDeleteSubscriptionAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Empty, DeleteSubscriptionMetadata>> | A task representing the result of polling the operation. |
PollOnceReactivateSubscription(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of
ReactivateSubscription
.
Declaration
public virtual Operation<Subscription, ReactivateSubscriptionMetadata> PollOnceReactivateSubscription(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, ReactivateSubscriptionMetadata> | The result of polling the operation. |
PollOnceReactivateSubscriptionAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ReactivateSubscription
.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> PollOnceReactivateSubscriptionAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, ReactivateSubscriptionMetadata>> | A task representing the result of polling the operation. |
PollOnceUpdateSubscription(string, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of UpdateSubscription
.
Declaration
public virtual Operation<Subscription, UpdateSubscriptionMetadata> PollOnceUpdateSubscription(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, UpdateSubscriptionMetadata> | The result of polling the operation. |
PollOnceUpdateSubscriptionAsync(string, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UpdateSubscription
.
Declaration
public virtual Task<Operation<Subscription, UpdateSubscriptionMetadata>> PollOnceUpdateSubscriptionAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, UpdateSubscriptionMetadata>> | A task representing the result of polling the operation. |
ReactivateSubscription(ReactivateSubscriptionRequest, CallSettings)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Operation<Subscription, ReactivateSubscriptionMetadata> ReactivateSubscription(ReactivateSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ReactivateSubscriptionRequest | request | 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 |
---|---|
Operation<Subscription, ReactivateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
ReactivateSubscriptionRequest request = new ReactivateSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
};
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = subscriptionsServiceClient.ReactivateSubscription(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceReactivateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscription(SubscriptionName, CallSettings)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Operation<Subscription, ReactivateSubscriptionMetadata> ReactivateSubscription(SubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, ReactivateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = subscriptionsServiceClient.ReactivateSubscription(name);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceReactivateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscription(string, CallSettings)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Operation<Subscription, ReactivateSubscriptionMetadata> ReactivateSubscription(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, ReactivateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = subscriptionsServiceClient.ReactivateSubscription(name);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceReactivateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscriptionAsync(ReactivateSubscriptionRequest, CallSettings)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> ReactivateSubscriptionAsync(ReactivateSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ReactivateSubscriptionRequest | request | 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<Operation<Subscription, ReactivateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
ReactivateSubscriptionRequest request = new ReactivateSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
};
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = await subscriptionsServiceClient.ReactivateSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceReactivateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscriptionAsync(ReactivateSubscriptionRequest, CancellationToken)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> ReactivateSubscriptionAsync(ReactivateSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ReactivateSubscriptionRequest | request | 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<Operation<Subscription, ReactivateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
ReactivateSubscriptionRequest request = new ReactivateSubscriptionRequest
{
SubscriptionName = SubscriptionName.FromSubscription("[SUBSCRIPTION]"),
};
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = await subscriptionsServiceClient.ReactivateSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceReactivateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscriptionAsync(SubscriptionName, CallSettings)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> ReactivateSubscriptionAsync(SubscriptionName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, ReactivateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = await subscriptionsServiceClient.ReactivateSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceReactivateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscriptionAsync(SubscriptionName, CancellationToken)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> ReactivateSubscriptionAsync(SubscriptionName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
SubscriptionName | name | Required. Resource name of the subscription. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, ReactivateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
SubscriptionName name = SubscriptionName.FromSubscription("[SUBSCRIPTION]");
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = await subscriptionsServiceClient.ReactivateSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceReactivateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscriptionAsync(string, CallSettings)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> ReactivateSubscriptionAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription. Format: |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, ReactivateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = await subscriptionsServiceClient.ReactivateSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceReactivateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ReactivateSubscriptionAsync(string, CancellationToken)
Reactivates a suspended Google Workspace subscription.
This method resets your subscription's State
field to ACTIVE
. Before
you use this method, you must fix the error that suspended the
subscription. To learn how to use this method, see Reactivate a Google
Workspace
subscription.
Declaration
public virtual Task<Operation<Subscription, ReactivateSubscriptionMetadata>> ReactivateSubscriptionAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Resource name of the subscription. Format: |
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, ReactivateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "subscriptions/[SUBSCRIPTION]";
// Make the request
Operation<Subscription, ReactivateSubscriptionMetadata> response = await subscriptionsServiceClient.ReactivateSubscriptionAsync(name);
// Poll until the returned long-running operation is complete
Operation<Subscription, ReactivateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, ReactivateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceReactivateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
Task | A task representing the asynchronous shutdown operation. |
Remarks
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.
UpdateSubscription(Subscription, FieldMask, CallSettings)
Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
Declaration
public virtual Operation<Subscription, UpdateSubscriptionMetadata> UpdateSubscription(Subscription subscription, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Required. The subscription to update. The subscription's |
FieldMask | updateMask | Optional. Required. The field to update. You can update one of the following fields in a subscription:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<Subscription, UpdateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
Subscription subscription = new Subscription();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Subscription, UpdateSubscriptionMetadata> response = subscriptionsServiceClient.UpdateSubscription(subscription, updateMask);
// Poll until the returned long-running operation is complete
Operation<Subscription, UpdateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, UpdateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceUpdateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
UpdateSubscription(UpdateSubscriptionRequest, CallSettings)
Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
Declaration
public virtual Operation<Subscription, UpdateSubscriptionMetadata> UpdateSubscription(UpdateSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateSubscriptionRequest | request | 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 |
---|---|
Operation<Subscription, UpdateSubscriptionMetadata> | The RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = SubscriptionsServiceClient.Create();
// Initialize request argument(s)
UpdateSubscriptionRequest request = new UpdateSubscriptionRequest
{
Subscription = new Subscription(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<Subscription, UpdateSubscriptionMetadata> response = subscriptionsServiceClient.UpdateSubscription(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, UpdateSubscriptionMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, UpdateSubscriptionMetadata> retrievedResponse = subscriptionsServiceClient.PollOnceUpdateSubscription(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
UpdateSubscriptionAsync(Subscription, FieldMask, CallSettings)
Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, UpdateSubscriptionMetadata>> UpdateSubscriptionAsync(Subscription subscription, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Required. The subscription to update. The subscription's |
FieldMask | updateMask | Optional. Required. The field to update. You can update one of the following fields in a subscription:
|
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, UpdateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
Subscription subscription = new Subscription();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Subscription, UpdateSubscriptionMetadata> response = await subscriptionsServiceClient.UpdateSubscriptionAsync(subscription, updateMask);
// Poll until the returned long-running operation is complete
Operation<Subscription, UpdateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, UpdateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceUpdateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
UpdateSubscriptionAsync(Subscription, FieldMask, CancellationToken)
Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, UpdateSubscriptionMetadata>> UpdateSubscriptionAsync(Subscription subscription, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Subscription | subscription | Required. The subscription to update. The subscription's |
FieldMask | updateMask | Optional. Required. The field to update. You can update one of the following fields in a subscription:
|
CancellationToken | cancellationToken | A CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
Task<Operation<Subscription, UpdateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
Subscription subscription = new Subscription();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Subscription, UpdateSubscriptionMetadata> response = await subscriptionsServiceClient.UpdateSubscriptionAsync(subscription, updateMask);
// Poll until the returned long-running operation is complete
Operation<Subscription, UpdateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, UpdateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceUpdateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
UpdateSubscriptionAsync(UpdateSubscriptionRequest, CallSettings)
Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, UpdateSubscriptionMetadata>> UpdateSubscriptionAsync(UpdateSubscriptionRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateSubscriptionRequest | request | 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<Operation<Subscription, UpdateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSubscriptionRequest request = new UpdateSubscriptionRequest
{
Subscription = new Subscription(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<Subscription, UpdateSubscriptionMetadata> response = await subscriptionsServiceClient.UpdateSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, UpdateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, UpdateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceUpdateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}
UpdateSubscriptionAsync(UpdateSubscriptionRequest, CancellationToken)
Updates or renews a Google Workspace subscription. To learn how to use this method, see Update or renew a Google Workspace subscription.
Declaration
public virtual Task<Operation<Subscription, UpdateSubscriptionMetadata>> UpdateSubscriptionAsync(UpdateSubscriptionRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateSubscriptionRequest | request | 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<Operation<Subscription, UpdateSubscriptionMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
SubscriptionsServiceClient subscriptionsServiceClient = await SubscriptionsServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSubscriptionRequest request = new UpdateSubscriptionRequest
{
Subscription = new Subscription(),
UpdateMask = new FieldMask(),
ValidateOnly = false,
};
// Make the request
Operation<Subscription, UpdateSubscriptionMetadata> response = await subscriptionsServiceClient.UpdateSubscriptionAsync(request);
// Poll until the returned long-running operation is complete
Operation<Subscription, UpdateSubscriptionMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Subscription result = completedResponse.Result;
// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Subscription, UpdateSubscriptionMetadata> retrievedResponse = await subscriptionsServiceClient.PollOnceUpdateSubscriptionAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
Subscription retrievedResult = retrievedResponse.Result;
}