If source, start_position, and end_position describe a call on
some object (e.g. a macro in the time series query language text) and a
location is to be designated in that object's text, nested_locator
identifies the location within that object.
When nested_locator is set, this field gives the reason for the nesting.
Usually, the reason is a macro invocation. In that case, the macro name
(including the leading '@') signals the location of the macro call
in the text and a macro argument name (including the leading '$') signals
the location of the macro argument inside the macro body that got
substituted away.
The source of the text. The source may be a field in the request, in which
case its format is the format of the
google.rpc.BadRequest.FieldViolation.field field in
https://cloud.google.com/apis/design/errors#error_details. It may also be
be a source other than the request field (e.g. a macro definition
referenced in the text of the query), in which case this is the name of
the source (e.g. the macro name).
[[["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\u003eThis webpage provides documentation for the \u003ccode\u003eTextLocator\u003c/code\u003e class within the Google Cloud Monitoring v3 API for .NET, with the latest version being 3.15.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextLocator\u003c/code\u003e class helps pinpoint specific sections within text, such as a request or referenced object, by using source, start position, and end position.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextLocator\u003c/code\u003e class includes properties like \u003ccode\u003eStartPosition\u003c/code\u003e, \u003ccode\u003eEndPosition\u003c/code\u003e, \u003ccode\u003eSource\u003c/code\u003e, \u003ccode\u003eNestedLocator\u003c/code\u003e, and \u003ccode\u003eNestingReason\u003c/code\u003e to fully describe a text location and any nested locations.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTextLocator\u003c/code\u003e class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe document includes a list of previous versions of the Google.Cloud.Monitoring.V3 API down to version 2.3.0.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Monitoring v3 API - Class TextLocator (3.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.14.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.13.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.12.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.11.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.10.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.9.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.8.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.7.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.6.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.5.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.4.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.3.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.2.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.1.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/3.0.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.6.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.5.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.4.0/Google.Cloud.Monitoring.V3.TextLocator)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/2.3.0/Google.Cloud.Monitoring.V3.TextLocator) \n\n public sealed class TextLocator : IMessage\u003cTextLocator\u003e, IEquatable\u003cTextLocator\u003e, IDeepCloneable\u003cTextLocator\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Monitoring v3 API class TextLocator.\n\nA locator for text. Indicates a particular part of the text of a request or\nof an object referenced in the request.\n\nFor example, suppose the request field `text` contains:\n\ntext: \"The quick brown fox jumps over the lazy dog.\"\n\nThen the locator:\n\nsource: \"text\"\nstart_position {\nline: 1\ncolumn: 17\n}\nend_position {\nline: 1\ncolumn: 19\n}\n\nrefers to the part of the text: \"fox\". \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TextLocator \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[TextLocator](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.TextLocator), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TextLocator](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.TextLocator), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[TextLocator](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3.TextLocator), [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.Monitoring.V3](/dotnet/docs/reference/Google.Cloud.Monitoring.V3/latest/Google.Cloud.Monitoring.V3)\n\nAssembly\n--------\n\nGoogle.Cloud.Monitoring.V3.dll\n\nConstructors\n------------\n\n### TextLocator()\n\n public TextLocator()\n\n### TextLocator(TextLocator)\n\n public TextLocator(TextLocator other)\n\nProperties\n----------\n\n### EndPosition\n\n public TextLocator.Types.Position EndPosition { get; set; }\n\nThe position of the last byte within the text.\n\n### NestedLocator\n\n public TextLocator NestedLocator { get; set; }\n\nIf `source`, `start_position`, and `end_position` describe a call on\nsome object (e.g. a macro in the time series query language text) and a\nlocation is to be designated in that object's text, `nested_locator`\nidentifies the location within that object.\n\n### NestingReason\n\n public string NestingReason { get; set; }\n\nWhen `nested_locator` is set, this field gives the reason for the nesting.\nUsually, the reason is a macro invocation. In that case, the macro name\n(including the leading '@') signals the location of the macro call\nin the text and a macro argument name (including the leading '$') signals\nthe location of the macro argument inside the macro body that got\nsubstituted away.\n\n### Source\n\n public string Source { get; set; }\n\nThe source of the text. The source may be a field in the request, in which\ncase its format is the format of the\ngoogle.rpc.BadRequest.FieldViolation.field field in\n\u003chttps://cloud.google.com/apis/design/errors#error_details\u003e. It may also be\nbe a source other than the request field (e.g. a macro definition\nreferenced in the text of the query), in which case this is the name of\nthe source (e.g. the macro name).\n\n### StartPosition\n\n public TextLocator.Types.Position StartPosition { get; set; }\n\nThe position of the first byte within the text."]]