Google Cloud Dialogflow v2beta1 API - Class SipTrunksClient (1.0.0-beta19)

public abstract class SipTrunksClient

Reference documentation and code samples for the Google Cloud Dialogflow v2beta1 API class SipTrunksClient.

SipTrunks client wrapper, for convenient use.

Inheritance

object > SipTrunksClient

Derived Types

Namespace

Google.Cloud.Dialogflow.V2Beta1

Assembly

Google.Cloud.Dialogflow.V2Beta1.dll

Remarks

Service for managing [SipTrunks][google.cloud.dialogflow.v2beta1.SipTrunk].

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default SipTrunks scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

GrpcClient

public virtual SipTrunks.SipTrunksClient GrpcClient { get; }

The underlying gRPC SipTrunks client

Property Value
Type Description
SipTrunksSipTrunksClient

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 SipTrunksClient Create()

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

Returns
Type Description
SipTrunksClient

The created SipTrunksClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskSipTrunksClient

The task representing the created SipTrunksClient.

CreateSipTrunk(LocationName, SipTrunk, CallSettings)

public virtual SipTrunk CreateSipTrunk(LocationName parent, SipTrunk sipTrunk, CallSettings callSettings = null)

Creates a SipTrunk for a specified location.

Parameters
Name Description
parent LocationName

Required. The location to create a SIP trunk for. Format: projects/<Project ID>/locations/<Location ID>.

sipTrunk SipTrunk

Required. The SIP trunk to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
SipTrunk sipTrunk = new SipTrunk();
// Make the request
SipTrunk response = sipTrunksClient.CreateSipTrunk(parent, sipTrunk);

CreateSipTrunk(CreateSipTrunkRequest, CallSettings)

public virtual SipTrunk CreateSipTrunk(CreateSipTrunkRequest request, CallSettings callSettings = null)

Creates a SipTrunk for a specified location.

Parameters
Name Description
request CreateSipTrunkRequest

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
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
CreateSipTrunkRequest request = new CreateSipTrunkRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SipTrunk = new SipTrunk(),
};
// Make the request
SipTrunk response = sipTrunksClient.CreateSipTrunk(request);

CreateSipTrunk(string, SipTrunk, CallSettings)

public virtual SipTrunk CreateSipTrunk(string parent, SipTrunk sipTrunk, CallSettings callSettings = null)

Creates a SipTrunk for a specified location.

Parameters
Name Description
parent string

Required. The location to create a SIP trunk for. Format: projects/<Project ID>/locations/<Location ID>.

sipTrunk SipTrunk

Required. The SIP trunk to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
SipTrunk sipTrunk = new SipTrunk();
// Make the request
SipTrunk response = sipTrunksClient.CreateSipTrunk(parent, sipTrunk);

CreateSipTrunkAsync(LocationName, SipTrunk, CallSettings)

public virtual Task<SipTrunk> CreateSipTrunkAsync(LocationName parent, SipTrunk sipTrunk, CallSettings callSettings = null)

Creates a SipTrunk for a specified location.

Parameters
Name Description
parent LocationName

Required. The location to create a SIP trunk for. Format: projects/<Project ID>/locations/<Location ID>.

sipTrunk SipTrunk

Required. The SIP trunk to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
SipTrunk sipTrunk = new SipTrunk();
// Make the request
SipTrunk response = await sipTrunksClient.CreateSipTrunkAsync(parent, sipTrunk);

CreateSipTrunkAsync(LocationName, SipTrunk, CancellationToken)

public virtual Task<SipTrunk> CreateSipTrunkAsync(LocationName parent, SipTrunk sipTrunk, CancellationToken cancellationToken)

Creates a SipTrunk for a specified location.

Parameters
Name Description
parent LocationName

Required. The location to create a SIP trunk for. Format: projects/<Project ID>/locations/<Location ID>.

sipTrunk SipTrunk

Required. The SIP trunk to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
SipTrunk sipTrunk = new SipTrunk();
// Make the request
SipTrunk response = await sipTrunksClient.CreateSipTrunkAsync(parent, sipTrunk);

CreateSipTrunkAsync(CreateSipTrunkRequest, CallSettings)

public virtual Task<SipTrunk> CreateSipTrunkAsync(CreateSipTrunkRequest request, CallSettings callSettings = null)

Creates a SipTrunk for a specified location.

Parameters
Name Description
request CreateSipTrunkRequest

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
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
CreateSipTrunkRequest request = new CreateSipTrunkRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SipTrunk = new SipTrunk(),
};
// Make the request
SipTrunk response = await sipTrunksClient.CreateSipTrunkAsync(request);

CreateSipTrunkAsync(CreateSipTrunkRequest, CancellationToken)

public virtual Task<SipTrunk> CreateSipTrunkAsync(CreateSipTrunkRequest request, CancellationToken cancellationToken)

Creates a SipTrunk for a specified location.

Parameters
Name Description
request CreateSipTrunkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
CreateSipTrunkRequest request = new CreateSipTrunkRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SipTrunk = new SipTrunk(),
};
// Make the request
SipTrunk response = await sipTrunksClient.CreateSipTrunkAsync(request);

CreateSipTrunkAsync(string, SipTrunk, CallSettings)

public virtual Task<SipTrunk> CreateSipTrunkAsync(string parent, SipTrunk sipTrunk, CallSettings callSettings = null)

Creates a SipTrunk for a specified location.

Parameters
Name Description
parent string

Required. The location to create a SIP trunk for. Format: projects/<Project ID>/locations/<Location ID>.

sipTrunk SipTrunk

Required. The SIP trunk to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
SipTrunk sipTrunk = new SipTrunk();
// Make the request
SipTrunk response = await sipTrunksClient.CreateSipTrunkAsync(parent, sipTrunk);

CreateSipTrunkAsync(string, SipTrunk, CancellationToken)

public virtual Task<SipTrunk> CreateSipTrunkAsync(string parent, SipTrunk sipTrunk, CancellationToken cancellationToken)

Creates a SipTrunk for a specified location.

Parameters
Name Description
parent string

Required. The location to create a SIP trunk for. Format: projects/<Project ID>/locations/<Location ID>.

sipTrunk SipTrunk

Required. The SIP trunk to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
SipTrunk sipTrunk = new SipTrunk();
// Make the request
SipTrunk response = await sipTrunksClient.CreateSipTrunkAsync(parent, sipTrunk);

DeleteSipTrunk(DeleteSipTrunkRequest, CallSettings)

public virtual void DeleteSipTrunk(DeleteSipTrunkRequest request, CallSettings callSettings = null)

Deletes a specified SipTrunk.

Parameters
Name Description
request DeleteSipTrunkRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
DeleteSipTrunkRequest request = new DeleteSipTrunkRequest
{
    SipTrunkName = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]"),
};
// Make the request
sipTrunksClient.DeleteSipTrunk(request);

DeleteSipTrunk(SipTrunkName, CallSettings)

public virtual void DeleteSipTrunk(SipTrunkName name, CallSettings callSettings = null)

Deletes a specified SipTrunk.

Parameters
Name Description
name SipTrunkName

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
SipTrunkName name = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]");
// Make the request
sipTrunksClient.DeleteSipTrunk(name);

DeleteSipTrunk(string, CallSettings)

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

Deletes a specified SipTrunk.

Parameters
Name Description
name string

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/sipTrunks/[SIPTRUNK]";
// Make the request
sipTrunksClient.DeleteSipTrunk(name);

DeleteSipTrunkAsync(DeleteSipTrunkRequest, CallSettings)

public virtual Task DeleteSipTrunkAsync(DeleteSipTrunkRequest request, CallSettings callSettings = null)

Deletes a specified SipTrunk.

Parameters
Name Description
request DeleteSipTrunkRequest

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.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
DeleteSipTrunkRequest request = new DeleteSipTrunkRequest
{
    SipTrunkName = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]"),
};
// Make the request
await sipTrunksClient.DeleteSipTrunkAsync(request);

DeleteSipTrunkAsync(DeleteSipTrunkRequest, CancellationToken)

public virtual Task DeleteSipTrunkAsync(DeleteSipTrunkRequest request, CancellationToken cancellationToken)

Deletes a specified SipTrunk.

Parameters
Name Description
request DeleteSipTrunkRequest

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.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
DeleteSipTrunkRequest request = new DeleteSipTrunkRequest
{
    SipTrunkName = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]"),
};
// Make the request
await sipTrunksClient.DeleteSipTrunkAsync(request);

DeleteSipTrunkAsync(SipTrunkName, CallSettings)

public virtual Task DeleteSipTrunkAsync(SipTrunkName name, CallSettings callSettings = null)

Deletes a specified SipTrunk.

Parameters
Name Description
name SipTrunkName

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
SipTrunkName name = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]");
// Make the request
await sipTrunksClient.DeleteSipTrunkAsync(name);

DeleteSipTrunkAsync(SipTrunkName, CancellationToken)

public virtual Task DeleteSipTrunkAsync(SipTrunkName name, CancellationToken cancellationToken)

Deletes a specified SipTrunk.

Parameters
Name Description
name SipTrunkName

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
SipTrunkName name = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]");
// Make the request
await sipTrunksClient.DeleteSipTrunkAsync(name);

DeleteSipTrunkAsync(string, CallSettings)

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

Deletes a specified SipTrunk.

Parameters
Name Description
name string

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/sipTrunks/[SIPTRUNK]";
// Make the request
await sipTrunksClient.DeleteSipTrunkAsync(name);

DeleteSipTrunkAsync(string, CancellationToken)

public virtual Task DeleteSipTrunkAsync(string name, CancellationToken cancellationToken)

Deletes a specified SipTrunk.

Parameters
Name Description
name string

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
Task

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/sipTrunks/[SIPTRUNK]";
// Make the request
await sipTrunksClient.DeleteSipTrunkAsync(name);

GetSipTrunk(GetSipTrunkRequest, CallSettings)

public virtual SipTrunk GetSipTrunk(GetSipTrunkRequest request, CallSettings callSettings = null)

Retrieves the specified SipTrunk.

Parameters
Name Description
request GetSipTrunkRequest

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
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
GetSipTrunkRequest request = new GetSipTrunkRequest
{
    SipTrunkName = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]"),
};
// Make the request
SipTrunk response = sipTrunksClient.GetSipTrunk(request);

GetSipTrunk(SipTrunkName, CallSettings)

public virtual SipTrunk GetSipTrunk(SipTrunkName name, CallSettings callSettings = null)

Retrieves the specified SipTrunk.

Parameters
Name Description
name SipTrunkName

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
SipTrunkName name = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]");
// Make the request
SipTrunk response = sipTrunksClient.GetSipTrunk(name);

GetSipTrunk(string, CallSettings)

public virtual SipTrunk GetSipTrunk(string name, CallSettings callSettings = null)

Retrieves the specified SipTrunk.

Parameters
Name Description
name string

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/sipTrunks/[SIPTRUNK]";
// Make the request
SipTrunk response = sipTrunksClient.GetSipTrunk(name);

GetSipTrunkAsync(GetSipTrunkRequest, CallSettings)

public virtual Task<SipTrunk> GetSipTrunkAsync(GetSipTrunkRequest request, CallSettings callSettings = null)

Retrieves the specified SipTrunk.

Parameters
Name Description
request GetSipTrunkRequest

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
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
GetSipTrunkRequest request = new GetSipTrunkRequest
{
    SipTrunkName = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]"),
};
// Make the request
SipTrunk response = await sipTrunksClient.GetSipTrunkAsync(request);

GetSipTrunkAsync(GetSipTrunkRequest, CancellationToken)

public virtual Task<SipTrunk> GetSipTrunkAsync(GetSipTrunkRequest request, CancellationToken cancellationToken)

Retrieves the specified SipTrunk.

Parameters
Name Description
request GetSipTrunkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
GetSipTrunkRequest request = new GetSipTrunkRequest
{
    SipTrunkName = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]"),
};
// Make the request
SipTrunk response = await sipTrunksClient.GetSipTrunkAsync(request);

GetSipTrunkAsync(SipTrunkName, CallSettings)

public virtual Task<SipTrunk> GetSipTrunkAsync(SipTrunkName name, CallSettings callSettings = null)

Retrieves the specified SipTrunk.

Parameters
Name Description
name SipTrunkName

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
SipTrunkName name = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]");
// Make the request
SipTrunk response = await sipTrunksClient.GetSipTrunkAsync(name);

GetSipTrunkAsync(SipTrunkName, CancellationToken)

public virtual Task<SipTrunk> GetSipTrunkAsync(SipTrunkName name, CancellationToken cancellationToken)

Retrieves the specified SipTrunk.

Parameters
Name Description
name SipTrunkName

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
SipTrunkName name = SipTrunkName.FromProjectLocationSiptrunk("[PROJECT]", "[LOCATION]", "[SIPTRUNK]");
// Make the request
SipTrunk response = await sipTrunksClient.GetSipTrunkAsync(name);

GetSipTrunkAsync(string, CallSettings)

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

Retrieves the specified SipTrunk.

Parameters
Name Description
name string

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/sipTrunks/[SIPTRUNK]";
// Make the request
SipTrunk response = await sipTrunksClient.GetSipTrunkAsync(name);

GetSipTrunkAsync(string, CancellationToken)

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

Retrieves the specified SipTrunk.

Parameters
Name Description
name string

Required. The name of the SIP trunk to delete. Format: projects/<Project ID>/locations/<Location ID>/sipTrunks/<SipTrunk ID>.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/sipTrunks/[SIPTRUNK]";
// Make the request
SipTrunk response = await sipTrunksClient.GetSipTrunkAsync(name);

ListSipTrunks(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListSipTrunksResponse, SipTrunk> ListSipTrunks(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of SipTrunks in the specified location.

Parameters
Name Description
parent LocationName

Required. The location to list SIP trunks from. Format: projects/<Project ID>/locations/<Location ID>.

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
PagedEnumerableListSipTrunksResponseSipTrunk

A pageable sequence of SipTrunk resources.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListSipTrunksResponse, SipTrunk> response = sipTrunksClient.ListSipTrunks(parent);

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

ListSipTrunks(ListSipTrunksRequest, CallSettings)

public virtual PagedEnumerable<ListSipTrunksResponse, SipTrunk> ListSipTrunks(ListSipTrunksRequest request, CallSettings callSettings = null)

Returns a list of SipTrunks in the specified location.

Parameters
Name Description
request ListSipTrunksRequest

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
PagedEnumerableListSipTrunksResponseSipTrunk

A pageable sequence of SipTrunk resources.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
ListSipTrunksRequest request = new ListSipTrunksRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedEnumerable<ListSipTrunksResponse, SipTrunk> response = sipTrunksClient.ListSipTrunks(request);

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

ListSipTrunks(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListSipTrunksResponse, SipTrunk> ListSipTrunks(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of SipTrunks in the specified location.

Parameters
Name Description
parent string

Required. The location to list SIP trunks from. Format: projects/<Project ID>/locations/<Location ID>.

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
PagedEnumerableListSipTrunksResponseSipTrunk

A pageable sequence of SipTrunk resources.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListSipTrunksResponse, SipTrunk> response = sipTrunksClient.ListSipTrunks(parent);

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

ListSipTrunksAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListSipTrunksResponse, SipTrunk> ListSipTrunksAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of SipTrunks in the specified location.

Parameters
Name Description
parent LocationName

Required. The location to list SIP trunks from. Format: projects/<Project ID>/locations/<Location ID>.

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
PagedAsyncEnumerableListSipTrunksResponseSipTrunk

A pageable asynchronous sequence of SipTrunk resources.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListSipTrunksResponse, SipTrunk> response = sipTrunksClient.ListSipTrunksAsync(parent);

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

ListSipTrunksAsync(ListSipTrunksRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListSipTrunksResponse, SipTrunk> ListSipTrunksAsync(ListSipTrunksRequest request, CallSettings callSettings = null)

Returns a list of SipTrunks in the specified location.

Parameters
Name Description
request ListSipTrunksRequest

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
PagedAsyncEnumerableListSipTrunksResponseSipTrunk

A pageable asynchronous sequence of SipTrunk resources.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
ListSipTrunksRequest request = new ListSipTrunksRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
};
// Make the request
PagedAsyncEnumerable<ListSipTrunksResponse, SipTrunk> response = sipTrunksClient.ListSipTrunksAsync(request);

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

ListSipTrunksAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListSipTrunksResponse, SipTrunk> ListSipTrunksAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Returns a list of SipTrunks in the specified location.

Parameters
Name Description
parent string

Required. The location to list SIP trunks from. Format: projects/<Project ID>/locations/<Location ID>.

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
PagedAsyncEnumerableListSipTrunksResponseSipTrunk

A pageable asynchronous sequence of SipTrunk resources.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListSipTrunksResponse, SipTrunk> response = sipTrunksClient.ListSipTrunksAsync(parent);

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

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.

UpdateSipTrunk(SipTrunk, FieldMask, CallSettings)

public virtual SipTrunk UpdateSipTrunk(SipTrunk sipTrunk, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified SipTrunk.

Parameters
Name Description
sipTrunk SipTrunk

Required. The SipTrunk to update.

updateMask FieldMask

Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
SipTrunk sipTrunk = new SipTrunk();
FieldMask updateMask = new FieldMask();
// Make the request
SipTrunk response = sipTrunksClient.UpdateSipTrunk(sipTrunk, updateMask);

UpdateSipTrunk(UpdateSipTrunkRequest, CallSettings)

public virtual SipTrunk UpdateSipTrunk(UpdateSipTrunkRequest request, CallSettings callSettings = null)

Updates the specified SipTrunk.

Parameters
Name Description
request UpdateSipTrunkRequest

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
SipTrunk

The RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = SipTrunksClient.Create();
// Initialize request argument(s)
UpdateSipTrunkRequest request = new UpdateSipTrunkRequest
{
    SipTrunk = new SipTrunk(),
    UpdateMask = new FieldMask(),
};
// Make the request
SipTrunk response = sipTrunksClient.UpdateSipTrunk(request);

UpdateSipTrunkAsync(SipTrunk, FieldMask, CallSettings)

public virtual Task<SipTrunk> UpdateSipTrunkAsync(SipTrunk sipTrunk, FieldMask updateMask, CallSettings callSettings = null)

Updates the specified SipTrunk.

Parameters
Name Description
sipTrunk SipTrunk

Required. The SipTrunk to update.

updateMask FieldMask

Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
SipTrunk sipTrunk = new SipTrunk();
FieldMask updateMask = new FieldMask();
// Make the request
SipTrunk response = await sipTrunksClient.UpdateSipTrunkAsync(sipTrunk, updateMask);

UpdateSipTrunkAsync(SipTrunk, FieldMask, CancellationToken)

public virtual Task<SipTrunk> UpdateSipTrunkAsync(SipTrunk sipTrunk, FieldMask updateMask, CancellationToken cancellationToken)

Updates the specified SipTrunk.

Parameters
Name Description
sipTrunk SipTrunk

Required. The SipTrunk to update.

updateMask FieldMask

Optional. The mask to control which fields get updated. If the mask is not present, all fields will be updated.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
SipTrunk sipTrunk = new SipTrunk();
FieldMask updateMask = new FieldMask();
// Make the request
SipTrunk response = await sipTrunksClient.UpdateSipTrunkAsync(sipTrunk, updateMask);

UpdateSipTrunkAsync(UpdateSipTrunkRequest, CallSettings)

public virtual Task<SipTrunk> UpdateSipTrunkAsync(UpdateSipTrunkRequest request, CallSettings callSettings = null)

Updates the specified SipTrunk.

Parameters
Name Description
request UpdateSipTrunkRequest

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
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
UpdateSipTrunkRequest request = new UpdateSipTrunkRequest
{
    SipTrunk = new SipTrunk(),
    UpdateMask = new FieldMask(),
};
// Make the request
SipTrunk response = await sipTrunksClient.UpdateSipTrunkAsync(request);

UpdateSipTrunkAsync(UpdateSipTrunkRequest, CancellationToken)

public virtual Task<SipTrunk> UpdateSipTrunkAsync(UpdateSipTrunkRequest request, CancellationToken cancellationToken)

Updates the specified SipTrunk.

Parameters
Name Description
request UpdateSipTrunkRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskSipTrunk

A Task containing the RPC response.

Example
// Create client
SipTrunksClient sipTrunksClient = await SipTrunksClient.CreateAsync();
// Initialize request argument(s)
UpdateSipTrunkRequest request = new UpdateSipTrunkRequest
{
    SipTrunk = new SipTrunk(),
    UpdateMask = new FieldMask(),
};
// Make the request
SipTrunk response = await sipTrunksClient.UpdateSipTrunkAsync(request);