Class EventarcClient (1.1.0)

public abstract class EventarcClient

Eventarc client wrapper, for convenient use.

Inheritance

System.Object > EventarcClient

Derived Types

Namespace

Google.Cloud.Eventarc.V1

Assembly

Google.Cloud.Eventarc.V1.dll

Remarks

Eventarc allows users to subscribe to various events that are provided by Google Cloud services and forward them to supported destinations.

Properties

CreateTriggerOperationsClient

public virtual OperationsClient CreateTriggerOperationsClient { get; }

The long-running operations client for CreateTrigger.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the Eventarc service, which is a host of "eventarc.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Eventarc scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default Eventarc scopes are:

DeleteTriggerOperationsClient

public virtual OperationsClient DeleteTriggerOperationsClient { get; }

The long-running operations client for DeleteTrigger.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Eventarc.EventarcClient GrpcClient { get; }

The underlying gRPC Eventarc client

Property Value
TypeDescription
Eventarc.EventarcClient

UpdateTriggerOperationsClient

public virtual OperationsClient UpdateTriggerOperationsClient { get; }

The long-running operations client for UpdateTrigger.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static EventarcClient Create()

Synchronously creates a EventarcClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EventarcClientBuilder.

Returns
TypeDescription
EventarcClient

The created EventarcClient.

CreateAsync(CancellationToken)

public static Task<EventarcClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a EventarcClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use EventarcClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<EventarcClient>

The task representing the created EventarcClient.

CreateTrigger(LocationName, Trigger, String, CallSettings)

public virtual Operation<Trigger, OperationMetadata> CreateTrigger(LocationName parent, Trigger trigger, string triggerId, CallSettings callSettings = null)

Create a new trigger in a particular project and location.

Parameters
NameDescription
parentLocationName

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.CreateTrigger(parent, trigger, triggerId);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceCreateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTrigger(CreateTriggerRequest, CallSettings)

public virtual Operation<Trigger, OperationMetadata> CreateTrigger(CreateTriggerRequest request, CallSettings callSettings = null)

Create a new trigger in a particular project and location.

Parameters
NameDescription
requestCreateTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
CreateTriggerRequest request = new CreateTriggerRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Trigger = new Trigger(),
    TriggerId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.CreateTrigger(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceCreateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTrigger(String, Trigger, String, CallSettings)

public virtual Operation<Trigger, OperationMetadata> CreateTrigger(string parent, Trigger trigger, string triggerId, CallSettings callSettings = null)

Create a new trigger in a particular project and location.

Parameters
NameDescription
parentString

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.CreateTrigger(parent, trigger, triggerId);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceCreateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTriggerAsync(LocationName, Trigger, String, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(LocationName parent, Trigger trigger, string triggerId, CallSettings callSettings = null)

Create a new trigger in a particular project and location.

Parameters
NameDescription
parentLocationName

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTriggerAsync(LocationName, Trigger, String, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(LocationName parent, Trigger trigger, string triggerId, CancellationToken cancellationToken)

Create a new trigger in a particular project and location.

Parameters
NameDescription
parentLocationName

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTriggerAsync(CreateTriggerRequest, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(CreateTriggerRequest request, CallSettings callSettings = null)

Create a new trigger in a particular project and location.

Parameters
NameDescription
requestCreateTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
CreateTriggerRequest request = new CreateTriggerRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Trigger = new Trigger(),
    TriggerId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTriggerAsync(CreateTriggerRequest, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(CreateTriggerRequest request, CancellationToken cancellationToken)

Create a new trigger in a particular project and location.

Parameters
NameDescription
requestCreateTriggerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
CreateTriggerRequest request = new CreateTriggerRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Trigger = new Trigger(),
    TriggerId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTriggerAsync(String, Trigger, String, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(string parent, Trigger trigger, string triggerId, CallSettings callSettings = null)

Create a new trigger in a particular project and location.

Parameters
NameDescription
parentString

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

CreateTriggerAsync(String, Trigger, String, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> CreateTriggerAsync(string parent, Trigger trigger, string triggerId, CancellationToken cancellationToken)

Create a new trigger in a particular project and location.

Parameters
NameDescription
parentString

Required. The parent collection in which to add this trigger.

triggerTrigger

Required. The trigger to create.

triggerIdString

Required. The user-provided ID to be assigned to the trigger.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Trigger trigger = new Trigger();
string triggerId = "";
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.CreateTriggerAsync(parent, trigger, triggerId);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceCreateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTrigger(DeleteTriggerRequest, CallSettings)

public virtual Operation<Trigger, OperationMetadata> DeleteTrigger(DeleteTriggerRequest request, CallSettings callSettings = null)

Delete a single trigger.

Parameters
NameDescription
requestDeleteTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
DeleteTriggerRequest request = new DeleteTriggerRequest
{
    TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
    Etag = "",
    AllowMissing = false,
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.DeleteTrigger(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceDeleteTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTrigger(TriggerName, Boolean, CallSettings)

public virtual Operation<Trigger, OperationMetadata> DeleteTrigger(TriggerName name, bool allowMissing, CallSettings callSettings = null)

Delete a single trigger.

Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to be deleted.

allowMissingBoolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.DeleteTrigger(name, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceDeleteTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTrigger(String, Boolean, CallSettings)

public virtual Operation<Trigger, OperationMetadata> DeleteTrigger(string name, bool allowMissing, CallSettings callSettings = null)

Delete a single trigger.

Parameters
NameDescription
nameString

Required. The name of the trigger to be deleted.

allowMissingBoolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.DeleteTrigger(name, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceDeleteTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTriggerAsync(DeleteTriggerRequest, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(DeleteTriggerRequest request, CallSettings callSettings = null)

Delete a single trigger.

Parameters
NameDescription
requestDeleteTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
DeleteTriggerRequest request = new DeleteTriggerRequest
{
    TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
    Etag = "",
    AllowMissing = false,
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTriggerAsync(DeleteTriggerRequest, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(DeleteTriggerRequest request, CancellationToken cancellationToken)

Delete a single trigger.

Parameters
NameDescription
requestDeleteTriggerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
DeleteTriggerRequest request = new DeleteTriggerRequest
{
    TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
    Etag = "",
    AllowMissing = false,
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTriggerAsync(TriggerName, Boolean, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(TriggerName name, bool allowMissing, CallSettings callSettings = null)

Delete a single trigger.

Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to be deleted.

allowMissingBoolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTriggerAsync(TriggerName, Boolean, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(TriggerName name, bool allowMissing, CancellationToken cancellationToken)

Delete a single trigger.

Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to be deleted.

allowMissingBoolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTriggerAsync(String, Boolean, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(string name, bool allowMissing, CallSettings callSettings = null)

Delete a single trigger.

Parameters
NameDescription
nameString

Required. The name of the trigger to be deleted.

allowMissingBoolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

DeleteTriggerAsync(String, Boolean, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> DeleteTriggerAsync(string name, bool allowMissing, CancellationToken cancellationToken)

Delete a single trigger.

Parameters
NameDescription
nameString

Required. The name of the trigger to be deleted.

allowMissingBoolean

If set to true, and the trigger is not found, the request will succeed but no action will be taken on the server.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.DeleteTriggerAsync(name, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceDeleteTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

GetTrigger(GetTriggerRequest, CallSettings)

public virtual Trigger GetTrigger(GetTriggerRequest request, CallSettings callSettings = null)

Get a single trigger.

Parameters
NameDescription
requestGetTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Trigger

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
GetTriggerRequest request = new GetTriggerRequest
{
    TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Trigger response = eventarcClient.GetTrigger(request);

GetTrigger(TriggerName, CallSettings)

public virtual Trigger GetTrigger(TriggerName name, CallSettings callSettings = null)

Get a single trigger.

Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Trigger

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
// Make the request
Trigger response = eventarcClient.GetTrigger(name);

GetTrigger(String, CallSettings)

public virtual Trigger GetTrigger(string name, CallSettings callSettings = null)

Get a single trigger.

Parameters
NameDescription
nameString

Required. The name of the trigger to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Trigger

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
// Make the request
Trigger response = eventarcClient.GetTrigger(name);

GetTriggerAsync(GetTriggerRequest, CallSettings)

public virtual Task<Trigger> GetTriggerAsync(GetTriggerRequest request, CallSettings callSettings = null)

Get a single trigger.

Parameters
NameDescription
requestGetTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Trigger>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
GetTriggerRequest request = new GetTriggerRequest
{
    TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(request);

GetTriggerAsync(GetTriggerRequest, CancellationToken)

public virtual Task<Trigger> GetTriggerAsync(GetTriggerRequest request, CancellationToken cancellationToken)

Get a single trigger.

Parameters
NameDescription
requestGetTriggerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Trigger>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
GetTriggerRequest request = new GetTriggerRequest
{
    TriggerName = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]"),
};
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(request);

GetTriggerAsync(TriggerName, CallSettings)

public virtual Task<Trigger> GetTriggerAsync(TriggerName name, CallSettings callSettings = null)

Get a single trigger.

Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Trigger>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);

GetTriggerAsync(TriggerName, CancellationToken)

public virtual Task<Trigger> GetTriggerAsync(TriggerName name, CancellationToken cancellationToken)

Get a single trigger.

Parameters
NameDescription
nameTriggerName

Required. The name of the trigger to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Trigger>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
TriggerName name = TriggerName.FromProjectLocationTrigger("[PROJECT]", "[LOCATION]", "[TRIGGER]");
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);

GetTriggerAsync(String, CallSettings)

public virtual Task<Trigger> GetTriggerAsync(string name, CallSettings callSettings = null)

Get a single trigger.

Parameters
NameDescription
nameString

Required. The name of the trigger to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Trigger>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);

GetTriggerAsync(String, CancellationToken)

public virtual Task<Trigger> GetTriggerAsync(string name, CancellationToken cancellationToken)

Get a single trigger.

Parameters
NameDescription
nameString

Required. The name of the trigger to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Trigger>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/triggers/[TRIGGER]";
// Make the request
Trigger response = await eventarcClient.GetTriggerAsync(name);

ListTriggers(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListTriggersResponse, Trigger> ListTriggers(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List triggers.

Parameters
NameDescription
parentLocationName

Required. The parent collection to list triggers on.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTriggersResponse, Trigger>

A pageable sequence of Trigger resources.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Trigger 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 (ListTriggersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Trigger 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<Trigger> 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 (Trigger 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;

ListTriggers(ListTriggersRequest, CallSettings)

public virtual PagedEnumerable<ListTriggersResponse, Trigger> ListTriggers(ListTriggersRequest request, CallSettings callSettings = null)

List triggers.

Parameters
NameDescription
requestListTriggersRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTriggersResponse, Trigger>

A pageable sequence of Trigger resources.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
ListTriggersRequest request = new ListTriggersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggers(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Trigger 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 (ListTriggersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Trigger 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<Trigger> 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 (Trigger 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;

ListTriggers(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListTriggersResponse, Trigger> ListTriggers(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List triggers.

Parameters
NameDescription
parentString

Required. The parent collection to list triggers on.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTriggersResponse, Trigger>

A pageable sequence of Trigger resources.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggers(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Trigger 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 (ListTriggersResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Trigger 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<Trigger> 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 (Trigger 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;

ListTriggersAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListTriggersResponse, Trigger> ListTriggersAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List triggers.

Parameters
NameDescription
parentLocationName

Required. The parent collection to list triggers on.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTriggersResponse, Trigger>

A pageable asynchronous sequence of Trigger resources.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Trigger 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((ListTriggersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Trigger 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<Trigger> 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 (Trigger 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;

ListTriggersAsync(ListTriggersRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTriggersResponse, Trigger> ListTriggersAsync(ListTriggersRequest request, CallSettings callSettings = null)

List triggers.

Parameters
NameDescription
requestListTriggersRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTriggersResponse, Trigger>

A pageable asynchronous sequence of Trigger resources.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
ListTriggersRequest request = new ListTriggersRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggersAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Trigger 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((ListTriggersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Trigger 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<Trigger> 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 (Trigger 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;

ListTriggersAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListTriggersResponse, Trigger> ListTriggersAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

List triggers.

Parameters
NameDescription
parentString

Required. The parent collection to list triggers on.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTriggersResponse, Trigger>

A pageable asynchronous sequence of Trigger resources.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListTriggersResponse, Trigger> response = eventarcClient.ListTriggersAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Trigger 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((ListTriggersResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Trigger 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<Trigger> 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 (Trigger 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;

PollOnceCreateTrigger(String, CallSettings)

public virtual Operation<Trigger, OperationMetadata> PollOnceCreateTrigger(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of CreateTrigger.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The result of polling the operation.

PollOnceCreateTriggerAsync(String, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> PollOnceCreateTriggerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of CreateTrigger.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteTrigger(String, CallSettings)

public virtual Operation<Trigger, OperationMetadata> PollOnceDeleteTrigger(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteTrigger.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The result of polling the operation.

PollOnceDeleteTriggerAsync(String, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> PollOnceDeleteTriggerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteTrigger.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpdateTrigger(String, CallSettings)

public virtual Operation<Trigger, OperationMetadata> PollOnceUpdateTrigger(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UpdateTrigger.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The result of polling the operation.

PollOnceUpdateTriggerAsync(String, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> PollOnceUpdateTriggerAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UpdateTrigger.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A task representing the result of polling the operation.

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
TypeDescription
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.

UpdateTrigger(Trigger, FieldMask, Boolean, CallSettings)

public virtual Operation<Trigger, OperationMetadata> UpdateTrigger(Trigger trigger, FieldMask updateMask, bool allowMissing, CallSettings callSettings = null)

Update a single trigger.

Parameters
NameDescription
triggerTrigger

The trigger to be updated.

updateMaskFieldMask

The fields to be updated; only fields explicitly provided will be updated. If no field mask is provided, all provided fields in the request will be updated. To update all fields, provide a field mask of "*".

allowMissingBoolean

If set to true, and the trigger is not found, a new trigger will be created. In this situation, update_mask is ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
Trigger trigger = new Trigger();
FieldMask updateMask = new FieldMask();
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.UpdateTrigger(trigger, updateMask, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceUpdateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

UpdateTrigger(UpdateTriggerRequest, CallSettings)

public virtual Operation<Trigger, OperationMetadata> UpdateTrigger(UpdateTriggerRequest request, CallSettings callSettings = null)

Update a single trigger.

Parameters
NameDescription
requestUpdateTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Trigger, OperationMetadata>

The RPC response.

Example
// Create client
EventarcClient eventarcClient = EventarcClient.Create();
// Initialize request argument(s)
UpdateTriggerRequest request = new UpdateTriggerRequest
{
    Trigger = new Trigger(),
    UpdateMask = new FieldMask(),
    AllowMissing = false,
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = eventarcClient.UpdateTrigger(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = eventarcClient.PollOnceUpdateTrigger(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

UpdateTriggerAsync(Trigger, FieldMask, Boolean, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(Trigger trigger, FieldMask updateMask, bool allowMissing, CallSettings callSettings = null)

Update a single trigger.

Parameters
NameDescription
triggerTrigger

The trigger to be updated.

updateMaskFieldMask

The fields to be updated; only fields explicitly provided will be updated. If no field mask is provided, all provided fields in the request will be updated. To update all fields, provide a field mask of "*".

allowMissingBoolean

If set to true, and the trigger is not found, a new trigger will be created. In this situation, update_mask is ignored.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
Trigger trigger = new Trigger();
FieldMask updateMask = new FieldMask();
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(trigger, updateMask, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

UpdateTriggerAsync(Trigger, FieldMask, Boolean, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(Trigger trigger, FieldMask updateMask, bool allowMissing, CancellationToken cancellationToken)

Update a single trigger.

Parameters
NameDescription
triggerTrigger

The trigger to be updated.

updateMaskFieldMask

The fields to be updated; only fields explicitly provided will be updated. If no field mask is provided, all provided fields in the request will be updated. To update all fields, provide a field mask of "*".

allowMissingBoolean

If set to true, and the trigger is not found, a new trigger will be created. In this situation, update_mask is ignored.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
Trigger trigger = new Trigger();
FieldMask updateMask = new FieldMask();
bool allowMissing = false;
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(trigger, updateMask, allowMissing);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

UpdateTriggerAsync(UpdateTriggerRequest, CallSettings)

public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(UpdateTriggerRequest request, CallSettings callSettings = null)

Update a single trigger.

Parameters
NameDescription
requestUpdateTriggerRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
UpdateTriggerRequest request = new UpdateTriggerRequest
{
    Trigger = new Trigger(),
    UpdateMask = new FieldMask(),
    AllowMissing = false,
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}

UpdateTriggerAsync(UpdateTriggerRequest, CancellationToken)

public virtual Task<Operation<Trigger, OperationMetadata>> UpdateTriggerAsync(UpdateTriggerRequest request, CancellationToken cancellationToken)

Update a single trigger.

Parameters
NameDescription
requestUpdateTriggerRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Trigger, OperationMetadata>>

A Task containing the RPC response.

Example
// Create client
EventarcClient eventarcClient = await EventarcClient.CreateAsync();
// Initialize request argument(s)
UpdateTriggerRequest request = new UpdateTriggerRequest
{
    Trigger = new Trigger(),
    UpdateMask = new FieldMask(),
    AllowMissing = false,
    ValidateOnly = false,
};
// Make the request
Operation<Trigger, OperationMetadata> response = await eventarcClient.UpdateTriggerAsync(request);

// Poll until the returned long-running operation is complete
Operation<Trigger, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Trigger 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<Trigger, OperationMetadata> retrievedResponse = await eventarcClient.PollOnceUpdateTriggerAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Trigger retrievedResult = retrievedResponse.Result;
}