public abstract class TenantServiceClient
Reference documentation and code samples for the Google Cloud Talent Solution v4beta1 API class TenantServiceClient.
TenantService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Talent.V4Beta1Assembly
Google.Cloud.Talent.V4Beta1.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 | |
---|---|
Type | Description |
String |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default TenantService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyList<String> |
The default TenantService scopes are:
GrpcClient
public virtual TenantService.TenantServiceClient GrpcClient { get; }
The underlying gRPC TenantService client
Property Value | |
---|---|
Type | Description |
TenantService.TenantServiceClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
TenantServiceClient | The created TenantServiceClient. |
CreateAsync(CancellationToken)
public static Task<TenantServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a TenantServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TenantServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<TenantServiceClient> | 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 | |
---|---|
Name | Description |
parent | ProjectName Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
tenant | Tenant Required. The tenant to be created. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Tenant | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateTenantRequest 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 |
Tenant | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
tenant | Tenant Required. The tenant to be created. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Tenant | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
tenant | Tenant Required. The tenant to be created. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ProjectName Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
tenant | Tenant Required. The tenant to be created. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateTenantRequest 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<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CreateTenantRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
tenant | Tenant Required. The tenant to be created. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | String Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
tenant | Tenant Required. The tenant to be created. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteTenantRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | |
---|---|
Name | Description |
name | TenantName 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | |
---|---|
Name | Description |
name | String 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// 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 | |
---|---|
Name | Description |
request | DeleteTenantRequest 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 | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteTenantRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | TenantName 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | TenantName 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". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String 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". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetTenantRequest 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 |
Tenant | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | TenantName 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Tenant | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | String 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Tenant | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetTenantRequest 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<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetTenantRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | TenantName 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | TenantName 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". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String 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". |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | String 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". |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
parent | ProjectName Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTenantsResponse, Tenant> | A pageable sequence of Tenant resources. |
// 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 | |
---|---|
Name | Description |
request | ListTenantsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTenantsResponse, Tenant> | A pageable sequence of Tenant resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
parent | String Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerable<ListTenantsResponse, Tenant> | A pageable sequence of Tenant resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
parent | ProjectName Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTenantsResponse, Tenant> | A pageable asynchronous sequence of Tenant resources. |
// 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 | |
---|---|
Name | Description |
request | ListTenantsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTenantsResponse, Tenant> | A pageable asynchronous sequence of Tenant resources. |
// 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, Nullable<Int32>, 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 | |
---|---|
Name | Description |
parent | String Required. Resource name of the project under which the tenant is created. The format is "projects/{project_id}", for example, "projects/foo". |
pageToken | String The token returned from the previous request. A value of |
pageSize | Nullable<Int32> The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerable<ListTenantsResponse, Tenant> | A pageable asynchronous sequence of Tenant resources. |
// 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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateTenant(Tenant, CallSettings)
public virtual Tenant UpdateTenant(Tenant tenant, CallSettings callSettings = null)
Updates specified tenant.
Parameters | |
---|---|
Name | Description |
tenant | Tenant Required. The tenant resource to replace the current resource in the system. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Tenant | The RPC response. |
// Create client
TenantServiceClient tenantServiceClient = TenantServiceClient.Create();
// Initialize request argument(s)
Tenant tenant = new Tenant();
// Make the request
Tenant response = tenantServiceClient.UpdateTenant(tenant);
UpdateTenant(UpdateTenantRequest, CallSettings)
public virtual Tenant UpdateTenant(UpdateTenantRequest request, CallSettings callSettings = null)
Updates specified tenant.
Parameters | |
---|---|
Name | Description |
request | UpdateTenantRequest 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 |
Tenant | The RPC response. |
// 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, CallSettings)
public virtual Task<Tenant> UpdateTenantAsync(Tenant tenant, CallSettings callSettings = null)
Updates specified tenant.
Parameters | |
---|---|
Name | Description |
tenant | Tenant Required. The tenant resource to replace the current resource in the system. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
Tenant tenant = new Tenant();
// Make the request
Tenant response = await tenantServiceClient.UpdateTenantAsync(tenant);
UpdateTenantAsync(Tenant, CancellationToken)
public virtual Task<Tenant> UpdateTenantAsync(Tenant tenant, CancellationToken cancellationToken)
Updates specified tenant.
Parameters | |
---|---|
Name | Description |
tenant | Tenant Required. The tenant resource to replace the current resource in the system. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// Create client
TenantServiceClient tenantServiceClient = await TenantServiceClient.CreateAsync();
// Initialize request argument(s)
Tenant tenant = new Tenant();
// Make the request
Tenant response = await tenantServiceClient.UpdateTenantAsync(tenant);
UpdateTenantAsync(UpdateTenantRequest, CallSettings)
public virtual Task<Tenant> UpdateTenantAsync(UpdateTenantRequest request, CallSettings callSettings = null)
Updates specified tenant.
Parameters | |
---|---|
Name | Description |
request | UpdateTenantRequest 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<Tenant> | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateTenantRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Tenant> | A Task containing the RPC response. |
// 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);