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.
Namespace
Google.Api.Gax.GrpcAssembly
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 | |
---|---|
Name | Description |
serviceDescriptor | ServiceDescriptor The protobuf descriptor for the service. |
defaultEndpoint | String The default endpoint to connect to. |
defaultScopes | IEnumerable<String> The default scopes for the service. Must not be null, and must not contain any null elements. May be empty. |
supportsScopedJwts | Boolean Whether the service supports scoped JWTs as credentials. |
transports | ApiTransports The transports supported by this service. |
apiMetadata | 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 |
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 |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
String |
ServiceDescriptor
public ServiceDescriptor ServiceDescriptor { get; }
The protobuf service descriptor for this service. This is never null.
Property Value | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Boolean |
Transports
public ApiTransports Transports { get; }
The transports supported by this service.
Property Value | |
---|---|
Type | Description |
ApiTransports |