Class RoutersClient (2.1.0)

public abstract class RoutersClient

Routers client wrapper, for convenient use.

Inheritance

Object > RoutersClient

Derived Types

Namespace

Google.Cloud.Compute.V1

Assembly

Google.Cloud.Compute.V1.dll

Remarks

The Routers API.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default Routers scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

DeleteOperationsClient

public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for Delete.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual Routers.RoutersClient GrpcClient { get; }

The underlying gRPC Routers client

Property Value
TypeDescription
Routers.RoutersClient

InsertOperationsClient

public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for Insert.

Property Value
TypeDescription
OperationsClient

PatchOperationsClient

public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for Patch.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateOperationsClient

public virtual OperationsClient UpdateOperationsClient { get; }

The long-running operations client for Update.

Property Value
TypeDescription
OperationsClient

Methods

AggregatedList(AggregatedListRoutersRequest, CallSettings)

public virtual PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> AggregatedList(AggregatedListRoutersRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of routers.

Parameters
NameDescription
requestAggregatedListRoutersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<RouterAggregatedList, KeyValuePair<String, RoutersScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
AggregatedListRoutersRequest request = new AggregatedListRoutersRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedList(request);

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

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

public virtual PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of routers.

Parameters
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<RouterAggregatedList, KeyValuePair<String, RoutersScopedList>>

A pageable sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
// Make the request
PagedEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedList(project);

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

AggregatedListAsync(AggregatedListRoutersRequest, CallSettings)

public virtual PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> AggregatedListAsync(AggregatedListRoutersRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of routers.

Parameters
NameDescription
requestAggregatedListRoutersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<String, RoutersScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
AggregatedListRoutersRequest request = new AggregatedListRoutersRequest
{
    OrderBy = "",
    Project = "",
    Filter = "",
    IncludeAllScopes = false,
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedListAsync(request);

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

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

public virtual PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of routers.

Parameters
NameDescription
projectString

Project ID for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<String, RoutersScopedList>>

A pageable asynchronous sequence of KeyValuePair<TKey,TValue> resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
// Make the request
PagedAsyncEnumerable<RouterAggregatedList, KeyValuePair<string, RoutersScopedList>> response = routersClient.AggregatedListAsync(project);

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

Create()

public static RoutersClient Create()

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

Returns
TypeDescription
RoutersClient

The created RoutersClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<RoutersClient>

The task representing the created RoutersClient.

Delete(DeleteRouterRequest, CallSettings)

public virtual Operation<Operation, Operation> Delete(DeleteRouterRequest request, CallSettings callSettings = null)

Deletes the specified Router resource.

Parameters
NameDescription
requestDeleteRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
DeleteRouterRequest request = new DeleteRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Delete(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Delete(String, String, String, CallSettings)

public virtual Operation<Operation, Operation> Delete(string project, string region, string router, CallSettings callSettings = null)

Deletes the specified Router resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Delete(project, region, router);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceDelete(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteRouterRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteRouterRequest request, CallSettings callSettings = null)

Deletes the specified Router resource.

Parameters
NameDescription
requestDeleteRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
DeleteRouterRequest request = new DeleteRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(DeleteRouterRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteRouterRequest request, CancellationToken cancellationToken)

Deletes the specified Router resource.

Parameters
NameDescription
requestDeleteRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
DeleteRouterRequest request = new DeleteRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.DeleteAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(String, String, String, CallSettings)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string region, string router, CallSettings callSettings = null)

Deletes the specified Router resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.DeleteAsync(project, region, router);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

DeleteAsync(String, String, String, CancellationToken)

public virtual Task<Operation<Operation, Operation>> DeleteAsync(string project, string region, string router, CancellationToken cancellationToken)

Deletes the specified Router resource.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.DeleteAsync(project, region, router);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceDeleteAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Get(GetRouterRequest, CallSettings)

public virtual Router Get(GetRouterRequest request, CallSettings callSettings = null)

Returns the specified Router resource. Gets a list of available routers by making a list() request.

Parameters
NameDescription
requestGetRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Router

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetRouterRequest request = new GetRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
Router response = routersClient.Get(request);

Get(String, String, String, CallSettings)

public virtual Router Get(string project, string region, string router, CallSettings callSettings = null)

Returns the specified Router resource. Gets a list of available routers by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Router

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
Router response = routersClient.Get(project, region, router);

GetAsync(GetRouterRequest, CallSettings)

public virtual Task<Router> GetAsync(GetRouterRequest request, CallSettings callSettings = null)

Returns the specified Router resource. Gets a list of available routers by making a list() request.

Parameters
NameDescription
requestGetRouterRequest

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

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterRequest request = new GetRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
Router response = await routersClient.GetAsync(request);

GetAsync(GetRouterRequest, CancellationToken)

public virtual Task<Router> GetAsync(GetRouterRequest request, CancellationToken cancellationToken)

Returns the specified Router resource. Gets a list of available routers by making a list() request.

Parameters
NameDescription
requestGetRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Router>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterRequest request = new GetRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
Router response = await routersClient.GetAsync(request);

GetAsync(String, String, String, CallSettings)

public virtual Task<Router> GetAsync(string project, string region, string router, CallSettings callSettings = null)

Returns the specified Router resource. Gets a list of available routers by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to return.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Router>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
Router response = await routersClient.GetAsync(project, region, router);

GetAsync(String, String, String, CancellationToken)

public virtual Task<Router> GetAsync(string project, string region, string router, CancellationToken cancellationToken)

Returns the specified Router resource. Gets a list of available routers by making a list() request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to return.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Router>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
Router response = await routersClient.GetAsync(project, region, router);

GetNatMappingInfo(GetNatMappingInfoRoutersRequest, CallSettings)

public virtual PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfo(GetNatMappingInfoRoutersRequest request, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
NameDescription
requestGetNatMappingInfoRoutersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings>

A pageable sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetNatMappingInfoRoutersRequest request = new GetNatMappingInfoRoutersRequest
{
    Region = "",
    Router = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfo(request);

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

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

public virtual PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfo(string project, string region, string router, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query for Nat Mapping information of VM endpoints.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings>

A pageable sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
PagedEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfo(project, region, router);

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

GetNatMappingInfoAsync(GetNatMappingInfoRoutersRequest, CallSettings)

public virtual PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfoAsync(GetNatMappingInfoRoutersRequest request, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
NameDescription
requestGetNatMappingInfoRoutersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings>

A pageable asynchronous sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetNatMappingInfoRoutersRequest request = new GetNatMappingInfoRoutersRequest
{
    Region = "",
    Router = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfoAsync(request);

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

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

public virtual PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> GetNatMappingInfoAsync(string project, string region, string router, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves runtime Nat mapping information of VM endpoints.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query for Nat Mapping information of VM endpoints.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings>

A pageable asynchronous sequence of VmEndpointNatMappings resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
PagedAsyncEnumerable<VmEndpointNatMappingsList, VmEndpointNatMappings> response = routersClient.GetNatMappingInfoAsync(project, region, router);

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

GetRouterStatus(GetRouterStatusRouterRequest, CallSettings)

public virtual RouterStatusResponse GetRouterStatus(GetRouterStatusRouterRequest request, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
NameDescription
requestGetRouterStatusRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RouterStatusResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
GetRouterStatusRouterRequest request = new GetRouterStatusRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
RouterStatusResponse response = routersClient.GetRouterStatus(request);

GetRouterStatus(String, String, String, CallSettings)

public virtual RouterStatusResponse GetRouterStatus(string project, string region, string router, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RouterStatusResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RouterStatusResponse response = routersClient.GetRouterStatus(project, region, router);

GetRouterStatusAsync(GetRouterStatusRouterRequest, CallSettings)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(GetRouterStatusRouterRequest request, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
NameDescription
requestGetRouterStatusRouterRequest

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

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterStatusRouterRequest request = new GetRouterStatusRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(request);

GetRouterStatusAsync(GetRouterStatusRouterRequest, CancellationToken)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(GetRouterStatusRouterRequest request, CancellationToken cancellationToken)

Retrieves runtime information of the specified router.

Parameters
NameDescription
requestGetRouterStatusRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<RouterStatusResponse>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
GetRouterStatusRouterRequest request = new GetRouterStatusRouterRequest
{
    Region = "",
    Router = "",
    Project = "",
};
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(request);

GetRouterStatusAsync(String, String, String, CallSettings)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(string project, string region, string router, CallSettings callSettings = null)

Retrieves runtime information of the specified router.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RouterStatusResponse>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(project, region, router);

GetRouterStatusAsync(String, String, String, CancellationToken)

public virtual Task<RouterStatusResponse> GetRouterStatusAsync(string project, string region, string router, CancellationToken cancellationToken)

Retrieves runtime information of the specified router.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<RouterStatusResponse>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
// Make the request
RouterStatusResponse response = await routersClient.GetRouterStatusAsync(project, region, router);

Insert(InsertRouterRequest, CallSettings)

public virtual Operation<Operation, Operation> Insert(InsertRouterRequest request, CallSettings callSettings = null)

Creates a Router resource in the specified project and region using the data included in the request.

Parameters
NameDescription
requestInsertRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
InsertRouterRequest request = new InsertRouterRequest
{
    RequestId = "",
    Region = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Insert(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Insert(String, String, Router, CallSettings)

public virtual Operation<Operation, Operation> Insert(string project, string region, Router routerResource, CallSettings callSettings = null)

Creates a Router resource in the specified project and region using the data included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Insert(project, region, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceInsert(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertRouterRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertRouterRequest request, CallSettings callSettings = null)

Creates a Router resource in the specified project and region using the data included in the request.

Parameters
NameDescription
requestInsertRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
InsertRouterRequest request = new InsertRouterRequest
{
    RequestId = "",
    Region = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(InsertRouterRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertRouterRequest request, CancellationToken cancellationToken)

Creates a Router resource in the specified project and region using the data included in the request.

Parameters
NameDescription
requestInsertRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
InsertRouterRequest request = new InsertRouterRequest
{
    RequestId = "",
    Region = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.InsertAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(String, String, Router, CallSettings)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, Router routerResource, CallSettings callSettings = null)

Creates a Router resource in the specified project and region using the data included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.InsertAsync(project, region, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

InsertAsync(String, String, Router, CancellationToken)

public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, string region, Router routerResource, CancellationToken cancellationToken)

Creates a Router resource in the specified project and region using the data included in the request.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerResourceRouter

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.InsertAsync(project, region, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceInsertAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

List(ListRoutersRequest, CallSettings)

public virtual PagedEnumerable<RouterList, Router> List(ListRoutersRequest request, CallSettings callSettings = null)

Retrieves a list of Router resources available to the specified project.

Parameters
NameDescription
requestListRoutersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<RouterList, Router>

A pageable sequence of Router resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
ListRoutersRequest request = new ListRoutersRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedEnumerable<RouterList, Router> response = routersClient.List(request);

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

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

public virtual PagedEnumerable<RouterList, Router> List(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of Router resources available to the specified project.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<RouterList, Router>

A pageable sequence of Router resources.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedEnumerable<RouterList, Router> response = routersClient.List(project, region);

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

ListAsync(ListRoutersRequest, CallSettings)

public virtual PagedAsyncEnumerable<RouterList, Router> ListAsync(ListRoutersRequest request, CallSettings callSettings = null)

Retrieves a list of Router resources available to the specified project.

Parameters
NameDescription
requestListRoutersRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<RouterList, Router>

A pageable asynchronous sequence of Router resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
ListRoutersRequest request = new ListRoutersRequest
{
    Region = "",
    OrderBy = "",
    Project = "",
    Filter = "",
    ReturnPartialSuccess = false,
};
// Make the request
PagedAsyncEnumerable<RouterList, Router> response = routersClient.ListAsync(request);

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

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

public virtual PagedAsyncEnumerable<RouterList, Router> ListAsync(string project, string region, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of Router resources available to the specified project.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<RouterList, Router>

A pageable asynchronous sequence of Router resources.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
// Make the request
PagedAsyncEnumerable<RouterList, Router> response = routersClient.ListAsync(project, region);

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

Patch(PatchRouterRequest, CallSettings)

public virtual Operation<Operation, Operation> Patch(PatchRouterRequest request, CallSettings callSettings = null)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
requestPatchRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
PatchRouterRequest request = new PatchRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Patch(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Patch(String, String, String, Router, CallSettings)

public virtual Operation<Operation, Operation> Patch(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to patch.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Patch(project, region, router, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOncePatch(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchRouterRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchRouterRequest request, CallSettings callSettings = null)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
requestPatchRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PatchRouterRequest request = new PatchRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(PatchRouterRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchRouterRequest request, CancellationToken cancellationToken)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
requestPatchRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PatchRouterRequest request = new PatchRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.PatchAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(String, String, String, Router, CallSettings)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to patch.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.PatchAsync(project, region, router, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PatchAsync(String, String, String, Router, CancellationToken)

public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, string router, Router routerResource, CancellationToken cancellationToken)

Patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to patch.

routerResourceRouter

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.PatchAsync(project, region, router, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOncePatchAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

PollOnceDelete(String, CallSettings)

public virtual Operation<Operation, Operation> PollOnceDelete(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceDeleteAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceDeleteAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOnceInsert(String, CallSettings)

public virtual Operation<Operation, Operation> PollOnceInsert(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceInsertAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceInsertAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOncePatch(String, CallSettings)

public virtual Operation<Operation, Operation> PollOncePatch(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOncePatchAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOncePatchAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

PollOnceUpdate(String, CallSettings)

public virtual Operation<Operation, Operation> PollOnceUpdate(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The result of polling the operation.

PollOnceUpdateAsync(String, CallSettings)

public virtual Task<Operation<Operation, Operation>> PollOnceUpdateAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A task representing the result of polling the operation.

Preview(PreviewRouterRequest, CallSettings)

public virtual RoutersPreviewResponse Preview(PreviewRouterRequest request, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
NameDescription
requestPreviewRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RoutersPreviewResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
PreviewRouterRequest request = new PreviewRouterRequest
{
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
RoutersPreviewResponse response = routersClient.Preview(request);

Preview(String, String, String, Router, CallSettings)

public virtual RoutersPreviewResponse Preview(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RoutersPreviewResponse

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
RoutersPreviewResponse response = routersClient.Preview(project, region, router, routerResource);

PreviewAsync(PreviewRouterRequest, CallSettings)

public virtual Task<RoutersPreviewResponse> PreviewAsync(PreviewRouterRequest request, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
NameDescription
requestPreviewRouterRequest

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

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PreviewRouterRequest request = new PreviewRouterRequest
{
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(request);

PreviewAsync(PreviewRouterRequest, CancellationToken)

public virtual Task<RoutersPreviewResponse> PreviewAsync(PreviewRouterRequest request, CancellationToken cancellationToken)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
NameDescription
requestPreviewRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<RoutersPreviewResponse>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
PreviewRouterRequest request = new PreviewRouterRequest
{
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(request);

PreviewAsync(String, String, String, Router, CallSettings)

public virtual Task<RoutersPreviewResponse> PreviewAsync(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<RoutersPreviewResponse>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(project, region, router, routerResource);

PreviewAsync(String, String, String, Router, CancellationToken)

public virtual Task<RoutersPreviewResponse> PreviewAsync(string project, string region, string router, Router routerResource, CancellationToken cancellationToken)

Preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to query.

routerResourceRouter

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<RoutersPreviewResponse>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
RoutersPreviewResponse response = await routersClient.PreviewAsync(project, region, router, routerResource);

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.

Update(UpdateRouterRequest, CallSettings)

public virtual Operation<Operation, Operation> Update(UpdateRouterRequest request, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
NameDescription
requestUpdateRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
UpdateRouterRequest request = new UpdateRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Update(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

Update(String, String, String, Router, CallSettings)

public virtual Operation<Operation, Operation> Update(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to update.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Operation, Operation>

The RPC response.

Example
// Create client
RoutersClient routersClient = RoutersClient.Create();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = routersClient.Update(project, region, router, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = routersClient.PollOnceUpdate(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

UpdateAsync(UpdateRouterRequest, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateRouterRequest request, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
NameDescription
requestUpdateRouterRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
UpdateRouterRequest request = new UpdateRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

UpdateAsync(UpdateRouterRequest, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(UpdateRouterRequest request, CancellationToken cancellationToken)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
NameDescription
requestUpdateRouterRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
UpdateRouterRequest request = new UpdateRouterRequest
{
    RequestId = "",
    Region = "",
    Router = "",
    RouterResource = new Router(),
    Project = "",
};
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(request);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

UpdateAsync(String, String, String, Router, CallSettings)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string region, string router, Router routerResource, CallSettings callSettings = null)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to update.

routerResourceRouter

The body resource for this request

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(project, region, router, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}

UpdateAsync(String, String, String, Router, CancellationToken)

public virtual Task<Operation<Operation, Operation>> UpdateAsync(string project, string region, string router, Router routerResource, CancellationToken cancellationToken)

Updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region for this request.

routerString

Name of the Router resource to update.

routerResourceRouter

The body resource for this request

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Operation, Operation>>

A Task containing the RPC response.

Example
// Create client
RoutersClient routersClient = await RoutersClient.CreateAsync();
// Initialize request argument(s)
string project = "";
string region = "";
string router = "";
Router routerResource = new Router();
// Make the request
lro::Operation<Operation, Operation> response = await routersClient.UpdateAsync(project, region, router, routerResource);

// Poll until the returned long-running operation is complete
lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Operation result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
lro::Operation<Operation, Operation> retrievedResponse = await routersClient.PollOnceUpdateAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Operation retrievedResult = retrievedResponse.Result;
}