# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::TextLocator (v1.10.0)

1.10.0 (latest) 1.9.0 1.8.0 1.7.1 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.18.0 0.17.0 0.16.0 0.15.2 0.14.0 0.13.0 0.12.1 0.11.0 0.10.0 0.9.0 0.8.0 0.7.1 Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::TextLocator.

A locator for text. Indicates a particular part of the text of a request or
of an object referenced in the request.


For example, suppose the request field `text` contains:

text: "The quick brown fox jumps over the lazy dog."

Then the locator:

source: "text"
start_position {
line: 1
column: 17
}
end_position {
line: 1
column: 19
}

<br />

refers to the part of the text: "fox".

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #end_position

    def end_position() -> ::Google::Cloud::Monitoring::V3::TextLocator::Position

**Returns**

- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the last byte within the text.

### #end_position=

    def end_position=(value) -> ::Google::Cloud::Monitoring::V3::TextLocator::Position

**Parameter**

- **value** ([::Google::Cloud::Monitoring::V3::TextLocator::Position](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the last byte within the text.
**Returns**

- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the last byte within the text.

### #nested_locator

    def nested_locator() -> ::Google::Cloud::Monitoring::V3::TextLocator

**Returns**

- ([::Google::Cloud::Monitoring::V3::TextLocator](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/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.

### #nested_locator=

    def nested_locator=(value) -> ::Google::Cloud::Monitoring::V3::TextLocator

**Parameter**

- **value** ([::Google::Cloud::Monitoring::V3::TextLocator](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/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](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/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

    def nesting_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=

    def nesting_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

    def source() -> ::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=

    def source=(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).

### #start_position

    def start_position() -> ::Google::Cloud::Monitoring::V3::TextLocator::Position

**Returns**

- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the first byte within the text.

### #start_position=

    def start_position=(value) -> ::Google::Cloud::Monitoring::V3::TextLocator::Position

**Parameter**

- **value** ([::Google::Cloud::Monitoring::V3::TextLocator::Position](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the first byte within the text.
**Returns**

- ([::Google::Cloud::Monitoring::V3::TextLocator::Position](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-monitoring-v3/latest/Google-Cloud-Monitoring-V3-TextLocator-Position)) --- The position of the first byte within the text.