Class: Google::Apis::DocsV1::Range

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/docs_v1/classes.rb,
lib/google/apis/docs_v1/representations.rb,
lib/google/apis/docs_v1/representations.rb

Overview

Specifies a contiguous range of text.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Range

Returns a new instance of Range.



4158
4159
4160
# File 'lib/google/apis/docs_v1/classes.rb', line 4158

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#end_indexFixnum

The zero-based end index of this range, exclusive, in UTF-16 code units. In all current uses, an end index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


4133
4134
4135
# File 'lib/google/apis/docs_v1/classes.rb', line 4133

def end_index
  @end_index
end

#segment_idString

The ID of the header, footer, or footnote that this range is contained in. An empty segment ID signifies the document's body. Corresponds to the JSON property segmentId

Returns:

  • (String)


4139
4140
4141
# File 'lib/google/apis/docs_v1/classes.rb', line 4139

def segment_id
  @segment_id
end

#start_indexFixnum

The zero-based start index of this range, in UTF-16 code units. In all current uses, a start index must be provided. This field is an Int32Value in order to accommodate future use cases with open-ended ranges. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


4146
4147
4148
# File 'lib/google/apis/docs_v1/classes.rb', line 4146

def start_index
  @start_index
end

#tab_idString

The tab that contains this range. When omitted, the request applies to the first tab. In a document containing a single tab: - If provided, must match the singular tab's ID. - If omitted, the request applies to the singular tab. In a document containing multiple tabs: - If provided, the request applies to the specified tab. - If omitted, the request applies to the first tab in the document. Corresponds to the JSON property tabId

Returns:

  • (String)


4156
4157
4158
# File 'lib/google/apis/docs_v1/classes.rb', line 4156

def tab_id
  @tab_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4163
4164
4165
4166
4167
4168
# File 'lib/google/apis/docs_v1/classes.rb', line 4163

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @segment_id = args[:segment_id] if args.key?(:segment_id)
  @start_index = args[:start_index] if args.key?(:start_index)
  @tab_id = args[:tab_id] if args.key?(:tab_id)
end