Class: Google::Apis::DocsV1::StructuralElement

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

A StructuralElement describes content that provides structure to the document.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ StructuralElement

Returns a new instance of StructuralElement.



5163
5164
5165
# File 'lib/google/apis/docs_v1/classes.rb', line 5163

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

Instance Attribute Details

#end_indexFixnum

The zero-based end index of this structural element, exclusive, in UTF-16 code units. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


5132
5133
5134
# File 'lib/google/apis/docs_v1/classes.rb', line 5132

def end_index
  @end_index
end

#paragraphGoogle::Apis::DocsV1::Paragraph

A StructuralElement representing a paragraph. A paragraph is a range of content that's terminated with a newline character. Corresponds to the JSON property paragraph



5138
5139
5140
# File 'lib/google/apis/docs_v1/classes.rb', line 5138

def paragraph
  @paragraph
end

#section_breakGoogle::Apis::DocsV1::SectionBreak

A StructuralElement representing a section break. A section is a range of content that has the same SectionStyle. A section break represents the start of a new section, and the section style applies to the section after the section break. The document body always begins with a section break. Corresponds to the JSON property sectionBreak



5146
5147
5148
# File 'lib/google/apis/docs_v1/classes.rb', line 5146

def section_break
  @section_break
end

#start_indexFixnum

The zero-based start index of this structural element, in UTF-16 code units. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


5151
5152
5153
# File 'lib/google/apis/docs_v1/classes.rb', line 5151

def start_index
  @start_index
end

#tableGoogle::Apis::DocsV1::Table

A StructuralElement representing a table. Corresponds to the JSON property table



5156
5157
5158
# File 'lib/google/apis/docs_v1/classes.rb', line 5156

def table
  @table
end

#table_of_contentsGoogle::Apis::DocsV1::TableOfContents

A StructuralElement representing a table of contents. Corresponds to the JSON property tableOfContents



5161
5162
5163
# File 'lib/google/apis/docs_v1/classes.rb', line 5161

def table_of_contents
  @table_of_contents
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5168
5169
5170
5171
5172
5173
5174
5175
# File 'lib/google/apis/docs_v1/classes.rb', line 5168

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @paragraph = args[:paragraph] if args.key?(:paragraph)
  @section_break = args[:section_break] if args.key?(:section_break)
  @start_index = args[:start_index] if args.key?(:start_index)
  @table = args[:table] if args.key?(:table)
  @table_of_contents = args[:table_of_contents] if args.key?(:table_of_contents)
end