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.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eServiceMetadata\u003c/code\u003e class provides metadata for a single service within an API, with each instance representing a specific service and being unique by identity.\u003c/p\u003e\n"],["\u003cp\u003eThis class offers details such as the service's default endpoint, scopes, supported transports, and whether it supports scoped JWTs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceMetadata\u003c/code\u003e object contains properties like \u003ccode\u003eApiMetadata\u003c/code\u003e, \u003ccode\u003eDefaultEndpoint\u003c/code\u003e, \u003ccode\u003eDefaultScopes\u003c/code\u003e, \u003ccode\u003eEndpointTemplate\u003c/code\u003e, \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eServiceDescriptor\u003c/code\u003e, \u003ccode\u003eSupportsScopedJwts\u003c/code\u003e, and \u003ccode\u003eTransports\u003c/code\u003e to describe different aspects of a service.\u003c/p\u003e\n"],["\u003cp\u003eThere are multiple versions of the \u003ccode\u003eServiceMetadata\u003c/code\u003e class available, ranging from the latest version [4.10.0] down to version 3.2.0, which can be accessed on the site.\u003c/p\u003e\n"],["\u003cp\u003eThe class \u003ccode\u003eServiceMetadata\u003c/code\u003e inherits functionalities from the base \u003ccode\u003eobject\u003c/code\u003e class including methods such as \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, and \u003ccode\u003eGetType\u003c/code\u003e, that can be referenced.\u003c/p\u003e\n"]]],[],null,["# Class ServiceMetadata (4.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.10.0 (latest)](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata)\n- [4.8.0](/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.Grpc.ServiceMetadata)\n- [4.4.0](/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.Grpc.ServiceMetadata)\n- [4.3.1](/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.Grpc.ServiceMetadata)\n- [4.2.0](/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.Grpc.ServiceMetadata)\n- [4.0.0](/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.Grpc.ServiceMetadata)\n- [3.2.0](/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.Grpc.ServiceMetadata) \n\n public sealed class ServiceMetadata\n\nProvides metadata about a single service within an API.\nOften most of these aspects will be the same across multiple services,\nbut they can be specified with different values in the original proto, so\nthey are specified individually here. This class is expected to be constructed\nwith a single instance per service; equality is by simple identity. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ServiceMetadata \n\nInherited Members\n-----------------\n\n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Api.Gax.Grpc](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc)\n\nAssembly\n--------\n\nGoogle.Api.Gax.Grpc.dll\n\nConstructors\n------------\n\n### ServiceMetadata(ServiceDescriptor, string, IEnumerable\\\u003cstring\\\u003e, bool, ApiTransports, ApiMetadata)\n\n public ServiceMetadata(ServiceDescriptor serviceDescriptor, string defaultEndpoint, IEnumerable\u003cstring\u003e defaultScopes, bool supportsScopedJwts, ApiTransports transports, ApiMetadata apiMetadata)\n\nConstructs a new instance for a given service.\n\nProperties\n----------\n\n### ApiMetadata\n\n public ApiMetadata ApiMetadata { get; }\n\nThe metadata for the API this is part of. This is never null.\n\n### DefaultEndpoint\n\n public string DefaultEndpoint { get; }\n\nThe default endpoint for the service. This may be null, if a service has no default endpoint.\n\n**Remarks** \nThe default endpoint is an endpoint in the default universe domain.\n\n### DefaultScopes\n\n public IReadOnlyList\u003cstring\u003e DefaultScopes { get; }\n\nThe default scopes for the service. This will never be null, but may be empty.\nThis will never contain any null references.\nThis will never change after construction.\n\n### EndpointTemplate\n\n public string EndpointTemplate { get; }\n\nThe template to build and endpoint for the service taking into account a custom universe domain,\nfor instance \"storage.{0}\".\nMay be null, in which case no universe domain dependent endpoint may be built for the service.\n\n### Name\n\n public string Name { get; }\n\nThe name of the service within the API, e.g. \"Subscriber\". This is never null or empty.\n\n### ServiceDescriptor\n\n public ServiceDescriptor ServiceDescriptor { get; }\n\nThe protobuf service descriptor for this service. This is never null.\n\n### SupportsScopedJwts\n\n public bool SupportsScopedJwts { get; }\n\nWhether this service supports scoped JWT access (in which case\nthis is preferred by default over OAuth tokens).\n\n### Transports\n\n public ApiTransports Transports { get; }\n\nThe transports supported by this service."]]