(::Google::Cloud::Monitoring::V3::TextLocator) — 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.
value (::Google::Cloud::Monitoring::V3::TextLocator) — 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.
Returns
(::Google::Cloud::Monitoring::V3::TextLocator) — 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.
#nesting_reason
defnesting_reason()->::String
Returns
(::String) — 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.
#nesting_reason=
defnesting_reason=(value)->::String
Parameter
value (::String) — 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.
Returns
(::String) — 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.
#source
defsource()->::String
Returns
(::String) — 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).
#source=
defsource=(value)->::String
Parameter
value (::String) — 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).
Returns
(::String) — 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."],[],[],null,["# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::TextLocator (v1.6.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.6.1 (latest)](/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.6.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.6.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.5.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.5.1/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.4.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.4.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.3.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.3.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.2.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.2.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.1.0](/ruby/docs/reference/google-cloud-monitoring-v3/1.1.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [1.0.1](/ruby/docs/reference/google-cloud-monitoring-v3/1.0.1/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.18.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.18.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.17.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.17.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.16.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.16.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.15.2](/ruby/docs/reference/google-cloud-monitoring-v3/0.15.2/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.14.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.14.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.13.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.13.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.12.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.12.1/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.11.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.11.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.10.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.10.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.9.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.9.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.8.0](/ruby/docs/reference/google-cloud-monitoring-v3/0.8.0/Google-Cloud-Monitoring-V3-TextLocator)\n- [0.7.1](/ruby/docs/reference/google-cloud-monitoring-v3/0.7.1/Google-Cloud-Monitoring-V3-TextLocator) \nReference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::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\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\n\u003cbr /\u003e\n\nrefers to the part of the text: \"fox\". \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #end_position\n\n def end_position() -\u003e ::Google::Cloud::Monitoring::V3::TextLocator::Position\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](./Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the last byte within the text.\n\n### #end_position=\n\n def end_position=(value) -\u003e ::Google::Cloud::Monitoring::V3::TextLocator::Position\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::TextLocator::Position](./Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the last byte within the text. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](./Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the last byte within the text.\n\n### #nested_locator\n\n def nested_locator() -\u003e ::Google::Cloud::Monitoring::V3::TextLocator\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::TextLocator](./Google-Cloud-Monitoring-V3-TextLocator)) --- 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.\n\n### #nested_locator=\n\n def nested_locator=(value) -\u003e ::Google::Cloud::Monitoring::V3::TextLocator\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::TextLocator](./Google-Cloud-Monitoring-V3-TextLocator)) --- 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. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::TextLocator](./Google-Cloud-Monitoring-V3-TextLocator)) --- 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.\n\n### #nesting_reason\n\n def nesting_reason() -\u003e ::String\n\n**Returns**\n\n- (::String) --- 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.\n\n### #nesting_reason=\n\n def nesting_reason=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- 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. \n**Returns**\n\n- (::String) --- 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.\n\n### #source\n\n def source() -\u003e ::String\n\n**Returns**\n\n- (::String) --- 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).\n\n### #source=\n\n def source=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- 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). \n**Returns**\n\n- (::String) --- 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).\n\n### #start_position\n\n def start_position() -\u003e ::Google::Cloud::Monitoring::V3::TextLocator::Position\n\n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](./Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the first byte within the text.\n\n### #start_position=\n\n def start_position=(value) -\u003e ::Google::Cloud::Monitoring::V3::TextLocator::Position\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Monitoring::V3::TextLocator::Position](./Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the first byte within the text. \n**Returns**\n\n- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](./Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the first byte within the text."]]