Class: Google::Apis::DocsV1::Document

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 Google Docs 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) ⇒ Document

Returns a new instance of Document



889
890
891
# File 'generated/google/apis/docs_v1/classes.rb', line 889

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

Instance Attribute Details

#bodyGoogle::Apis::DocsV1::Body

The document body. The body typically contains the full document contents except for headers, footers and footnotes. Corresponds to the JSON property body



796
797
798
# File 'generated/google/apis/docs_v1/classes.rb', line 796

def body
  @body
end

#document_idString

Output only. The ID of the document. Corresponds to the JSON property documentId

Returns:

  • (String)


801
802
803
# File 'generated/google/apis/docs_v1/classes.rb', line 801

def document_id
  @document_id
end

#document_styleGoogle::Apis::DocsV1::DocumentStyle

The style of the document. Corresponds to the JSON property documentStyle



806
807
808
# File 'generated/google/apis/docs_v1/classes.rb', line 806

def document_style
  @document_style
end

#footersHash<String,Google::Apis::DocsV1::Footer>

Output only. The footers in the document, keyed by footer ID. Corresponds to the JSON property footers

Returns:



811
812
813
# File 'generated/google/apis/docs_v1/classes.rb', line 811

def footers
  @footers
end

#footnotesHash<String,Google::Apis::DocsV1::Footnote>

Output only. The footnotes in the document, keyed by footnote ID. Corresponds to the JSON property footnotes

Returns:



816
817
818
# File 'generated/google/apis/docs_v1/classes.rb', line 816

def footnotes
  @footnotes
end

#headersHash<String,Google::Apis::DocsV1::Header>

Output only. The headers in the document, keyed by header ID. Corresponds to the JSON property headers

Returns:



821
822
823
# File 'generated/google/apis/docs_v1/classes.rb', line 821

def headers
  @headers
end

#inline_objectsHash<String,Google::Apis::DocsV1::InlineObject>

Output only. The inline objects in the document, keyed by object ID. Corresponds to the JSON property inlineObjects

Returns:



826
827
828
# File 'generated/google/apis/docs_v1/classes.rb', line 826

def inline_objects
  @inline_objects
end

#listsHash<String,Google::Apis::DocsV1::List>

Output only. The lists in the document, keyed by list ID. Corresponds to the JSON property lists

Returns:



831
832
833
# File 'generated/google/apis/docs_v1/classes.rb', line 831

def lists
  @lists
end

#named_rangesHash<String,Google::Apis::DocsV1::NamedRanges>

Output only. The named ranges in the document, keyed by name. Corresponds to the JSON property namedRanges

Returns:



836
837
838
# File 'generated/google/apis/docs_v1/classes.rb', line 836

def named_ranges
  @named_ranges
end

#named_stylesGoogle::Apis::DocsV1::NamedStyles

The named styles. Paragraphs in the document can inherit their TextStyle and ParagraphStyle from these named styles. Corresponds to the JSON property namedStyles



843
844
845
# File 'generated/google/apis/docs_v1/classes.rb', line 843

def named_styles
  @named_styles
end

#positioned_objectsHash<String,Google::Apis::DocsV1::PositionedObject>

Output only. The positioned objects in the document, keyed by object ID. Corresponds to the JSON property positionedObjects

Returns:



848
849
850
# File 'generated/google/apis/docs_v1/classes.rb', line 848

def positioned_objects
  @positioned_objects
end

#revision_idString

Output only. The revision ID of the document. Can be used in update requests to specify which revision of a document to apply updates to and how the request should behave if the document has been edited since that revision. Only populated if the user has edit access to the document. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the document has not changed. Conversely, a changed ID (for the same document and user) usually means the document has been updated; however, a changed ID can also be due to internal factors such as ID format changes. Corresponds to the JSON property revisionId

Returns:

  • (String)


863
864
865
# File 'generated/google/apis/docs_v1/classes.rb', line 863

def revision_id
  @revision_id
end

#suggested_document_style_changesHash<String,Google::Apis::DocsV1::SuggestedDocumentStyle>

Output only. The suggested changes to the style of the document, keyed by suggestion ID. Corresponds to the JSON property suggestedDocumentStyleChanges



869
870
871
# File 'generated/google/apis/docs_v1/classes.rb', line 869

def suggested_document_style_changes
  @suggested_document_style_changes
end

#suggested_named_styles_changesHash<String,Google::Apis::DocsV1::SuggestedNamedStyles>

Output only. The suggested changes to the named styles of the document, keyed by suggestion ID. Corresponds to the JSON property suggestedNamedStylesChanges



875
876
877
# File 'generated/google/apis/docs_v1/classes.rb', line 875

def suggested_named_styles_changes
  @suggested_named_styles_changes
end

#suggestions_view_modeString

Output only. The suggestions view mode applied to the document. Note: When editing a document, changes must be based on a document with SUGGESTIONS_INLINE. Corresponds to the JSON property suggestionsViewMode

Returns:

  • (String)


882
883
884
# File 'generated/google/apis/docs_v1/classes.rb', line 882

def suggestions_view_mode
  @suggestions_view_mode
end

#titleString

The title of the document. Corresponds to the JSON property title

Returns:

  • (String)


887
888
889
# File 'generated/google/apis/docs_v1/classes.rb', line 887

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
# File 'generated/google/apis/docs_v1/classes.rb', line 894

def update!(**args)
  @body = args[:body] if args.key?(:body)
  @document_id = args[:document_id] if args.key?(:document_id)
  @document_style = args[:document_style] if args.key?(:document_style)
  @footers = args[:footers] if args.key?(:footers)
  @footnotes = args[:footnotes] if args.key?(:footnotes)
  @headers = args[:headers] if args.key?(:headers)
  @inline_objects = args[:inline_objects] if args.key?(:inline_objects)
  @lists = args[:lists] if args.key?(:lists)
  @named_ranges = args[:named_ranges] if args.key?(:named_ranges)
  @named_styles = args[:named_styles] if args.key?(:named_styles)
  @positioned_objects = args[:positioned_objects] if args.key?(:positioned_objects)
  @revision_id = args[:revision_id] if args.key?(:revision_id)
  @suggested_document_style_changes = args[:suggested_document_style_changes] if args.key?(:suggested_document_style_changes)
  @suggested_named_styles_changes = args[:suggested_named_styles_changes] if args.key?(:suggested_named_styles_changes)
  @suggestions_view_mode = args[:suggestions_view_mode] if args.key?(:suggestions_view_mode)
  @title = args[:title] if args.key?(:title)
end