# Google.Cloud.Location - Class LocationsClientImpl (2.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClientImpl)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.3.0/Google.Cloud.Location.LocationsClientImpl)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.2.0/Google.Cloud.Location.LocationsClientImpl)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.1.0/Google.Cloud.Location.LocationsClientImpl)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/2.0.0/Google.Cloud.Location.LocationsClientImpl)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/1.0.0/Google.Cloud.Location.LocationsClientImpl)

    public sealed class LocationsClientImpl : LocationsClient

Reference documentation and code samples for the Google.Cloud.Location class LocationsClientImpl.

Locations client wrapper implementation, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient) \> LocationsClientImpl

## Inherited Members

[LocationsClient.DefaultEndpoint](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_DefaultEndpoint) [LocationsClient.DefaultScopes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_DefaultScopes) [LocationsClient.ServiceMetadata](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_ServiceMetadata) [LocationsClient.CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_CreateAsync_System_Threading_CancellationToken_) [LocationsClient.Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_Create) [LocationsClient.ShutdownDefaultChannelsAsync()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_ShutdownDefaultChannelsAsync) [LocationsClient.GetLocationAsync(GetLocationRequest, CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_GetLocationAsync_Google_Cloud_Location_GetLocationRequest_System_Threading_CancellationToken_) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Location](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location)

## Assembly

Google.Cloud.Location.dll

## Remarks

An abstract interface that provides location-related information for
a service. Service-specific metadata is provided through the
\[Location.metadata\]\[google.cloud.location.Location.metadata\] field.

## Constructors

### LocationsClientImpl(LocationsClient, LocationsSettings, ILogger)

    public LocationsClientImpl(Locations.LocationsClient grpcClient, LocationsSettings settings, ILogger logger)

Constructs a client wrapper for the Locations service, with the specified gRPC client and settings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `grpcClient` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locationshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient` The underlying gRPC client. |
| `settings` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsSettings` The base [LocationsSettings](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsSettings) used within this client. |
| `logger` | `https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger` Optional [ILogger](https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger) to use within this client. |

## Properties

### GrpcClient

    public override Locations.LocationsClient GrpcClient { get; }

The underlying gRPC Locations client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locationshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient` |   |

**Overrides** [LocationsClient.GrpcClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_GrpcClient)

## Methods

### GetLocation(GetLocationRequest, CallSettings)

    public override Location GetLocation(GetLocationRequest request, CallSettings callSettings = null)

Gets information about a location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.GetLocationRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Location` | The RPC response. |

**Overrides** [LocationsClient.GetLocation(GetLocationRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_GetLocation_Google_Cloud_Location_GetLocationRequest_Google_Api_Gax_Grpc_CallSettings_)

### GetLocationAsync(GetLocationRequest, CallSettings)

    public override Task<Location> GetLocationAsync(GetLocationRequest request, CallSettings callSettings = null)

Gets information about a location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.GetLocationRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Location` | A Task containing the RPC response. |

**Overrides** [LocationsClient.GetLocationAsync(GetLocationRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_GetLocationAsync_Google_Cloud_Location_GetLocationRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListLocations(ListLocationsRequest, CallSettings)

    public override PagedEnumerable<ListLocationsResponse, Location> ListLocations(ListLocationsRequest request, CallSettings callSettings = null)

Lists information about the supported locations for this service.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.ListLocationsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.ListLocationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Location` | A pageable sequence of [Location](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Location) resources. |

**Overrides** [LocationsClient.ListLocations(ListLocationsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_ListLocations_Google_Cloud_Location_ListLocationsRequest_Google_Api_Gax_Grpc_CallSettings_)

### ListLocationsAsync(ListLocationsRequest, CallSettings)

    public override PagedAsyncEnumerable<ListLocationsResponse, Location> ListLocationsAsync(ListLocationsRequest request, CallSettings callSettings = null)

Lists information about the supported locations for this service.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.ListLocationsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.ListLocationsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Location` | A pageable asynchronous sequence of [Location](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Location) resources. |

**Overrides** [LocationsClient.ListLocationsAsync(ListLocationsRequest, CallSettings)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient#Google_Cloud_Location_LocationsClient_ListLocationsAsync_Google_Cloud_Location_ListLocationsRequest_Google_Api_Gax_Grpc_CallSettings_)