Optional. The minimum (inclusive) revision allowed for validating messages.
If empty or not present, allow any revision to be validated against
last_revision or any revision created before.
Optional. The maximum (inclusive) revision allowed for validating messages.
If empty or not present, allow any revision to be validated against
first_revision or any revision created after.
Required. The name of the schema that messages published should be
validated against. Format is projects/{project}/schemas/{schema}. The
value of this field will be _deleted-schema_ if the schema has been
deleted.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe page provides reference documentation for the \u003ccode\u003eSchemaSettings\u003c/code\u003e class within the Google Cloud Pub/Sub v1 API for .NET, detailing its functionality for validating messages against a schema.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eSchemaSettings\u003c/code\u003e class is 3.23.0, and the page also lists previous versions dating back to version 2.3.0, with a total of 31 listed versions.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSchemaSettings\u003c/code\u003e class, implementing interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, and \u003ccode\u003eIDeepCloneable\u003c/code\u003e, offers constructors and properties to manage schema validation, including encoding, revision IDs, and schema names.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of \u003ccode\u003eSchemaSettings\u003c/code\u003e include \u003ccode\u003eEncoding\u003c/code\u003e to define message encoding, \u003ccode\u003eFirstRevisionId\u003c/code\u003e and \u003ccode\u003eLastRevisionId\u003c/code\u003e for revision control, and \u003ccode\u003eSchema\u003c/code\u003e to specify the schema name against which messages are validated.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSchemaSettings\u003c/code\u003e class belongs to the \u003ccode\u003eGoogle.Cloud.PubSub.V1\u003c/code\u003e namespace and is contained within the \u003ccode\u003eGoogle.Cloud.PubSub.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Cloud Pub/Sub v1 API - Class SchemaSettings (3.27.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.0 (latest)](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.26.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.26.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.25.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.25.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.24.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.24.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.23.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.23.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.22.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.22.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.21.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.21.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.20.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.20.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.19.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.19.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.18.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.18.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.17.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.16.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.15.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.14.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.13.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.12.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.11.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.10.1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.10.1/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.9.1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.9.1/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.8.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.7.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.6.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.5.1/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.4.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.3.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.2.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.1.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/3.0.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.10.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.9.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.8.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.7.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.6.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.5.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.4.0/Google.Cloud.PubSub.V1.SchemaSettings)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.PubSub.V1/2.3.0/Google.Cloud.PubSub.V1.SchemaSettings) \n\n public sealed class SchemaSettings : IMessage\u003cSchemaSettings\u003e, IEquatable\u003cSchemaSettings\u003e, IDeepCloneable\u003cSchemaSettings\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Pub/Sub v1 API class SchemaSettings.\n\nSettings for validating messages published against a schema. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e SchemaSettings \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[SchemaSettings](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.SchemaSettings), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[SchemaSettings](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.SchemaSettings), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[SchemaSettings](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.SchemaSettings), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\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.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.PubSub.V1](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.PubSub.V1.dll\n\nConstructors\n------------\n\n### SchemaSettings()\n\n public SchemaSettings()\n\n### SchemaSettings(SchemaSettings)\n\n public SchemaSettings(SchemaSettings other)\n\nProperties\n----------\n\n### Encoding\n\n public Encoding Encoding { get; set; }\n\nOptional. The encoding of messages validated against `schema`.\n\n### FirstRevisionId\n\n public string FirstRevisionId { get; set; }\n\nOptional. The minimum (inclusive) revision allowed for validating messages.\nIf empty or not present, allow any revision to be validated against\nlast_revision or any revision created before.\n\n### LastRevisionId\n\n public string LastRevisionId { get; set; }\n\nOptional. The maximum (inclusive) revision allowed for validating messages.\nIf empty or not present, allow any revision to be validated against\nfirst_revision or any revision created after.\n\n### Schema\n\n public string Schema { get; set; }\n\nRequired. The name of the schema that messages published should be\nvalidated against. Format is `projects/{project}/schemas/{schema}`. The\nvalue of this field will be `_deleted-schema_` if the schema has been\ndeleted.\n\n### SchemaAsSchemaName\n\n public SchemaName SchemaAsSchemaName { get; set; }\n\n[SchemaName](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.SchemaName)-typed view over the [Schema](/dotnet/docs/reference/Google.Cloud.PubSub.V1/latest/Google.Cloud.PubSub.V1.SchemaSettings#Google_Cloud_PubSub_V1_SchemaSettings_Schema) resource name property."]]