# Class ServiceMetadata (4.10.0)

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

- [4.10.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata)
- [4.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.Grpc.ServiceMetadata)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.Grpc.ServiceMetadata)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.Grpc.ServiceMetadata)
- [4.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.Grpc.ServiceMetadata)
- [4.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.Grpc.ServiceMetadata)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.Grpc.ServiceMetadata)

    public sealed class ServiceMetadata

Provides metadata about a single service within an API.
Often most of these aspects will be the same across multiple services,
but they can be specified with different values in the original proto, so
they are specified individually here. This class is expected to be constructed
with a single instance per service; equality is by simple identity.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ServiceMetadata

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax.Grpc](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc)

## Assembly

Google.Api.Gax.Grpc.dll

## Constructors

### ServiceMetadata(ServiceDescriptor, string, IEnumerable\<string\>, bool, ApiTransports, ApiMetadata)

    public ServiceMetadata(ServiceDescriptor serviceDescriptor, string defaultEndpoint, IEnumerable<string> defaultScopes, bool supportsScopedJwts, ApiTransports transports, ApiMetadata apiMetadata)

Constructs a new instance for a given service.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `serviceDescriptor` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceDescriptor.html` The protobuf descriptor for the service. |
| `defaultEndpoint` | `https://learn.microsoft.com/dotnet/api/system.string` The default endpoint to connect to. |
| `defaultScopes` | `https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1https://learn.microsoft.com/dotnet/api/system.string` The default scopes for the service. Must not be null, and must not contain any null elements. May be empty. |
| `supportsScopedJwts` | `https://learn.microsoft.com/dotnet/api/system.boolean` Whether the service supports scoped JWTs as credentials. |
| `transports` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ApiTransports` The transports supported by this service. |
| `apiMetadata` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ApiMetadata` The metadata for this API, including all of the services expected to be available at the same endpoint, and all associated protos. |

## Properties

### ApiMetadata

    public ApiMetadata ApiMetadata { get; }

The metadata for the API this is part of. This is never null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ApiMetadata` |   |

### DefaultEndpoint

    public string DefaultEndpoint { get; }

The default endpoint for the service. This may be null, if a service has no default endpoint.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default endpoint is an endpoint in the default universe domain.

### DefaultScopes

    public IReadOnlyList<string> DefaultScopes { get; }

The default scopes for the service. This will never be null, but may be empty.
This will never contain any null references.
This will never change after construction.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

### EndpointTemplate

    public string EndpointTemplate { get; }

The template to build and endpoint for the service taking into account a custom universe domain,
for instance "storage.{0}".
May be null, in which case no universe domain dependent endpoint may be built for the service.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Name

    public string Name { get; }

The name of the service within the API, e.g. "Subscriber". This is never null or empty.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServiceDescriptor

    public ServiceDescriptor ServiceDescriptor { get; }

The protobuf service descriptor for this service. This is never null.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.ServiceDescriptor.html` |   |

### SupportsScopedJwts

    public bool SupportsScopedJwts { get; }

Whether this service supports scoped JWT access (in which case
this is preferred by default over OAuth tokens).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Transports

    public ApiTransports Transports { get; }

The transports supported by this service.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ApiTransports` |   |