Batch v1alpha API - Class BatchServiceClient (1.0.0-alpha29)

public abstract class BatchServiceClient

Reference documentation and code samples for the Batch v1alpha API class BatchServiceClient.

BatchService client wrapper, for convenient use.

Inheritance

object > BatchServiceClient

Derived Types

Namespace

Google.Cloud.Batch.V1Alpha

Assembly

Google.Cloud.Batch.V1Alpha.dll

Remarks

Google Batch Service. The service manages user submitted batch jobs and allocates Google Compute Engine VM instances to run the jobs.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default BatchService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default BatchService scopes are:

DeleteJobOperationsClient

public virtual OperationsClient DeleteJobOperationsClient { get; }

The long-running operations client for DeleteJob.

Property Value
Type Description
OperationsClient

DeleteResourceAllowanceOperationsClient

public virtual OperationsClient DeleteResourceAllowanceOperationsClient { get; }

The long-running operations client for DeleteResourceAllowance.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual BatchService.BatchServiceClient GrpcClient { get; }

The underlying gRPC BatchService client

Property Value
Type Description
BatchServiceBatchServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static BatchServiceClient Create()

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

Returns
Type Description
BatchServiceClient

The created BatchServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskBatchServiceClient

The task representing the created BatchServiceClient.

CreateJob(LocationName, Job, string, CallSettings)

public virtual Job CreateJob(LocationName parent, Job job, string jobId, CallSettings callSettings = null)

Create a Job.

Parameters
Name Description
parent LocationName

Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"

job Job

Required. The Job to create.

jobId string

ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = batchServiceClient.CreateJob(parent, job, jobId);

CreateJob(CreateJobRequest, CallSettings)

public virtual Job CreateJob(CreateJobRequest request, CallSettings callSettings = null)

Create a Job.

Parameters
Name Description
request CreateJobRequest

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
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::CreateJobRequest request = new gcbv::CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    JobId = "",
    Job = new gcbv::Job(),
    RequestId = "",
};
// Make the request
gcbv::Job response = batchServiceClient.CreateJob(request);

CreateJob(string, Job, string, CallSettings)

public virtual Job CreateJob(string parent, Job job, string jobId, CallSettings callSettings = null)

Create a Job.

Parameters
Name Description
parent string

Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"

job Job

Required. The Job to create.

jobId string

ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = batchServiceClient.CreateJob(parent, job, jobId);

CreateJobAsync(LocationName, Job, string, CallSettings)

public virtual Task<Job> CreateJobAsync(LocationName parent, Job job, string jobId, CallSettings callSettings = null)

Create a Job.

Parameters
Name Description
parent LocationName

Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"

job Job

Required. The Job to create.

jobId string

ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(parent, job, jobId);

CreateJobAsync(LocationName, Job, string, CancellationToken)

public virtual Task<Job> CreateJobAsync(LocationName parent, Job job, string jobId, CancellationToken cancellationToken)

Create a Job.

Parameters
Name Description
parent LocationName

Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"

job Job

Required. The Job to create.

jobId string

ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(parent, job, jobId);

CreateJobAsync(CreateJobRequest, CallSettings)

public virtual Task<Job> CreateJobAsync(CreateJobRequest request, CallSettings callSettings = null)

Create a Job.

Parameters
Name Description
request CreateJobRequest

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
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::CreateJobRequest request = new gcbv::CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    JobId = "",
    Job = new gcbv::Job(),
    RequestId = "",
};
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(request);

CreateJobAsync(CreateJobRequest, CancellationToken)

public virtual Task<Job> CreateJobAsync(CreateJobRequest request, CancellationToken cancellationToken)

Create a Job.

Parameters
Name Description
request CreateJobRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::CreateJobRequest request = new gcbv::CreateJobRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    JobId = "",
    Job = new gcbv::Job(),
    RequestId = "",
};
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(request);

CreateJobAsync(string, Job, string, CallSettings)

public virtual Task<Job> CreateJobAsync(string parent, Job job, string jobId, CallSettings callSettings = null)

Create a Job.

Parameters
Name Description
parent string

Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"

job Job

Required. The Job to create.

jobId string

ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(parent, job, jobId);

CreateJobAsync(string, Job, string, CancellationToken)

public virtual Task<Job> CreateJobAsync(string parent, Job job, string jobId, CancellationToken cancellationToken)

Create a Job.

Parameters
Name Description
parent string

Required. The parent resource name where the Job will be created. Pattern: "projects/{project}/locations/{location}"

job Job

Required. The Job to create.

jobId string

ID used to uniquely identify the Job within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The job.name field in the request will be ignored and the created resource name of the Job will be "{parent}/jobs/{job_id}".

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::Job job = new gcbv::Job();
string jobId = "";
// Make the request
gcbv::Job response = await batchServiceClient.CreateJobAsync(parent, job, jobId);

CreateResourceAllowance(LocationName, ResourceAllowance, string, CallSettings)

public virtual ResourceAllowance CreateResourceAllowance(LocationName parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, CallSettings callSettings = null)

Create a Resource Allowance.

Parameters
Name Description
parent LocationName

Required. The parent resource name where the ResourceAllowance will be created. Pattern: "projects/{project}/locations/{location}"

resourceAllowance ResourceAllowance

Required. The ResourceAllowance to create.

resourceAllowanceId string

ID used to uniquely identify the ResourceAllowance within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The resource_allowance.name field in the request will be ignored and the created resource name of the ResourceAllowance will be "{parent}/resourceAllowances/{resource_allowance_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
string resourceAllowanceId = "";
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.CreateResourceAllowance(parent, resourceAllowance, resourceAllowanceId);

CreateResourceAllowance(CreateResourceAllowanceRequest, CallSettings)

public virtual ResourceAllowance CreateResourceAllowance(CreateResourceAllowanceRequest request, CallSettings callSettings = null)

Create a Resource Allowance.

Parameters
Name Description
request CreateResourceAllowanceRequest

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
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::CreateResourceAllowanceRequest request = new gcbv::CreateResourceAllowanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ResourceAllowanceId = "",
    ResourceAllowance = new gcbv::ResourceAllowance(),
    RequestId = "",
};
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.CreateResourceAllowance(request);

CreateResourceAllowance(string, ResourceAllowance, string, CallSettings)

public virtual ResourceAllowance CreateResourceAllowance(string parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, CallSettings callSettings = null)

Create a Resource Allowance.

Parameters
Name Description
parent string

Required. The parent resource name where the ResourceAllowance will be created. Pattern: "projects/{project}/locations/{location}"

resourceAllowance ResourceAllowance

Required. The ResourceAllowance to create.

resourceAllowanceId string

ID used to uniquely identify the ResourceAllowance within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The resource_allowance.name field in the request will be ignored and the created resource name of the ResourceAllowance will be "{parent}/resourceAllowances/{resource_allowance_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
string resourceAllowanceId = "";
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.CreateResourceAllowance(parent, resourceAllowance, resourceAllowanceId);

CreateResourceAllowanceAsync(LocationName, ResourceAllowance, string, CallSettings)

public virtual Task<ResourceAllowance> CreateResourceAllowanceAsync(LocationName parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, CallSettings callSettings = null)

Create a Resource Allowance.

Parameters
Name Description
parent LocationName

Required. The parent resource name where the ResourceAllowance will be created. Pattern: "projects/{project}/locations/{location}"

resourceAllowance ResourceAllowance

Required. The ResourceAllowance to create.

resourceAllowanceId string

ID used to uniquely identify the ResourceAllowance within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The resource_allowance.name field in the request will be ignored and the created resource name of the ResourceAllowance will be "{parent}/resourceAllowances/{resource_allowance_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
string resourceAllowanceId = "";
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId);

CreateResourceAllowanceAsync(LocationName, ResourceAllowance, string, CancellationToken)

public virtual Task<ResourceAllowance> CreateResourceAllowanceAsync(LocationName parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, CancellationToken cancellationToken)

Create a Resource Allowance.

Parameters
Name Description
parent LocationName

Required. The parent resource name where the ResourceAllowance will be created. Pattern: "projects/{project}/locations/{location}"

resourceAllowance ResourceAllowance

Required. The ResourceAllowance to create.

resourceAllowanceId string

ID used to uniquely identify the ResourceAllowance within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The resource_allowance.name field in the request will be ignored and the created resource name of the ResourceAllowance will be "{parent}/resourceAllowances/{resource_allowance_id}".

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
string resourceAllowanceId = "";
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId);

CreateResourceAllowanceAsync(CreateResourceAllowanceRequest, CallSettings)

public virtual Task<ResourceAllowance> CreateResourceAllowanceAsync(CreateResourceAllowanceRequest request, CallSettings callSettings = null)

Create a Resource Allowance.

Parameters
Name Description
request CreateResourceAllowanceRequest

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
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::CreateResourceAllowanceRequest request = new gcbv::CreateResourceAllowanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ResourceAllowanceId = "",
    ResourceAllowance = new gcbv::ResourceAllowance(),
    RequestId = "",
};
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(request);

CreateResourceAllowanceAsync(CreateResourceAllowanceRequest, CancellationToken)

public virtual Task<ResourceAllowance> CreateResourceAllowanceAsync(CreateResourceAllowanceRequest request, CancellationToken cancellationToken)

Create a Resource Allowance.

Parameters
Name Description
request CreateResourceAllowanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::CreateResourceAllowanceRequest request = new gcbv::CreateResourceAllowanceRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ResourceAllowanceId = "",
    ResourceAllowance = new gcbv::ResourceAllowance(),
    RequestId = "",
};
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(request);

CreateResourceAllowanceAsync(string, ResourceAllowance, string, CallSettings)

public virtual Task<ResourceAllowance> CreateResourceAllowanceAsync(string parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, CallSettings callSettings = null)

Create a Resource Allowance.

Parameters
Name Description
parent string

Required. The parent resource name where the ResourceAllowance will be created. Pattern: "projects/{project}/locations/{location}"

resourceAllowance ResourceAllowance

Required. The ResourceAllowance to create.

resourceAllowanceId string

ID used to uniquely identify the ResourceAllowance within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The resource_allowance.name field in the request will be ignored and the created resource name of the ResourceAllowance will be "{parent}/resourceAllowances/{resource_allowance_id}".

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
string resourceAllowanceId = "";
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId);

CreateResourceAllowanceAsync(string, ResourceAllowance, string, CancellationToken)

public virtual Task<ResourceAllowance> CreateResourceAllowanceAsync(string parent, ResourceAllowance resourceAllowance, string resourceAllowanceId, CancellationToken cancellationToken)

Create a Resource Allowance.

Parameters
Name Description
parent string

Required. The parent resource name where the ResourceAllowance will be created. Pattern: "projects/{project}/locations/{location}"

resourceAllowance ResourceAllowance

Required. The ResourceAllowance to create.

resourceAllowanceId string

ID used to uniquely identify the ResourceAllowance within its parent scope. This field should contain at most 63 characters and must start with lowercase characters. Only lowercase characters, numbers and '-' are accepted. The '-' character cannot be the first or the last one. A system generated ID will be used if the field is not set.

The resource_allowance.name field in the request will be ignored and the created resource name of the ResourceAllowance will be "{parent}/resourceAllowances/{resource_allowance_id}".

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
string resourceAllowanceId = "";
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.CreateResourceAllowanceAsync(parent, resourceAllowance, resourceAllowanceId);

DeleteJob(DeleteJobRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteJob(DeleteJobRequest request, CallSettings callSettings = null)

Delete a Job.

Parameters
Name Description
request DeleteJobRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::DeleteJobRequest request = new gcbv::DeleteJobRequest
{
    Name = "",
    Reason = "",
    RequestId = "",
};
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = batchServiceClient.DeleteJob(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = batchServiceClient.PollOnceDeleteJob(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;
}

DeleteJob(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteJob(string name, CallSettings callSettings = null)

Delete a Job.

Parameters
Name Description
name string

Job name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = batchServiceClient.DeleteJob(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = batchServiceClient.PollOnceDeleteJob(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;
}

DeleteJobAsync(DeleteJobRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteJobAsync(DeleteJobRequest request, CallSettings callSettings = null)

Delete a Job.

Parameters
Name Description
request DeleteJobRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::DeleteJobRequest request = new gcbv::DeleteJobRequest
{
    Name = "",
    Reason = "",
    RequestId = "",
};
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteJobAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteJobAsync(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;
}

DeleteJobAsync(DeleteJobRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteJobAsync(DeleteJobRequest request, CancellationToken cancellationToken)

Delete a Job.

Parameters
Name Description
request DeleteJobRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::DeleteJobRequest request = new gcbv::DeleteJobRequest
{
    Name = "",
    Reason = "",
    RequestId = "",
};
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteJobAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteJobAsync(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;
}

DeleteJobAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteJobAsync(string name, CallSettings callSettings = null)

Delete a Job.

Parameters
Name Description
name string

Job name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteJobAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteJobAsync(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;
}

DeleteJobAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteJobAsync(string name, CancellationToken cancellationToken)

Delete a Job.

Parameters
Name Description
name string

Job name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteJobAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteJobAsync(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;
}

DeleteResourceAllowance(DeleteResourceAllowanceRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteResourceAllowance(DeleteResourceAllowanceRequest request, CallSettings callSettings = null)

Delete a ResourceAllowance.

Parameters
Name Description
request DeleteResourceAllowanceRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::DeleteResourceAllowanceRequest request = new gcbv::DeleteResourceAllowanceRequest
{
    ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"),
    Reason = "",
    RequestId = "",
};
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = batchServiceClient.DeleteResourceAllowance(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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;
}

DeleteResourceAllowance(ResourceAllowanceName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteResourceAllowance(ResourceAllowanceName name, CallSettings callSettings = null)

Delete a ResourceAllowance.

Parameters
Name Description
name ResourceAllowanceName

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]");
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = batchServiceClient.DeleteResourceAllowance(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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;
}

DeleteResourceAllowance(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteResourceAllowance(string name, CallSettings callSettings = null)

Delete a ResourceAllowance.

Parameters
Name Description
name string

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = batchServiceClient.DeleteResourceAllowance(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = batchServiceClient.PollOnceDeleteResourceAllowance(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;
}

DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest request, CallSettings callSettings = null)

Delete a ResourceAllowance.

Parameters
Name Description
request DeleteResourceAllowanceRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::DeleteResourceAllowanceRequest request = new gcbv::DeleteResourceAllowanceRequest
{
    ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"),
    Reason = "",
    RequestId = "",
};
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteResourceAllowanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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;
}

DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteResourceAllowanceAsync(DeleteResourceAllowanceRequest request, CancellationToken cancellationToken)

Delete a ResourceAllowance.

Parameters
Name Description
request DeleteResourceAllowanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::DeleteResourceAllowanceRequest request = new gcbv::DeleteResourceAllowanceRequest
{
    ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"),
    Reason = "",
    RequestId = "",
};
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteResourceAllowanceAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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;
}

DeleteResourceAllowanceAsync(ResourceAllowanceName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteResourceAllowanceAsync(ResourceAllowanceName name, CallSettings callSettings = null)

Delete a ResourceAllowance.

Parameters
Name Description
name ResourceAllowanceName

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]");
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteResourceAllowanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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;
}

DeleteResourceAllowanceAsync(ResourceAllowanceName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteResourceAllowanceAsync(ResourceAllowanceName name, CancellationToken cancellationToken)

Delete a ResourceAllowance.

Parameters
Name Description
name ResourceAllowanceName

Required. ResourceAllowance name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]");
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteResourceAllowanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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;
}

DeleteResourceAllowanceAsync(string, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteResourceAllowanceAsync(string name, CallSettings callSettings = null)

Delete a ResourceAllowance.

Parameters
Name Description
name string

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteResourceAllowanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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;
}

DeleteResourceAllowanceAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteResourceAllowanceAsync(string name, CancellationToken cancellationToken)

Delete a ResourceAllowance.

Parameters
Name Description
name string

Required. ResourceAllowance name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]";
// Make the request
Operation<Empty, gcbv::OperationMetadata> response = await batchServiceClient.DeleteResourceAllowanceAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, gcbv::OperationMetadata> 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, gcbv::OperationMetadata> retrievedResponse = await batchServiceClient.PollOnceDeleteResourceAllowanceAsync(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;
}

GetJob(GetJobRequest, CallSettings)

public virtual Job GetJob(GetJobRequest request, CallSettings callSettings = null)

Get a Job specified by its resource name.

Parameters
Name Description
request GetJobRequest

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
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::GetJobRequest request = new gcbv::GetJobRequest
{
    JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
gcbv::Job response = batchServiceClient.GetJob(request);

GetJob(JobName, CallSettings)

public virtual Job GetJob(JobName name, CallSettings callSettings = null)

Get a Job specified by its resource name.

Parameters
Name Description
name JobName

Required. Job name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
gcbv::Job response = batchServiceClient.GetJob(name);

GetJob(string, CallSettings)

public virtual Job GetJob(string name, CallSettings callSettings = null)

Get a Job specified by its resource name.

Parameters
Name Description
name string

Required. Job name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
gcbv::Job response = batchServiceClient.GetJob(name);

GetJobAsync(GetJobRequest, CallSettings)

public virtual Task<Job> GetJobAsync(GetJobRequest request, CallSettings callSettings = null)

Get a Job specified by its resource name.

Parameters
Name Description
request GetJobRequest

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
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::GetJobRequest request = new gcbv::GetJobRequest
{
    JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
gcbv::Job response = await batchServiceClient.GetJobAsync(request);

GetJobAsync(GetJobRequest, CancellationToken)

public virtual Task<Job> GetJobAsync(GetJobRequest request, CancellationToken cancellationToken)

Get a Job specified by its resource name.

Parameters
Name Description
request GetJobRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::GetJobRequest request = new gcbv::GetJobRequest
{
    JobName = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]"),
};
// Make the request
gcbv::Job response = await batchServiceClient.GetJobAsync(request);

GetJobAsync(JobName, CallSettings)

public virtual Task<Job> GetJobAsync(JobName name, CallSettings callSettings = null)

Get a Job specified by its resource name.

Parameters
Name Description
name JobName

Required. Job name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
gcbv::Job response = await batchServiceClient.GetJobAsync(name);

GetJobAsync(JobName, CancellationToken)

public virtual Task<Job> GetJobAsync(JobName name, CancellationToken cancellationToken)

Get a Job specified by its resource name.

Parameters
Name Description
name JobName

Required. Job name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::JobName name = gcbv::JobName.FromProjectLocationJob("[PROJECT]", "[LOCATION]", "[JOB]");
// Make the request
gcbv::Job response = await batchServiceClient.GetJobAsync(name);

GetJobAsync(string, CallSettings)

public virtual Task<Job> GetJobAsync(string name, CallSettings callSettings = null)

Get a Job specified by its resource name.

Parameters
Name Description
name string

Required. Job name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
gcbv::Job response = await batchServiceClient.GetJobAsync(name);

GetJobAsync(string, CancellationToken)

public virtual Task<Job> GetJobAsync(string name, CancellationToken cancellationToken)

Get a Job specified by its resource name.

Parameters
Name Description
name string

Required. Job name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]";
// Make the request
gcbv::Job response = await batchServiceClient.GetJobAsync(name);

GetResourceAllowance(GetResourceAllowanceRequest, CallSettings)

public virtual ResourceAllowance GetResourceAllowance(GetResourceAllowanceRequest request, CallSettings callSettings = null)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
request GetResourceAllowanceRequest

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
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::GetResourceAllowanceRequest request = new gcbv::GetResourceAllowanceRequest
{
    ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"),
};
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.GetResourceAllowance(request);

GetResourceAllowance(ResourceAllowanceName, CallSettings)

public virtual ResourceAllowance GetResourceAllowance(ResourceAllowanceName name, CallSettings callSettings = null)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
name ResourceAllowanceName

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]");
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.GetResourceAllowance(name);

GetResourceAllowance(string, CallSettings)

public virtual ResourceAllowance GetResourceAllowance(string name, CallSettings callSettings = null)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
name string

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]";
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.GetResourceAllowance(name);

GetResourceAllowanceAsync(GetResourceAllowanceRequest, CallSettings)

public virtual Task<ResourceAllowance> GetResourceAllowanceAsync(GetResourceAllowanceRequest request, CallSettings callSettings = null)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
request GetResourceAllowanceRequest

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
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::GetResourceAllowanceRequest request = new gcbv::GetResourceAllowanceRequest
{
    ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"),
};
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(request);

GetResourceAllowanceAsync(GetResourceAllowanceRequest, CancellationToken)

public virtual Task<ResourceAllowance> GetResourceAllowanceAsync(GetResourceAllowanceRequest request, CancellationToken cancellationToken)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
request GetResourceAllowanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::GetResourceAllowanceRequest request = new gcbv::GetResourceAllowanceRequest
{
    ResourceAllowanceName = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]"),
};
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(request);

GetResourceAllowanceAsync(ResourceAllowanceName, CallSettings)

public virtual Task<ResourceAllowance> GetResourceAllowanceAsync(ResourceAllowanceName name, CallSettings callSettings = null)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
name ResourceAllowanceName

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]");
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name);

GetResourceAllowanceAsync(ResourceAllowanceName, CancellationToken)

public virtual Task<ResourceAllowance> GetResourceAllowanceAsync(ResourceAllowanceName name, CancellationToken cancellationToken)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
name ResourceAllowanceName

Required. ResourceAllowance name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ResourceAllowanceName name = gcbv::ResourceAllowanceName.FromProjectLocationResourceAllowance("[PROJECT]", "[LOCATION]", "[RESOURCE_ALLOWANCE]");
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name);

GetResourceAllowanceAsync(string, CallSettings)

public virtual Task<ResourceAllowance> GetResourceAllowanceAsync(string name, CallSettings callSettings = null)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
name string

Required. ResourceAllowance name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]";
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name);

GetResourceAllowanceAsync(string, CancellationToken)

public virtual Task<ResourceAllowance> GetResourceAllowanceAsync(string name, CancellationToken cancellationToken)

Get a ResourceAllowance specified by its resource name.

Parameters
Name Description
name string

Required. ResourceAllowance name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/resourceAllowances/[RESOURCE_ALLOWANCE]";
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.GetResourceAllowanceAsync(name);

GetTask(GetTaskRequest, CallSettings)

public virtual Task GetTask(GetTaskRequest request, CallSettings callSettings = null)

Return a single Task.

Parameters
Name Description
request GetTaskRequest

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

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::GetTaskRequest request = new gcbv::GetTaskRequest
{
    TaskName = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"),
};
// Make the request
gcbv::Task response = batchServiceClient.GetTask(request);

GetTask(TaskName, CallSettings)

public virtual Task GetTask(TaskName name, CallSettings callSettings = null)

Return a single Task.

Parameters
Name Description
name TaskName

Required. Task name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::TaskName name = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]");
// Make the request
gcbv::Task response = batchServiceClient.GetTask(name);

GetTask(string, CallSettings)

public virtual Task GetTask(string name, CallSettings callSettings = null)

Return a single Task.

Parameters
Name Description
name string

Required. Task name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]";
// Make the request
gcbv::Task response = batchServiceClient.GetTask(name);

GetTaskAsync(GetTaskRequest, CallSettings)

public virtual Task<Task> GetTaskAsync(GetTaskRequest request, CallSettings callSettings = null)

Return a single Task.

Parameters
Name Description
request GetTaskRequest

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
TaskTask

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::GetTaskRequest request = new gcbv::GetTaskRequest
{
    TaskName = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"),
};
// Make the request
gcbv::Task response = await batchServiceClient.GetTaskAsync(request);

GetTaskAsync(GetTaskRequest, CancellationToken)

public virtual Task<Task> GetTaskAsync(GetTaskRequest request, CancellationToken cancellationToken)

Return a single Task.

Parameters
Name Description
request GetTaskRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTask

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::GetTaskRequest request = new gcbv::GetTaskRequest
{
    TaskName = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]"),
};
// Make the request
gcbv::Task response = await batchServiceClient.GetTaskAsync(request);

GetTaskAsync(TaskName, CallSettings)

public virtual Task<Task> GetTaskAsync(TaskName name, CallSettings callSettings = null)

Return a single Task.

Parameters
Name Description
name TaskName

Required. Task name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTask

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::TaskName name = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]");
// Make the request
gcbv::Task response = await batchServiceClient.GetTaskAsync(name);

GetTaskAsync(TaskName, CancellationToken)

public virtual Task<Task> GetTaskAsync(TaskName name, CancellationToken cancellationToken)

Return a single Task.

Parameters
Name Description
name TaskName

Required. Task name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTask

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::TaskName name = gcbv::TaskName.FromProjectLocationJobTaskGroupTask("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]", "[TASK]");
// Make the request
gcbv::Task response = await batchServiceClient.GetTaskAsync(name);

GetTaskAsync(string, CallSettings)

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

Return a single Task.

Parameters
Name Description
name string

Required. Task name.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTask

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]";
// Make the request
gcbv::Task response = await batchServiceClient.GetTaskAsync(name);

GetTaskAsync(string, CancellationToken)

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

Return a single Task.

Parameters
Name Description
name string

Required. Task name.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTask

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]/tasks/[TASK]";
// Make the request
gcbv::Task response = await batchServiceClient.GetTaskAsync(name);

ListJobs(ListJobsRequest, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(ListJobsRequest request, CallSettings callSettings = null)

List all Jobs for a project within a region.

Parameters
Name Description
request ListJobsRequest

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
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::ListJobsRequest request = new gcbv::ListJobsRequest
{
    Parent = "",
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<gcbv::ListJobsResponse, gcbv::Job> response = batchServiceClient.ListJobs(request);

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

ListJobs(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListJobsResponse, Job> ListJobs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all Jobs for a project within a region.

Parameters
Name Description
parent string

Parent path.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListJobsResponseJob

A pageable sequence of Job resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedEnumerable<gcbv::ListJobsResponse, gcbv::Job> response = batchServiceClient.ListJobs(parent);

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

ListJobsAsync(ListJobsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(ListJobsRequest request, CallSettings callSettings = null)

List all Jobs for a project within a region.

Parameters
Name Description
request ListJobsRequest

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
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ListJobsRequest request = new gcbv::ListJobsRequest
{
    Parent = "",
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<gcbv::ListJobsResponse, gcbv::Job> response = batchServiceClient.ListJobsAsync(request);

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

ListJobsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListJobsResponse, Job> ListJobsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all Jobs for a project within a region.

Parameters
Name Description
parent string

Parent path.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListJobsResponseJob

A pageable asynchronous sequence of Job resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "";
// Make the request
PagedAsyncEnumerable<gcbv::ListJobsResponse, gcbv::Job> response = batchServiceClient.ListJobsAsync(parent);

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

ListResourceAllowances(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListResourceAllowancesResponse, ResourceAllowance> ListResourceAllowances(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all ResourceAllowances for a project within a region.

Parameters
Name Description
parent LocationName

Required. Parent path.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListResourceAllowancesResponseResourceAllowance

A pageable sequence of ResourceAllowance resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<gcbv::ListResourceAllowancesResponse, gcbv::ResourceAllowance> response = batchServiceClient.ListResourceAllowances(parent);

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

ListResourceAllowances(ListResourceAllowancesRequest, CallSettings)

public virtual PagedEnumerable<ListResourceAllowancesResponse, ResourceAllowance> ListResourceAllowances(ListResourceAllowancesRequest request, CallSettings callSettings = null)

List all ResourceAllowances for a project within a region.

Parameters
Name Description
request ListResourceAllowancesRequest

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
PagedEnumerableListResourceAllowancesResponseResourceAllowance

A pageable sequence of ResourceAllowance resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::ListResourceAllowancesRequest request = new gcbv::ListResourceAllowancesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<gcbv::ListResourceAllowancesResponse, gcbv::ResourceAllowance> response = batchServiceClient.ListResourceAllowances(request);

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

ListResourceAllowances(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListResourceAllowancesResponse, ResourceAllowance> ListResourceAllowances(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all ResourceAllowances for a project within a region.

Parameters
Name Description
parent string

Required. Parent path.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListResourceAllowancesResponseResourceAllowance

A pageable sequence of ResourceAllowance resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<gcbv::ListResourceAllowancesResponse, gcbv::ResourceAllowance> response = batchServiceClient.ListResourceAllowances(parent);

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

ListResourceAllowancesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListResourceAllowancesResponse, ResourceAllowance> ListResourceAllowancesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all ResourceAllowances for a project within a region.

Parameters
Name Description
parent LocationName

Required. Parent path.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListResourceAllowancesResponseResourceAllowance

A pageable asynchronous sequence of ResourceAllowance resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<gcbv::ListResourceAllowancesResponse, gcbv::ResourceAllowance> response = batchServiceClient.ListResourceAllowancesAsync(parent);

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

ListResourceAllowancesAsync(ListResourceAllowancesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListResourceAllowancesResponse, ResourceAllowance> ListResourceAllowancesAsync(ListResourceAllowancesRequest request, CallSettings callSettings = null)

List all ResourceAllowances for a project within a region.

Parameters
Name Description
request ListResourceAllowancesRequest

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
PagedAsyncEnumerableListResourceAllowancesResponseResourceAllowance

A pageable asynchronous sequence of ResourceAllowance resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ListResourceAllowancesRequest request = new gcbv::ListResourceAllowancesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<gcbv::ListResourceAllowancesResponse, gcbv::ResourceAllowance> response = batchServiceClient.ListResourceAllowancesAsync(request);

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

ListResourceAllowancesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListResourceAllowancesResponse, ResourceAllowance> ListResourceAllowancesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List all ResourceAllowances for a project within a region.

Parameters
Name Description
parent string

Required. Parent path.

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListResourceAllowancesResponseResourceAllowance

A pageable asynchronous sequence of ResourceAllowance resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<gcbv::ListResourceAllowancesResponse, gcbv::ResourceAllowance> response = batchServiceClient.ListResourceAllowancesAsync(parent);

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

ListTasks(ListTasksRequest, CallSettings)

public virtual PagedEnumerable<ListTasksResponse, Task> ListTasks(ListTasksRequest request, CallSettings callSettings = null)

List Tasks associated with a job.

Parameters
Name Description
request ListTasksRequest

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
PagedEnumerableListTasksResponseTask

A pageable sequence of Task resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::ListTasksRequest request = new gcbv::ListTasksRequest
{
    ParentAsTaskGroupName = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<gcbv::ListTasksResponse, gcbv::Task> response = batchServiceClient.ListTasks(request);

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

ListTasks(TaskGroupName, string, int?, CallSettings)

public virtual PagedEnumerable<ListTasksResponse, Task> ListTasks(TaskGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List Tasks associated with a job.

Parameters
Name Description
parent TaskGroupName

Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTasksResponseTask

A pageable sequence of Task resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::TaskGroupName parent = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]");
// Make the request
PagedEnumerable<gcbv::ListTasksResponse, gcbv::Task> response = batchServiceClient.ListTasks(parent);

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

ListTasks(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListTasksResponse, Task> ListTasks(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List Tasks associated with a job.

Parameters
Name Description
parent string

Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedEnumerableListTasksResponseTask

A pageable sequence of Task resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]";
// Make the request
PagedEnumerable<gcbv::ListTasksResponse, gcbv::Task> response = batchServiceClient.ListTasks(parent);

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

ListTasksAsync(ListTasksRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTasksResponse, Task> ListTasksAsync(ListTasksRequest request, CallSettings callSettings = null)

List Tasks associated with a job.

Parameters
Name Description
request ListTasksRequest

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
PagedAsyncEnumerableListTasksResponseTask

A pageable asynchronous sequence of Task resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ListTasksRequest request = new gcbv::ListTasksRequest
{
    ParentAsTaskGroupName = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<gcbv::ListTasksResponse, gcbv::Task> response = batchServiceClient.ListTasksAsync(request);

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

ListTasksAsync(TaskGroupName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTasksResponse, Task> ListTasksAsync(TaskGroupName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List Tasks associated with a job.

Parameters
Name Description
parent TaskGroupName

Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTasksResponseTask

A pageable asynchronous sequence of Task resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::TaskGroupName parent = gcbv::TaskGroupName.FromProjectLocationJobTaskGroup("[PROJECT]", "[LOCATION]", "[JOB]", "[TASK_GROUP]");
// Make the request
PagedAsyncEnumerable<gcbv::ListTasksResponse, gcbv::Task> response = batchServiceClient.ListTasksAsync(parent);

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

ListTasksAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTasksResponse, Task> ListTasksAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

List Tasks associated with a job.

Parameters
Name Description
parent string

Required. Name of a TaskGroup from which Tasks are being requested. Pattern: "projects/{project}/locations/{location}/jobs/{job}/taskGroups/{task_group}"

pageToken string

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

pageSize int

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.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListTasksResponseTask

A pageable asynchronous sequence of Task resources.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/jobs/[JOB]/taskGroups/[TASK_GROUP]";
// Make the request
PagedAsyncEnumerable<gcbv::ListTasksResponse, gcbv::Task> response = batchServiceClient.ListTasksAsync(parent);

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

PollOnceDeleteJob(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteJob(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteJobAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteResourceAllowance(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteResourceAllowance(string operationName, CallSettings callSettings = null)

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteResourceAllowanceAsync(string, CallSettings)

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

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

Parameters
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

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

UpdateJob(Job, FieldMask, CallSettings)

public virtual Job UpdateJob(Job job, FieldMask updateMask, CallSettings callSettings = null)

Update a Job.

Parameters
Name Description
job Job

Required. The Job to update. Only fields specified in updateMask are updated.

updateMask FieldMask

Required. Mask of fields to update.

The jobs.patch method can only be used while a job is in the QUEUED, SCHEDULED, or RUNNING state and currently only supports increasing the value of the first taskCount field in the job's taskGroups field. Therefore, you must set the value of updateMask to taskGroups. Any other job fields in the update request will be ignored.

For example, to update a job's taskCount to 2, set updateMask to taskGroups and use the following request body:

{
"taskGroups":[{
"taskCount": 2
}]
}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::Job job = new gcbv::Job();
FieldMask updateMask = new FieldMask();
// Make the request
gcbv::Job response = batchServiceClient.UpdateJob(job, updateMask);

UpdateJob(UpdateJobRequest, CallSettings)

public virtual Job UpdateJob(UpdateJobRequest request, CallSettings callSettings = null)

Update a Job.

Parameters
Name Description
request UpdateJobRequest

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
Job

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::UpdateJobRequest request = new gcbv::UpdateJobRequest
{
    Job = new gcbv::Job(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
gcbv::Job response = batchServiceClient.UpdateJob(request);

UpdateJobAsync(Job, FieldMask, CallSettings)

public virtual Task<Job> UpdateJobAsync(Job job, FieldMask updateMask, CallSettings callSettings = null)

Update a Job.

Parameters
Name Description
job Job

Required. The Job to update. Only fields specified in updateMask are updated.

updateMask FieldMask

Required. Mask of fields to update.

The jobs.patch method can only be used while a job is in the QUEUED, SCHEDULED, or RUNNING state and currently only supports increasing the value of the first taskCount field in the job's taskGroups field. Therefore, you must set the value of updateMask to taskGroups. Any other job fields in the update request will be ignored.

For example, to update a job's taskCount to 2, set updateMask to taskGroups and use the following request body:

{
"taskGroups":[{
"taskCount": 2
}]
}
callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::Job job = new gcbv::Job();
FieldMask updateMask = new FieldMask();
// Make the request
gcbv::Job response = await batchServiceClient.UpdateJobAsync(job, updateMask);

UpdateJobAsync(Job, FieldMask, CancellationToken)

public virtual Task<Job> UpdateJobAsync(Job job, FieldMask updateMask, CancellationToken cancellationToken)

Update a Job.

Parameters
Name Description
job Job

Required. The Job to update. Only fields specified in updateMask are updated.

updateMask FieldMask

Required. Mask of fields to update.

The jobs.patch method can only be used while a job is in the QUEUED, SCHEDULED, or RUNNING state and currently only supports increasing the value of the first taskCount field in the job's taskGroups field. Therefore, you must set the value of updateMask to taskGroups. Any other job fields in the update request will be ignored.

For example, to update a job's taskCount to 2, set updateMask to taskGroups and use the following request body:

{
"taskGroups":[{
"taskCount": 2
}]
}
cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::Job job = new gcbv::Job();
FieldMask updateMask = new FieldMask();
// Make the request
gcbv::Job response = await batchServiceClient.UpdateJobAsync(job, updateMask);

UpdateJobAsync(UpdateJobRequest, CallSettings)

public virtual Task<Job> UpdateJobAsync(UpdateJobRequest request, CallSettings callSettings = null)

Update a Job.

Parameters
Name Description
request UpdateJobRequest

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
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::UpdateJobRequest request = new gcbv::UpdateJobRequest
{
    Job = new gcbv::Job(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
gcbv::Job response = await batchServiceClient.UpdateJobAsync(request);

UpdateJobAsync(UpdateJobRequest, CancellationToken)

public virtual Task<Job> UpdateJobAsync(UpdateJobRequest request, CancellationToken cancellationToken)

Update a Job.

Parameters
Name Description
request UpdateJobRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskJob

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::UpdateJobRequest request = new gcbv::UpdateJobRequest
{
    Job = new gcbv::Job(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
gcbv::Job response = await batchServiceClient.UpdateJobAsync(request);

UpdateResourceAllowance(ResourceAllowance, FieldMask, CallSettings)

public virtual ResourceAllowance UpdateResourceAllowance(ResourceAllowance resourceAllowance, FieldMask updateMask, CallSettings callSettings = null)

Update a Resource Allowance.

Parameters
Name Description
resourceAllowance ResourceAllowance

Required. The ResourceAllowance to update. Update description. Only fields specified in update_mask are updated.

updateMask FieldMask

Required. Mask of fields to update.

Field mask is used to specify the fields to be overwritten in the ResourceAllowance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

UpdateResourceAllowance request now only supports update on limit field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
FieldMask updateMask = new FieldMask();
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.UpdateResourceAllowance(resourceAllowance, updateMask);

UpdateResourceAllowance(UpdateResourceAllowanceRequest, CallSettings)

public virtual ResourceAllowance UpdateResourceAllowance(UpdateResourceAllowanceRequest request, CallSettings callSettings = null)

Update a Resource Allowance.

Parameters
Name Description
request UpdateResourceAllowanceRequest

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
ResourceAllowance

The RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = gcbv::BatchServiceClient.Create();
// Initialize request argument(s)
gcbv::UpdateResourceAllowanceRequest request = new gcbv::UpdateResourceAllowanceRequest
{
    ResourceAllowance = new gcbv::ResourceAllowance(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
gcbv::ResourceAllowance response = batchServiceClient.UpdateResourceAllowance(request);

UpdateResourceAllowanceAsync(ResourceAllowance, FieldMask, CallSettings)

public virtual Task<ResourceAllowance> UpdateResourceAllowanceAsync(ResourceAllowance resourceAllowance, FieldMask updateMask, CallSettings callSettings = null)

Update a Resource Allowance.

Parameters
Name Description
resourceAllowance ResourceAllowance

Required. The ResourceAllowance to update. Update description. Only fields specified in update_mask are updated.

updateMask FieldMask

Required. Mask of fields to update.

Field mask is used to specify the fields to be overwritten in the ResourceAllowance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

UpdateResourceAllowance request now only supports update on limit field.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
FieldMask updateMask = new FieldMask();
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(resourceAllowance, updateMask);

UpdateResourceAllowanceAsync(ResourceAllowance, FieldMask, CancellationToken)

public virtual Task<ResourceAllowance> UpdateResourceAllowanceAsync(ResourceAllowance resourceAllowance, FieldMask updateMask, CancellationToken cancellationToken)

Update a Resource Allowance.

Parameters
Name Description
resourceAllowance ResourceAllowance

Required. The ResourceAllowance to update. Update description. Only fields specified in update_mask are updated.

updateMask FieldMask

Required. Mask of fields to update.

Field mask is used to specify the fields to be overwritten in the ResourceAllowance resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.

UpdateResourceAllowance request now only supports update on limit field.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::ResourceAllowance resourceAllowance = new gcbv::ResourceAllowance();
FieldMask updateMask = new FieldMask();
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(resourceAllowance, updateMask);

UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest, CallSettings)

public virtual Task<ResourceAllowance> UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest request, CallSettings callSettings = null)

Update a Resource Allowance.

Parameters
Name Description
request UpdateResourceAllowanceRequest

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
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::UpdateResourceAllowanceRequest request = new gcbv::UpdateResourceAllowanceRequest
{
    ResourceAllowance = new gcbv::ResourceAllowance(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(request);

UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest, CancellationToken)

public virtual Task<ResourceAllowance> UpdateResourceAllowanceAsync(UpdateResourceAllowanceRequest request, CancellationToken cancellationToken)

Update a Resource Allowance.

Parameters
Name Description
request UpdateResourceAllowanceRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskResourceAllowance

A Task containing the RPC response.

Example
// Create client
gcbv::BatchServiceClient batchServiceClient = await gcbv::BatchServiceClient.CreateAsync();
// Initialize request argument(s)
gcbv::UpdateResourceAllowanceRequest request = new gcbv::UpdateResourceAllowanceRequest
{
    ResourceAllowance = new gcbv::ResourceAllowance(),
    UpdateMask = new FieldMask(),
    RequestId = "",
};
// Make the request
gcbv::ResourceAllowance response = await batchServiceClient.UpdateResourceAllowanceAsync(request);