Google Cloud Talent Solution v4 API - Class TenantServiceClient (2.3.0)

public abstract class TenantServiceClient

Reference documentation and code samples for the Google Cloud Talent Solution v4 API class TenantServiceClient.

TenantService client wrapper, for convenient use.

Inheritance

object > TenantServiceClient

Derived Types

Namespace

Google.Cloud.Talent.V4

Assembly

Google.Cloud.Talent.V4.dll

Remarks

A service that handles tenant management, including CRUD and enumeration.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default TenantService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

GrpcClient

public virtual TenantService.TenantServiceClient GrpcClient { get; }

The underlying gRPC TenantService client

Property Value
TypeDescription
TenantServiceTenantServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

Methods

Create()

public static TenantServiceClient Create()

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

Returns
TypeDescription
TenantServiceClient

The created TenantServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskTenantServiceClient

The task representing the created TenantServiceClient.

CreateTenant(ProjectName, Tenant, CallSettings)

public virtual Tenant CreateTenant(ProjectName parent, Tenant tenant, CallSettings callSettings = null)

Creates a new tenant entity.

Parameters
NameDescription
parentProjectName

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

tenantTenant

Required. The tenant to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Tenant tenant = new Tenant();
// Make the request
Tenant response = tenantServiceClient.CreateTenant(parent, tenant);

CreateTenant(CreateTenantRequest, CallSettings)

public virtual Tenant CreateTenant(CreateTenantRequest request, CallSettings callSettings = null)

Creates a new tenant entity.

Parameters
NameDescription
requestCreateTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
CreateTenantRequest request = new CreateTenantRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Tenant = new Tenant(),
};
// Make the request
Tenant response = tenantServiceClient.CreateTenant(request);

CreateTenant(string, Tenant, CallSettings)

public virtual Tenant CreateTenant(string parent, Tenant tenant, CallSettings callSettings = null)

Creates a new tenant entity.

Parameters
NameDescription
parentstring

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

tenantTenant

Required. The tenant to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Tenant tenant = new Tenant();
// Make the request
Tenant response = tenantServiceClient.CreateTenant(parent, tenant);

CreateTenantAsync(ProjectName, Tenant, CallSettings)

public virtual Task<Tenant> CreateTenantAsync(ProjectName parent, Tenant tenant, CallSettings callSettings = null)

Creates a new tenant entity.

Parameters
NameDescription
parentProjectName

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

tenantTenant

Required. The tenant to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Tenant tenant = new Tenant();
// Make the request
Tenant response = await tenantServiceClient.CreateTenantAsync(parent, tenant);

CreateTenantAsync(ProjectName, Tenant, CancellationToken)

public virtual Task<Tenant> CreateTenantAsync(ProjectName parent, Tenant tenant, CancellationToken cancellationToken)

Creates a new tenant entity.

Parameters
NameDescription
parentProjectName

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

tenantTenant

Required. The tenant to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
Tenant tenant = new Tenant();
// Make the request
Tenant response = await tenantServiceClient.CreateTenantAsync(parent, tenant);

CreateTenantAsync(CreateTenantRequest, CallSettings)

public virtual Task<Tenant> CreateTenantAsync(CreateTenantRequest request, CallSettings callSettings = null)

Creates a new tenant entity.

Parameters
NameDescription
requestCreateTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTenantRequest request = new CreateTenantRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Tenant = new Tenant(),
};
// Make the request
Tenant response = await tenantServiceClient.CreateTenantAsync(request);

CreateTenantAsync(CreateTenantRequest, CancellationToken)

public virtual Task<Tenant> CreateTenantAsync(CreateTenantRequest request, CancellationToken cancellationToken)

Creates a new tenant entity.

Parameters
NameDescription
requestCreateTenantRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
CreateTenantRequest request = new CreateTenantRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
    Tenant = new Tenant(),
};
// Make the request
Tenant response = await tenantServiceClient.CreateTenantAsync(request);

CreateTenantAsync(string, Tenant, CallSettings)

public virtual Task<Tenant> CreateTenantAsync(string parent, Tenant tenant, CallSettings callSettings = null)

Creates a new tenant entity.

Parameters
NameDescription
parentstring

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

tenantTenant

Required. The tenant to be created.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Tenant tenant = new Tenant();
// Make the request
Tenant response = await tenantServiceClient.CreateTenantAsync(parent, tenant);

CreateTenantAsync(string, Tenant, CancellationToken)

public virtual Task<Tenant> CreateTenantAsync(string parent, Tenant tenant, CancellationToken cancellationToken)

Creates a new tenant entity.

Parameters
NameDescription
parentstring

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

tenantTenant

Required. The tenant to be created.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
Tenant tenant = new Tenant();
// Make the request
Tenant response = await tenantServiceClient.CreateTenantAsync(parent, tenant);

DeleteTenant(DeleteTenantRequest, CallSettings)

public virtual void DeleteTenant(DeleteTenantRequest request, CallSettings callSettings = null)

Deletes specified tenant.

Parameters
NameDescription
requestDeleteTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
DeleteTenantRequest request = new DeleteTenantRequest
{
    TenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
};
// Make the request
tenantServiceClient.DeleteTenant(request);

DeleteTenant(TenantName, CallSettings)

public virtual void DeleteTenant(TenantName name, CallSettings callSettings = null)

Deletes specified tenant.

Parameters
NameDescription
nameTenantName

Required. The resource name of the tenant to be deleted.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
// Make the request
tenantServiceClient.DeleteTenant(name);

DeleteTenant(string, CallSettings)

public virtual void DeleteTenant(string name, CallSettings callSettings = null)

Deletes specified tenant.

Parameters
NameDescription
namestring

Required. The resource name of the tenant to be deleted.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/tenants/[TENANT]";
// Make the request
tenantServiceClient.DeleteTenant(name);

DeleteTenantAsync(DeleteTenantRequest, CallSettings)

public virtual Task DeleteTenantAsync(DeleteTenantRequest request, CallSettings callSettings = null)

Deletes specified tenant.

Parameters
NameDescription
requestDeleteTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteTenantRequest request = new DeleteTenantRequest
{
    TenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
};
// Make the request
await tenantServiceClient.DeleteTenantAsync(request);

DeleteTenantAsync(DeleteTenantRequest, CancellationToken)

public virtual Task DeleteTenantAsync(DeleteTenantRequest request, CancellationToken cancellationToken)

Deletes specified tenant.

Parameters
NameDescription
requestDeleteTenantRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteTenantRequest request = new DeleteTenantRequest
{
    TenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
};
// Make the request
await tenantServiceClient.DeleteTenantAsync(request);

DeleteTenantAsync(TenantName, CallSettings)

public virtual Task DeleteTenantAsync(TenantName name, CallSettings callSettings = null)

Deletes specified tenant.

Parameters
NameDescription
nameTenantName

Required. The resource name of the tenant to be deleted.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
// Make the request
await tenantServiceClient.DeleteTenantAsync(name);

DeleteTenantAsync(TenantName, CancellationToken)

public virtual Task DeleteTenantAsync(TenantName name, CancellationToken cancellationToken)

Deletes specified tenant.

Parameters
NameDescription
nameTenantName

Required. The resource name of the tenant to be deleted.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
// Make the request
await tenantServiceClient.DeleteTenantAsync(name);

DeleteTenantAsync(string, CallSettings)

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

Deletes specified tenant.

Parameters
NameDescription
namestring

Required. The resource name of the tenant to be deleted.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/tenants/[TENANT]";
// Make the request
await tenantServiceClient.DeleteTenantAsync(name);

DeleteTenantAsync(string, CancellationToken)

public virtual Task DeleteTenantAsync(string name, CancellationToken cancellationToken)

Deletes specified tenant.

Parameters
NameDescription
namestring

Required. The resource name of the tenant to be deleted.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/tenants/[TENANT]";
// Make the request
await tenantServiceClient.DeleteTenantAsync(name);

GetTenant(GetTenantRequest, CallSettings)

public virtual Tenant GetTenant(GetTenantRequest request, CallSettings callSettings = null)

Retrieves specified tenant.

Parameters
NameDescription
requestGetTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
GetTenantRequest request = new GetTenantRequest
{
    TenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
};
// Make the request
Tenant response = tenantServiceClient.GetTenant(request);

GetTenant(TenantName, CallSettings)

public virtual Tenant GetTenant(TenantName name, CallSettings callSettings = null)

Retrieves specified tenant.

Parameters
NameDescription
nameTenantName

Required. The resource name of the tenant to be retrieved.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
// Make the request
Tenant response = tenantServiceClient.GetTenant(name);

GetTenant(string, CallSettings)

public virtual Tenant GetTenant(string name, CallSettings callSettings = null)

Retrieves specified tenant.

Parameters
NameDescription
namestring

Required. The resource name of the tenant to be retrieved.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/tenants/[TENANT]";
// Make the request
Tenant response = tenantServiceClient.GetTenant(name);

GetTenantAsync(GetTenantRequest, CallSettings)

public virtual Task<Tenant> GetTenantAsync(GetTenantRequest request, CallSettings callSettings = null)

Retrieves specified tenant.

Parameters
NameDescription
requestGetTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
GetTenantRequest request = new GetTenantRequest
{
    TenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
};
// Make the request
Tenant response = await tenantServiceClient.GetTenantAsync(request);

GetTenantAsync(GetTenantRequest, CancellationToken)

public virtual Task<Tenant> GetTenantAsync(GetTenantRequest request, CancellationToken cancellationToken)

Retrieves specified tenant.

Parameters
NameDescription
requestGetTenantRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
GetTenantRequest request = new GetTenantRequest
{
    TenantName = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]"),
};
// Make the request
Tenant response = await tenantServiceClient.GetTenantAsync(request);

GetTenantAsync(TenantName, CallSettings)

public virtual Task<Tenant> GetTenantAsync(TenantName name, CallSettings callSettings = null)

Retrieves specified tenant.

Parameters
NameDescription
nameTenantName

Required. The resource name of the tenant to be retrieved.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
// Make the request
Tenant response = await tenantServiceClient.GetTenantAsync(name);

GetTenantAsync(TenantName, CancellationToken)

public virtual Task<Tenant> GetTenantAsync(TenantName name, CancellationToken cancellationToken)

Retrieves specified tenant.

Parameters
NameDescription
nameTenantName

Required. The resource name of the tenant to be retrieved.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
TenantName name = TenantName.FromProjectTenant("[PROJECT]", "[TENANT]");
// Make the request
Tenant response = await tenantServiceClient.GetTenantAsync(name);

GetTenantAsync(string, CallSettings)

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

Retrieves specified tenant.

Parameters
NameDescription
namestring

Required. The resource name of the tenant to be retrieved.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/tenants/[TENANT]";
// Make the request
Tenant response = await tenantServiceClient.GetTenantAsync(name);

GetTenantAsync(string, CancellationToken)

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

Retrieves specified tenant.

Parameters
NameDescription
namestring

Required. The resource name of the tenant to be retrieved.

The format is "projects/{project_id}/tenants/{tenant_id}", for example, "projects/foo/tenants/bar".

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/tenants/[TENANT]";
// Make the request
Tenant response = await tenantServiceClient.GetTenantAsync(name);

ListTenants(ProjectName, string, int?, CallSettings)

public virtual PagedEnumerable<ListTenantsResponse, Tenant> ListTenants(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all tenants associated with the project.

Parameters
NameDescription
parentProjectName

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

pageTokenstring

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

pageSizeint

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTenantsResponseTenant

A pageable sequence of Tenant resources.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedEnumerable<ListTenantsResponse, Tenant> response = tenantServiceClient.ListTenants(parent);

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

ListTenants(ListTenantsRequest, CallSettings)

public virtual PagedEnumerable<ListTenantsResponse, Tenant> ListTenants(ListTenantsRequest request, CallSettings callSettings = null)

Lists all tenants associated with the project.

Parameters
NameDescription
requestListTenantsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTenantsResponseTenant

A pageable sequence of Tenant resources.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
ListTenantsRequest request = new ListTenantsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedEnumerable<ListTenantsResponse, Tenant> response = tenantServiceClient.ListTenants(request);

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

ListTenants(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListTenantsResponse, Tenant> ListTenants(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all tenants associated with the project.

Parameters
NameDescription
parentstring

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

pageTokenstring

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

pageSizeint

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListTenantsResponseTenant

A pageable sequence of Tenant resources.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedEnumerable<ListTenantsResponse, Tenant> response = tenantServiceClient.ListTenants(parent);

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

ListTenantsAsync(ProjectName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTenantsResponse, Tenant> ListTenantsAsync(ProjectName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all tenants associated with the project.

Parameters
NameDescription
parentProjectName

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

pageTokenstring

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

pageSizeint

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTenantsResponseTenant

A pageable asynchronous sequence of Tenant resources.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
ProjectName parent = ProjectName.FromProject("[PROJECT]");
// Make the request
PagedAsyncEnumerable<ListTenantsResponse, Tenant> response = tenantServiceClient.ListTenantsAsync(parent);

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

ListTenantsAsync(ListTenantsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTenantsResponse, Tenant> ListTenantsAsync(ListTenantsRequest request, CallSettings callSettings = null)

Lists all tenants associated with the project.

Parameters
NameDescription
requestListTenantsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTenantsResponseTenant

A pageable asynchronous sequence of Tenant resources.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
ListTenantsRequest request = new ListTenantsRequest
{
    ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
};
// Make the request
PagedAsyncEnumerable<ListTenantsResponse, Tenant> response = tenantServiceClient.ListTenantsAsync(request);

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

ListTenantsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTenantsResponse, Tenant> ListTenantsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all tenants associated with the project.

Parameters
NameDescription
parentstring

Required. Resource name of the project under which the tenant is created.

The format is "projects/{project_id}", for example, "projects/foo".

pageTokenstring

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

pageSizeint

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListTenantsResponseTenant

A pageable asynchronous sequence of Tenant resources.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]";
// Make the request
PagedAsyncEnumerable<ListTenantsResponse, Tenant> response = tenantServiceClient.ListTenantsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Tenant 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((ListTenantsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Tenant 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<Tenant> 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 (Tenant item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateTenant(Tenant, FieldMask, CallSettings)

public virtual Tenant UpdateTenant(Tenant tenant, FieldMask updateMask, CallSettings callSettings = null)

Updates specified tenant.

Parameters
NameDescription
tenantTenant

Required. The tenant resource to replace the current resource in the system.

updateMaskFieldMask

Strongly recommended for the best service experience.

If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is provided, only the specified fields in [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. Otherwise all the fields are updated.

A field mask to specify the tenant fields to be updated. Only top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
Tenant tenant = new Tenant();
FieldMask updateMask = new FieldMask();
// Make the request
Tenant response = tenantServiceClient.UpdateTenant(tenant, updateMask);

UpdateTenant(UpdateTenantRequest, CallSettings)

public virtual Tenant UpdateTenant(UpdateTenantRequest request, CallSettings callSettings = null)

Updates specified tenant.

Parameters
NameDescription
requestUpdateTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Tenant

The RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
UpdateTenantRequest request = new UpdateTenantRequest
{
    Tenant = new Tenant(),
    UpdateMask = new FieldMask(),
};
// Make the request
Tenant response = tenantServiceClient.UpdateTenant(request);

UpdateTenantAsync(Tenant, FieldMask, CallSettings)

public virtual Task<Tenant> UpdateTenantAsync(Tenant tenant, FieldMask updateMask, CallSettings callSettings = null)

Updates specified tenant.

Parameters
NameDescription
tenantTenant

Required. The tenant resource to replace the current resource in the system.

updateMaskFieldMask

Strongly recommended for the best service experience.

If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is provided, only the specified fields in [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. Otherwise all the fields are updated.

A field mask to specify the tenant fields to be updated. Only top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
Tenant tenant = new Tenant();
FieldMask updateMask = new FieldMask();
// Make the request
Tenant response = await tenantServiceClient.UpdateTenantAsync(tenant, updateMask);

UpdateTenantAsync(Tenant, FieldMask, CancellationToken)

public virtual Task<Tenant> UpdateTenantAsync(Tenant tenant, FieldMask updateMask, CancellationToken cancellationToken)

Updates specified tenant.

Parameters
NameDescription
tenantTenant

Required. The tenant resource to replace the current resource in the system.

updateMaskFieldMask

Strongly recommended for the best service experience.

If [update_mask][google.cloud.talent.v4.UpdateTenantRequest.update_mask] is provided, only the specified fields in [tenant][google.cloud.talent.v4.UpdateTenantRequest.tenant] are updated. Otherwise all the fields are updated.

A field mask to specify the tenant fields to be updated. Only top level fields of [Tenant][google.cloud.talent.v4.Tenant] are supported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
Tenant tenant = new Tenant();
FieldMask updateMask = new FieldMask();
// Make the request
Tenant response = await tenantServiceClient.UpdateTenantAsync(tenant, updateMask);

UpdateTenantAsync(UpdateTenantRequest, CallSettings)

public virtual Task<Tenant> UpdateTenantAsync(UpdateTenantRequest request, CallSettings callSettings = null)

Updates specified tenant.

Parameters
NameDescription
requestUpdateTenantRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateTenantRequest request = new UpdateTenantRequest
{
    Tenant = new Tenant(),
    UpdateMask = new FieldMask(),
};
// Make the request
Tenant response = await tenantServiceClient.UpdateTenantAsync(request);

UpdateTenantAsync(UpdateTenantRequest, CancellationToken)

public virtual Task<Tenant> UpdateTenantAsync(UpdateTenantRequest request, CancellationToken cancellationToken)

Updates specified tenant.

Parameters
NameDescription
requestUpdateTenantRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskTenant

A Task containing the RPC response.

Example
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateTenantRequest request = new UpdateTenantRequest
{
    Tenant = new Tenant(),
    UpdateMask = new FieldMask(),
};
// Make the request
Tenant response = await tenantServiceClient.UpdateTenantAsync(request);