Class: Google::Apis::DocsV1::Request

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 single update to apply to a document.

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) ⇒ Request

Returns a new instance of Request.



4243
4244
4245
# File 'generated/google/apis/docs_v1/classes.rb', line 4243

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

Instance Attribute Details

Creates a Footer. The new footer is applied to the SectionStyle at the location of the SectionBreak if specificed, otherwise it is applied to the DocumentStyle. If a footer of the specified type already exists, a 400 bad request error is returned. Corresponds to the JSON property createFooter



4047
4048
4049
# File 'generated/google/apis/docs_v1/classes.rb', line 4047

def create_footer
  @create_footer
end

#create_footnoteGoogle::Apis::DocsV1::CreateFootnoteRequest

Creates a Footnote segment and inserts a new FootnoteReference to it at the given location. The new Footnote segment will contain a space followed by a newline character. Corresponds to the JSON property createFootnote



4056
4057
4058
# File 'generated/google/apis/docs_v1/classes.rb', line 4056

def create_footnote
  @create_footnote
end

#create_headerGoogle::Apis::DocsV1::CreateHeaderRequest

Creates a Header. The new header is applied to the SectionStyle at the location of the SectionBreak if specificed, otherwise it is applied to the DocumentStyle. If a header of the specified type already exists, a 400 bad request error is returned. Corresponds to the JSON property createHeader



4066
4067
4068
# File 'generated/google/apis/docs_v1/classes.rb', line 4066

def create_header
  @create_header
end

#create_named_rangeGoogle::Apis::DocsV1::CreateNamedRangeRequest

Creates a NamedRange referencing the given range. Corresponds to the JSON property createNamedRange



4072
4073
4074
# File 'generated/google/apis/docs_v1/classes.rb', line 4072

def create_named_range
  @create_named_range
end

#create_paragraph_bulletsGoogle::Apis::DocsV1::CreateParagraphBulletsRequest

Creates bullets for all of the paragraphs that overlap with the given range. The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text. If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list. Corresponds to the JSON property createParagraphBullets



4084
4085
4086
# File 'generated/google/apis/docs_v1/classes.rb', line 4084

def create_paragraph_bullets
  @create_paragraph_bullets
end

#delete_content_rangeGoogle::Apis::DocsV1::DeleteContentRangeRequest

Deletes content from the document. Corresponds to the JSON property deleteContentRange



4089
4090
4091
# File 'generated/google/apis/docs_v1/classes.rb', line 4089

def delete_content_range
  @delete_content_range
end

Deletes a Footer from the document. Corresponds to the JSON property deleteFooter



4094
4095
4096
# File 'generated/google/apis/docs_v1/classes.rb', line 4094

def delete_footer
  @delete_footer
end

#delete_headerGoogle::Apis::DocsV1::DeleteHeaderRequest

Deletes a Header from the document. Corresponds to the JSON property deleteHeader



4099
4100
4101
# File 'generated/google/apis/docs_v1/classes.rb', line 4099

def delete_header
  @delete_header
end

#delete_named_rangeGoogle::Apis::DocsV1::DeleteNamedRangeRequest

Deletes a NamedRange. Corresponds to the JSON property deleteNamedRange



4104
4105
4106
# File 'generated/google/apis/docs_v1/classes.rb', line 4104

def delete_named_range
  @delete_named_range
end

#delete_paragraph_bulletsGoogle::Apis::DocsV1::DeleteParagraphBulletsRequest

Deletes bullets from all of the paragraphs that overlap with the given range. The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph. Corresponds to the JSON property deleteParagraphBullets



4111
4112
4113
# File 'generated/google/apis/docs_v1/classes.rb', line 4111

def delete_paragraph_bullets
  @delete_paragraph_bullets
end

#delete_positioned_objectGoogle::Apis::DocsV1::DeletePositionedObjectRequest

Deletes a PositionedObject from the document. Corresponds to the JSON property deletePositionedObject



4117
4118
4119
# File 'generated/google/apis/docs_v1/classes.rb', line 4117

def delete_positioned_object
  @delete_positioned_object
end

#delete_table_columnGoogle::Apis::DocsV1::DeleteTableColumnRequest

Deletes a column from a table. Corresponds to the JSON property deleteTableColumn



4122
4123
4124
# File 'generated/google/apis/docs_v1/classes.rb', line 4122

def delete_table_column
  @delete_table_column
end

#delete_table_rowGoogle::Apis::DocsV1::DeleteTableRowRequest

Deletes a row from a table. Corresponds to the JSON property deleteTableRow



4127
4128
4129
# File 'generated/google/apis/docs_v1/classes.rb', line 4127

def delete_table_row
  @delete_table_row
end

#insert_inline_imageGoogle::Apis::DocsV1::InsertInlineImageRequest

Inserts an InlineObject containing an image at the given location. Corresponds to the JSON property insertInlineImage



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

def insert_inline_image
  @insert_inline_image
end

#insert_page_breakGoogle::Apis::DocsV1::InsertPageBreakRequest

Inserts a page break followed by a newline at the specified location. Corresponds to the JSON property insertPageBreak



4138
4139
4140
# File 'generated/google/apis/docs_v1/classes.rb', line 4138

def insert_page_break
  @insert_page_break
end

#insert_section_breakGoogle::Apis::DocsV1::InsertSectionBreakRequest

Inserts a section break at the given location. A newline character will be inserted before the section break. Corresponds to the JSON property insertSectionBreak



4144
4145
4146
# File 'generated/google/apis/docs_v1/classes.rb', line 4144

def insert_section_break
  @insert_section_break
end

#insert_tableGoogle::Apis::DocsV1::InsertTableRequest

Inserts a table at the specified location. A newline character will be inserted before the inserted table. Corresponds to the JSON property insertTable



4150
4151
4152
# File 'generated/google/apis/docs_v1/classes.rb', line 4150

def insert_table
  @insert_table
end

#insert_table_columnGoogle::Apis::DocsV1::InsertTableColumnRequest

Inserts an empty column into a table. Corresponds to the JSON property insertTableColumn



4155
4156
4157
# File 'generated/google/apis/docs_v1/classes.rb', line 4155

def insert_table_column
  @insert_table_column
end

#insert_table_rowGoogle::Apis::DocsV1::InsertTableRowRequest

Inserts an empty row into a table. Corresponds to the JSON property insertTableRow



4160
4161
4162
# File 'generated/google/apis/docs_v1/classes.rb', line 4160

def insert_table_row
  @insert_table_row
end

#insert_textGoogle::Apis::DocsV1::InsertTextRequest

Inserts text at the specified location. Corresponds to the JSON property insertText



4165
4166
4167
# File 'generated/google/apis/docs_v1/classes.rb', line 4165

def insert_text
  @insert_text
end

#merge_table_cellsGoogle::Apis::DocsV1::MergeTableCellsRequest

Merges cells in a Table. Corresponds to the JSON property mergeTableCells



4170
4171
4172
# File 'generated/google/apis/docs_v1/classes.rb', line 4170

def merge_table_cells
  @merge_table_cells
end

#replace_all_textGoogle::Apis::DocsV1::ReplaceAllTextRequest

Replaces all instances of text matching a criteria with replace text. Corresponds to the JSON property replaceAllText



4175
4176
4177
# File 'generated/google/apis/docs_v1/classes.rb', line 4175

def replace_all_text
  @replace_all_text
end

#replace_imageGoogle::Apis::DocsV1::ReplaceImageRequest

Replaces an existing image with a new image. Replacing an image removes some image effects from the existing image in order to mirror the behavior of the Docs editor. Corresponds to the JSON property replaceImage



4183
4184
4185
# File 'generated/google/apis/docs_v1/classes.rb', line 4183

def replace_image
  @replace_image
end

#replace_named_range_contentGoogle::Apis::DocsV1::ReplaceNamedRangeContentRequest

Replaces the contents of the specified NamedRange or NamedRanges with the given replacement content. Note that an individual NamedRange may consist of multiple discontinuous ranges. In this case, only the content in the first range will be replaced. The other ranges and their content will be deleted. In cases where replacing or deleting any ranges would result in an invalid document structure, a 400 bad request error is returned. Corresponds to the JSON property replaceNamedRangeContent



4198
4199
4200
# File 'generated/google/apis/docs_v1/classes.rb', line 4198

def replace_named_range_content
  @replace_named_range_content
end

#unmerge_table_cellsGoogle::Apis::DocsV1::UnmergeTableCellsRequest

Unmerges cells in a Table. Corresponds to the JSON property unmergeTableCells



4203
4204
4205
# File 'generated/google/apis/docs_v1/classes.rb', line 4203

def unmerge_table_cells
  @unmerge_table_cells
end

#update_document_styleGoogle::Apis::DocsV1::UpdateDocumentStyleRequest

Updates the DocumentStyle. Corresponds to the JSON property updateDocumentStyle



4208
4209
4210
# File 'generated/google/apis/docs_v1/classes.rb', line 4208

def update_document_style
  @update_document_style
end

#update_paragraph_styleGoogle::Apis::DocsV1::UpdateParagraphStyleRequest

Update the styling of all paragraphs that overlap with the given range. Corresponds to the JSON property updateParagraphStyle



4213
4214
4215
# File 'generated/google/apis/docs_v1/classes.rb', line 4213

def update_paragraph_style
  @update_paragraph_style
end

#update_section_styleGoogle::Apis::DocsV1::UpdateSectionStyleRequest

Updates the SectionStyle. Corresponds to the JSON property updateSectionStyle



4218
4219
4220
# File 'generated/google/apis/docs_v1/classes.rb', line 4218

def update_section_style
  @update_section_style
end

#update_table_cell_styleGoogle::Apis::DocsV1::UpdateTableCellStyleRequest

Updates the style of a range of table cells. Corresponds to the JSON property updateTableCellStyle



4223
4224
4225
# File 'generated/google/apis/docs_v1/classes.rb', line 4223

def update_table_cell_style
  @update_table_cell_style
end

#update_table_column_propertiesGoogle::Apis::DocsV1::UpdateTableColumnPropertiesRequest

Updates the TableColumnProperties of columns in a table. Corresponds to the JSON property updateTableColumnProperties



4230
4231
4232
# File 'generated/google/apis/docs_v1/classes.rb', line 4230

def update_table_column_properties
  @update_table_column_properties
end

#update_table_row_styleGoogle::Apis::DocsV1::UpdateTableRowStyleRequest

Updates the TableRowStyle of rows in a table. Corresponds to the JSON property updateTableRowStyle



4236
4237
4238
# File 'generated/google/apis/docs_v1/classes.rb', line 4236

def update_table_row_style
  @update_table_row_style
end

#update_text_styleGoogle::Apis::DocsV1::UpdateTextStyleRequest

Update the styling of text. Corresponds to the JSON property updateTextStyle



4241
4242
4243
# File 'generated/google/apis/docs_v1/classes.rb', line 4241

def update_text_style
  @update_text_style
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
# File 'generated/google/apis/docs_v1/classes.rb', line 4248

def update!(**args)
  @create_footer = args[:create_footer] if args.key?(:create_footer)
  @create_footnote = args[:create_footnote] if args.key?(:create_footnote)
  @create_header = args[:create_header] if args.key?(:create_header)
  @create_named_range = args[:create_named_range] if args.key?(:create_named_range)
  @create_paragraph_bullets = args[:create_paragraph_bullets] if args.key?(:create_paragraph_bullets)
  @delete_content_range = args[:delete_content_range] if args.key?(:delete_content_range)
  @delete_footer = args[:delete_footer] if args.key?(:delete_footer)
  @delete_header = args[:delete_header] if args.key?(:delete_header)
  @delete_named_range = args[:delete_named_range] if args.key?(:delete_named_range)
  @delete_paragraph_bullets = args[:delete_paragraph_bullets] if args.key?(:delete_paragraph_bullets)
  @delete_positioned_object = args[:delete_positioned_object] if args.key?(:delete_positioned_object)
  @delete_table_column = args[:delete_table_column] if args.key?(:delete_table_column)
  @delete_table_row = args[:delete_table_row] if args.key?(:delete_table_row)
  @insert_inline_image = args[:insert_inline_image] if args.key?(:insert_inline_image)
  @insert_page_break = args[:insert_page_break] if args.key?(:insert_page_break)
  @insert_section_break = args[:insert_section_break] if args.key?(:insert_section_break)
  @insert_table = args[:insert_table] if args.key?(:insert_table)
  @insert_table_column = args[:insert_table_column] if args.key?(:insert_table_column)
  @insert_table_row = args[:insert_table_row] if args.key?(:insert_table_row)
  @insert_text = args[:insert_text] if args.key?(:insert_text)
  @merge_table_cells = args[:merge_table_cells] if args.key?(:merge_table_cells)
  @replace_all_text = args[:replace_all_text] if args.key?(:replace_all_text)
  @replace_image = args[:replace_image] if args.key?(:replace_image)
  @replace_named_range_content = args[:replace_named_range_content] if args.key?(:replace_named_range_content)
  @unmerge_table_cells = args[:unmerge_table_cells] if args.key?(:unmerge_table_cells)
  @update_document_style = args[:update_document_style] if args.key?(:update_document_style)
  @update_paragraph_style = args[:update_paragraph_style] if args.key?(:update_paragraph_style)
  @update_section_style = args[:update_section_style] if args.key?(:update_section_style)
  @update_table_cell_style = args[:update_table_cell_style] if args.key?(:update_table_cell_style)
  @update_table_column_properties = args[:update_table_column_properties] if args.key?(:update_table_column_properties)
  @update_table_row_style = args[:update_table_row_style] if args.key?(:update_table_row_style)
  @update_text_style = args[:update_text_style] if args.key?(:update_text_style)
end