Class ServiceMetadata (4.0.0)

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

Namespace

Google.Api.Gax.Grpc

Assembly

Google.Api.Gax.Grpc.dll

Constructors

ServiceMetadata(ServiceDescriptor, String, IEnumerable<String>, Boolean, 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
NameDescription
serviceDescriptorServiceDescriptor

The protobuf descriptor for the service.

defaultEndpointString

The default endpoint to connect to.

defaultScopesIEnumerable<String>

The default scopes for the service. Must not be null, and must not contain any null elements. May be empty.

supportsScopedJwtsBoolean

Whether the service supports scoped JWTs as credentials.

transportsApiTransports

The transports supported by this service.

apiMetadataApiMetadata

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
TypeDescription
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
TypeDescription
String

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
TypeDescription
IReadOnlyList<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
TypeDescription
String

ServiceDescriptor

public ServiceDescriptor ServiceDescriptor { get; }

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

Property Value
TypeDescription
ServiceDescriptor

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
TypeDescription
Boolean

Transports

public ApiTransports Transports { get; }

The transports supported by this service.

Property Value
TypeDescription
ApiTransports