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
GoogleGoogle.ApiGaxGrpcAssembly
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 | ServiceDescriptor The protobuf descriptor for the service. |
defaultEndpoint | string The default endpoint to connect to. |
defaultScopes | IEnumerablestring The default scopes for the service. Must not be null, and must not contain any null elements. May be empty. |
supportsScopedJwts | bool 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 |
IReadOnlyListstring |
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 |
bool |
Transports
public ApiTransports Transports { get; }
The transports supported by this service.
Property Value | |
---|---|
Type | Description |
ApiTransports |