A provider function for the protobuf descriptors of the API. Must not be null, and must not
return a null value. This will only be called once by this API descriptor, when first requested.
Properties
HttpRuleOverrides
public IReadOnlyDictionary<string, ByteString> HttpRuleOverrides { get; }
A dictionary (based on ordinal string comparisons) from fully-qualified RPC names
to byte strings representing overrides for the HTTP rule. This is designed to support
mixins which are hosted at individual APIs, but which are exposed via different URLs
to the original mixin definition. This is never null, but may be empty.
The HttpRule overrides for services in this package; typically used to override
URLs for the REST transport. Must not be null. Will be cloned in the form of an immutable dictionary,
after which the original sequence is discarded.
[[["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-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eApiMetadata\u003c/code\u003e provides metadata about an API, designed to have a single instance per API, with equality based on simple identity.\u003c/p\u003e\n"],["\u003cp\u003eThe class can be constructed either with a direct sequence of file descriptors or a function that lazily provides them when \u003ccode\u003eProtobufDescriptors\u003c/code\u003e is accessed.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eApiMetadata\u003c/code\u003e allows setting overrides for HTTP rules via the \u003ccode\u003eHttpRuleOverrides\u003c/code\u003e property and can encode enums as numbers in JSON when \u003ccode\u003eRequestNumericEnumJsonEncoding\u003c/code\u003e is true.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eName\u003c/code\u003e property of the class indicates the API's name, and the \u003ccode\u003eProtobufDescriptors\u003c/code\u003e property contains the API's protobuf descriptors.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods to create new instances with altered HTTP rule overrides (\u003ccode\u003eWithHttpRuleOverrides\u003c/code\u003e) or changed enum encoding preferences (\u003ccode\u003eWithRequestNumericEnumJsonEncoding\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# Class ApiMetadata (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.ApiMetadata)\n- [4.8.0](/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.Grpc.ApiMetadata)\n- [4.4.0](/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.Grpc.ApiMetadata)\n- [4.3.1](/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.Grpc.ApiMetadata)\n- [4.2.0](/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.Grpc.ApiMetadata)\n- [4.0.0](/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.Grpc.ApiMetadata)\n- [3.2.0](/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.Grpc.ApiMetadata) \n\n public sealed class ApiMetadata\n\nProvides metadata about an API. This is expected to be constructed with a single instance\nper API; equality is by simple identity. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ApiMetadata \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### ApiMetadata(string, IEnumerable\\\u003cFileDescriptor\\\u003e)\n\n public ApiMetadata(string name, IEnumerable\u003cFileDescriptor\u003e descriptors)\n\nCreates an API descriptor from a sequence of file descriptors.\n\n**Remarks** \nThe sequence is evaluated once, on construction.\n\n### ApiMetadata(string, Func\\\u003cIEnumerable\\\u003cFileDescriptor\\\u003e\\\u003e)\n\n public ApiMetadata(string name, Func\u003cIEnumerable\u003cFileDescriptor\u003e\u003e descriptorsProvider)\n\nCreates an API descriptor which lazily requests the protobuf descriptors when [ProtobufDescriptors](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ApiMetadata#Google_Api_Gax_Grpc_ApiMetadata_ProtobufDescriptors) is first called.\n\nProperties\n----------\n\n### HttpRuleOverrides\n\n public IReadOnlyDictionary\u003cstring, ByteString\u003e HttpRuleOverrides { get; }\n\nA dictionary (based on ordinal string comparisons) from fully-qualified RPC names\nto byte strings representing overrides for the HTTP rule. This is designed to support\nmixins which are hosted at individual APIs, but which are exposed via different URLs\nto the original mixin definition. This is never null, but may be empty.\n\n### Name\n\n public string Name { get; }\n\nThe name of the API (typically the fully-qualified name of the client library package).\nThis is never null or empty.\n\n### ProtobufDescriptors\n\n public IReadOnlyList\u003cFileDescriptor\u003e ProtobufDescriptors { get; }\n\nThe protobuf descriptors used by this API.\n\n### RequestNumericEnumJsonEncoding\n\n public bool RequestNumericEnumJsonEncoding { get; }\n\nWhen true, [RestGrpcAdapter](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.Rest.RestGrpcAdapter) will request that enums are encoded as numbers in JSON\nrather than as strings, preserving unknown values.\n\n### TypeRegistry\n\n public TypeRegistry TypeRegistry { get; }\n\nA type registry containing all the types in [ProtobufDescriptors](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ApiMetadata#Google_Api_Gax_Grpc_ApiMetadata_ProtobufDescriptors).\n\nMethods\n-------\n\n### WithHttpRuleOverrides(IEnumerable\\\u003cKeyValuePair\\\u003cstring, ByteString\\\u003e\\\u003e)\n\n public ApiMetadata WithHttpRuleOverrides(IEnumerable\u003cKeyValuePair\u003cstring, ByteString\u003e\u003e overrides)\n\nCreates a new instance with the same values as this one, other than the given set of HttpRule overrides.\n\n### WithRequestNumericEnumJsonEncoding(bool)\n\n public ApiMetadata WithRequestNumericEnumJsonEncoding(bool value)\n\nReturns a new instance based on this one, but with the specified value for [RequestNumericEnumJsonEncoding](/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ApiMetadata#Google_Api_Gax_Grpc_ApiMetadata_RequestNumericEnumJsonEncoding)."]]