Class: Google::Apis::DocsV1::TextRun

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

Overview

A ParagraphElement that represents a run of text that all has the same styling.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ TextRun

Returns a new instance of TextRun.



5822
5823
5824
# File 'generated/google/apis/docs_v1/classes.rb', line 5822

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

Instance Attribute Details

#contentString

The text of this run. Any non-text elements in the run are replaced with the Unicode character U+E907. Corresponds to the JSON property content

Returns:

  • (String)


5784
5785
5786
# File 'generated/google/apis/docs_v1/classes.rb', line 5784

def content
  @content
end

#suggested_deletion_idsArray<String>

The suggested deletion IDs. If empty, then there are no suggested deletions of this content. Corresponds to the JSON property suggestedDeletionIds

Returns:

  • (Array<String>)


5790
5791
5792
# File 'generated/google/apis/docs_v1/classes.rb', line 5790

def suggested_deletion_ids
  @suggested_deletion_ids
end

#suggested_insertion_idsArray<String>

The suggested insertion IDs. A TextRun may have multiple insertion IDs if it is a nested suggested change. If empty, then this is not a suggested insertion. Corresponds to the JSON property suggestedInsertionIds

Returns:

  • (Array<String>)


5797
5798
5799
# File 'generated/google/apis/docs_v1/classes.rb', line 5797

def suggested_insertion_ids
  @suggested_insertion_ids
end

#suggested_text_style_changesHash<String,Google::Apis::DocsV1::SuggestedTextStyle>

The suggested text style changes to this run, keyed by suggestion ID. Corresponds to the JSON property suggestedTextStyleChanges



5802
5803
5804
# File 'generated/google/apis/docs_v1/classes.rb', line 5802

def suggested_text_style_changes
  @suggested_text_style_changes
end

#text_styleGoogle::Apis::DocsV1::TextStyle

Represents the styling that can be applied to text. Inherited text styles are represented as unset fields in this message. A text style's parent depends on where the text style is defined:

  • The TextStyle of text in a Paragraph inherits from the paragraph's corresponding named style type.
  • The TextStyle on a named style inherits from the normal text named style.
  • The TextStyle of the normal text named style inherits from the default text style in the Docs editor.
  • The TextStyle on a Paragraph element that is contained in a table may inherit its text style from the table style. If the text style does not inherit from a parent, unsetting fields will revert the style to a value matching the defaults in the Docs editor. Corresponds to the JSON property textStyle


5820
5821
5822
# File 'generated/google/apis/docs_v1/classes.rb', line 5820

def text_style
  @text_style
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5827
5828
5829
5830
5831
5832
5833
# File 'generated/google/apis/docs_v1/classes.rb', line 5827

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @suggested_deletion_ids = args[:suggested_deletion_ids] if args.key?(:suggested_deletion_ids)
  @suggested_insertion_ids = args[:suggested_insertion_ids] if args.key?(:suggested_insertion_ids)
  @suggested_text_style_changes = args[:suggested_text_style_changes] if args.key?(:suggested_text_style_changes)
  @text_style = args[:text_style] if args.key?(:text_style)
end