Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

6848 řádky
276 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package docs provides access to the Google Docs API.
  6. //
  7. // For product documentation, see: https://developers.google.com/docs/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/docs/v1"
  14. // ...
  15. // ctx := context.Background()
  16. // docsService, err := docs.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // docsService, err := docs.NewService(ctx, option.WithScopes(docs.DriveReadonlyScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // docsService, err := docs.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // docsService, err := docs.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package docs // import "google.golang.org/api/docs/v1"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "docs:v1"
  71. const apiName = "docs"
  72. const apiVersion = "v1"
  73. const basePath = "https://docs.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your Google Docs documents
  77. DocumentsScope = "https://www.googleapis.com/auth/documents"
  78. // View your Google Docs documents
  79. DocumentsReadonlyScope = "https://www.googleapis.com/auth/documents.readonly"
  80. // See, edit, create, and delete all of your Google Drive files
  81. DriveScope = "https://www.googleapis.com/auth/drive"
  82. // View and manage Google Drive files and folders that you have opened
  83. // or created with this app
  84. DriveFileScope = "https://www.googleapis.com/auth/drive.file"
  85. // See and download all your Google Drive files
  86. DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
  87. )
  88. // NewService creates a new Service.
  89. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  90. scopesOption := option.WithScopes(
  91. "https://www.googleapis.com/auth/documents",
  92. "https://www.googleapis.com/auth/documents.readonly",
  93. "https://www.googleapis.com/auth/drive",
  94. "https://www.googleapis.com/auth/drive.file",
  95. "https://www.googleapis.com/auth/drive.readonly",
  96. )
  97. // NOTE: prepend, so we don't override user-specified scopes.
  98. opts = append([]option.ClientOption{scopesOption}, opts...)
  99. client, endpoint, err := htransport.NewClient(ctx, opts...)
  100. if err != nil {
  101. return nil, err
  102. }
  103. s, err := New(client)
  104. if err != nil {
  105. return nil, err
  106. }
  107. if endpoint != "" {
  108. s.BasePath = endpoint
  109. }
  110. return s, nil
  111. }
  112. // New creates a new Service. It uses the provided http.Client for requests.
  113. //
  114. // Deprecated: please use NewService instead.
  115. // To provide a custom HTTP client, use option.WithHTTPClient.
  116. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  117. func New(client *http.Client) (*Service, error) {
  118. if client == nil {
  119. return nil, errors.New("client is nil")
  120. }
  121. s := &Service{client: client, BasePath: basePath}
  122. s.Documents = NewDocumentsService(s)
  123. return s, nil
  124. }
  125. type Service struct {
  126. client *http.Client
  127. BasePath string // API endpoint base URL
  128. UserAgent string // optional additional User-Agent fragment
  129. Documents *DocumentsService
  130. }
  131. func (s *Service) userAgent() string {
  132. if s.UserAgent == "" {
  133. return googleapi.UserAgent
  134. }
  135. return googleapi.UserAgent + " " + s.UserAgent
  136. }
  137. func NewDocumentsService(s *Service) *DocumentsService {
  138. rs := &DocumentsService{s: s}
  139. return rs
  140. }
  141. type DocumentsService struct {
  142. s *Service
  143. }
  144. // AutoText: A ParagraphElement representing a
  145. // spot in the text that is dynamically replaced with content that can
  146. // change
  147. // over time, like a page number.
  148. type AutoText struct {
  149. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  150. // there are no suggested deletions
  151. // of this content.
  152. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  153. // SuggestedInsertionIds: The suggested insertion IDs. An AutoText
  154. // may have multiple insertion IDs if it is a nested suggested change.
  155. // If
  156. // empty, then this is not a suggested insertion.
  157. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  158. // SuggestedTextStyleChanges: The suggested text style changes to this
  159. // AutoText, keyed by suggestion ID.
  160. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  161. // TextStyle: The text style of this AutoText.
  162. TextStyle *TextStyle `json:"textStyle,omitempty"`
  163. // Type: The type of this auto text.
  164. //
  165. // Possible values:
  166. // "TYPE_UNSPECIFIED" - An unspecified auto text type.
  167. // "PAGE_NUMBER" - Type for auto text that represents the current page
  168. // number.
  169. // "PAGE_COUNT" - Type for auto text that represents the total number
  170. // of pages in the
  171. // document.
  172. Type string `json:"type,omitempty"`
  173. // ForceSendFields is a list of field names (e.g.
  174. // "SuggestedDeletionIds") to unconditionally include in API requests.
  175. // By default, fields with empty values are omitted from API requests.
  176. // However, any non-pointer, non-interface field appearing in
  177. // ForceSendFields will be sent to the server regardless of whether the
  178. // field is empty or not. This may be used to include empty fields in
  179. // Patch requests.
  180. ForceSendFields []string `json:"-"`
  181. // NullFields is a list of field names (e.g. "SuggestedDeletionIds") to
  182. // include in API requests with the JSON null value. By default, fields
  183. // with empty values are omitted from API requests. However, any field
  184. // with an empty value appearing in NullFields will be sent to the
  185. // server as null. It is an error if a field in this list has a
  186. // non-empty value. This may be used to include null fields in Patch
  187. // requests.
  188. NullFields []string `json:"-"`
  189. }
  190. func (s *AutoText) MarshalJSON() ([]byte, error) {
  191. type NoMethod AutoText
  192. raw := NoMethod(*s)
  193. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  194. }
  195. // Background: Represents the background of a document.
  196. type Background struct {
  197. // Color: The background color.
  198. Color *OptionalColor `json:"color,omitempty"`
  199. // ForceSendFields is a list of field names (e.g. "Color") to
  200. // unconditionally include in API requests. By default, fields with
  201. // empty values are omitted from API requests. However, any non-pointer,
  202. // non-interface field appearing in ForceSendFields will be sent to the
  203. // server regardless of whether the field is empty or not. This may be
  204. // used to include empty fields in Patch requests.
  205. ForceSendFields []string `json:"-"`
  206. // NullFields is a list of field names (e.g. "Color") to include in API
  207. // requests with the JSON null value. By default, fields with empty
  208. // values are omitted from API requests. However, any field with an
  209. // empty value appearing in NullFields will be sent to the server as
  210. // null. It is an error if a field in this list has a non-empty value.
  211. // This may be used to include null fields in Patch requests.
  212. NullFields []string `json:"-"`
  213. }
  214. func (s *Background) MarshalJSON() ([]byte, error) {
  215. type NoMethod Background
  216. raw := NoMethod(*s)
  217. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  218. }
  219. // BackgroundSuggestionState: A mask that indicates which of the fields
  220. // on the base Background have been changed in this suggestion.
  221. // For any field set to true, the Backgound has a new suggested value.
  222. type BackgroundSuggestionState struct {
  223. // BackgroundColorSuggested: Indicates whether the current background
  224. // color has been modified in this
  225. // suggestion.
  226. BackgroundColorSuggested bool `json:"backgroundColorSuggested,omitempty"`
  227. // ForceSendFields is a list of field names (e.g.
  228. // "BackgroundColorSuggested") to unconditionally include in API
  229. // requests. By default, fields with empty values are omitted from API
  230. // requests. However, any non-pointer, non-interface field appearing in
  231. // ForceSendFields will be sent to the server regardless of whether the
  232. // field is empty or not. This may be used to include empty fields in
  233. // Patch requests.
  234. ForceSendFields []string `json:"-"`
  235. // NullFields is a list of field names (e.g. "BackgroundColorSuggested")
  236. // to include in API requests with the JSON null value. By default,
  237. // fields with empty values are omitted from API requests. However, any
  238. // field with an empty value appearing in NullFields will be sent to the
  239. // server as null. It is an error if a field in this list has a
  240. // non-empty value. This may be used to include null fields in Patch
  241. // requests.
  242. NullFields []string `json:"-"`
  243. }
  244. func (s *BackgroundSuggestionState) MarshalJSON() ([]byte, error) {
  245. type NoMethod BackgroundSuggestionState
  246. raw := NoMethod(*s)
  247. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  248. }
  249. // BatchUpdateDocumentRequest: Request message for BatchUpdateDocument.
  250. type BatchUpdateDocumentRequest struct {
  251. // Requests: A list of updates to apply to the document.
  252. Requests []*Request `json:"requests,omitempty"`
  253. // WriteControl: Provides control over how write requests are executed.
  254. WriteControl *WriteControl `json:"writeControl,omitempty"`
  255. // ForceSendFields is a list of field names (e.g. "Requests") to
  256. // unconditionally include in API requests. By default, fields with
  257. // empty values are omitted from API requests. However, any non-pointer,
  258. // non-interface field appearing in ForceSendFields will be sent to the
  259. // server regardless of whether the field is empty or not. This may be
  260. // used to include empty fields in Patch requests.
  261. ForceSendFields []string `json:"-"`
  262. // NullFields is a list of field names (e.g. "Requests") to include in
  263. // API requests with the JSON null value. By default, fields with empty
  264. // values are omitted from API requests. However, any field with an
  265. // empty value appearing in NullFields will be sent to the server as
  266. // null. It is an error if a field in this list has a non-empty value.
  267. // This may be used to include null fields in Patch requests.
  268. NullFields []string `json:"-"`
  269. }
  270. func (s *BatchUpdateDocumentRequest) MarshalJSON() ([]byte, error) {
  271. type NoMethod BatchUpdateDocumentRequest
  272. raw := NoMethod(*s)
  273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  274. }
  275. // BatchUpdateDocumentResponse: Response message from a
  276. // BatchUpdateDocument request.
  277. type BatchUpdateDocumentResponse struct {
  278. // DocumentId: The ID of the document to which the updates were applied
  279. // to.
  280. DocumentId string `json:"documentId,omitempty"`
  281. // Replies: The reply of the updates. This maps 1:1 with the updates,
  282. // although replies
  283. // to some requests may be empty.
  284. Replies []*Response `json:"replies,omitempty"`
  285. // WriteControl: The updated write control after applying the request.
  286. WriteControl *WriteControl `json:"writeControl,omitempty"`
  287. // ServerResponse contains the HTTP response code and headers from the
  288. // server.
  289. googleapi.ServerResponse `json:"-"`
  290. // ForceSendFields is a list of field names (e.g. "DocumentId") to
  291. // unconditionally include in API requests. By default, fields with
  292. // empty values are omitted from API requests. However, any non-pointer,
  293. // non-interface field appearing in ForceSendFields will be sent to the
  294. // server regardless of whether the field is empty or not. This may be
  295. // used to include empty fields in Patch requests.
  296. ForceSendFields []string `json:"-"`
  297. // NullFields is a list of field names (e.g. "DocumentId") to include in
  298. // API requests with the JSON null value. By default, fields with empty
  299. // values are omitted from API requests. However, any field with an
  300. // empty value appearing in NullFields will be sent to the server as
  301. // null. It is an error if a field in this list has a non-empty value.
  302. // This may be used to include null fields in Patch requests.
  303. NullFields []string `json:"-"`
  304. }
  305. func (s *BatchUpdateDocumentResponse) MarshalJSON() ([]byte, error) {
  306. type NoMethod BatchUpdateDocumentResponse
  307. raw := NoMethod(*s)
  308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  309. }
  310. // Body: The document body.
  311. //
  312. // The body typically contains the full document contents except
  313. // for
  314. // headers, footers
  315. // and footnotes.
  316. type Body struct {
  317. // Content: The contents of the body.
  318. //
  319. // The indexes for the body's content begin at zero.
  320. Content []*StructuralElement `json:"content,omitempty"`
  321. // ForceSendFields is a list of field names (e.g. "Content") to
  322. // unconditionally include in API requests. By default, fields with
  323. // empty values are omitted from API requests. However, any non-pointer,
  324. // non-interface field appearing in ForceSendFields will be sent to the
  325. // server regardless of whether the field is empty or not. This may be
  326. // used to include empty fields in Patch requests.
  327. ForceSendFields []string `json:"-"`
  328. // NullFields is a list of field names (e.g. "Content") to include in
  329. // API requests with the JSON null value. By default, fields with empty
  330. // values are omitted from API requests. However, any field with an
  331. // empty value appearing in NullFields will be sent to the server as
  332. // null. It is an error if a field in this list has a non-empty value.
  333. // This may be used to include null fields in Patch requests.
  334. NullFields []string `json:"-"`
  335. }
  336. func (s *Body) MarshalJSON() ([]byte, error) {
  337. type NoMethod Body
  338. raw := NoMethod(*s)
  339. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  340. }
  341. // Bullet: Describes the bullet of a paragraph.
  342. type Bullet struct {
  343. // ListId: The ID of the list this paragraph belongs to.
  344. ListId string `json:"listId,omitempty"`
  345. // NestingLevel: The nesting level of this paragraph in the list.
  346. NestingLevel int64 `json:"nestingLevel,omitempty"`
  347. // TextStyle: The paragraph specific text style applied to this bullet.
  348. TextStyle *TextStyle `json:"textStyle,omitempty"`
  349. // ForceSendFields is a list of field names (e.g. "ListId") to
  350. // unconditionally include in API requests. By default, fields with
  351. // empty values are omitted from API requests. However, any non-pointer,
  352. // non-interface field appearing in ForceSendFields will be sent to the
  353. // server regardless of whether the field is empty or not. This may be
  354. // used to include empty fields in Patch requests.
  355. ForceSendFields []string `json:"-"`
  356. // NullFields is a list of field names (e.g. "ListId") to include in API
  357. // requests with the JSON null value. By default, fields with empty
  358. // values are omitted from API requests. However, any field with an
  359. // empty value appearing in NullFields will be sent to the server as
  360. // null. It is an error if a field in this list has a non-empty value.
  361. // This may be used to include null fields in Patch requests.
  362. NullFields []string `json:"-"`
  363. }
  364. func (s *Bullet) MarshalJSON() ([]byte, error) {
  365. type NoMethod Bullet
  366. raw := NoMethod(*s)
  367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  368. }
  369. // BulletSuggestionState: A mask that indicates which of the fields on
  370. // the base
  371. // Bullet have been changed in this suggestion.
  372. // For any field set to true, there is a new suggested value.
  373. type BulletSuggestionState struct {
  374. // ListIdSuggested: Indicates if there was a suggested change to
  375. // the
  376. // list_id.
  377. ListIdSuggested bool `json:"listIdSuggested,omitempty"`
  378. // NestingLevelSuggested: Indicates if there was a suggested change to
  379. // the
  380. // nesting_level.
  381. NestingLevelSuggested bool `json:"nestingLevelSuggested,omitempty"`
  382. // TextStyleSuggestionState: A mask that indicates which of the fields
  383. // in text style have been changed in this
  384. // suggestion.
  385. TextStyleSuggestionState *TextStyleSuggestionState `json:"textStyleSuggestionState,omitempty"`
  386. // ForceSendFields is a list of field names (e.g. "ListIdSuggested") to
  387. // unconditionally include in API requests. By default, fields with
  388. // empty values are omitted from API requests. However, any non-pointer,
  389. // non-interface field appearing in ForceSendFields will be sent to the
  390. // server regardless of whether the field is empty or not. This may be
  391. // used to include empty fields in Patch requests.
  392. ForceSendFields []string `json:"-"`
  393. // NullFields is a list of field names (e.g. "ListIdSuggested") to
  394. // include in API requests with the JSON null value. By default, fields
  395. // with empty values are omitted from API requests. However, any field
  396. // with an empty value appearing in NullFields will be sent to the
  397. // server as null. It is an error if a field in this list has a
  398. // non-empty value. This may be used to include null fields in Patch
  399. // requests.
  400. NullFields []string `json:"-"`
  401. }
  402. func (s *BulletSuggestionState) MarshalJSON() ([]byte, error) {
  403. type NoMethod BulletSuggestionState
  404. raw := NoMethod(*s)
  405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  406. }
  407. // Color: A solid color.
  408. type Color struct {
  409. // RgbColor: The RGB color value.
  410. RgbColor *RgbColor `json:"rgbColor,omitempty"`
  411. // ForceSendFields is a list of field names (e.g. "RgbColor") to
  412. // unconditionally include in API requests. By default, fields with
  413. // empty values are omitted from API requests. However, any non-pointer,
  414. // non-interface field appearing in ForceSendFields will be sent to the
  415. // server regardless of whether the field is empty or not. This may be
  416. // used to include empty fields in Patch requests.
  417. ForceSendFields []string `json:"-"`
  418. // NullFields is a list of field names (e.g. "RgbColor") to include in
  419. // API requests with the JSON null value. By default, fields with empty
  420. // values are omitted from API requests. However, any field with an
  421. // empty value appearing in NullFields will be sent to the server as
  422. // null. It is an error if a field in this list has a non-empty value.
  423. // This may be used to include null fields in Patch requests.
  424. NullFields []string `json:"-"`
  425. }
  426. func (s *Color) MarshalJSON() ([]byte, error) {
  427. type NoMethod Color
  428. raw := NoMethod(*s)
  429. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  430. }
  431. // ColumnBreak: A ParagraphElement representing a
  432. // column break. A column break makes the subsequent text start at the
  433. // top of
  434. // the next column.
  435. type ColumnBreak struct {
  436. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  437. // there are no suggested deletions
  438. // of this content.
  439. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  440. // SuggestedInsertionIds: The suggested insertion IDs. A ColumnBreak may
  441. // have multiple insertion IDs if it is
  442. // a nested suggested change. If empty, then this is not a
  443. // suggested
  444. // insertion.
  445. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  446. // SuggestedTextStyleChanges: The suggested text style changes to this
  447. // ColumnBreak, keyed by suggestion
  448. // ID.
  449. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  450. // TextStyle: The text style of this ColumnBreak.
  451. //
  452. // Similar to text content, like text runs and footnote references, the
  453. // text
  454. // style of a column break can affect content layout as well as the
  455. // styling of
  456. // text inserted adjacent to it.
  457. TextStyle *TextStyle `json:"textStyle,omitempty"`
  458. // ForceSendFields is a list of field names (e.g.
  459. // "SuggestedDeletionIds") to unconditionally include in API requests.
  460. // By default, fields with empty values are omitted from API requests.
  461. // However, any non-pointer, non-interface field appearing in
  462. // ForceSendFields will be sent to the server regardless of whether the
  463. // field is empty or not. This may be used to include empty fields in
  464. // Patch requests.
  465. ForceSendFields []string `json:"-"`
  466. // NullFields is a list of field names (e.g. "SuggestedDeletionIds") to
  467. // include in API requests with the JSON null value. By default, fields
  468. // with empty values are omitted from API requests. However, any field
  469. // with an empty value appearing in NullFields will be sent to the
  470. // server as null. It is an error if a field in this list has a
  471. // non-empty value. This may be used to include null fields in Patch
  472. // requests.
  473. NullFields []string `json:"-"`
  474. }
  475. func (s *ColumnBreak) MarshalJSON() ([]byte, error) {
  476. type NoMethod ColumnBreak
  477. raw := NoMethod(*s)
  478. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  479. }
  480. // CreateNamedRangeRequest: Creates a NamedRange referencing the
  481. // given
  482. // range.
  483. type CreateNamedRangeRequest struct {
  484. // Name: The name of the NamedRange. Names do not need to be
  485. // unique.
  486. //
  487. // Names must be at least 1 character and no more than 256
  488. // characters,
  489. // measured in UTF-16 code units.
  490. Name string `json:"name,omitempty"`
  491. // Range: The range to apply the name to.
  492. Range *Range `json:"range,omitempty"`
  493. // ForceSendFields is a list of field names (e.g. "Name") to
  494. // unconditionally include in API requests. By default, fields with
  495. // empty values are omitted from API requests. However, any non-pointer,
  496. // non-interface field appearing in ForceSendFields will be sent to the
  497. // server regardless of whether the field is empty or not. This may be
  498. // used to include empty fields in Patch requests.
  499. ForceSendFields []string `json:"-"`
  500. // NullFields is a list of field names (e.g. "Name") to include in API
  501. // requests with the JSON null value. By default, fields with empty
  502. // values are omitted from API requests. However, any field with an
  503. // empty value appearing in NullFields will be sent to the server as
  504. // null. It is an error if a field in this list has a non-empty value.
  505. // This may be used to include null fields in Patch requests.
  506. NullFields []string `json:"-"`
  507. }
  508. func (s *CreateNamedRangeRequest) MarshalJSON() ([]byte, error) {
  509. type NoMethod CreateNamedRangeRequest
  510. raw := NoMethod(*s)
  511. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  512. }
  513. // CreateNamedRangeResponse: The result of creating a named range.
  514. type CreateNamedRangeResponse struct {
  515. // NamedRangeId: The ID of the created named range.
  516. NamedRangeId string `json:"namedRangeId,omitempty"`
  517. // ForceSendFields is a list of field names (e.g. "NamedRangeId") to
  518. // unconditionally include in API requests. By default, fields with
  519. // empty values are omitted from API requests. However, any non-pointer,
  520. // non-interface field appearing in ForceSendFields will be sent to the
  521. // server regardless of whether the field is empty or not. This may be
  522. // used to include empty fields in Patch requests.
  523. ForceSendFields []string `json:"-"`
  524. // NullFields is a list of field names (e.g. "NamedRangeId") to include
  525. // in API requests with the JSON null value. By default, fields with
  526. // empty values are omitted from API requests. However, any field with
  527. // an empty value appearing in NullFields will be sent to the server as
  528. // null. It is an error if a field in this list has a non-empty value.
  529. // This may be used to include null fields in Patch requests.
  530. NullFields []string `json:"-"`
  531. }
  532. func (s *CreateNamedRangeResponse) MarshalJSON() ([]byte, error) {
  533. type NoMethod CreateNamedRangeResponse
  534. raw := NoMethod(*s)
  535. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  536. }
  537. // CreateParagraphBulletsRequest: Creates bullets for all of the
  538. // paragraphs that overlap with the given range.
  539. //
  540. // The nesting level of each paragraph will be determined by counting
  541. // leading
  542. // tabs in front of each paragraph. To avoid excess space between the
  543. // bullet and
  544. // the corresponding paragraph, these leading tabs are removed by this
  545. // request.
  546. // This may change the indices of parts of the text.
  547. //
  548. // If the paragraph immediately before paragraphs being updated is in a
  549. // list
  550. // with a matching preset, the paragraphs being updated are added to
  551. // that
  552. // preceding list.
  553. type CreateParagraphBulletsRequest struct {
  554. // BulletPreset: The kinds of bullet glyphs to be used.
  555. //
  556. // Possible values:
  557. // "BULLET_GLYPH_PRESET_UNSPECIFIED" - The bullet glyph preset is
  558. // unspecified.
  559. // "BULLET_DISC_CIRCLE_SQUARE" - A bulleted list with a `DISC`,
  560. // `CIRCLE` and `SQUARE` bullet glyph for the
  561. // first 3 list nesting levels.
  562. // "BULLET_DIAMONDX_ARROW3D_SQUARE" - A bulleted list with a
  563. // `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for
  564. // the first 3 list nesting levels.
  565. // "BULLET_CHECKBOX" - A bulleted list with `CHECKBOX` bullet glyphs
  566. // for all list nesting levels.
  567. // "BULLET_ARROW_DIAMOND_DISC" - A bulleted list with a `ARROW`,
  568. // `DIAMOND` and `DISC` bullet glyph for
  569. // the first 3 list nesting levels.
  570. // "BULLET_STAR_CIRCLE_SQUARE" - A bulleted list with a `STAR`,
  571. // `CIRCLE` and `SQUARE` bullet glyph for
  572. // the first 3 list nesting levels.
  573. // "BULLET_ARROW3D_CIRCLE_SQUARE" - A bulleted list with a `ARROW3D`,
  574. // `CIRCLE` and `SQUARE` bullet glyph for
  575. // the first 3 list nesting levels.
  576. // "BULLET_LEFTTRIANGLE_DIAMOND_DISC" - A bulleted list with a
  577. // `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph
  578. // for the first 3 list nesting levels.
  579. // "BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE" - A bulleted list with a
  580. // `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet
  581. // glyph for the first 3 list nesting levels.
  582. // "BULLET_DIAMOND_CIRCLE_SQUARE" - A bulleted list with a `DIAMOND`,
  583. // `CIRCLE` and `SQUARE` bullet glyph
  584. // for the first 3 list nesting levels.
  585. // "NUMBERED_DECIMAL_ALPHA_ROMAN" - A numbered list with `DECIMAL`,
  586. // `ALPHA` and `ROMAN` numeric glyphs for
  587. // the first 3 list nesting levels, followed by periods.
  588. // "NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS" - A numbered list with
  589. // `DECIMAL`, `ALPHA` and `ROMAN` numeric glyphs for
  590. // the first 3 list nesting levels, followed by parenthesis.
  591. // "NUMBERED_DECIMAL_NESTED" - A numbered list with `DECIMAL` numeric
  592. // glyphs separated by periods, where
  593. // each nesting level uses the previous nesting level's glyph as a
  594. // prefix.
  595. // For example: '1.', '1.1.', '2.', '2.2.'.
  596. // "NUMBERED_UPPERALPHA_ALPHA_ROMAN" - A numbered list with
  597. // `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for
  598. // the first 3 list nesting levels, followed by periods.
  599. // "NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL" - A numbered list with
  600. // `UPPERROMAN`, `UPPERALPHA` and `DECIMAL` numeric
  601. // glyphs for the first 3 list nesting levels, followed by periods.
  602. // "NUMBERED_ZERODECIMAL_ALPHA_ROMAN" - A numbered list with
  603. // `ZERODECIMAL`, `ALPHA` and `ROMAN` numeric glyphs for
  604. // the first 3 list nesting levels, followed by periods.
  605. BulletPreset string `json:"bulletPreset,omitempty"`
  606. // Range: The range to apply the bullet preset to.
  607. Range *Range `json:"range,omitempty"`
  608. // ForceSendFields is a list of field names (e.g. "BulletPreset") to
  609. // unconditionally include in API requests. By default, fields with
  610. // empty values are omitted from API requests. However, any non-pointer,
  611. // non-interface field appearing in ForceSendFields will be sent to the
  612. // server regardless of whether the field is empty or not. This may be
  613. // used to include empty fields in Patch requests.
  614. ForceSendFields []string `json:"-"`
  615. // NullFields is a list of field names (e.g. "BulletPreset") to include
  616. // in API requests with the JSON null value. By default, fields with
  617. // empty values are omitted from API requests. However, any field with
  618. // an empty value appearing in NullFields will be sent to the server as
  619. // null. It is an error if a field in this list has a non-empty value.
  620. // This may be used to include null fields in Patch requests.
  621. NullFields []string `json:"-"`
  622. }
  623. func (s *CreateParagraphBulletsRequest) MarshalJSON() ([]byte, error) {
  624. type NoMethod CreateParagraphBulletsRequest
  625. raw := NoMethod(*s)
  626. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  627. }
  628. // CropProperties: The crop properties of an image.
  629. //
  630. // The crop rectangle is represented using fractional offsets from the
  631. // original
  632. // content's four edges.
  633. //
  634. // - If the offset is in the interval (0, 1), the corresponding edge of
  635. // crop
  636. // rectangle is positioned inside of the image's original bounding
  637. // rectangle.
  638. // - If the offset is negative or greater than 1, the corresponding edge
  639. // of crop
  640. // rectangle is positioned outside of the image's original bounding
  641. // rectangle.
  642. // - If all offsets and rotation angle are 0, the image is not cropped.
  643. type CropProperties struct {
  644. // Angle: The clockwise rotation angle of the crop rectangle around its
  645. // center, in
  646. // radians. Rotation is applied after the offsets.
  647. Angle float64 `json:"angle,omitempty"`
  648. // OffsetBottom: The offset specifies how far inwards the bottom edge of
  649. // the crop rectangle
  650. // is from the bottom edge of the original content as a fraction of
  651. // the
  652. // original content's height.
  653. OffsetBottom float64 `json:"offsetBottom,omitempty"`
  654. // OffsetLeft: The offset specifies how far inwards the left edge of the
  655. // crop rectangle is
  656. // from the left edge of the original content as a fraction of the
  657. // original
  658. // content's width.
  659. OffsetLeft float64 `json:"offsetLeft,omitempty"`
  660. // OffsetRight: The offset specifies how far inwards the right edge of
  661. // the crop rectangle
  662. // is from the right edge of the original content as a fraction of
  663. // the
  664. // original content's width.
  665. OffsetRight float64 `json:"offsetRight,omitempty"`
  666. // OffsetTop: The offset specifies how far inwards the top edge of the
  667. // crop rectangle is
  668. // from the top edge of the original content as a fraction of the
  669. // original
  670. // content's height.
  671. OffsetTop float64 `json:"offsetTop,omitempty"`
  672. // ForceSendFields is a list of field names (e.g. "Angle") to
  673. // unconditionally include in API requests. By default, fields with
  674. // empty values are omitted from API requests. However, any non-pointer,
  675. // non-interface field appearing in ForceSendFields will be sent to the
  676. // server regardless of whether the field is empty or not. This may be
  677. // used to include empty fields in Patch requests.
  678. ForceSendFields []string `json:"-"`
  679. // NullFields is a list of field names (e.g. "Angle") to include in API
  680. // requests with the JSON null value. By default, fields with empty
  681. // values are omitted from API requests. However, any field with an
  682. // empty value appearing in NullFields will be sent to the server as
  683. // null. It is an error if a field in this list has a non-empty value.
  684. // This may be used to include null fields in Patch requests.
  685. NullFields []string `json:"-"`
  686. }
  687. func (s *CropProperties) MarshalJSON() ([]byte, error) {
  688. type NoMethod CropProperties
  689. raw := NoMethod(*s)
  690. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  691. }
  692. func (s *CropProperties) UnmarshalJSON(data []byte) error {
  693. type NoMethod CropProperties
  694. var s1 struct {
  695. Angle gensupport.JSONFloat64 `json:"angle"`
  696. OffsetBottom gensupport.JSONFloat64 `json:"offsetBottom"`
  697. OffsetLeft gensupport.JSONFloat64 `json:"offsetLeft"`
  698. OffsetRight gensupport.JSONFloat64 `json:"offsetRight"`
  699. OffsetTop gensupport.JSONFloat64 `json:"offsetTop"`
  700. *NoMethod
  701. }
  702. s1.NoMethod = (*NoMethod)(s)
  703. if err := json.Unmarshal(data, &s1); err != nil {
  704. return err
  705. }
  706. s.Angle = float64(s1.Angle)
  707. s.OffsetBottom = float64(s1.OffsetBottom)
  708. s.OffsetLeft = float64(s1.OffsetLeft)
  709. s.OffsetRight = float64(s1.OffsetRight)
  710. s.OffsetTop = float64(s1.OffsetTop)
  711. return nil
  712. }
  713. // CropPropertiesSuggestionState: A mask that indicates which of the
  714. // fields on the base CropProperties have been changed in this
  715. // suggestion.
  716. // For any field set to true, there is a new suggested value.
  717. type CropPropertiesSuggestionState struct {
  718. // AngleSuggested: Indicates if there was a suggested change to angle.
  719. AngleSuggested bool `json:"angleSuggested,omitempty"`
  720. // OffsetBottomSuggested: Indicates if there was a suggested change to
  721. // offset_bottom.
  722. OffsetBottomSuggested bool `json:"offsetBottomSuggested,omitempty"`
  723. // OffsetLeftSuggested: Indicates if there was a suggested change to
  724. // offset_left.
  725. OffsetLeftSuggested bool `json:"offsetLeftSuggested,omitempty"`
  726. // OffsetRightSuggested: Indicates if there was a suggested change to
  727. // offset_right.
  728. OffsetRightSuggested bool `json:"offsetRightSuggested,omitempty"`
  729. // OffsetTopSuggested: Indicates if there was a suggested change to
  730. // offset_top.
  731. OffsetTopSuggested bool `json:"offsetTopSuggested,omitempty"`
  732. // ForceSendFields is a list of field names (e.g. "AngleSuggested") to
  733. // unconditionally include in API requests. By default, fields with
  734. // empty values are omitted from API requests. However, any non-pointer,
  735. // non-interface field appearing in ForceSendFields will be sent to the
  736. // server regardless of whether the field is empty or not. This may be
  737. // used to include empty fields in Patch requests.
  738. ForceSendFields []string `json:"-"`
  739. // NullFields is a list of field names (e.g. "AngleSuggested") to
  740. // include in API requests with the JSON null value. By default, fields
  741. // with empty values are omitted from API requests. However, any field
  742. // with an empty value appearing in NullFields will be sent to the
  743. // server as null. It is an error if a field in this list has a
  744. // non-empty value. This may be used to include null fields in Patch
  745. // requests.
  746. NullFields []string `json:"-"`
  747. }
  748. func (s *CropPropertiesSuggestionState) MarshalJSON() ([]byte, error) {
  749. type NoMethod CropPropertiesSuggestionState
  750. raw := NoMethod(*s)
  751. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  752. }
  753. // DeleteContentRangeRequest: Deletes content from the document.
  754. type DeleteContentRangeRequest struct {
  755. // Range: The range of content to delete.
  756. //
  757. // Deleting text that crosses a paragraph boundary may result in
  758. // changes
  759. // to paragraph styles, lists, positioned objects and bookmarks as the
  760. // two
  761. // paragraphs are merged.
  762. //
  763. // Attempting to delete certain ranges can result in an invalid
  764. // document
  765. // structure in which case a 400 bad request error is returned.
  766. //
  767. // Some examples of invalid delete requests include:
  768. //
  769. // * Deleting one code unit of a surrogate pair.
  770. // * Deleting the last newline character of a Body, Header,
  771. // Footer, Footnote, TableCell or TableOfContents.
  772. // * Deleting the start or end of a Table,
  773. // TableOfContents or Equation without deleting the entire element.
  774. // * Deleting the newline character before a
  775. // Table,
  776. // TableOfContents or
  777. // SectionBreak without deleting the
  778. // element.
  779. // * Deleting individual rows or cells of a table. Deleting the content
  780. // within
  781. // a table cell is allowed.
  782. Range *Range `json:"range,omitempty"`
  783. // ForceSendFields is a list of field names (e.g. "Range") to
  784. // unconditionally include in API requests. By default, fields with
  785. // empty values are omitted from API requests. However, any non-pointer,
  786. // non-interface field appearing in ForceSendFields will be sent to the
  787. // server regardless of whether the field is empty or not. This may be
  788. // used to include empty fields in Patch requests.
  789. ForceSendFields []string `json:"-"`
  790. // NullFields is a list of field names (e.g. "Range") to include in API
  791. // requests with the JSON null value. By default, fields with empty
  792. // values are omitted from API requests. However, any field with an
  793. // empty value appearing in NullFields will be sent to the server as
  794. // null. It is an error if a field in this list has a non-empty value.
  795. // This may be used to include null fields in Patch requests.
  796. NullFields []string `json:"-"`
  797. }
  798. func (s *DeleteContentRangeRequest) MarshalJSON() ([]byte, error) {
  799. type NoMethod DeleteContentRangeRequest
  800. raw := NoMethod(*s)
  801. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  802. }
  803. // DeleteNamedRangeRequest: Deletes a NamedRange.
  804. type DeleteNamedRangeRequest struct {
  805. // Name: The name of the range(s) to delete. All named ranges with the
  806. // given
  807. // name will be deleted.
  808. Name string `json:"name,omitempty"`
  809. // NamedRangeId: The ID of the named range to delete.
  810. NamedRangeId string `json:"namedRangeId,omitempty"`
  811. // ForceSendFields is a list of field names (e.g. "Name") to
  812. // unconditionally include in API requests. By default, fields with
  813. // empty values are omitted from API requests. However, any non-pointer,
  814. // non-interface field appearing in ForceSendFields will be sent to the
  815. // server regardless of whether the field is empty or not. This may be
  816. // used to include empty fields in Patch requests.
  817. ForceSendFields []string `json:"-"`
  818. // NullFields is a list of field names (e.g. "Name") to include in API
  819. // requests with the JSON null value. By default, fields with empty
  820. // values are omitted from API requests. However, any field with an
  821. // empty value appearing in NullFields will be sent to the server as
  822. // null. It is an error if a field in this list has a non-empty value.
  823. // This may be used to include null fields in Patch requests.
  824. NullFields []string `json:"-"`
  825. }
  826. func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) {
  827. type NoMethod DeleteNamedRangeRequest
  828. raw := NoMethod(*s)
  829. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  830. }
  831. // DeleteParagraphBulletsRequest: Deletes bullets from all of the
  832. // paragraphs that overlap with the given range.
  833. //
  834. // The nesting level of each paragraph will be visually preserved by
  835. // adding
  836. // indent to the start of the corresponding paragraph.
  837. type DeleteParagraphBulletsRequest struct {
  838. // Range: The range to delete bullets from.
  839. Range *Range `json:"range,omitempty"`
  840. // ForceSendFields is a list of field names (e.g. "Range") to
  841. // unconditionally include in API requests. By default, fields with
  842. // empty values are omitted from API requests. However, any non-pointer,
  843. // non-interface field appearing in ForceSendFields will be sent to the
  844. // server regardless of whether the field is empty or not. This may be
  845. // used to include empty fields in Patch requests.
  846. ForceSendFields []string `json:"-"`
  847. // NullFields is a list of field names (e.g. "Range") to include in API
  848. // requests with the JSON null value. By default, fields with empty
  849. // values are omitted from API requests. However, any field with an
  850. // empty value appearing in NullFields will be sent to the server as
  851. // null. It is an error if a field in this list has a non-empty value.
  852. // This may be used to include null fields in Patch requests.
  853. NullFields []string `json:"-"`
  854. }
  855. func (s *DeleteParagraphBulletsRequest) MarshalJSON() ([]byte, error) {
  856. type NoMethod DeleteParagraphBulletsRequest
  857. raw := NoMethod(*s)
  858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  859. }
  860. // DeletePositionedObjectRequest: Deletes a PositionedObject from
  861. // the
  862. // document.
  863. type DeletePositionedObjectRequest struct {
  864. // ObjectId: The ID of the positioned object to delete.
  865. ObjectId string `json:"objectId,omitempty"`
  866. // ForceSendFields is a list of field names (e.g. "ObjectId") to
  867. // unconditionally include in API requests. By default, fields with
  868. // empty values are omitted from API requests. However, any non-pointer,
  869. // non-interface field appearing in ForceSendFields will be sent to the
  870. // server regardless of whether the field is empty or not. This may be
  871. // used to include empty fields in Patch requests.
  872. ForceSendFields []string `json:"-"`
  873. // NullFields is a list of field names (e.g. "ObjectId") to include in
  874. // API requests with the JSON null value. By default, fields with empty
  875. // values are omitted from API requests. However, any field with an
  876. // empty value appearing in NullFields will be sent to the server as
  877. // null. It is an error if a field in this list has a non-empty value.
  878. // This may be used to include null fields in Patch requests.
  879. NullFields []string `json:"-"`
  880. }
  881. func (s *DeletePositionedObjectRequest) MarshalJSON() ([]byte, error) {
  882. type NoMethod DeletePositionedObjectRequest
  883. raw := NoMethod(*s)
  884. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  885. }
  886. // DeleteTableColumnRequest: Deletes a column from a table.
  887. type DeleteTableColumnRequest struct {
  888. // TableCellLocation: The reference table cell location from which the
  889. // column will be deleted.
  890. //
  891. // The column this cell spans will be deleted. If this is a merged cell
  892. // that
  893. // spans multiple columns, all columns that the cell spans will be
  894. // deleted. If
  895. // no columns remain in the table after this deletion, the whole table
  896. // is
  897. // deleted.
  898. TableCellLocation *TableCellLocation `json:"tableCellLocation,omitempty"`
  899. // ForceSendFields is a list of field names (e.g. "TableCellLocation")
  900. // to unconditionally include in API requests. By default, fields with
  901. // empty values are omitted from API requests. However, any non-pointer,
  902. // non-interface field appearing in ForceSendFields will be sent to the
  903. // server regardless of whether the field is empty or not. This may be
  904. // used to include empty fields in Patch requests.
  905. ForceSendFields []string `json:"-"`
  906. // NullFields is a list of field names (e.g. "TableCellLocation") to
  907. // include in API requests with the JSON null value. By default, fields
  908. // with empty values are omitted from API requests. However, any field
  909. // with an empty value appearing in NullFields will be sent to the
  910. // server as null. It is an error if a field in this list has a
  911. // non-empty value. This may be used to include null fields in Patch
  912. // requests.
  913. NullFields []string `json:"-"`
  914. }
  915. func (s *DeleteTableColumnRequest) MarshalJSON() ([]byte, error) {
  916. type NoMethod DeleteTableColumnRequest
  917. raw := NoMethod(*s)
  918. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  919. }
  920. // DeleteTableRowRequest: Deletes a row from a table.
  921. type DeleteTableRowRequest struct {
  922. // TableCellLocation: The reference table cell location from which the
  923. // row will be deleted.
  924. //
  925. // The row this cell spans will be deleted. If this is a merged cell
  926. // that
  927. // spans multiple rows, all rows that the cell spans will be deleted. If
  928. // no
  929. // rows remain in the table after this deletion, the whole table is
  930. // deleted.
  931. TableCellLocation *TableCellLocation `json:"tableCellLocation,omitempty"`
  932. // ForceSendFields is a list of field names (e.g. "TableCellLocation")
  933. // to unconditionally include in API requests. By default, fields with
  934. // empty values are omitted from API requests. However, any non-pointer,
  935. // non-interface field appearing in ForceSendFields will be sent to the
  936. // server regardless of whether the field is empty or not. This may be
  937. // used to include empty fields in Patch requests.
  938. ForceSendFields []string `json:"-"`
  939. // NullFields is a list of field names (e.g. "TableCellLocation") to
  940. // include in API requests with the JSON null value. By default, fields
  941. // with empty values are omitted from API requests. However, any field
  942. // with an empty value appearing in NullFields will be sent to the
  943. // server as null. It is an error if a field in this list has a
  944. // non-empty value. This may be used to include null fields in Patch
  945. // requests.
  946. NullFields []string `json:"-"`
  947. }
  948. func (s *DeleteTableRowRequest) MarshalJSON() ([]byte, error) {
  949. type NoMethod DeleteTableRowRequest
  950. raw := NoMethod(*s)
  951. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  952. }
  953. // Dimension: A magnitude in a single direction in the specified units.
  954. type Dimension struct {
  955. // Magnitude: The magnitude.
  956. Magnitude float64 `json:"magnitude,omitempty"`
  957. // Unit: The units for magnitude.
  958. //
  959. // Possible values:
  960. // "UNIT_UNSPECIFIED" - The units are unknown.
  961. // "PT" - A point, 1/72 of an inch.
  962. Unit string `json:"unit,omitempty"`
  963. // ForceSendFields is a list of field names (e.g. "Magnitude") to
  964. // unconditionally include in API requests. By default, fields with
  965. // empty values are omitted from API requests. However, any non-pointer,
  966. // non-interface field appearing in ForceSendFields will be sent to the
  967. // server regardless of whether the field is empty or not. This may be
  968. // used to include empty fields in Patch requests.
  969. ForceSendFields []string `json:"-"`
  970. // NullFields is a list of field names (e.g. "Magnitude") to include in
  971. // API requests with the JSON null value. By default, fields with empty
  972. // values are omitted from API requests. However, any field with an
  973. // empty value appearing in NullFields will be sent to the server as
  974. // null. It is an error if a field in this list has a non-empty value.
  975. // This may be used to include null fields in Patch requests.
  976. NullFields []string `json:"-"`
  977. }
  978. func (s *Dimension) MarshalJSON() ([]byte, error) {
  979. type NoMethod Dimension
  980. raw := NoMethod(*s)
  981. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  982. }
  983. func (s *Dimension) UnmarshalJSON(data []byte) error {
  984. type NoMethod Dimension
  985. var s1 struct {
  986. Magnitude gensupport.JSONFloat64 `json:"magnitude"`
  987. *NoMethod
  988. }
  989. s1.NoMethod = (*NoMethod)(s)
  990. if err := json.Unmarshal(data, &s1); err != nil {
  991. return err
  992. }
  993. s.Magnitude = float64(s1.Magnitude)
  994. return nil
  995. }
  996. // Document: A Google Docs document.
  997. type Document struct {
  998. // Body: The main body of the document.
  999. Body *Body `json:"body,omitempty"`
  1000. // DocumentId: The ID of the document.
  1001. DocumentId string `json:"documentId,omitempty"`
  1002. // DocumentStyle: The style of the document.
  1003. DocumentStyle *DocumentStyle `json:"documentStyle,omitempty"`
  1004. // Footers: The footers in the document, keyed by footer ID.
  1005. Footers map[string]Footer `json:"footers,omitempty"`
  1006. // Footnotes: The footnotes in the document, keyed by footnote ID.
  1007. Footnotes map[string]Footnote `json:"footnotes,omitempty"`
  1008. // Headers: The headers in the document, keyed by header ID.
  1009. Headers map[string]Header `json:"headers,omitempty"`
  1010. // InlineObjects: The inline objects in the document, keyed by object
  1011. // ID.
  1012. InlineObjects map[string]InlineObject `json:"inlineObjects,omitempty"`
  1013. // Lists: The lists in the document, keyed by list ID.
  1014. Lists map[string]List `json:"lists,omitempty"`
  1015. // NamedRanges: The named ranges in the document, keyed by name.
  1016. NamedRanges map[string]NamedRanges `json:"namedRanges,omitempty"`
  1017. // NamedStyles: The named styles of the document.
  1018. NamedStyles *NamedStyles `json:"namedStyles,omitempty"`
  1019. // PositionedObjects: The positioned objects in the document, keyed by
  1020. // object ID.
  1021. PositionedObjects map[string]PositionedObject `json:"positionedObjects,omitempty"`
  1022. // RevisionId: The revision ID of the document. Can be used in update
  1023. // requests to specify
  1024. // which revision of a document to apply updates to and how the request
  1025. // should
  1026. // behave if the document has been edited since that revision. Only
  1027. // populated
  1028. // if the user has edit access to the document.
  1029. //
  1030. // The format of the revision ID may change over time, so it should be
  1031. // treated
  1032. // opaquely. A returned revision ID is only guaranteed to be valid for
  1033. // 24
  1034. // hours after it has been returned and cannot be shared across users.
  1035. // If the
  1036. // revision ID is unchanged between calls, then the document has not
  1037. // changed.
  1038. // Conversely, a changed ID (for the same document and user) usually
  1039. // means the
  1040. // document has been updated; however, a changed ID can also be due
  1041. // to
  1042. // internal factors such as ID format changes.
  1043. RevisionId string `json:"revisionId,omitempty"`
  1044. // SuggestedDocumentStyleChanges: The suggested changes to the style of
  1045. // the document, keyed by suggestion ID.
  1046. SuggestedDocumentStyleChanges map[string]SuggestedDocumentStyle `json:"suggestedDocumentStyleChanges,omitempty"`
  1047. // SuggestedNamedStylesChanges: The suggested changes to the named
  1048. // styles of the document, keyed by
  1049. // suggestion ID.
  1050. SuggestedNamedStylesChanges map[string]SuggestedNamedStyles `json:"suggestedNamedStylesChanges,omitempty"`
  1051. // SuggestionsViewMode: The suggestions view mode applied to the
  1052. // document.
  1053. //
  1054. // Note: When editing a document, changes must be based on a document
  1055. // with
  1056. // SUGGESTIONS_INLINE.
  1057. //
  1058. // Possible values:
  1059. // "DEFAULT_FOR_CURRENT_ACCESS" - The SuggestionsViewMode applied to
  1060. // the returned document depends on the
  1061. // user's current access level. If the user only has view
  1062. // access,
  1063. // PREVIEW_WITHOUT_SUGGESTIONS is
  1064. // applied. Otherwise, SUGGESTIONS_INLINE is applied.
  1065. // This is the default suggestions view mode.
  1066. // "SUGGESTIONS_INLINE" - The returned document has suggestions
  1067. // inline. Suggested changes will be
  1068. // differentiated from base content within the document.
  1069. //
  1070. // Requests to retrieve a document using this mode will return a 403
  1071. // error if
  1072. // the user does not have permission to view suggested changes.
  1073. // "PREVIEW_SUGGESTIONS_ACCEPTED" - The returned document is a preview
  1074. // with all suggested changes accepted.
  1075. //
  1076. // Requests to retrieve a document using this mode will return a 403
  1077. // error if
  1078. // the user does not have permission to view suggested changes.
  1079. // "PREVIEW_WITHOUT_SUGGESTIONS" - The returned document is a preview
  1080. // with all suggested changes rejected if
  1081. // there are any suggestions in the document.
  1082. SuggestionsViewMode string `json:"suggestionsViewMode,omitempty"`
  1083. // Title: The title of the document.
  1084. Title string `json:"title,omitempty"`
  1085. // ServerResponse contains the HTTP response code and headers from the
  1086. // server.
  1087. googleapi.ServerResponse `json:"-"`
  1088. // ForceSendFields is a list of field names (e.g. "Body") to
  1089. // unconditionally include in API requests. By default, fields with
  1090. // empty values are omitted from API requests. However, any non-pointer,
  1091. // non-interface field appearing in ForceSendFields will be sent to the
  1092. // server regardless of whether the field is empty or not. This may be
  1093. // used to include empty fields in Patch requests.
  1094. ForceSendFields []string `json:"-"`
  1095. // NullFields is a list of field names (e.g. "Body") to include in API
  1096. // requests with the JSON null value. By default, fields with empty
  1097. // values are omitted from API requests. However, any field with an
  1098. // empty value appearing in NullFields will be sent to the server as
  1099. // null. It is an error if a field in this list has a non-empty value.
  1100. // This may be used to include null fields in Patch requests.
  1101. NullFields []string `json:"-"`
  1102. }
  1103. func (s *Document) MarshalJSON() ([]byte, error) {
  1104. type NoMethod Document
  1105. raw := NoMethod(*s)
  1106. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1107. }
  1108. // DocumentStyle: The style of the document.
  1109. type DocumentStyle struct {
  1110. // Background: The background of the document.
  1111. Background *Background `json:"background,omitempty"`
  1112. // DefaultFooterId: The ID of the default footer. If not set, there is
  1113. // no default footer.
  1114. DefaultFooterId string `json:"defaultFooterId,omitempty"`
  1115. // DefaultHeaderId: The ID of the default header. If not set, there is
  1116. // no default header.
  1117. DefaultHeaderId string `json:"defaultHeaderId,omitempty"`
  1118. // EvenPageFooterId: The ID of the footer used only for even pages. The
  1119. // value of
  1120. // use_even_page_header_footer determines
  1121. // whether to use the default_footer_id or this value for the
  1122. // footer on even pages. If not set, there is no even page footer.
  1123. EvenPageFooterId string `json:"evenPageFooterId,omitempty"`
  1124. // EvenPageHeaderId: The ID of the header used only for even pages. The
  1125. // value of
  1126. // use_even_page_header_footer determines
  1127. // whether to use the default_header_id or this value for the
  1128. // header on even pages. If not set, there is no even page header.
  1129. EvenPageHeaderId string `json:"evenPageHeaderId,omitempty"`
  1130. // FirstPageFooterId: The ID of the footer used only for the first page.
  1131. // If not set then
  1132. // a unique footer for the first page does not exist. The value
  1133. // of
  1134. // use_first_page_header_footer determines
  1135. // whether to use the default_footer_id or this value for the
  1136. // footer on the first page. If not set, there is no first page footer.
  1137. FirstPageFooterId string `json:"firstPageFooterId,omitempty"`
  1138. // FirstPageHeaderId: The ID of the header used only for the first page.
  1139. // If not set then
  1140. // a unique header for the first page does not exist.
  1141. // The value of use_first_page_header_footer determines
  1142. // whether to use the default_header_id or this value for the
  1143. // header on the first page. If not set, there is no first page header.
  1144. FirstPageHeaderId string `json:"firstPageHeaderId,omitempty"`
  1145. // MarginBottom: The bottom page margin.
  1146. MarginBottom *Dimension `json:"marginBottom,omitempty"`
  1147. // MarginLeft: The left page margin.
  1148. MarginLeft *Dimension `json:"marginLeft,omitempty"`
  1149. // MarginRight: The right page margin.
  1150. MarginRight *Dimension `json:"marginRight,omitempty"`
  1151. // MarginTop: The top page margin.
  1152. MarginTop *Dimension `json:"marginTop,omitempty"`
  1153. // PageNumberStart: The page number from which to start counting the
  1154. // number of pages.
  1155. PageNumberStart int64 `json:"pageNumberStart,omitempty"`
  1156. // PageSize: The size of a page in the document.
  1157. PageSize *Size `json:"pageSize,omitempty"`
  1158. // UseEvenPageHeaderFooter: Indicates whether to use the even page
  1159. // header / footer IDs for the even
  1160. // pages.
  1161. UseEvenPageHeaderFooter bool `json:"useEvenPageHeaderFooter,omitempty"`
  1162. // UseFirstPageHeaderFooter: Indicates whether to use the first page
  1163. // header / footer IDs for the first
  1164. // page.
  1165. UseFirstPageHeaderFooter bool `json:"useFirstPageHeaderFooter,omitempty"`
  1166. // ForceSendFields is a list of field names (e.g. "Background") to
  1167. // unconditionally include in API requests. By default, fields with
  1168. // empty values are omitted from API requests. However, any non-pointer,
  1169. // non-interface field appearing in ForceSendFields will be sent to the
  1170. // server regardless of whether the field is empty or not. This may be
  1171. // used to include empty fields in Patch requests.
  1172. ForceSendFields []string `json:"-"`
  1173. // NullFields is a list of field names (e.g. "Background") to include in
  1174. // API requests with the JSON null value. By default, fields with empty
  1175. // values are omitted from API requests. However, any field with an
  1176. // empty value appearing in NullFields will be sent to the server as
  1177. // null. It is an error if a field in this list has a non-empty value.
  1178. // This may be used to include null fields in Patch requests.
  1179. NullFields []string `json:"-"`
  1180. }
  1181. func (s *DocumentStyle) MarshalJSON() ([]byte, error) {
  1182. type NoMethod DocumentStyle
  1183. raw := NoMethod(*s)
  1184. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1185. }
  1186. // DocumentStyleSuggestionState: A mask that indicates which of the
  1187. // fields on the base DocumentStyle have been changed in this
  1188. // suggestion.
  1189. // For any field set to true, there is a new suggested value.
  1190. type DocumentStyleSuggestionState struct {
  1191. // BackgroundSuggestionState: A mask that indicates which of the fields
  1192. // in background have been changed in this
  1193. // suggestion.
  1194. BackgroundSuggestionState *BackgroundSuggestionState `json:"backgroundSuggestionState,omitempty"`
  1195. // DefaultFooterIdSuggested: Indicates if there was a suggested change
  1196. // to default_footer_id.
  1197. DefaultFooterIdSuggested bool `json:"defaultFooterIdSuggested,omitempty"`
  1198. // DefaultHeaderIdSuggested: Indicates if there was a suggested change
  1199. // to default_header_id.
  1200. DefaultHeaderIdSuggested bool `json:"defaultHeaderIdSuggested,omitempty"`
  1201. // EvenPageFooterIdSuggested: Indicates if there was a suggested change
  1202. // to even_page_footer_id.
  1203. EvenPageFooterIdSuggested bool `json:"evenPageFooterIdSuggested,omitempty"`
  1204. // EvenPageHeaderIdSuggested: Indicates if there was a suggested change
  1205. // to even_page_header_id.
  1206. EvenPageHeaderIdSuggested bool `json:"evenPageHeaderIdSuggested,omitempty"`
  1207. // FirstPageFooterIdSuggested: Indicates if there was a suggested change
  1208. // to first_page_footer_id.
  1209. FirstPageFooterIdSuggested bool `json:"firstPageFooterIdSuggested,omitempty"`
  1210. // FirstPageHeaderIdSuggested: Indicates if there was a suggested change
  1211. // to first_page_header_id.
  1212. FirstPageHeaderIdSuggested bool `json:"firstPageHeaderIdSuggested,omitempty"`
  1213. // MarginBottomSuggested: Indicates if there was a suggested change to
  1214. // margin_bottom.
  1215. MarginBottomSuggested bool `json:"marginBottomSuggested,omitempty"`
  1216. // MarginLeftSuggested: Indicates if there was a suggested change to
  1217. // margin_left.
  1218. MarginLeftSuggested bool `json:"marginLeftSuggested,omitempty"`
  1219. // MarginRightSuggested: Indicates if there was a suggested change to
  1220. // margin_right.
  1221. MarginRightSuggested bool `json:"marginRightSuggested,omitempty"`
  1222. // MarginTopSuggested: Indicates if there was a suggested change to
  1223. // margin_top.
  1224. MarginTopSuggested bool `json:"marginTopSuggested,omitempty"`
  1225. // PageNumberStartSuggested: Indicates if there was a suggested change
  1226. // to page_number_start.
  1227. PageNumberStartSuggested bool `json:"pageNumberStartSuggested,omitempty"`
  1228. // PageSizeSuggestionState: A mask that indicates which of the fields in
  1229. // size have been changed in this
  1230. // suggestion.
  1231. PageSizeSuggestionState *SizeSuggestionState `json:"pageSizeSuggestionState,omitempty"`
  1232. // UseEvenPageHeaderFooterSuggested: Indicates if there was a suggested
  1233. // change to use_even_page_header_footer.
  1234. UseEvenPageHeaderFooterSuggested bool `json:"useEvenPageHeaderFooterSuggested,omitempty"`
  1235. // UseFirstPageHeaderFooterSuggested: Indicates if there was a suggested
  1236. // change to use_first_page_header_footer.
  1237. UseFirstPageHeaderFooterSuggested bool `json:"useFirstPageHeaderFooterSuggested,omitempty"`
  1238. // ForceSendFields is a list of field names (e.g.
  1239. // "BackgroundSuggestionState") to unconditionally include in API
  1240. // requests. By default, fields with empty values are omitted from API
  1241. // requests. However, any non-pointer, non-interface field appearing in
  1242. // ForceSendFields will be sent to the server regardless of whether the
  1243. // field is empty or not. This may be used to include empty fields in
  1244. // Patch requests.
  1245. ForceSendFields []string `json:"-"`
  1246. // NullFields is a list of field names (e.g.
  1247. // "BackgroundSuggestionState") to include in API requests with the JSON
  1248. // null value. By default, fields with empty values are omitted from API
  1249. // requests. However, any field with an empty value appearing in
  1250. // NullFields will be sent to the server as null. It is an error if a
  1251. // field in this list has a non-empty value. This may be used to include
  1252. // null fields in Patch requests.
  1253. NullFields []string `json:"-"`
  1254. }
  1255. func (s *DocumentStyleSuggestionState) MarshalJSON() ([]byte, error) {
  1256. type NoMethod DocumentStyleSuggestionState
  1257. raw := NoMethod(*s)
  1258. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1259. }
  1260. // EmbeddedDrawingProperties: The properties of an embedded drawing.
  1261. type EmbeddedDrawingProperties struct {
  1262. }
  1263. // EmbeddedDrawingPropertiesSuggestionState: A mask that indicates which
  1264. // of the fields on the base
  1265. // EmbeddedDrawingProperties
  1266. // have been changed in this suggestion. For any field set to true,
  1267. // there is a
  1268. // new suggested value.
  1269. type EmbeddedDrawingPropertiesSuggestionState struct {
  1270. }
  1271. // EmbeddedObject: An embedded object in the document.
  1272. type EmbeddedObject struct {
  1273. // Description: The description of the embedded object. The `title` and
  1274. // `description` are
  1275. // both combined to display alt text.
  1276. Description string `json:"description,omitempty"`
  1277. // EmbeddedDrawingProperties: The properties of an embedded drawing.
  1278. EmbeddedDrawingProperties *EmbeddedDrawingProperties `json:"embeddedDrawingProperties,omitempty"`
  1279. // EmbeddedObjectBorder: The border of the embedded object.
  1280. EmbeddedObjectBorder *EmbeddedObjectBorder `json:"embeddedObjectBorder,omitempty"`
  1281. // ImageProperties: The properties of an image.
  1282. ImageProperties *ImageProperties `json:"imageProperties,omitempty"`
  1283. // LinkedContentReference: A reference to the external linked source
  1284. // content. For example, it contains
  1285. // a reference to the source Sheets chart when the embedded object is a
  1286. // linked
  1287. // chart.
  1288. //
  1289. // If unset, then the embedded object is not linked.
  1290. LinkedContentReference *LinkedContentReference `json:"linkedContentReference,omitempty"`
  1291. // MarginBottom: The bottom margin of the embedded object.
  1292. MarginBottom *Dimension `json:"marginBottom,omitempty"`
  1293. // MarginLeft: The left margin of the embedded object.
  1294. MarginLeft *Dimension `json:"marginLeft,omitempty"`
  1295. // MarginRight: The right margin of the embedded object.
  1296. MarginRight *Dimension `json:"marginRight,omitempty"`
  1297. // MarginTop: The top margin of the embedded object.
  1298. MarginTop *Dimension `json:"marginTop,omitempty"`
  1299. // Size: The size of the embedded object.
  1300. Size *Size `json:"size,omitempty"`
  1301. // Title: The title of the embedded object. The `title` and
  1302. // `description` are both
  1303. // combined to display alt text.
  1304. Title string `json:"title,omitempty"`
  1305. // ForceSendFields is a list of field names (e.g. "Description") to
  1306. // unconditionally include in API requests. By default, fields with
  1307. // empty values are omitted from API requests. However, any non-pointer,
  1308. // non-interface field appearing in ForceSendFields will be sent to the
  1309. // server regardless of whether the field is empty or not. This may be
  1310. // used to include empty fields in Patch requests.
  1311. ForceSendFields []string `json:"-"`
  1312. // NullFields is a list of field names (e.g. "Description") to include
  1313. // in API requests with the JSON null value. By default, fields with
  1314. // empty values are omitted from API requests. However, any field with
  1315. // an empty value appearing in NullFields will be sent to the server as
  1316. // null. It is an error if a field in this list has a non-empty value.
  1317. // This may be used to include null fields in Patch requests.
  1318. NullFields []string `json:"-"`
  1319. }
  1320. func (s *EmbeddedObject) MarshalJSON() ([]byte, error) {
  1321. type NoMethod EmbeddedObject
  1322. raw := NoMethod(*s)
  1323. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1324. }
  1325. // EmbeddedObjectBorder: A border around an EmbeddedObject.
  1326. type EmbeddedObjectBorder struct {
  1327. // Color: The color of the border.
  1328. Color *OptionalColor `json:"color,omitempty"`
  1329. // DashStyle: The dash style of the border.
  1330. //
  1331. // Possible values:
  1332. // "DASH_STYLE_UNSPECIFIED" - Unspecified dash style.
  1333. // "SOLID" - Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal
  1334. // value 'solid'.
  1335. // This is the default dash style.
  1336. // "DOT" - Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal
  1337. // value 'dot'.
  1338. // "DASH" - Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal
  1339. // value 'dash'.
  1340. DashStyle string `json:"dashStyle,omitempty"`
  1341. // PropertyState: The property state of the border property.
  1342. //
  1343. // Possible values:
  1344. // "RENDERED" - If a property's state is RENDERED, then the element
  1345. // has the corresponding
  1346. // property when rendered in the document. This is the default value.
  1347. // "NOT_RENDERED" - If a property's state is NOT_RENDERED, then the
  1348. // element does not have the
  1349. // corresponding property when rendered in the document.
  1350. PropertyState string `json:"propertyState,omitempty"`
  1351. // Width: The width of the border.
  1352. Width *Dimension `json:"width,omitempty"`
  1353. // ForceSendFields is a list of field names (e.g. "Color") to
  1354. // unconditionally include in API requests. By default, fields with
  1355. // empty values are omitted from API requests. However, any non-pointer,
  1356. // non-interface field appearing in ForceSendFields will be sent to the
  1357. // server regardless of whether the field is empty or not. This may be
  1358. // used to include empty fields in Patch requests.
  1359. ForceSendFields []string `json:"-"`
  1360. // NullFields is a list of field names (e.g. "Color") to include in API
  1361. // requests with the JSON null value. By default, fields with empty
  1362. // values are omitted from API requests. However, any field with an
  1363. // empty value appearing in NullFields will be sent to the server as
  1364. // null. It is an error if a field in this list has a non-empty value.
  1365. // This may be used to include null fields in Patch requests.
  1366. NullFields []string `json:"-"`
  1367. }
  1368. func (s *EmbeddedObjectBorder) MarshalJSON() ([]byte, error) {
  1369. type NoMethod EmbeddedObjectBorder
  1370. raw := NoMethod(*s)
  1371. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1372. }
  1373. // EmbeddedObjectBorderSuggestionState: A mask that indicates which of
  1374. // the fields on the base EmbeddedObjectBorder have been changed in
  1375. // this
  1376. // suggestion. For any field set to true, there is a new suggested
  1377. // value.
  1378. type EmbeddedObjectBorderSuggestionState struct {
  1379. // ColorSuggested: Indicates if there was a suggested change to color.
  1380. ColorSuggested bool `json:"colorSuggested,omitempty"`
  1381. // DashStyleSuggested: Indicates if there was a suggested change to
  1382. // dash_style.
  1383. DashStyleSuggested bool `json:"dashStyleSuggested,omitempty"`
  1384. // PropertyStateSuggested: Indicates if there was a suggested change to
  1385. // property_state.
  1386. PropertyStateSuggested bool `json:"propertyStateSuggested,omitempty"`
  1387. // WidthSuggested: Indicates if there was a suggested change to width.
  1388. WidthSuggested bool `json:"widthSuggested,omitempty"`
  1389. // ForceSendFields is a list of field names (e.g. "ColorSuggested") to
  1390. // unconditionally include in API requests. By default, fields with
  1391. // empty values are omitted from API requests. However, any non-pointer,
  1392. // non-interface field appearing in ForceSendFields will be sent to the
  1393. // server regardless of whether the field is empty or not. This may be
  1394. // used to include empty fields in Patch requests.
  1395. ForceSendFields []string `json:"-"`
  1396. // NullFields is a list of field names (e.g. "ColorSuggested") to
  1397. // include in API requests with the JSON null value. By default, fields
  1398. // with empty values are omitted from API requests. However, any field
  1399. // with an empty value appearing in NullFields will be sent to the
  1400. // server as null. It is an error if a field in this list has a
  1401. // non-empty value. This may be used to include null fields in Patch
  1402. // requests.
  1403. NullFields []string `json:"-"`
  1404. }
  1405. func (s *EmbeddedObjectBorderSuggestionState) MarshalJSON() ([]byte, error) {
  1406. type NoMethod EmbeddedObjectBorderSuggestionState
  1407. raw := NoMethod(*s)
  1408. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1409. }
  1410. // EmbeddedObjectSuggestionState: A mask that indicates which of the
  1411. // fields on the base EmbeddedObject have been changed in this
  1412. // suggestion.
  1413. // For any field set to true, there is a new suggested value.
  1414. type EmbeddedObjectSuggestionState struct {
  1415. // DescriptionSuggested: Indicates if there was a suggested change to
  1416. // description.
  1417. DescriptionSuggested bool `json:"descriptionSuggested,omitempty"`
  1418. // EmbeddedDrawingPropertiesSuggestionState: A mask that indicates which
  1419. // of the fields in embedded_drawing_properties have been
  1420. // changed in this suggestion.
  1421. EmbeddedDrawingPropertiesSuggestionState *EmbeddedDrawingPropertiesSuggestionState `json:"embeddedDrawingPropertiesSuggestionState,omitempty"`
  1422. // EmbeddedObjectBorderSuggestionState: A mask that indicates which of
  1423. // the fields in embedded_object_border have been
  1424. // changed in this suggestion.
  1425. EmbeddedObjectBorderSuggestionState *EmbeddedObjectBorderSuggestionState `json:"embeddedObjectBorderSuggestionState,omitempty"`
  1426. // ImagePropertiesSuggestionState: A mask that indicates which of the
  1427. // fields in image_properties have been changed in
  1428. // this suggestion.
  1429. ImagePropertiesSuggestionState *ImagePropertiesSuggestionState `json:"imagePropertiesSuggestionState,omitempty"`
  1430. // LinkedContentReferenceSuggestionState: A mask that indicates which of
  1431. // the fields in linked_content_reference have been
  1432. // changed in this suggestion.
  1433. LinkedContentReferenceSuggestionState *LinkedContentReferenceSuggestionState `json:"linkedContentReferenceSuggestionState,omitempty"`
  1434. // MarginBottomSuggested: Indicates if there was a suggested change to
  1435. // margin_bottom.
  1436. MarginBottomSuggested bool `json:"marginBottomSuggested,omitempty"`
  1437. // MarginLeftSuggested: Indicates if there was a suggested change to
  1438. // margin_left.
  1439. MarginLeftSuggested bool `json:"marginLeftSuggested,omitempty"`
  1440. // MarginRightSuggested: Indicates if there was a suggested change to
  1441. // margin_right.
  1442. MarginRightSuggested bool `json:"marginRightSuggested,omitempty"`
  1443. // MarginTopSuggested: Indicates if there was a suggested change to
  1444. // margin_top.
  1445. MarginTopSuggested bool `json:"marginTopSuggested,omitempty"`
  1446. // SizeSuggestionState: A mask that indicates which of the fields in
  1447. // size have been changed in this
  1448. // suggestion.
  1449. SizeSuggestionState *SizeSuggestionState `json:"sizeSuggestionState,omitempty"`
  1450. // TitleSuggested: Indicates if there was a suggested change to title.
  1451. TitleSuggested bool `json:"titleSuggested,omitempty"`
  1452. // ForceSendFields is a list of field names (e.g.
  1453. // "DescriptionSuggested") to unconditionally include in API requests.
  1454. // By default, fields with empty values are omitted from API requests.
  1455. // However, any non-pointer, non-interface field appearing in
  1456. // ForceSendFields will be sent to the server regardless of whether the
  1457. // field is empty or not. This may be used to include empty fields in
  1458. // Patch requests.
  1459. ForceSendFields []string `json:"-"`
  1460. // NullFields is a list of field names (e.g. "DescriptionSuggested") to
  1461. // include in API requests with the JSON null value. By default, fields
  1462. // with empty values are omitted from API requests. However, any field
  1463. // with an empty value appearing in NullFields will be sent to the
  1464. // server as null. It is an error if a field in this list has a
  1465. // non-empty value. This may be used to include null fields in Patch
  1466. // requests.
  1467. NullFields []string `json:"-"`
  1468. }
  1469. func (s *EmbeddedObjectSuggestionState) MarshalJSON() ([]byte, error) {
  1470. type NoMethod EmbeddedObjectSuggestionState
  1471. raw := NoMethod(*s)
  1472. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1473. }
  1474. // EndOfSegmentLocation: Location at the end of a body, header, footer
  1475. // or footnote. The location is
  1476. // immediately before the last newline in the document segment.
  1477. type EndOfSegmentLocation struct {
  1478. // SegmentId: The ID of the header, footer or footnote the location is
  1479. // in. An empty
  1480. // segment ID signifies the document's body.
  1481. SegmentId string `json:"segmentId,omitempty"`
  1482. // ForceSendFields is a list of field names (e.g. "SegmentId") to
  1483. // unconditionally include in API requests. By default, fields with
  1484. // empty values are omitted from API requests. However, any non-pointer,
  1485. // non-interface field appearing in ForceSendFields will be sent to the
  1486. // server regardless of whether the field is empty or not. This may be
  1487. // used to include empty fields in Patch requests.
  1488. ForceSendFields []string `json:"-"`
  1489. // NullFields is a list of field names (e.g. "SegmentId") to include in
  1490. // API requests with the JSON null value. By default, fields with empty
  1491. // values are omitted from API requests. However, any field with an
  1492. // empty value appearing in NullFields will be sent to the server as
  1493. // null. It is an error if a field in this list has a non-empty value.
  1494. // This may be used to include null fields in Patch requests.
  1495. NullFields []string `json:"-"`
  1496. }
  1497. func (s *EndOfSegmentLocation) MarshalJSON() ([]byte, error) {
  1498. type NoMethod EndOfSegmentLocation
  1499. raw := NoMethod(*s)
  1500. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1501. }
  1502. // Equation: A ParagraphElement representing an
  1503. // equation.
  1504. type Equation struct {
  1505. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  1506. // there are no suggested deletions
  1507. // of this content.
  1508. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  1509. // SuggestedInsertionIds: The suggested insertion IDs. A Equation
  1510. // may have multiple insertion IDs if it is a nested suggested change.
  1511. // If
  1512. // empty, then this is not a suggested insertion.
  1513. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  1514. // ForceSendFields is a list of field names (e.g.
  1515. // "SuggestedDeletionIds") to unconditionally include in API requests.
  1516. // By default, fields with empty values are omitted from API requests.
  1517. // However, any non-pointer, non-interface field appearing in
  1518. // ForceSendFields will be sent to the server regardless of whether the
  1519. // field is empty or not. This may be used to include empty fields in
  1520. // Patch requests.
  1521. ForceSendFields []string `json:"-"`
  1522. // NullFields is a list of field names (e.g. "SuggestedDeletionIds") to
  1523. // include in API requests with the JSON null value. By default, fields
  1524. // with empty values are omitted from API requests. However, any field
  1525. // with an empty value appearing in NullFields will be sent to the
  1526. // server as null. It is an error if a field in this list has a
  1527. // non-empty value. This may be used to include null fields in Patch
  1528. // requests.
  1529. NullFields []string `json:"-"`
  1530. }
  1531. func (s *Equation) MarshalJSON() ([]byte, error) {
  1532. type NoMethod Equation
  1533. raw := NoMethod(*s)
  1534. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1535. }
  1536. // Footer: A document footer.
  1537. type Footer struct {
  1538. // Content: The contents of the footer.
  1539. //
  1540. // The indexes for a footer's content begin at zero.
  1541. Content []*StructuralElement `json:"content,omitempty"`
  1542. // FooterId: The ID of the footer.
  1543. FooterId string `json:"footerId,omitempty"`
  1544. // ForceSendFields is a list of field names (e.g. "Content") to
  1545. // unconditionally include in API requests. By default, fields with
  1546. // empty values are omitted from API requests. However, any non-pointer,
  1547. // non-interface field appearing in ForceSendFields will be sent to the
  1548. // server regardless of whether the field is empty or not. This may be
  1549. // used to include empty fields in Patch requests.
  1550. ForceSendFields []string `json:"-"`
  1551. // NullFields is a list of field names (e.g. "Content") to include in
  1552. // API requests with the JSON null value. By default, fields with empty
  1553. // values are omitted from API requests. However, any field with an
  1554. // empty value appearing in NullFields will be sent to the server as
  1555. // null. It is an error if a field in this list has a non-empty value.
  1556. // This may be used to include null fields in Patch requests.
  1557. NullFields []string `json:"-"`
  1558. }
  1559. func (s *Footer) MarshalJSON() ([]byte, error) {
  1560. type NoMethod Footer
  1561. raw := NoMethod(*s)
  1562. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1563. }
  1564. // Footnote: A document footnote.
  1565. type Footnote struct {
  1566. // Content: The contents of the footnote.
  1567. //
  1568. // The indexes for a footnote's content begin at zero.
  1569. Content []*StructuralElement `json:"content,omitempty"`
  1570. // FootnoteId: The ID of the footnote.
  1571. FootnoteId string `json:"footnoteId,omitempty"`
  1572. // ForceSendFields is a list of field names (e.g. "Content") to
  1573. // unconditionally include in API requests. By default, fields with
  1574. // empty values are omitted from API requests. However, any non-pointer,
  1575. // non-interface field appearing in ForceSendFields will be sent to the
  1576. // server regardless of whether the field is empty or not. This may be
  1577. // used to include empty fields in Patch requests.
  1578. ForceSendFields []string `json:"-"`
  1579. // NullFields is a list of field names (e.g. "Content") to include in
  1580. // API requests with the JSON null value. By default, fields with empty
  1581. // values are omitted from API requests. However, any field with an
  1582. // empty value appearing in NullFields will be sent to the server as
  1583. // null. It is an error if a field in this list has a non-empty value.
  1584. // This may be used to include null fields in Patch requests.
  1585. NullFields []string `json:"-"`
  1586. }
  1587. func (s *Footnote) MarshalJSON() ([]byte, error) {
  1588. type NoMethod Footnote
  1589. raw := NoMethod(*s)
  1590. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1591. }
  1592. // FootnoteReference: A ParagraphElement representing a
  1593. // footnote reference. A footnote reference is the inline content
  1594. // rendered with
  1595. // a number and is used to identify the footnote.
  1596. type FootnoteReference struct {
  1597. // FootnoteId: The ID of the footnote that
  1598. // contains the content of this footnote reference.
  1599. FootnoteId string `json:"footnoteId,omitempty"`
  1600. // FootnoteNumber: The rendered number of this footnote.
  1601. FootnoteNumber string `json:"footnoteNumber,omitempty"`
  1602. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  1603. // there are no suggested deletions
  1604. // of this content.
  1605. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  1606. // SuggestedInsertionIds: The suggested insertion IDs. A
  1607. // FootnoteReference may have multiple insertion IDs if
  1608. // it is a nested suggested change. If empty, then this is not a
  1609. // suggested
  1610. // insertion.
  1611. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  1612. // SuggestedTextStyleChanges: The suggested text style changes to this
  1613. // FootnoteReference, keyed by
  1614. // suggestion ID.
  1615. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  1616. // TextStyle: The text style of this FootnoteReference.
  1617. TextStyle *TextStyle `json:"textStyle,omitempty"`
  1618. // ForceSendFields is a list of field names (e.g. "FootnoteId") to
  1619. // unconditionally include in API requests. By default, fields with
  1620. // empty values are omitted from API requests. However, any non-pointer,
  1621. // non-interface field appearing in ForceSendFields will be sent to the
  1622. // server regardless of whether the field is empty or not. This may be
  1623. // used to include empty fields in Patch requests.
  1624. ForceSendFields []string `json:"-"`
  1625. // NullFields is a list of field names (e.g. "FootnoteId") to include in
  1626. // API requests with the JSON null value. By default, fields with empty
  1627. // values are omitted from API requests. However, any field with an
  1628. // empty value appearing in NullFields will be sent to the server as
  1629. // null. It is an error if a field in this list has a non-empty value.
  1630. // This may be used to include null fields in Patch requests.
  1631. NullFields []string `json:"-"`
  1632. }
  1633. func (s *FootnoteReference) MarshalJSON() ([]byte, error) {
  1634. type NoMethod FootnoteReference
  1635. raw := NoMethod(*s)
  1636. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1637. }
  1638. // Header: A document header.
  1639. type Header struct {
  1640. // Content: The contents of the header.
  1641. //
  1642. // The indexes for a header's content begin at zero.
  1643. Content []*StructuralElement `json:"content,omitempty"`
  1644. // HeaderId: The ID of the header.
  1645. HeaderId string `json:"headerId,omitempty"`
  1646. // ForceSendFields is a list of field names (e.g. "Content") to
  1647. // unconditionally include in API requests. By default, fields with
  1648. // empty values are omitted from API requests. However, any non-pointer,
  1649. // non-interface field appearing in ForceSendFields will be sent to the
  1650. // server regardless of whether the field is empty or not. This may be
  1651. // used to include empty fields in Patch requests.
  1652. ForceSendFields []string `json:"-"`
  1653. // NullFields is a list of field names (e.g. "Content") to include in
  1654. // API requests with the JSON null value. By default, fields with empty
  1655. // values are omitted from API requests. However, any field with an
  1656. // empty value appearing in NullFields will be sent to the server as
  1657. // null. It is an error if a field in this list has a non-empty value.
  1658. // This may be used to include null fields in Patch requests.
  1659. NullFields []string `json:"-"`
  1660. }
  1661. func (s *Header) MarshalJSON() ([]byte, error) {
  1662. type NoMethod Header
  1663. raw := NoMethod(*s)
  1664. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1665. }
  1666. // HorizontalRule: A ParagraphElement representing a
  1667. // horizontal line.
  1668. type HorizontalRule struct {
  1669. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  1670. // there are no suggested deletions
  1671. // of this content.
  1672. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  1673. // SuggestedInsertionIds: The suggested insertion IDs. A HorizontalRule
  1674. // may have multiple insertion IDs if it
  1675. // is a nested suggested change. If empty, then this is not a
  1676. // suggested
  1677. // insertion.
  1678. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  1679. // SuggestedTextStyleChanges: The suggested text style changes to this
  1680. // HorizontalRule, keyed by
  1681. // suggestion ID.
  1682. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  1683. // TextStyle: The text style of this HorizontalRule.
  1684. //
  1685. // Similar to text content, like text runs and footnote references, the
  1686. // text
  1687. // style of a horizontal rule can affect content layout as well as the
  1688. // styling
  1689. // of text inserted adjacent to it.
  1690. TextStyle *TextStyle `json:"textStyle,omitempty"`
  1691. // ForceSendFields is a list of field names (e.g.
  1692. // "SuggestedDeletionIds") to unconditionally include in API requests.
  1693. // By default, fields with empty values are omitted from API requests.
  1694. // However, any non-pointer, non-interface field appearing in
  1695. // ForceSendFields will be sent to the server regardless of whether the
  1696. // field is empty or not. This may be used to include empty fields in
  1697. // Patch requests.
  1698. ForceSendFields []string `json:"-"`
  1699. // NullFields is a list of field names (e.g. "SuggestedDeletionIds") to
  1700. // include in API requests with the JSON null value. By default, fields
  1701. // with empty values are omitted from API requests. However, any field
  1702. // with an empty value appearing in NullFields will be sent to the
  1703. // server as null. It is an error if a field in this list has a
  1704. // non-empty value. This may be used to include null fields in Patch
  1705. // requests.
  1706. NullFields []string `json:"-"`
  1707. }
  1708. func (s *HorizontalRule) MarshalJSON() ([]byte, error) {
  1709. type NoMethod HorizontalRule
  1710. raw := NoMethod(*s)
  1711. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1712. }
  1713. // ImageProperties: The properties of an image.
  1714. type ImageProperties struct {
  1715. // Angle: The clockwise rotation angle of the image, in radians.
  1716. Angle float64 `json:"angle,omitempty"`
  1717. // Brightness: The brightness effect of the image. The value should be
  1718. // in the interval
  1719. // [-1.0, 1.0], where 0 means no effect.
  1720. Brightness float64 `json:"brightness,omitempty"`
  1721. // ContentUri: A URI to the image with a default lifetime of 30
  1722. // minutes.
  1723. // This URI is tagged with the account of the requester. Anyone with the
  1724. // URI
  1725. // effectively accesses the image as the original requester. Access to
  1726. // the
  1727. // image may be lost if the document's sharing settings change.
  1728. ContentUri string `json:"contentUri,omitempty"`
  1729. // Contrast: The contrast effect of the image. The value should be in
  1730. // the interval
  1731. // [-1.0, 1.0], where 0 means no effect.
  1732. Contrast float64 `json:"contrast,omitempty"`
  1733. // CropProperties: The crop properties of the image.
  1734. //
  1735. // After cropping, the image will be stretched to fit in its container.
  1736. CropProperties *CropProperties `json:"cropProperties,omitempty"`
  1737. // SourceUri: The source URI is the URI used to insert the image. The
  1738. // source URI can be
  1739. // empty.
  1740. SourceUri string `json:"sourceUri,omitempty"`
  1741. // Transparency: The transparency effect of the image. The value should
  1742. // be in the interval
  1743. // [0.0, 1.0], where 0 means no effect and 1 means completely
  1744. // transparent.
  1745. Transparency float64 `json:"transparency,omitempty"`
  1746. // ForceSendFields is a list of field names (e.g. "Angle") to
  1747. // unconditionally include in API requests. By default, fields with
  1748. // empty values are omitted from API requests. However, any non-pointer,
  1749. // non-interface field appearing in ForceSendFields will be sent to the
  1750. // server regardless of whether the field is empty or not. This may be
  1751. // used to include empty fields in Patch requests.
  1752. ForceSendFields []string `json:"-"`
  1753. // NullFields is a list of field names (e.g. "Angle") to include in API
  1754. // requests with the JSON null value. By default, fields with empty
  1755. // values are omitted from API requests. However, any field with an
  1756. // empty value appearing in NullFields will be sent to the server as
  1757. // null. It is an error if a field in this list has a non-empty value.
  1758. // This may be used to include null fields in Patch requests.
  1759. NullFields []string `json:"-"`
  1760. }
  1761. func (s *ImageProperties) MarshalJSON() ([]byte, error) {
  1762. type NoMethod ImageProperties
  1763. raw := NoMethod(*s)
  1764. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1765. }
  1766. func (s *ImageProperties) UnmarshalJSON(data []byte) error {
  1767. type NoMethod ImageProperties
  1768. var s1 struct {
  1769. Angle gensupport.JSONFloat64 `json:"angle"`
  1770. Brightness gensupport.JSONFloat64 `json:"brightness"`
  1771. Contrast gensupport.JSONFloat64 `json:"contrast"`
  1772. Transparency gensupport.JSONFloat64 `json:"transparency"`
  1773. *NoMethod
  1774. }
  1775. s1.NoMethod = (*NoMethod)(s)
  1776. if err := json.Unmarshal(data, &s1); err != nil {
  1777. return err
  1778. }
  1779. s.Angle = float64(s1.Angle)
  1780. s.Brightness = float64(s1.Brightness)
  1781. s.Contrast = float64(s1.Contrast)
  1782. s.Transparency = float64(s1.Transparency)
  1783. return nil
  1784. }
  1785. // ImagePropertiesSuggestionState: A mask that indicates which of the
  1786. // fields on the base ImageProperties have been changed in this
  1787. // suggestion.
  1788. // For any field set to true, there is a new suggested value.
  1789. type ImagePropertiesSuggestionState struct {
  1790. // AngleSuggested: Indicates if there was a suggested change to angle.
  1791. AngleSuggested bool `json:"angleSuggested,omitempty"`
  1792. // BrightnessSuggested: Indicates if there was a suggested change to
  1793. // brightness.
  1794. BrightnessSuggested bool `json:"brightnessSuggested,omitempty"`
  1795. // ContentUriSuggested: Indicates if there was a suggested change
  1796. // to
  1797. // content_uri.
  1798. ContentUriSuggested bool `json:"contentUriSuggested,omitempty"`
  1799. // ContrastSuggested: Indicates if there was a suggested change to
  1800. // contrast.
  1801. ContrastSuggested bool `json:"contrastSuggested,omitempty"`
  1802. // CropPropertiesSuggestionState: A mask that indicates which of the
  1803. // fields in crop_properties have been changed in
  1804. // this suggestion.
  1805. CropPropertiesSuggestionState *CropPropertiesSuggestionState `json:"cropPropertiesSuggestionState,omitempty"`
  1806. // SourceUriSuggested: Indicates if there was a suggested change to
  1807. // source_uri.
  1808. SourceUriSuggested bool `json:"sourceUriSuggested,omitempty"`
  1809. // TransparencySuggested: Indicates if there was a suggested change to
  1810. // transparency.
  1811. TransparencySuggested bool `json:"transparencySuggested,omitempty"`
  1812. // ForceSendFields is a list of field names (e.g. "AngleSuggested") to
  1813. // unconditionally include in API requests. By default, fields with
  1814. // empty values are omitted from API requests. However, any non-pointer,
  1815. // non-interface field appearing in ForceSendFields will be sent to the
  1816. // server regardless of whether the field is empty or not. This may be
  1817. // used to include empty fields in Patch requests.
  1818. ForceSendFields []string `json:"-"`
  1819. // NullFields is a list of field names (e.g. "AngleSuggested") to
  1820. // include in API requests with the JSON null value. By default, fields
  1821. // with empty values are omitted from API requests. However, any field
  1822. // with an empty value appearing in NullFields will be sent to the
  1823. // server as null. It is an error if a field in this list has a
  1824. // non-empty value. This may be used to include null fields in Patch
  1825. // requests.
  1826. NullFields []string `json:"-"`
  1827. }
  1828. func (s *ImagePropertiesSuggestionState) MarshalJSON() ([]byte, error) {
  1829. type NoMethod ImagePropertiesSuggestionState
  1830. raw := NoMethod(*s)
  1831. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1832. }
  1833. // InlineObject: An object that appears inline with text. An
  1834. // InlineObject contains
  1835. // an EmbeddedObject such as an image.
  1836. type InlineObject struct {
  1837. // InlineObjectProperties: The properties of this inline object.
  1838. InlineObjectProperties *InlineObjectProperties `json:"inlineObjectProperties,omitempty"`
  1839. // ObjectId: The ID of this inline object.
  1840. ObjectId string `json:"objectId,omitempty"`
  1841. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  1842. // there are no suggested deletions
  1843. // of this content.
  1844. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  1845. // SuggestedInlineObjectPropertiesChanges: The suggested changes to the
  1846. // inline object properties, keyed by suggestion
  1847. // ID.
  1848. SuggestedInlineObjectPropertiesChanges map[string]SuggestedInlineObjectProperties `json:"suggestedInlineObjectPropertiesChanges,omitempty"`
  1849. // SuggestedInsertionId: The suggested insertion ID. If empty, then this
  1850. // is not a suggested
  1851. // insertion.
  1852. SuggestedInsertionId string `json:"suggestedInsertionId,omitempty"`
  1853. // ForceSendFields is a list of field names (e.g.
  1854. // "InlineObjectProperties") to unconditionally include in API requests.
  1855. // By default, fields with empty values are omitted from API requests.
  1856. // However, any non-pointer, non-interface field appearing in
  1857. // ForceSendFields will be sent to the server regardless of whether the
  1858. // field is empty or not. This may be used to include empty fields in
  1859. // Patch requests.
  1860. ForceSendFields []string `json:"-"`
  1861. // NullFields is a list of field names (e.g. "InlineObjectProperties")
  1862. // to include in API requests with the JSON null value. By default,
  1863. // fields with empty values are omitted from API requests. However, any
  1864. // field with an empty value appearing in NullFields will be sent to the
  1865. // server as null. It is an error if a field in this list has a
  1866. // non-empty value. This may be used to include null fields in Patch
  1867. // requests.
  1868. NullFields []string `json:"-"`
  1869. }
  1870. func (s *InlineObject) MarshalJSON() ([]byte, error) {
  1871. type NoMethod InlineObject
  1872. raw := NoMethod(*s)
  1873. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1874. }
  1875. // InlineObjectElement: A ParagraphElement that contains
  1876. // an InlineObject.
  1877. type InlineObjectElement struct {
  1878. // InlineObjectId: The ID of the InlineObject this
  1879. // element contains.
  1880. InlineObjectId string `json:"inlineObjectId,omitempty"`
  1881. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  1882. // there are no suggested deletions
  1883. // of this content.
  1884. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  1885. // SuggestedInsertionIds: The suggested insertion IDs. An
  1886. // InlineObjectElement may have multiple insertion IDs
  1887. // if it is a nested suggested change. If empty, then this is not a
  1888. // suggested
  1889. // insertion.
  1890. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  1891. // SuggestedTextStyleChanges: The suggested text style changes to this
  1892. // InlineObject, keyed by suggestion
  1893. // ID.
  1894. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  1895. // TextStyle: The text style of this InlineObjectElement.
  1896. //
  1897. // Similar to text content, like text runs and footnote references, the
  1898. // text
  1899. // style of an inline object element can affect content layout as well
  1900. // as the
  1901. // styling of text inserted adjacent to it.
  1902. TextStyle *TextStyle `json:"textStyle,omitempty"`
  1903. // ForceSendFields is a list of field names (e.g. "InlineObjectId") to
  1904. // unconditionally include in API requests. By default, fields with
  1905. // empty values are omitted from API requests. However, any non-pointer,
  1906. // non-interface field appearing in ForceSendFields will be sent to the
  1907. // server regardless of whether the field is empty or not. This may be
  1908. // used to include empty fields in Patch requests.
  1909. ForceSendFields []string `json:"-"`
  1910. // NullFields is a list of field names (e.g. "InlineObjectId") to
  1911. // include in API requests with the JSON null value. By default, fields
  1912. // with empty values are omitted from API requests. However, any field
  1913. // with an empty value appearing in NullFields will be sent to the
  1914. // server as null. It is an error if a field in this list has a
  1915. // non-empty value. This may be used to include null fields in Patch
  1916. // requests.
  1917. NullFields []string `json:"-"`
  1918. }
  1919. func (s *InlineObjectElement) MarshalJSON() ([]byte, error) {
  1920. type NoMethod InlineObjectElement
  1921. raw := NoMethod(*s)
  1922. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1923. }
  1924. // InlineObjectProperties: Properties of an InlineObject.
  1925. type InlineObjectProperties struct {
  1926. // EmbeddedObject: The embedded object of this inline object.
  1927. EmbeddedObject *EmbeddedObject `json:"embeddedObject,omitempty"`
  1928. // ForceSendFields is a list of field names (e.g. "EmbeddedObject") to
  1929. // unconditionally include in API requests. By default, fields with
  1930. // empty values are omitted from API requests. However, any non-pointer,
  1931. // non-interface field appearing in ForceSendFields will be sent to the
  1932. // server regardless of whether the field is empty or not. This may be
  1933. // used to include empty fields in Patch requests.
  1934. ForceSendFields []string `json:"-"`
  1935. // NullFields is a list of field names (e.g. "EmbeddedObject") to
  1936. // include in API requests with the JSON null value. By default, fields
  1937. // with empty values are omitted from API requests. However, any field
  1938. // with an empty value appearing in NullFields will be sent to the
  1939. // server as null. It is an error if a field in this list has a
  1940. // non-empty value. This may be used to include null fields in Patch
  1941. // requests.
  1942. NullFields []string `json:"-"`
  1943. }
  1944. func (s *InlineObjectProperties) MarshalJSON() ([]byte, error) {
  1945. type NoMethod InlineObjectProperties
  1946. raw := NoMethod(*s)
  1947. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1948. }
  1949. // InlineObjectPropertiesSuggestionState: A mask that indicates which of
  1950. // the fields on the base
  1951. // InlineObjectProperties have
  1952. // been changed in this suggestion. For any field set to true, there is
  1953. // a new
  1954. // suggested value.
  1955. type InlineObjectPropertiesSuggestionState struct {
  1956. // EmbeddedObjectSuggestionState: A mask that indicates which of the
  1957. // fields in embedded_object have been
  1958. // changed in this suggestion.
  1959. EmbeddedObjectSuggestionState *EmbeddedObjectSuggestionState `json:"embeddedObjectSuggestionState,omitempty"`
  1960. // ForceSendFields is a list of field names (e.g.
  1961. // "EmbeddedObjectSuggestionState") to unconditionally include in API
  1962. // requests. By default, fields with empty values are omitted from API
  1963. // requests. However, any non-pointer, non-interface field appearing in
  1964. // ForceSendFields will be sent to the server regardless of whether the
  1965. // field is empty or not. This may be used to include empty fields in
  1966. // Patch requests.
  1967. ForceSendFields []string `json:"-"`
  1968. // NullFields is a list of field names (e.g.
  1969. // "EmbeddedObjectSuggestionState") to include in API requests with the
  1970. // JSON null value. By default, fields with empty values are omitted
  1971. // from API requests. However, any field with an empty value appearing
  1972. // in NullFields will be sent to the server as null. It is an error if a
  1973. // field in this list has a non-empty value. This may be used to include
  1974. // null fields in Patch requests.
  1975. NullFields []string `json:"-"`
  1976. }
  1977. func (s *InlineObjectPropertiesSuggestionState) MarshalJSON() ([]byte, error) {
  1978. type NoMethod InlineObjectPropertiesSuggestionState
  1979. raw := NoMethod(*s)
  1980. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1981. }
  1982. // InsertInlineImageRequest: Inserts an InlineObject containing an
  1983. // image at the given location.
  1984. type InsertInlineImageRequest struct {
  1985. // EndOfSegmentLocation: Inserts the text at the end of a header, footer
  1986. // or the document body.
  1987. //
  1988. // Inline images cannot be inserted inside a footnote.
  1989. EndOfSegmentLocation *EndOfSegmentLocation `json:"endOfSegmentLocation,omitempty"`
  1990. // Location: Inserts the image at a specific index in the document.
  1991. //
  1992. // The image must be inserted inside the bounds of an
  1993. // existing
  1994. // Paragraph. For instance, it cannot be
  1995. // inserted at a table's start index (i.e. between the table and
  1996. // its
  1997. // preceding paragraph).
  1998. //
  1999. // Inline images cannot be inserted inside a footnote or equation.
  2000. Location *Location `json:"location,omitempty"`
  2001. // ObjectSize: The size that the image should appear as in the document.
  2002. // This property is
  2003. // optional and the final size of the image in the document is
  2004. // determined by
  2005. // the following rules:
  2006. // * If neither width nor height is specified, then a default size of
  2007. // the
  2008. // image is calculated based on its resolution.
  2009. // * If one dimension is specified then the other dimension is
  2010. // calculated to
  2011. // preserve the aspect ratio of the image.
  2012. // * If both width and height are specified, the image is scaled to
  2013. // fit
  2014. // within the provided dimensions while maintaining its aspect ratio.
  2015. ObjectSize *Size `json:"objectSize,omitempty"`
  2016. // Uri: The image URI.
  2017. //
  2018. // The image is fetched once at insertion time and a copy is stored
  2019. // for
  2020. // display inside the document. Images must be less than 50MB in size,
  2021. // cannot
  2022. // exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF
  2023. // format.
  2024. //
  2025. // The provided URI can be at most 2 kB in length. The URI itself is
  2026. // saved
  2027. // with the image, and exposed via the ImageProperties.content_uri
  2028. // field.
  2029. Uri string `json:"uri,omitempty"`
  2030. // ForceSendFields is a list of field names (e.g.
  2031. // "EndOfSegmentLocation") to unconditionally include in API requests.
  2032. // By default, fields with empty values are omitted from API requests.
  2033. // However, any non-pointer, non-interface field appearing in
  2034. // ForceSendFields will be sent to the server regardless of whether the
  2035. // field is empty or not. This may be used to include empty fields in
  2036. // Patch requests.
  2037. ForceSendFields []string `json:"-"`
  2038. // NullFields is a list of field names (e.g. "EndOfSegmentLocation") to
  2039. // include in API requests with the JSON null value. By default, fields
  2040. // with empty values are omitted from API requests. However, any field
  2041. // with an empty value appearing in NullFields will be sent to the
  2042. // server as null. It is an error if a field in this list has a
  2043. // non-empty value. This may be used to include null fields in Patch
  2044. // requests.
  2045. NullFields []string `json:"-"`
  2046. }
  2047. func (s *InsertInlineImageRequest) MarshalJSON() ([]byte, error) {
  2048. type NoMethod InsertInlineImageRequest
  2049. raw := NoMethod(*s)
  2050. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2051. }
  2052. // InsertInlineImageResponse: The result of inserting an inline image.
  2053. type InsertInlineImageResponse struct {
  2054. // ObjectId: The ID of the created InlineObject.
  2055. ObjectId string `json:"objectId,omitempty"`
  2056. // ForceSendFields is a list of field names (e.g. "ObjectId") to
  2057. // unconditionally include in API requests. By default, fields with
  2058. // empty values are omitted from API requests. However, any non-pointer,
  2059. // non-interface field appearing in ForceSendFields will be sent to the
  2060. // server regardless of whether the field is empty or not. This may be
  2061. // used to include empty fields in Patch requests.
  2062. ForceSendFields []string `json:"-"`
  2063. // NullFields is a list of field names (e.g. "ObjectId") to include in
  2064. // API requests with the JSON null value. By default, fields with empty
  2065. // values are omitted from API requests. However, any field with an
  2066. // empty value appearing in NullFields will be sent to the server as
  2067. // null. It is an error if a field in this list has a non-empty value.
  2068. // This may be used to include null fields in Patch requests.
  2069. NullFields []string `json:"-"`
  2070. }
  2071. func (s *InsertInlineImageResponse) MarshalJSON() ([]byte, error) {
  2072. type NoMethod InsertInlineImageResponse
  2073. raw := NoMethod(*s)
  2074. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2075. }
  2076. // InsertInlineSheetsChartResponse: The result of inserting an embedded
  2077. // Google Sheets chart.
  2078. type InsertInlineSheetsChartResponse struct {
  2079. // ObjectId: The object ID of the inserted chart.
  2080. ObjectId string `json:"objectId,omitempty"`
  2081. // ForceSendFields is a list of field names (e.g. "ObjectId") to
  2082. // unconditionally include in API requests. By default, fields with
  2083. // empty values are omitted from API requests. However, any non-pointer,
  2084. // non-interface field appearing in ForceSendFields will be sent to the
  2085. // server regardless of whether the field is empty or not. This may be
  2086. // used to include empty fields in Patch requests.
  2087. ForceSendFields []string `json:"-"`
  2088. // NullFields is a list of field names (e.g. "ObjectId") to include in
  2089. // API requests with the JSON null value. By default, fields with empty
  2090. // values are omitted from API requests. However, any field with an
  2091. // empty value appearing in NullFields will be sent to the server as
  2092. // null. It is an error if a field in this list has a non-empty value.
  2093. // This may be used to include null fields in Patch requests.
  2094. NullFields []string `json:"-"`
  2095. }
  2096. func (s *InsertInlineSheetsChartResponse) MarshalJSON() ([]byte, error) {
  2097. type NoMethod InsertInlineSheetsChartResponse
  2098. raw := NoMethod(*s)
  2099. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2100. }
  2101. // InsertTableRowRequest: Inserts an empty row into a table.
  2102. type InsertTableRowRequest struct {
  2103. // InsertBelow: Whether to insert new row below the reference cell
  2104. // location.
  2105. //
  2106. // - `True`: insert below the cell.
  2107. // - `False`: insert above the cell.
  2108. InsertBelow bool `json:"insertBelow,omitempty"`
  2109. // TableCellLocation: The reference table cell location from which rows
  2110. // will be inserted.
  2111. //
  2112. // A new row will be inserted above (or below) the row where the
  2113. // reference
  2114. // cell is. If the reference cell is a merged cell, a new row will
  2115. // be
  2116. // inserted above (or below) the merged cell.
  2117. TableCellLocation *TableCellLocation `json:"tableCellLocation,omitempty"`
  2118. // ForceSendFields is a list of field names (e.g. "InsertBelow") to
  2119. // unconditionally include in API requests. By default, fields with
  2120. // empty values are omitted from API requests. However, any non-pointer,
  2121. // non-interface field appearing in ForceSendFields will be sent to the
  2122. // server regardless of whether the field is empty or not. This may be
  2123. // used to include empty fields in Patch requests.
  2124. ForceSendFields []string `json:"-"`
  2125. // NullFields is a list of field names (e.g. "InsertBelow") to include
  2126. // in API requests with the JSON null value. By default, fields with
  2127. // empty values are omitted from API requests. However, any field with
  2128. // an empty value appearing in NullFields will be sent to the server as
  2129. // null. It is an error if a field in this list has a non-empty value.
  2130. // This may be used to include null fields in Patch requests.
  2131. NullFields []string `json:"-"`
  2132. }
  2133. func (s *InsertTableRowRequest) MarshalJSON() ([]byte, error) {
  2134. type NoMethod InsertTableRowRequest
  2135. raw := NoMethod(*s)
  2136. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2137. }
  2138. // InsertTextRequest: Inserts text at the specified location.
  2139. type InsertTextRequest struct {
  2140. // EndOfSegmentLocation: Inserts the text at the end of a header,
  2141. // footer, footnote or
  2142. // the document body.
  2143. EndOfSegmentLocation *EndOfSegmentLocation `json:"endOfSegmentLocation,omitempty"`
  2144. // Location: Inserts the text at a specific index in the document.
  2145. //
  2146. // Text must be inserted inside the bounds of an existing
  2147. // Paragraph. For instance, text cannot be
  2148. // inserted at a table's start index (i.e. between the table and
  2149. // its
  2150. // preceding paragraph). The text must be inserted in the
  2151. // preceding
  2152. // paragraph.
  2153. Location *Location `json:"location,omitempty"`
  2154. // Text: The text to be inserted.
  2155. //
  2156. // Inserting a newline character will implicitly create a new
  2157. // Paragraph at that index.
  2158. // The paragraph style of the new paragraph will be copied from the
  2159. // paragraph
  2160. // at the current insertion index, including lists and bullets.
  2161. //
  2162. // Text styles for inserted text will be determined automatically,
  2163. // generally
  2164. // preserving the styling of neighboring text. In most cases, the text
  2165. // style
  2166. // for the inserted text will match the text immediately before the
  2167. // insertion
  2168. // index.
  2169. //
  2170. // Some control characters (U+0000-U+0008, U+000C-U+001F) and
  2171. // characters
  2172. // from the Unicode Basic Multilingual Plane Private Use Area
  2173. // (U+E000-U+F8FF)
  2174. // will be stripped out of the inserted text.
  2175. Text string `json:"text,omitempty"`
  2176. // ForceSendFields is a list of field names (e.g.
  2177. // "EndOfSegmentLocation") to unconditionally include in API requests.
  2178. // By default, fields with empty values are omitted from API requests.
  2179. // However, any non-pointer, non-interface field appearing in
  2180. // ForceSendFields will be sent to the server regardless of whether the
  2181. // field is empty or not. This may be used to include empty fields in
  2182. // Patch requests.
  2183. ForceSendFields []string `json:"-"`
  2184. // NullFields is a list of field names (e.g. "EndOfSegmentLocation") to
  2185. // include in API requests with the JSON null value. By default, fields
  2186. // with empty values are omitted from API requests. However, any field
  2187. // with an empty value appearing in NullFields will be sent to the
  2188. // server as null. It is an error if a field in this list has a
  2189. // non-empty value. This may be used to include null fields in Patch
  2190. // requests.
  2191. NullFields []string `json:"-"`
  2192. }
  2193. func (s *InsertTextRequest) MarshalJSON() ([]byte, error) {
  2194. type NoMethod InsertTextRequest
  2195. raw := NoMethod(*s)
  2196. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2197. }
  2198. // Link: A reference to another portion of a document or an external URL
  2199. // resource.
  2200. type Link struct {
  2201. // BookmarkId: The ID of a bookmark in this document.
  2202. BookmarkId string `json:"bookmarkId,omitempty"`
  2203. // HeadingId: The ID of a heading in this document.
  2204. HeadingId string `json:"headingId,omitempty"`
  2205. // Url: An external URL.
  2206. Url string `json:"url,omitempty"`
  2207. // ForceSendFields is a list of field names (e.g. "BookmarkId") to
  2208. // unconditionally include in API requests. By default, fields with
  2209. // empty values are omitted from API requests. However, any non-pointer,
  2210. // non-interface field appearing in ForceSendFields will be sent to the
  2211. // server regardless of whether the field is empty or not. This may be
  2212. // used to include empty fields in Patch requests.
  2213. ForceSendFields []string `json:"-"`
  2214. // NullFields is a list of field names (e.g. "BookmarkId") to include in
  2215. // API requests with the JSON null value. By default, fields with empty
  2216. // values are omitted from API requests. However, any field with an
  2217. // empty value appearing in NullFields will be sent to the server as
  2218. // null. It is an error if a field in this list has a non-empty value.
  2219. // This may be used to include null fields in Patch requests.
  2220. NullFields []string `json:"-"`
  2221. }
  2222. func (s *Link) MarshalJSON() ([]byte, error) {
  2223. type NoMethod Link
  2224. raw := NoMethod(*s)
  2225. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2226. }
  2227. // LinkedContentReference: A reference to the external linked source
  2228. // content.
  2229. type LinkedContentReference struct {
  2230. // SheetsChartReference: A reference to the linked chart.
  2231. SheetsChartReference *SheetsChartReference `json:"sheetsChartReference,omitempty"`
  2232. // ForceSendFields is a list of field names (e.g.
  2233. // "SheetsChartReference") to unconditionally include in API requests.
  2234. // By default, fields with empty values are omitted from API requests.
  2235. // However, any non-pointer, non-interface field appearing in
  2236. // ForceSendFields will be sent to the server regardless of whether the
  2237. // field is empty or not. This may be used to include empty fields in
  2238. // Patch requests.
  2239. ForceSendFields []string `json:"-"`
  2240. // NullFields is a list of field names (e.g. "SheetsChartReference") to
  2241. // include in API requests with the JSON null value. By default, fields
  2242. // with empty values are omitted from API requests. However, any field
  2243. // with an empty value appearing in NullFields will be sent to the
  2244. // server as null. It is an error if a field in this list has a
  2245. // non-empty value. This may be used to include null fields in Patch
  2246. // requests.
  2247. NullFields []string `json:"-"`
  2248. }
  2249. func (s *LinkedContentReference) MarshalJSON() ([]byte, error) {
  2250. type NoMethod LinkedContentReference
  2251. raw := NoMethod(*s)
  2252. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2253. }
  2254. // LinkedContentReferenceSuggestionState: A mask that indicates which of
  2255. // the fields on the base
  2256. // LinkedContentReference have
  2257. // been changed in this suggestion. For any field set to true, there is
  2258. // a new
  2259. // suggested value.
  2260. type LinkedContentReferenceSuggestionState struct {
  2261. // SheetsChartReferenceSuggestionState: A mask that indicates which of
  2262. // the fields in sheets_chart_reference have
  2263. // been changed in this suggestion.
  2264. SheetsChartReferenceSuggestionState *SheetsChartReferenceSuggestionState `json:"sheetsChartReferenceSuggestionState,omitempty"`
  2265. // ForceSendFields is a list of field names (e.g.
  2266. // "SheetsChartReferenceSuggestionState") to unconditionally include in
  2267. // API requests. By default, fields with empty values are omitted from
  2268. // API requests. However, any non-pointer, non-interface field appearing
  2269. // in ForceSendFields will be sent to the server regardless of whether
  2270. // the field is empty or not. This may be used to include empty fields
  2271. // in Patch requests.
  2272. ForceSendFields []string `json:"-"`
  2273. // NullFields is a list of field names (e.g.
  2274. // "SheetsChartReferenceSuggestionState") to include in API requests
  2275. // with the JSON null value. By default, fields with empty values are
  2276. // omitted from API requests. However, any field with an empty value
  2277. // appearing in NullFields will be sent to the server as null. It is an
  2278. // error if a field in this list has a non-empty value. This may be used
  2279. // to include null fields in Patch requests.
  2280. NullFields []string `json:"-"`
  2281. }
  2282. func (s *LinkedContentReferenceSuggestionState) MarshalJSON() ([]byte, error) {
  2283. type NoMethod LinkedContentReferenceSuggestionState
  2284. raw := NoMethod(*s)
  2285. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2286. }
  2287. // List: A List represents the list attributes for a group of paragraphs
  2288. // that all
  2289. // belong to the same list. A paragraph that is part of a list has a
  2290. // reference
  2291. // to the list's ID in its bullet.
  2292. type List struct {
  2293. // ListProperties: The properties of the list.
  2294. ListProperties *ListProperties `json:"listProperties,omitempty"`
  2295. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  2296. // there are no suggested deletions
  2297. // of this list.
  2298. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  2299. // SuggestedInsertionId: The suggested insertion ID. If empty, then this
  2300. // is not a suggested
  2301. // insertion.
  2302. SuggestedInsertionId string `json:"suggestedInsertionId,omitempty"`
  2303. // SuggestedListPropertiesChanges: The suggested changes to the list
  2304. // properties, keyed by suggestion
  2305. // ID.
  2306. SuggestedListPropertiesChanges map[string]SuggestedListProperties `json:"suggestedListPropertiesChanges,omitempty"`
  2307. // ForceSendFields is a list of field names (e.g. "ListProperties") to
  2308. // unconditionally include in API requests. By default, fields with
  2309. // empty values are omitted from API requests. However, any non-pointer,
  2310. // non-interface field appearing in ForceSendFields will be sent to the
  2311. // server regardless of whether the field is empty or not. This may be
  2312. // used to include empty fields in Patch requests.
  2313. ForceSendFields []string `json:"-"`
  2314. // NullFields is a list of field names (e.g. "ListProperties") to
  2315. // include in API requests with the JSON null value. By default, fields
  2316. // with empty values are omitted from API requests. However, any field
  2317. // with an empty value appearing in NullFields will be sent to the
  2318. // server as null. It is an error if a field in this list has a
  2319. // non-empty value. This may be used to include null fields in Patch
  2320. // requests.
  2321. NullFields []string `json:"-"`
  2322. }
  2323. func (s *List) MarshalJSON() ([]byte, error) {
  2324. type NoMethod List
  2325. raw := NoMethod(*s)
  2326. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2327. }
  2328. // ListProperties: The properties of a list which describe the look
  2329. // and feel of bullets belonging to paragraphs associated with a list.
  2330. type ListProperties struct {
  2331. // NestingLevels: Describes the properties of the bullets at the
  2332. // associated level.
  2333. //
  2334. // A list has at most nine levels of nesting with nesting level
  2335. // 0
  2336. // corresponding to the top-most level and nesting level 8 corresponding
  2337. // to
  2338. // the most nested level. The nesting levels are returned in ascending
  2339. // order
  2340. // with the least nested returned first.
  2341. NestingLevels []*NestingLevel `json:"nestingLevels,omitempty"`
  2342. // ForceSendFields is a list of field names (e.g. "NestingLevels") to
  2343. // unconditionally include in API requests. By default, fields with
  2344. // empty values are omitted from API requests. However, any non-pointer,
  2345. // non-interface field appearing in ForceSendFields will be sent to the
  2346. // server regardless of whether the field is empty or not. This may be
  2347. // used to include empty fields in Patch requests.
  2348. ForceSendFields []string `json:"-"`
  2349. // NullFields is a list of field names (e.g. "NestingLevels") to include
  2350. // in API requests with the JSON null value. By default, fields with
  2351. // empty values are omitted from API requests. However, any field with
  2352. // an empty value appearing in NullFields will be sent to the server as
  2353. // null. It is an error if a field in this list has a non-empty value.
  2354. // This may be used to include null fields in Patch requests.
  2355. NullFields []string `json:"-"`
  2356. }
  2357. func (s *ListProperties) MarshalJSON() ([]byte, error) {
  2358. type NoMethod ListProperties
  2359. raw := NoMethod(*s)
  2360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2361. }
  2362. // ListPropertiesSuggestionState: A mask that indicates which of the
  2363. // fields on the base ListProperties have been changed in this
  2364. // suggestion.
  2365. // For any field set to true, there is a new suggested value.
  2366. type ListPropertiesSuggestionState struct {
  2367. // NestingLevelsSuggestionStates: A mask that indicates which of the
  2368. // fields on the corresponding
  2369. // NestingLevel in nesting_levels have been changed in
  2370. // this suggestion.
  2371. //
  2372. // The nesting level suggestion states are returned in ascending order
  2373. // of the
  2374. // nesting level with the least nested returned first.
  2375. NestingLevelsSuggestionStates []*NestingLevelSuggestionState `json:"nestingLevelsSuggestionStates,omitempty"`
  2376. // ForceSendFields is a list of field names (e.g.
  2377. // "NestingLevelsSuggestionStates") to unconditionally include in API
  2378. // requests. By default, fields with empty values are omitted from API
  2379. // requests. However, any non-pointer, non-interface field appearing in
  2380. // ForceSendFields will be sent to the server regardless of whether the
  2381. // field is empty or not. This may be used to include empty fields in
  2382. // Patch requests.
  2383. ForceSendFields []string `json:"-"`
  2384. // NullFields is a list of field names (e.g.
  2385. // "NestingLevelsSuggestionStates") to include in API requests with the
  2386. // JSON null value. By default, fields with empty values are omitted
  2387. // from API requests. However, any field with an empty value appearing
  2388. // in NullFields will be sent to the server as null. It is an error if a
  2389. // field in this list has a non-empty value. This may be used to include
  2390. // null fields in Patch requests.
  2391. NullFields []string `json:"-"`
  2392. }
  2393. func (s *ListPropertiesSuggestionState) MarshalJSON() ([]byte, error) {
  2394. type NoMethod ListPropertiesSuggestionState
  2395. raw := NoMethod(*s)
  2396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2397. }
  2398. // Location: A particular location in the document.
  2399. type Location struct {
  2400. // Index: The zero-based index, in UTF-16 code units.
  2401. //
  2402. // The index is relative to the beginning of the segment specified
  2403. // by
  2404. // segment_id.
  2405. Index int64 `json:"index,omitempty"`
  2406. // SegmentId: The ID of the header, footer or footnote the location is
  2407. // in. An empty
  2408. // segment ID signifies the document's body.
  2409. SegmentId string `json:"segmentId,omitempty"`
  2410. // ForceSendFields is a list of field names (e.g. "Index") to
  2411. // unconditionally include in API requests. By default, fields with
  2412. // empty values are omitted from API requests. However, any non-pointer,
  2413. // non-interface field appearing in ForceSendFields will be sent to the
  2414. // server regardless of whether the field is empty or not. This may be
  2415. // used to include empty fields in Patch requests.
  2416. ForceSendFields []string `json:"-"`
  2417. // NullFields is a list of field names (e.g. "Index") to include in API
  2418. // requests with the JSON null value. By default, fields with empty
  2419. // values are omitted from API requests. However, any field with an
  2420. // empty value appearing in NullFields will be sent to the server as
  2421. // null. It is an error if a field in this list has a non-empty value.
  2422. // This may be used to include null fields in Patch requests.
  2423. NullFields []string `json:"-"`
  2424. }
  2425. func (s *Location) MarshalJSON() ([]byte, error) {
  2426. type NoMethod Location
  2427. raw := NoMethod(*s)
  2428. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2429. }
  2430. // NamedRange: A collection of Ranges with the same named
  2431. // range
  2432. // ID.
  2433. //
  2434. // Named ranges allow developers to associate parts of a document with
  2435. // an
  2436. // arbitrary user-defined label so their contents can be
  2437. // programmatically read
  2438. // or edited at a later time. A document can contain multiple named
  2439. // ranges with
  2440. // the same name, but every named range has a unique ID.
  2441. //
  2442. // A named range is created with a single Range,
  2443. // and content inserted inside a named range generally expands that
  2444. // range.
  2445. // However, certain document changes can cause the range to be split
  2446. // into
  2447. // multiple ranges.
  2448. //
  2449. // Named ranges are not private. All applications and collaborators that
  2450. // have
  2451. // access to the document can see its named ranges.
  2452. type NamedRange struct {
  2453. // Name: The name of the named range.
  2454. Name string `json:"name,omitempty"`
  2455. // NamedRangeId: The ID of the named range.
  2456. NamedRangeId string `json:"namedRangeId,omitempty"`
  2457. // Ranges: The ranges that belong to this named range.
  2458. Ranges []*Range `json:"ranges,omitempty"`
  2459. // ForceSendFields is a list of field names (e.g. "Name") to
  2460. // unconditionally include in API requests. By default, fields with
  2461. // empty values are omitted from API requests. However, any non-pointer,
  2462. // non-interface field appearing in ForceSendFields will be sent to the
  2463. // server regardless of whether the field is empty or not. This may be
  2464. // used to include empty fields in Patch requests.
  2465. ForceSendFields []string `json:"-"`
  2466. // NullFields is a list of field names (e.g. "Name") to include in API
  2467. // requests with the JSON null value. By default, fields with empty
  2468. // values are omitted from API requests. However, any field with an
  2469. // empty value appearing in NullFields will be sent to the server as
  2470. // null. It is an error if a field in this list has a non-empty value.
  2471. // This may be used to include null fields in Patch requests.
  2472. NullFields []string `json:"-"`
  2473. }
  2474. func (s *NamedRange) MarshalJSON() ([]byte, error) {
  2475. type NoMethod NamedRange
  2476. raw := NoMethod(*s)
  2477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2478. }
  2479. // NamedRanges: A collection of all the NamedRanges in the
  2480. // document that share a given name.
  2481. type NamedRanges struct {
  2482. // Name: The name that all the named ranges share.
  2483. Name string `json:"name,omitempty"`
  2484. // NamedRanges: The NamedRanges that share the same name.
  2485. NamedRanges []*NamedRange `json:"namedRanges,omitempty"`
  2486. // ForceSendFields is a list of field names (e.g. "Name") to
  2487. // unconditionally include in API requests. By default, fields with
  2488. // empty values are omitted from API requests. However, any non-pointer,
  2489. // non-interface field appearing in ForceSendFields will be sent to the
  2490. // server regardless of whether the field is empty or not. This may be
  2491. // used to include empty fields in Patch requests.
  2492. ForceSendFields []string `json:"-"`
  2493. // NullFields is a list of field names (e.g. "Name") to include in API
  2494. // requests with the JSON null value. By default, fields with empty
  2495. // values are omitted from API requests. However, any field with an
  2496. // empty value appearing in NullFields will be sent to the server as
  2497. // null. It is an error if a field in this list has a non-empty value.
  2498. // This may be used to include null fields in Patch requests.
  2499. NullFields []string `json:"-"`
  2500. }
  2501. func (s *NamedRanges) MarshalJSON() ([]byte, error) {
  2502. type NoMethod NamedRanges
  2503. raw := NoMethod(*s)
  2504. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2505. }
  2506. // NamedStyle: A named style. Paragraphs in the document can inherit
  2507. // their
  2508. // TextStyle and
  2509. // ParagraphStyle from this named style
  2510. // when they have the same named style type.
  2511. type NamedStyle struct {
  2512. // NamedStyleType: The type of this named style.
  2513. //
  2514. // Possible values:
  2515. // "NAMED_STYLE_TYPE_UNSPECIFIED" - The type of named style is
  2516. // unspecified.
  2517. // "NORMAL_TEXT" - Normal text.
  2518. // "TITLE" - Title.
  2519. // "SUBTITLE" - Subtitle.
  2520. // "HEADING_1" - Heading 1.
  2521. // "HEADING_2" - Heading 2.
  2522. // "HEADING_3" - Heading 3.
  2523. // "HEADING_4" - Heading 4.
  2524. // "HEADING_5" - Heading 5.
  2525. // "HEADING_6" - Heading 6.
  2526. NamedStyleType string `json:"namedStyleType,omitempty"`
  2527. // ParagraphStyle: The paragraph style of this named style.
  2528. ParagraphStyle *ParagraphStyle `json:"paragraphStyle,omitempty"`
  2529. // TextStyle: The text style of this named style.
  2530. TextStyle *TextStyle `json:"textStyle,omitempty"`
  2531. // ForceSendFields is a list of field names (e.g. "NamedStyleType") to
  2532. // unconditionally include in API requests. By default, fields with
  2533. // empty values are omitted from API requests. However, any non-pointer,
  2534. // non-interface field appearing in ForceSendFields will be sent to the
  2535. // server regardless of whether the field is empty or not. This may be
  2536. // used to include empty fields in Patch requests.
  2537. ForceSendFields []string `json:"-"`
  2538. // NullFields is a list of field names (e.g. "NamedStyleType") to
  2539. // include in API requests with the JSON null value. By default, fields
  2540. // with empty values are omitted from API requests. However, any field
  2541. // with an empty value appearing in NullFields will be sent to the
  2542. // server as null. It is an error if a field in this list has a
  2543. // non-empty value. This may be used to include null fields in Patch
  2544. // requests.
  2545. NullFields []string `json:"-"`
  2546. }
  2547. func (s *NamedStyle) MarshalJSON() ([]byte, error) {
  2548. type NoMethod NamedStyle
  2549. raw := NoMethod(*s)
  2550. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2551. }
  2552. // NamedStyleSuggestionState: A suggestion state of a NamedStyle
  2553. // message.
  2554. type NamedStyleSuggestionState struct {
  2555. // NamedStyleType: The named style type that this suggestion state
  2556. // corresponds to.
  2557. //
  2558. // This field is provided as a convenience for matching
  2559. // the
  2560. // NamedStyleSuggestionState with its corresponding NamedStyle.
  2561. //
  2562. // Possible values:
  2563. // "NAMED_STYLE_TYPE_UNSPECIFIED" - The type of named style is
  2564. // unspecified.
  2565. // "NORMAL_TEXT" - Normal text.
  2566. // "TITLE" - Title.
  2567. // "SUBTITLE" - Subtitle.
  2568. // "HEADING_1" - Heading 1.
  2569. // "HEADING_2" - Heading 2.
  2570. // "HEADING_3" - Heading 3.
  2571. // "HEADING_4" - Heading 4.
  2572. // "HEADING_5" - Heading 5.
  2573. // "HEADING_6" - Heading 6.
  2574. NamedStyleType string `json:"namedStyleType,omitempty"`
  2575. // ParagraphStyleSuggestionState: A mask that indicates which of the
  2576. // fields in paragraph style have been changed in this
  2577. // suggestion.
  2578. ParagraphStyleSuggestionState *ParagraphStyleSuggestionState `json:"paragraphStyleSuggestionState,omitempty"`
  2579. // TextStyleSuggestionState: A mask that indicates which of the fields
  2580. // in text style have been changed in this
  2581. // suggestion.
  2582. TextStyleSuggestionState *TextStyleSuggestionState `json:"textStyleSuggestionState,omitempty"`
  2583. // ForceSendFields is a list of field names (e.g. "NamedStyleType") to
  2584. // unconditionally include in API requests. By default, fields with
  2585. // empty values are omitted from API requests. However, any non-pointer,
  2586. // non-interface field appearing in ForceSendFields will be sent to the
  2587. // server regardless of whether the field is empty or not. This may be
  2588. // used to include empty fields in Patch requests.
  2589. ForceSendFields []string `json:"-"`
  2590. // NullFields is a list of field names (e.g. "NamedStyleType") to
  2591. // include in API requests with the JSON null value. By default, fields
  2592. // with empty values are omitted from API requests. However, any field
  2593. // with an empty value appearing in NullFields will be sent to the
  2594. // server as null. It is an error if a field in this list has a
  2595. // non-empty value. This may be used to include null fields in Patch
  2596. // requests.
  2597. NullFields []string `json:"-"`
  2598. }
  2599. func (s *NamedStyleSuggestionState) MarshalJSON() ([]byte, error) {
  2600. type NoMethod NamedStyleSuggestionState
  2601. raw := NoMethod(*s)
  2602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2603. }
  2604. // NamedStyles: The named styles. Paragraphs in the document can inherit
  2605. // their
  2606. // TextStyle and
  2607. // ParagraphStyle from these named styles.
  2608. type NamedStyles struct {
  2609. // Styles: The named styles.
  2610. //
  2611. // There is an entry for each of the possible named style types.
  2612. Styles []*NamedStyle `json:"styles,omitempty"`
  2613. // ForceSendFields is a list of field names (e.g. "Styles") to
  2614. // unconditionally include in API requests. By default, fields with
  2615. // empty values are omitted from API requests. However, any non-pointer,
  2616. // non-interface field appearing in ForceSendFields will be sent to the
  2617. // server regardless of whether the field is empty or not. This may be
  2618. // used to include empty fields in Patch requests.
  2619. ForceSendFields []string `json:"-"`
  2620. // NullFields is a list of field names (e.g. "Styles") to include in API
  2621. // requests with the JSON null value. By default, fields with empty
  2622. // values are omitted from API requests. However, any field with an
  2623. // empty value appearing in NullFields will be sent to the server as
  2624. // null. It is an error if a field in this list has a non-empty value.
  2625. // This may be used to include null fields in Patch requests.
  2626. NullFields []string `json:"-"`
  2627. }
  2628. func (s *NamedStyles) MarshalJSON() ([]byte, error) {
  2629. type NoMethod NamedStyles
  2630. raw := NoMethod(*s)
  2631. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2632. }
  2633. // NamedStylesSuggestionState: The suggestion state of a
  2634. // NamedStyles
  2635. // message.
  2636. type NamedStylesSuggestionState struct {
  2637. // StylesSuggestionStates: A mask that indicates which of the fields on
  2638. // the corresponding NamedStyle in styles have been changed in
  2639. // this
  2640. // suggestion.
  2641. //
  2642. // The order of these named style suggestion states match the order of
  2643. // the
  2644. // corresponding named style within the named styles suggestion.
  2645. StylesSuggestionStates []*NamedStyleSuggestionState `json:"stylesSuggestionStates,omitempty"`
  2646. // ForceSendFields is a list of field names (e.g.
  2647. // "StylesSuggestionStates") to unconditionally include in API requests.
  2648. // By default, fields with empty values are omitted from API requests.
  2649. // However, any non-pointer, non-interface field appearing in
  2650. // ForceSendFields will be sent to the server regardless of whether the
  2651. // field is empty or not. This may be used to include empty fields in
  2652. // Patch requests.
  2653. ForceSendFields []string `json:"-"`
  2654. // NullFields is a list of field names (e.g. "StylesSuggestionStates")
  2655. // to include in API requests with the JSON null value. By default,
  2656. // fields with empty values are omitted from API requests. However, any
  2657. // field with an empty value appearing in NullFields will be sent to the
  2658. // server as null. It is an error if a field in this list has a
  2659. // non-empty value. This may be used to include null fields in Patch
  2660. // requests.
  2661. NullFields []string `json:"-"`
  2662. }
  2663. func (s *NamedStylesSuggestionState) MarshalJSON() ([]byte, error) {
  2664. type NoMethod NamedStylesSuggestionState
  2665. raw := NoMethod(*s)
  2666. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2667. }
  2668. // NestingLevel: Contains properties describing the look and feel of a
  2669. // list bullet at a given
  2670. // level of nesting.
  2671. type NestingLevel struct {
  2672. // BulletAlignment: The alignment of the bullet within the space
  2673. // allotted for rendering the
  2674. // bullet.
  2675. //
  2676. // Possible values:
  2677. // "BULLET_ALIGNMENT_UNSPECIFIED" - The bullet alignment is
  2678. // unspecified.
  2679. // "START" - The bullet is aligned to the start of the space allotted
  2680. // for rendering
  2681. // the bullet. Left-aligned for LTR text, right-aligned otherwise.
  2682. // "CENTER" - The bullet is aligned to the center of the space
  2683. // allotted for rendering
  2684. // the bullet.
  2685. // "END" - The bullet is aligned to the end of the space allotted for
  2686. // rendering the
  2687. // bullet. Right-aligned for LTR text, left-aligned otherwise.
  2688. BulletAlignment string `json:"bulletAlignment,omitempty"`
  2689. // GlyphFormat: The format string used by bullets at this level of
  2690. // nesting.
  2691. //
  2692. // The glyph format contains one or more placeholders, and these
  2693. // placeholder
  2694. // are replaced with the appropriate values depending on the glyph_type
  2695. // or glyph_symbol. The placeholders follow
  2696. // the pattern `%[nesting_level]`. Furthermore, placeholders can have
  2697. // prefixes
  2698. // and suffixes. Thus, the glyph format follows the
  2699. // pattern
  2700. // `<prefix>%[nesting_level]<suffix>`. Note that the prefix and suffix
  2701. // are
  2702. // optional and can be arbitrary strings.
  2703. //
  2704. // For example, the glyph format `%0.` indicates that the rendered glyph
  2705. // will
  2706. // replace the placeholder with the corresponding glyph for nesting
  2707. // level 0
  2708. // followed by a period as the suffix. So a list with a glyph type
  2709. // of
  2710. // UPPER_ALPHA and
  2711. // glyph format `%0.` at nesting level 0 will result in a list with
  2712. // rendered
  2713. // glyphs
  2714. // <p>`A.`
  2715. // <p>`B.`
  2716. // <p>`C.`
  2717. //
  2718. // The glyph format can contain placeholders for the current nesting
  2719. // level as
  2720. // well as placeholders for parent nesting levels. For example, a
  2721. // list can have a glyph format of `%0.` at nesting level 0 and a
  2722. // glyph format of `%0.%1.` at nesting level 1. Assuming both nesting
  2723. // levels
  2724. // have DECIMAL glyph
  2725. // types, this would result in a list with rendered
  2726. // glyphs
  2727. // <p>`1.`
  2728. // <p>`2.`
  2729. // <p>` 2.1.`
  2730. // <p>` 2.2.`
  2731. // <p>`3.`
  2732. //
  2733. // For nesting levels that are ordered, the string that replaces a
  2734. // placeholder
  2735. // in the glyph format for a particular paragraph depends on the
  2736. // paragraph's
  2737. // order within the list.
  2738. GlyphFormat string `json:"glyphFormat,omitempty"`
  2739. // GlyphSymbol: A custom glyph symbol used by bullets when paragraphs at
  2740. // this level of
  2741. // nesting are unordered.
  2742. //
  2743. // The glyph symbol replaces placeholders within the glyph_format. For
  2744. // example, if the
  2745. // glyph_symbol is the solid circle corresponding to Unicode U+25cf
  2746. // code
  2747. // point and the glyph_format is `%0`, the rendered
  2748. // glyph would be the solid circle.
  2749. GlyphSymbol string `json:"glyphSymbol,omitempty"`
  2750. // GlyphType: The type of glyph used by bullets when paragraphs at this
  2751. // level of
  2752. // nesting are ordered.
  2753. //
  2754. // The glyph type determines the type of glyph used to replace
  2755. // placeholders
  2756. // within the glyph_format
  2757. // when paragraphs at this level of nesting are ordered. For example, if
  2758. // the
  2759. // nesting level is 0, the glyph_format is `%0.` and the glyph
  2760. // type is DECIMAL,
  2761. // then the rendered glyph would replace the placeholder `%0` in the
  2762. // glyph
  2763. // format with a number corresponding to list item's order within the
  2764. // list.
  2765. //
  2766. // Possible values:
  2767. // "GLYPH_TYPE_UNSPECIFIED" - The glyph type is unspecified or
  2768. // unsupported.
  2769. // "NONE" - An empty string.
  2770. // "DECIMAL" - A number, like `1`, `2`, or `3`.
  2771. // "ZERO_DECIMAL" - A number where single digit numbers are prefixed
  2772. // with a zero, like `01`,
  2773. // `02`, or `03`. Numbers with more than one digit are not prefixed with
  2774. // a
  2775. // zero.
  2776. // "UPPER_ALPHA" - An uppercase letter, like `A`, `B`, or `C`.
  2777. // "ALPHA" - A lowercase letter, like `a`, `b`, or `c`.
  2778. // "UPPER_ROMAN" - An uppercase Roman numeral, like `I`, `II`, or
  2779. // `III`.
  2780. // "ROMAN" - A lowercase Roman numeral, like `i`, `ii`, or `iii`.
  2781. GlyphType string `json:"glyphType,omitempty"`
  2782. // IndentFirstLine: The amount of indentation for the first line of
  2783. // paragraphs at this level of
  2784. // nesting.
  2785. IndentFirstLine *Dimension `json:"indentFirstLine,omitempty"`
  2786. // IndentStart: The amount of indentation for paragraphs at this level
  2787. // of nesting. Applied
  2788. // to the side that corresponds to the start of the text, based on
  2789. // the
  2790. // paragraph's content direction.
  2791. IndentStart *Dimension `json:"indentStart,omitempty"`
  2792. // StartNumber: The number of the first list item at this nesting
  2793. // level.
  2794. //
  2795. // A value of 0 is treated as a value of 1 for lettered lists and
  2796. // roman
  2797. // numeraled lists, i.e. for values of both 0 and 1, lettered and
  2798. // roman
  2799. // numeraled lists will begin at `a` and `i` respectively.
  2800. //
  2801. // This value is ignored for nesting levels with unordered glyphs.
  2802. StartNumber int64 `json:"startNumber,omitempty"`
  2803. // TextStyle: The text style of bullets at this level of nesting.
  2804. TextStyle *TextStyle `json:"textStyle,omitempty"`
  2805. // ForceSendFields is a list of field names (e.g. "BulletAlignment") to
  2806. // unconditionally include in API requests. By default, fields with
  2807. // empty values are omitted from API requests. However, any non-pointer,
  2808. // non-interface field appearing in ForceSendFields will be sent to the
  2809. // server regardless of whether the field is empty or not. This may be
  2810. // used to include empty fields in Patch requests.
  2811. ForceSendFields []string `json:"-"`
  2812. // NullFields is a list of field names (e.g. "BulletAlignment") to
  2813. // include in API requests with the JSON null value. By default, fields
  2814. // with empty values are omitted from API requests. However, any field
  2815. // with an empty value appearing in NullFields will be sent to the
  2816. // server as null. It is an error if a field in this list has a
  2817. // non-empty value. This may be used to include null fields in Patch
  2818. // requests.
  2819. NullFields []string `json:"-"`
  2820. }
  2821. func (s *NestingLevel) MarshalJSON() ([]byte, error) {
  2822. type NoMethod NestingLevel
  2823. raw := NoMethod(*s)
  2824. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2825. }
  2826. // NestingLevelSuggestionState: A mask that indicates which of the
  2827. // fields on the base NestingLevel have been changed in this suggestion.
  2828. // For
  2829. // any field set to true, there is a new suggested value.
  2830. type NestingLevelSuggestionState struct {
  2831. // BulletAlignmentSuggested: Indicates if there was a suggested change
  2832. // to
  2833. // bullet_alignment.
  2834. BulletAlignmentSuggested bool `json:"bulletAlignmentSuggested,omitempty"`
  2835. // GlyphFormatSuggested: Indicates if there was a suggested change
  2836. // to
  2837. // glyph_format.
  2838. GlyphFormatSuggested bool `json:"glyphFormatSuggested,omitempty"`
  2839. // GlyphSymbolSuggested: Indicates if there was a suggested change
  2840. // to
  2841. // glyph_symbol.
  2842. GlyphSymbolSuggested bool `json:"glyphSymbolSuggested,omitempty"`
  2843. // GlyphTypeSuggested: Indicates if there was a suggested change
  2844. // to
  2845. // glyph_type.
  2846. GlyphTypeSuggested bool `json:"glyphTypeSuggested,omitempty"`
  2847. // IndentFirstLineSuggested: Indicates if there was a suggested change
  2848. // to
  2849. // indent_first_line.
  2850. IndentFirstLineSuggested bool `json:"indentFirstLineSuggested,omitempty"`
  2851. // IndentStartSuggested: Indicates if there was a suggested change
  2852. // to
  2853. // indent_start.
  2854. IndentStartSuggested bool `json:"indentStartSuggested,omitempty"`
  2855. // StartNumberSuggested: Indicates if there was a suggested change
  2856. // to
  2857. // start_number.
  2858. StartNumberSuggested bool `json:"startNumberSuggested,omitempty"`
  2859. // TextStyleSuggestionState: A mask that indicates which of the fields
  2860. // in text style have been changed in this
  2861. // suggestion.
  2862. TextStyleSuggestionState *TextStyleSuggestionState `json:"textStyleSuggestionState,omitempty"`
  2863. // ForceSendFields is a list of field names (e.g.
  2864. // "BulletAlignmentSuggested") to unconditionally include in API
  2865. // requests. By default, fields with empty values are omitted from API
  2866. // requests. However, any non-pointer, non-interface field appearing in
  2867. // ForceSendFields will be sent to the server regardless of whether the
  2868. // field is empty or not. This may be used to include empty fields in
  2869. // Patch requests.
  2870. ForceSendFields []string `json:"-"`
  2871. // NullFields is a list of field names (e.g. "BulletAlignmentSuggested")
  2872. // to include in API requests with the JSON null value. By default,
  2873. // fields with empty values are omitted from API requests. However, any
  2874. // field with an empty value appearing in NullFields will be sent to the
  2875. // server as null. It is an error if a field in this list has a
  2876. // non-empty value. This may be used to include null fields in Patch
  2877. // requests.
  2878. NullFields []string `json:"-"`
  2879. }
  2880. func (s *NestingLevelSuggestionState) MarshalJSON() ([]byte, error) {
  2881. type NoMethod NestingLevelSuggestionState
  2882. raw := NoMethod(*s)
  2883. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2884. }
  2885. // ObjectReferences: A collection of object IDs.
  2886. type ObjectReferences struct {
  2887. // ObjectIds: The object IDs.
  2888. ObjectIds []string `json:"objectIds,omitempty"`
  2889. // ForceSendFields is a list of field names (e.g. "ObjectIds") to
  2890. // unconditionally include in API requests. By default, fields with
  2891. // empty values are omitted from API requests. However, any non-pointer,
  2892. // non-interface field appearing in ForceSendFields will be sent to the
  2893. // server regardless of whether the field is empty or not. This may be
  2894. // used to include empty fields in Patch requests.
  2895. ForceSendFields []string `json:"-"`
  2896. // NullFields is a list of field names (e.g. "ObjectIds") to include in
  2897. // API requests with the JSON null value. By default, fields with empty
  2898. // values are omitted from API requests. However, any field with an
  2899. // empty value appearing in NullFields will be sent to the server as
  2900. // null. It is an error if a field in this list has a non-empty value.
  2901. // This may be used to include null fields in Patch requests.
  2902. NullFields []string `json:"-"`
  2903. }
  2904. func (s *ObjectReferences) MarshalJSON() ([]byte, error) {
  2905. type NoMethod ObjectReferences
  2906. raw := NoMethod(*s)
  2907. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2908. }
  2909. // OptionalColor: A color that can either be fully opaque or fully
  2910. // transparent.
  2911. type OptionalColor struct {
  2912. // Color: If set, this will be used as an opaque color. If unset, this
  2913. // represents
  2914. // a transparent color.
  2915. Color *Color `json:"color,omitempty"`
  2916. // ForceSendFields is a list of field names (e.g. "Color") to
  2917. // unconditionally include in API requests. By default, fields with
  2918. // empty values are omitted from API requests. However, any non-pointer,
  2919. // non-interface field appearing in ForceSendFields will be sent to the
  2920. // server regardless of whether the field is empty or not. This may be
  2921. // used to include empty fields in Patch requests.
  2922. ForceSendFields []string `json:"-"`
  2923. // NullFields is a list of field names (e.g. "Color") to include in API
  2924. // requests with the JSON null value. By default, fields with empty
  2925. // values are omitted from API requests. However, any field with an
  2926. // empty value appearing in NullFields will be sent to the server as
  2927. // null. It is an error if a field in this list has a non-empty value.
  2928. // This may be used to include null fields in Patch requests.
  2929. NullFields []string `json:"-"`
  2930. }
  2931. func (s *OptionalColor) MarshalJSON() ([]byte, error) {
  2932. type NoMethod OptionalColor
  2933. raw := NoMethod(*s)
  2934. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2935. }
  2936. // PageBreak: A ParagraphElement representing a
  2937. // page break. A page break makes the subsequent text start at the top
  2938. // of the
  2939. // next page.
  2940. type PageBreak struct {
  2941. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  2942. // there are no suggested deletions
  2943. // of this content.
  2944. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  2945. // SuggestedInsertionIds: The suggested insertion IDs. A PageBreak
  2946. // may have multiple insertion IDs if it is a nested suggested change.
  2947. // If
  2948. // empty, then this is not a suggested insertion.
  2949. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  2950. // SuggestedTextStyleChanges: The suggested text style changes to this
  2951. // PageBreak, keyed by suggestion ID.
  2952. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  2953. // TextStyle: The text style of this PageBreak.
  2954. //
  2955. // Similar to text content, like text runs and footnote references, the
  2956. // text
  2957. // style of a page break can affect content layout as well as the
  2958. // styling of
  2959. // text inserted adjacent to it.
  2960. TextStyle *TextStyle `json:"textStyle,omitempty"`
  2961. // ForceSendFields is a list of field names (e.g.
  2962. // "SuggestedDeletionIds") to unconditionally include in API requests.
  2963. // By default, fields with empty values are omitted from API requests.
  2964. // However, any non-pointer, non-interface field appearing in
  2965. // ForceSendFields will be sent to the server regardless of whether the
  2966. // field is empty or not. This may be used to include empty fields in
  2967. // Patch requests.
  2968. ForceSendFields []string `json:"-"`
  2969. // NullFields is a list of field names (e.g. "SuggestedDeletionIds") to
  2970. // include in API requests with the JSON null value. By default, fields
  2971. // with empty values are omitted from API requests. However, any field
  2972. // with an empty value appearing in NullFields will be sent to the
  2973. // server as null. It is an error if a field in this list has a
  2974. // non-empty value. This may be used to include null fields in Patch
  2975. // requests.
  2976. NullFields []string `json:"-"`
  2977. }
  2978. func (s *PageBreak) MarshalJSON() ([]byte, error) {
  2979. type NoMethod PageBreak
  2980. raw := NoMethod(*s)
  2981. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2982. }
  2983. // Paragraph: A StructuralElement representing a
  2984. // paragraph. A paragraph is a range of content that is terminated with
  2985. // a
  2986. // newline character.
  2987. type Paragraph struct {
  2988. // Bullet: The bullet for this paragraph. If not present, the paragraph
  2989. // does not
  2990. // belong to a list.
  2991. Bullet *Bullet `json:"bullet,omitempty"`
  2992. // Elements: The content of the paragraph broken down into its component
  2993. // parts.
  2994. Elements []*ParagraphElement `json:"elements,omitempty"`
  2995. // ParagraphStyle: The style of this paragraph.
  2996. ParagraphStyle *ParagraphStyle `json:"paragraphStyle,omitempty"`
  2997. // PositionedObjectIds: The IDs of the positioned objects tethered to
  2998. // this paragraph.
  2999. PositionedObjectIds []string `json:"positionedObjectIds,omitempty"`
  3000. // SuggestedBulletChanges: The suggested changes to this paragraph's
  3001. // bullet.
  3002. SuggestedBulletChanges map[string]SuggestedBullet `json:"suggestedBulletChanges,omitempty"`
  3003. // SuggestedParagraphStyleChanges: The suggested paragraph style changes
  3004. // to this paragraph, keyed by
  3005. // suggestion ID.
  3006. SuggestedParagraphStyleChanges map[string]SuggestedParagraphStyle `json:"suggestedParagraphStyleChanges,omitempty"`
  3007. // SuggestedPositionedObjectIds: The IDs of the positioned objects that
  3008. // are suggested to be attached to this
  3009. // paragraph, keyed by suggestion ID.
  3010. SuggestedPositionedObjectIds map[string]ObjectReferences `json:"suggestedPositionedObjectIds,omitempty"`
  3011. // ForceSendFields is a list of field names (e.g. "Bullet") to
  3012. // unconditionally include in API requests. By default, fields with
  3013. // empty values are omitted from API requests. However, any non-pointer,
  3014. // non-interface field appearing in ForceSendFields will be sent to the
  3015. // server regardless of whether the field is empty or not. This may be
  3016. // used to include empty fields in Patch requests.
  3017. ForceSendFields []string `json:"-"`
  3018. // NullFields is a list of field names (e.g. "Bullet") to include in API
  3019. // requests with the JSON null value. By default, fields with empty
  3020. // values are omitted from API requests. However, any field with an
  3021. // empty value appearing in NullFields will be sent to the server as
  3022. // null. It is an error if a field in this list has a non-empty value.
  3023. // This may be used to include null fields in Patch requests.
  3024. NullFields []string `json:"-"`
  3025. }
  3026. func (s *Paragraph) MarshalJSON() ([]byte, error) {
  3027. type NoMethod Paragraph
  3028. raw := NoMethod(*s)
  3029. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3030. }
  3031. // ParagraphBorder: A border around a paragraph.
  3032. type ParagraphBorder struct {
  3033. // Color: The color of the border.
  3034. Color *OptionalColor `json:"color,omitempty"`
  3035. // DashStyle: The dash style of the border.
  3036. //
  3037. // Possible values:
  3038. // "DASH_STYLE_UNSPECIFIED" - Unspecified dash style.
  3039. // "SOLID" - Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal
  3040. // value 'solid'.
  3041. // This is the default dash style.
  3042. // "DOT" - Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal
  3043. // value 'dot'.
  3044. // "DASH" - Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal
  3045. // value 'dash'.
  3046. DashStyle string `json:"dashStyle,omitempty"`
  3047. // Padding: The padding of the border.
  3048. Padding *Dimension `json:"padding,omitempty"`
  3049. // Width: The width of the border.
  3050. Width *Dimension `json:"width,omitempty"`
  3051. // ForceSendFields is a list of field names (e.g. "Color") to
  3052. // unconditionally include in API requests. By default, fields with
  3053. // empty values are omitted from API requests. However, any non-pointer,
  3054. // non-interface field appearing in ForceSendFields will be sent to the
  3055. // server regardless of whether the field is empty or not. This may be
  3056. // used to include empty fields in Patch requests.
  3057. ForceSendFields []string `json:"-"`
  3058. // NullFields is a list of field names (e.g. "Color") to include in API
  3059. // requests with the JSON null value. By default, fields with empty
  3060. // values are omitted from API requests. However, any field with an
  3061. // empty value appearing in NullFields will be sent to the server as
  3062. // null. It is an error if a field in this list has a non-empty value.
  3063. // This may be used to include null fields in Patch requests.
  3064. NullFields []string `json:"-"`
  3065. }
  3066. func (s *ParagraphBorder) MarshalJSON() ([]byte, error) {
  3067. type NoMethod ParagraphBorder
  3068. raw := NoMethod(*s)
  3069. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3070. }
  3071. // ParagraphElement: A ParagraphElement describes content within
  3072. // a
  3073. // Paragraph.
  3074. type ParagraphElement struct {
  3075. // AutoText: An auto text paragraph element.
  3076. AutoText *AutoText `json:"autoText,omitempty"`
  3077. // ColumnBreak: A column break paragraph element.
  3078. ColumnBreak *ColumnBreak `json:"columnBreak,omitempty"`
  3079. // EndIndex: The zero-base end index of this paragraph element,
  3080. // exclusive, in UTF-16
  3081. // code units.
  3082. EndIndex int64 `json:"endIndex,omitempty"`
  3083. // Equation: An equation paragraph element.
  3084. Equation *Equation `json:"equation,omitempty"`
  3085. // FootnoteReference: A footnote reference paragraph element.
  3086. FootnoteReference *FootnoteReference `json:"footnoteReference,omitempty"`
  3087. // HorizontalRule: A horizontal rule paragraph element.
  3088. HorizontalRule *HorizontalRule `json:"horizontalRule,omitempty"`
  3089. // InlineObjectElement: An inline object paragraph element.
  3090. InlineObjectElement *InlineObjectElement `json:"inlineObjectElement,omitempty"`
  3091. // PageBreak: A page break paragraph element.
  3092. PageBreak *PageBreak `json:"pageBreak,omitempty"`
  3093. // StartIndex: The zero-based start index of this paragraph element, in
  3094. // UTF-16 code units.
  3095. StartIndex int64 `json:"startIndex,omitempty"`
  3096. // TextRun: A text run paragraph element.
  3097. TextRun *TextRun `json:"textRun,omitempty"`
  3098. // ForceSendFields is a list of field names (e.g. "AutoText") to
  3099. // unconditionally include in API requests. By default, fields with
  3100. // empty values are omitted from API requests. However, any non-pointer,
  3101. // non-interface field appearing in ForceSendFields will be sent to the
  3102. // server regardless of whether the field is empty or not. This may be
  3103. // used to include empty fields in Patch requests.
  3104. ForceSendFields []string `json:"-"`
  3105. // NullFields is a list of field names (e.g. "AutoText") to include in
  3106. // API requests with the JSON null value. By default, fields with empty
  3107. // values are omitted from API requests. However, any field with an
  3108. // empty value appearing in NullFields will be sent to the server as
  3109. // null. It is an error if a field in this list has a non-empty value.
  3110. // This may be used to include null fields in Patch requests.
  3111. NullFields []string `json:"-"`
  3112. }
  3113. func (s *ParagraphElement) MarshalJSON() ([]byte, error) {
  3114. type NoMethod ParagraphElement
  3115. raw := NoMethod(*s)
  3116. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3117. }
  3118. // ParagraphStyle: Styles that apply to a whole paragraph.
  3119. //
  3120. // Inherited paragraph styles are represented as unset fields in this
  3121. // message.
  3122. // A paragraph style's parent depends on where the paragraph style is
  3123. // defined:
  3124. //
  3125. // * The ParagraphStyle on a Paragraph
  3126. // inherits from the paragraph's corresponding named style type.
  3127. // * The ParagraphStyle on a named style
  3128. // inherits from the normal text named style.
  3129. // * The ParagraphStyle of the normal text named style inherits
  3130. // from the default paragraph style in the Docs editor.
  3131. // * The ParagraphStyle on a Paragraph
  3132. // element that is contained in a table may inherit its paragraph
  3133. // style from
  3134. // the table style.
  3135. //
  3136. // If the paragraph style does not inherit from a parent, unsetting
  3137. // fields will
  3138. // revert the style to a value matching the defaults in the Docs editor.
  3139. type ParagraphStyle struct {
  3140. // Alignment: The text alignment for this paragraph.
  3141. //
  3142. // Possible values:
  3143. // "ALIGNMENT_UNSPECIFIED" - The paragraph alignment is inherited from
  3144. // the parent.
  3145. // "START" - The paragraph is aligned to the start of the line.
  3146. // Left-aligned for LTR
  3147. // text, right-aligned otherwise.
  3148. // "CENTER" - The paragraph is centered.
  3149. // "END" - The paragraph is aligned to the end of the line.
  3150. // Right-aligned for LTR
  3151. // text, left-aligned otherwise.
  3152. // "JUSTIFIED" - The paragraph is justified.
  3153. Alignment string `json:"alignment,omitempty"`
  3154. // AvoidWidowAndOrphan: Whether to avoid widows and orphans for the
  3155. // paragraph. If unset, the value
  3156. // is inherited from the parent.
  3157. AvoidWidowAndOrphan bool `json:"avoidWidowAndOrphan,omitempty"`
  3158. // BorderBetween: The border between this paragraph and the next and
  3159. // previous paragraphs.
  3160. // If unset, the value is inherited from the parent.
  3161. //
  3162. // The between border is rendered when the adjacent paragraph has the
  3163. // same
  3164. // border and indent properties.
  3165. //
  3166. // Paragraph borders cannot be partially updated. When making
  3167. // changes to a paragraph border the new border must be specified in
  3168. // its entirety.
  3169. BorderBetween *ParagraphBorder `json:"borderBetween,omitempty"`
  3170. // BorderBottom: The border at the bottom of this paragraph. If unset,
  3171. // the value is
  3172. // inherited from the parent.
  3173. //
  3174. // The bottom border is rendered when the paragraph below has different
  3175. // border
  3176. // and indent properties.
  3177. //
  3178. // Paragraph borders cannot be partially updated. When making
  3179. // changes to a paragraph border the new border must be specified in
  3180. // its entirety.
  3181. BorderBottom *ParagraphBorder `json:"borderBottom,omitempty"`
  3182. // BorderLeft: The border to the left of this paragraph. If unset, the
  3183. // value is inherited
  3184. // from the parent.
  3185. //
  3186. // Paragraph borders cannot be partially updated. When making
  3187. // changes to a paragraph border the new border must be specified in
  3188. // its entirety.
  3189. BorderLeft *ParagraphBorder `json:"borderLeft,omitempty"`
  3190. // BorderRight: The border to the right of this paragraph. If unset, the
  3191. // value is inherited
  3192. // from the parent.
  3193. //
  3194. // Paragraph borders cannot be partially updated. When making
  3195. // changes to a paragraph border the new border must be specified in
  3196. // its entirety.
  3197. BorderRight *ParagraphBorder `json:"borderRight,omitempty"`
  3198. // BorderTop: The border at the top of this paragraph. If unset, the
  3199. // value is inherited
  3200. // from the parent.
  3201. //
  3202. // The top border is rendered when the paragraph above has different
  3203. // border
  3204. // and indent properties.
  3205. //
  3206. // Paragraph borders cannot be partially updated. When making
  3207. // changes to a paragraph border the new border must be specified in
  3208. // its entirety.
  3209. BorderTop *ParagraphBorder `json:"borderTop,omitempty"`
  3210. // Direction: The text direction of this paragraph. If unset, the value
  3211. // defaults to
  3212. // LEFT_TO_RIGHT since
  3213. // paragraph direction is not inherited.
  3214. //
  3215. // Possible values:
  3216. // "CONTENT_DIRECTION_UNSPECIFIED" - The content direction is
  3217. // unspecified.
  3218. // "LEFT_TO_RIGHT" - The content goes from left to right.
  3219. // "RIGHT_TO_LEFT" - The content goes from right to left.
  3220. Direction string `json:"direction,omitempty"`
  3221. // HeadingId: The heading ID of the paragraph. If empty, then this
  3222. // paragraph is not a
  3223. // heading. This property is read-only.
  3224. HeadingId string `json:"headingId,omitempty"`
  3225. // IndentEnd: The amount of indentation for the paragraph on the side
  3226. // that corresponds to
  3227. // the end of the text, based on the current paragraph direction. If
  3228. // unset,
  3229. // the value is inherited from the parent.
  3230. IndentEnd *Dimension `json:"indentEnd,omitempty"`
  3231. // IndentFirstLine: The amount of indentation for the first line of the
  3232. // paragraph. If unset,
  3233. // the value is inherited from the parent.
  3234. IndentFirstLine *Dimension `json:"indentFirstLine,omitempty"`
  3235. // IndentStart: The amount of indentation for the paragraph on the side
  3236. // that corresponds to
  3237. // the start of the text, based on the current paragraph direction. If
  3238. // unset,
  3239. // the value is inherited from the parent.
  3240. IndentStart *Dimension `json:"indentStart,omitempty"`
  3241. // KeepLinesTogether: Whether all lines of the paragraph should be laid
  3242. // out on the same page or
  3243. // column if possible. If unset, the value is inherited from the parent.
  3244. KeepLinesTogether bool `json:"keepLinesTogether,omitempty"`
  3245. // KeepWithNext: Whether at least a part of this paragraph should be
  3246. // laid out on the same
  3247. // page or column as the next paragraph if possible. If unset, the value
  3248. // is
  3249. // inherited from the parent.
  3250. KeepWithNext bool `json:"keepWithNext,omitempty"`
  3251. // LineSpacing: The amount of space between lines, as a percentage of
  3252. // normal, where normal
  3253. // is represented as 100.0. If unset, the value is inherited from the
  3254. // parent.
  3255. LineSpacing float64 `json:"lineSpacing,omitempty"`
  3256. // NamedStyleType: The named style type of the paragraph.
  3257. //
  3258. // Since updating the named style type affects other properties
  3259. // within
  3260. // ParagraphStyle, the named style type is applied before the other
  3261. // properties
  3262. // are updated.
  3263. //
  3264. // Possible values:
  3265. // "NAMED_STYLE_TYPE_UNSPECIFIED" - The type of named style is
  3266. // unspecified.
  3267. // "NORMAL_TEXT" - Normal text.
  3268. // "TITLE" - Title.
  3269. // "SUBTITLE" - Subtitle.
  3270. // "HEADING_1" - Heading 1.
  3271. // "HEADING_2" - Heading 2.
  3272. // "HEADING_3" - Heading 3.
  3273. // "HEADING_4" - Heading 4.
  3274. // "HEADING_5" - Heading 5.
  3275. // "HEADING_6" - Heading 6.
  3276. NamedStyleType string `json:"namedStyleType,omitempty"`
  3277. // Shading: The shading of the paragraph. If unset, the value is
  3278. // inherited from the
  3279. // parent.
  3280. Shading *Shading `json:"shading,omitempty"`
  3281. // SpaceAbove: The amount of extra space above the paragraph. If unset,
  3282. // the value is
  3283. // inherited from the parent.
  3284. SpaceAbove *Dimension `json:"spaceAbove,omitempty"`
  3285. // SpaceBelow: The amount of extra space below the paragraph. If unset,
  3286. // the value is
  3287. // inherited from the parent.
  3288. SpaceBelow *Dimension `json:"spaceBelow,omitempty"`
  3289. // SpacingMode: The spacing mode for the paragraph.
  3290. //
  3291. // Possible values:
  3292. // "SPACING_MODE_UNSPECIFIED" - The spacing mode is inherited from the
  3293. // parent.
  3294. // "NEVER_COLLAPSE" - Paragraph spacing is always rendered.
  3295. // "COLLAPSE_LISTS" - Paragraph spacing is skipped between list
  3296. // elements.
  3297. SpacingMode string `json:"spacingMode,omitempty"`
  3298. // TabStops: A list of the tab stops for this paragraph. The list of tab
  3299. // stops is not
  3300. // inherited. This property is read-only.
  3301. TabStops []*TabStop `json:"tabStops,omitempty"`
  3302. // ForceSendFields is a list of field names (e.g. "Alignment") to
  3303. // unconditionally include in API requests. By default, fields with
  3304. // empty values are omitted from API requests. However, any non-pointer,
  3305. // non-interface field appearing in ForceSendFields will be sent to the
  3306. // server regardless of whether the field is empty or not. This may be
  3307. // used to include empty fields in Patch requests.
  3308. ForceSendFields []string `json:"-"`
  3309. // NullFields is a list of field names (e.g. "Alignment") to include in
  3310. // API requests with the JSON null value. By default, fields with empty
  3311. // values are omitted from API requests. However, any field with an
  3312. // empty value appearing in NullFields will be sent to the server as
  3313. // null. It is an error if a field in this list has a non-empty value.
  3314. // This may be used to include null fields in Patch requests.
  3315. NullFields []string `json:"-"`
  3316. }
  3317. func (s *ParagraphStyle) MarshalJSON() ([]byte, error) {
  3318. type NoMethod ParagraphStyle
  3319. raw := NoMethod(*s)
  3320. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3321. }
  3322. func (s *ParagraphStyle) UnmarshalJSON(data []byte) error {
  3323. type NoMethod ParagraphStyle
  3324. var s1 struct {
  3325. LineSpacing gensupport.JSONFloat64 `json:"lineSpacing"`
  3326. *NoMethod
  3327. }
  3328. s1.NoMethod = (*NoMethod)(s)
  3329. if err := json.Unmarshal(data, &s1); err != nil {
  3330. return err
  3331. }
  3332. s.LineSpacing = float64(s1.LineSpacing)
  3333. return nil
  3334. }
  3335. // ParagraphStyleSuggestionState: A mask that indicates which of the
  3336. // fields on the base ParagraphStyle have been changed in this
  3337. // suggestion.
  3338. // For any field set to true, there is a new suggested value.
  3339. type ParagraphStyleSuggestionState struct {
  3340. // AlignmentSuggested: Indicates if there was a suggested change to
  3341. // alignment.
  3342. AlignmentSuggested bool `json:"alignmentSuggested,omitempty"`
  3343. // AvoidWidowAndOrphanSuggested: Indicates if there was a suggested
  3344. // change to avoid_widow_and_orphan.
  3345. AvoidWidowAndOrphanSuggested bool `json:"avoidWidowAndOrphanSuggested,omitempty"`
  3346. // BorderBetweenSuggested: Indicates if there was a suggested change to
  3347. // border_between.
  3348. BorderBetweenSuggested bool `json:"borderBetweenSuggested,omitempty"`
  3349. // BorderBottomSuggested: Indicates if there was a suggested change to
  3350. // border_bottom.
  3351. BorderBottomSuggested bool `json:"borderBottomSuggested,omitempty"`
  3352. // BorderLeftSuggested: Indicates if there was a suggested change to
  3353. // border_left.
  3354. BorderLeftSuggested bool `json:"borderLeftSuggested,omitempty"`
  3355. // BorderRightSuggested: Indicates if there was a suggested change to
  3356. // border_right.
  3357. BorderRightSuggested bool `json:"borderRightSuggested,omitempty"`
  3358. // BorderTopSuggested: Indicates if there was a suggested change to
  3359. // border_top.
  3360. BorderTopSuggested bool `json:"borderTopSuggested,omitempty"`
  3361. // DirectionSuggested: Indicates if there was a suggested change to
  3362. // direction.
  3363. DirectionSuggested bool `json:"directionSuggested,omitempty"`
  3364. // HeadingIdSuggested: Indicates if there was a suggested change to
  3365. // heading_id.
  3366. HeadingIdSuggested bool `json:"headingIdSuggested,omitempty"`
  3367. // IndentEndSuggested: Indicates if there was a suggested change to
  3368. // indent_end.
  3369. IndentEndSuggested bool `json:"indentEndSuggested,omitempty"`
  3370. // IndentFirstLineSuggested: Indicates if there was a suggested change
  3371. // to indent_first_line.
  3372. IndentFirstLineSuggested bool `json:"indentFirstLineSuggested,omitempty"`
  3373. // IndentStartSuggested: Indicates if there was a suggested change to
  3374. // indent_start.
  3375. IndentStartSuggested bool `json:"indentStartSuggested,omitempty"`
  3376. // KeepLinesTogetherSuggested: Indicates if there was a suggested change
  3377. // to keep_lines_together.
  3378. KeepLinesTogetherSuggested bool `json:"keepLinesTogetherSuggested,omitempty"`
  3379. // KeepWithNextSuggested: Indicates if there was a suggested change to
  3380. // keep_with_next.
  3381. KeepWithNextSuggested bool `json:"keepWithNextSuggested,omitempty"`
  3382. // LineSpacingSuggested: Indicates if there was a suggested change to
  3383. // line_spacing.
  3384. LineSpacingSuggested bool `json:"lineSpacingSuggested,omitempty"`
  3385. // NamedStyleTypeSuggested: Indicates if there was a suggested change to
  3386. // named_style_type.
  3387. NamedStyleTypeSuggested bool `json:"namedStyleTypeSuggested,omitempty"`
  3388. // ShadingSuggestionState: A mask that indicates which of the fields in
  3389. // shading have been changed in
  3390. // this suggestion.
  3391. ShadingSuggestionState *ShadingSuggestionState `json:"shadingSuggestionState,omitempty"`
  3392. // SpaceAboveSuggested: Indicates if there was a suggested change to
  3393. // space_above.
  3394. SpaceAboveSuggested bool `json:"spaceAboveSuggested,omitempty"`
  3395. // SpaceBelowSuggested: Indicates if there was a suggested change to
  3396. // space_below.
  3397. SpaceBelowSuggested bool `json:"spaceBelowSuggested,omitempty"`
  3398. // SpacingModeSuggested: Indicates if there was a suggested change to
  3399. // spacing_mode.
  3400. SpacingModeSuggested bool `json:"spacingModeSuggested,omitempty"`
  3401. // ForceSendFields is a list of field names (e.g. "AlignmentSuggested")
  3402. // to unconditionally include in API requests. By default, fields with
  3403. // empty values are omitted from API requests. However, any non-pointer,
  3404. // non-interface field appearing in ForceSendFields will be sent to the
  3405. // server regardless of whether the field is empty or not. This may be
  3406. // used to include empty fields in Patch requests.
  3407. ForceSendFields []string `json:"-"`
  3408. // NullFields is a list of field names (e.g. "AlignmentSuggested") to
  3409. // include in API requests with the JSON null value. By default, fields
  3410. // with empty values are omitted from API requests. However, any field
  3411. // with an empty value appearing in NullFields will be sent to the
  3412. // server as null. It is an error if a field in this list has a
  3413. // non-empty value. This may be used to include null fields in Patch
  3414. // requests.
  3415. NullFields []string `json:"-"`
  3416. }
  3417. func (s *ParagraphStyleSuggestionState) MarshalJSON() ([]byte, error) {
  3418. type NoMethod ParagraphStyleSuggestionState
  3419. raw := NoMethod(*s)
  3420. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3421. }
  3422. // PositionedObject: An object that is tethered to a Paragraph
  3423. // and positioned relative to the beginning of the paragraph. A
  3424. // PositionedObject
  3425. // contains an EmbeddedObject such as an
  3426. // image.
  3427. type PositionedObject struct {
  3428. // ObjectId: The ID of this positioned object.
  3429. ObjectId string `json:"objectId,omitempty"`
  3430. // PositionedObjectProperties: The properties of this positioned object.
  3431. PositionedObjectProperties *PositionedObjectProperties `json:"positionedObjectProperties,omitempty"`
  3432. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  3433. // there are no suggested deletions
  3434. // of this content.
  3435. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  3436. // SuggestedInsertionId: The suggested insertion ID. If empty, then this
  3437. // is not a suggested
  3438. // insertion.
  3439. SuggestedInsertionId string `json:"suggestedInsertionId,omitempty"`
  3440. // SuggestedPositionedObjectPropertiesChanges: The suggested changes to
  3441. // the positioned object properties, keyed by
  3442. // suggestion ID.
  3443. SuggestedPositionedObjectPropertiesChanges map[string]SuggestedPositionedObjectProperties `json:"suggestedPositionedObjectPropertiesChanges,omitempty"`
  3444. // ForceSendFields is a list of field names (e.g. "ObjectId") to
  3445. // unconditionally include in API requests. By default, fields with
  3446. // empty values are omitted from API requests. However, any non-pointer,
  3447. // non-interface field appearing in ForceSendFields will be sent to the
  3448. // server regardless of whether the field is empty or not. This may be
  3449. // used to include empty fields in Patch requests.
  3450. ForceSendFields []string `json:"-"`
  3451. // NullFields is a list of field names (e.g. "ObjectId") to include in
  3452. // API requests with the JSON null value. By default, fields with empty
  3453. // values are omitted from API requests. However, any field with an
  3454. // empty value appearing in NullFields will be sent to the server as
  3455. // null. It is an error if a field in this list has a non-empty value.
  3456. // This may be used to include null fields in Patch requests.
  3457. NullFields []string `json:"-"`
  3458. }
  3459. func (s *PositionedObject) MarshalJSON() ([]byte, error) {
  3460. type NoMethod PositionedObject
  3461. raw := NoMethod(*s)
  3462. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3463. }
  3464. // PositionedObjectPositioning: The positioning of a PositionedObject.
  3465. // The positioned object is positioned
  3466. // relative to the beginning of the Paragraph
  3467. // it is tethered to.
  3468. type PositionedObjectPositioning struct {
  3469. // Layout: The layout of this positioned object.
  3470. //
  3471. // Possible values:
  3472. // "POSITIONED_OBJECT_LAYOUT_UNSPECIFIED" - The layout is unspecified.
  3473. // "WRAP_TEXT" - The text wraps around the positioned object.
  3474. // "BREAK_LEFT" - Breaks text such that the positioned object is on
  3475. // the left and text is on
  3476. // the right.
  3477. // "BREAK_RIGHT" - Breaks text such that the positioned object is on
  3478. // the right and text is on
  3479. // the left.
  3480. // "BREAK_LEFT_RIGHT" - Breaks text such that there is no text on the
  3481. // left or right of the
  3482. // positioned object.
  3483. // "IN_FRONT_OF_TEXT" - The positioned object is in front of the text.
  3484. Layout string `json:"layout,omitempty"`
  3485. // LeftOffset: The offset of the left edge of the positioned object
  3486. // relative to the
  3487. // beginning of the Paragraph it is tethered
  3488. // to. The exact positioning of the object can depend on other content
  3489. // in the
  3490. // document and the document's styling.
  3491. LeftOffset *Dimension `json:"leftOffset,omitempty"`
  3492. // TopOffset: The offset of the top edge of the positioned object
  3493. // relative to the
  3494. // beginning of the Paragraph it is tethered
  3495. // to. The exact positioning of the object can depend on other content
  3496. // in the
  3497. // document and the document's styling.
  3498. TopOffset *Dimension `json:"topOffset,omitempty"`
  3499. // ForceSendFields is a list of field names (e.g. "Layout") to
  3500. // unconditionally include in API requests. By default, fields with
  3501. // empty values are omitted from API requests. However, any non-pointer,
  3502. // non-interface field appearing in ForceSendFields will be sent to the
  3503. // server regardless of whether the field is empty or not. This may be
  3504. // used to include empty fields in Patch requests.
  3505. ForceSendFields []string `json:"-"`
  3506. // NullFields is a list of field names (e.g. "Layout") to include in API
  3507. // requests with the JSON null value. By default, fields with empty
  3508. // values are omitted from API requests. However, any field with an
  3509. // empty value appearing in NullFields will be sent to the server as
  3510. // null. It is an error if a field in this list has a non-empty value.
  3511. // This may be used to include null fields in Patch requests.
  3512. NullFields []string `json:"-"`
  3513. }
  3514. func (s *PositionedObjectPositioning) MarshalJSON() ([]byte, error) {
  3515. type NoMethod PositionedObjectPositioning
  3516. raw := NoMethod(*s)
  3517. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3518. }
  3519. // PositionedObjectPositioningSuggestionState: A mask that indicates
  3520. // which of the fields on the base
  3521. // PositionedObjectPositioning have been changed in this
  3522. // suggestion. For any field set to true, there is a new suggested
  3523. // value.
  3524. type PositionedObjectPositioningSuggestionState struct {
  3525. // LayoutSuggested: Indicates if there was a suggested change to layout.
  3526. LayoutSuggested bool `json:"layoutSuggested,omitempty"`
  3527. // LeftOffsetSuggested: Indicates if there was a suggested change to
  3528. // left_offset.
  3529. LeftOffsetSuggested bool `json:"leftOffsetSuggested,omitempty"`
  3530. // TopOffsetSuggested: Indicates if there was a suggested change to
  3531. // top_offset.
  3532. TopOffsetSuggested bool `json:"topOffsetSuggested,omitempty"`
  3533. // ForceSendFields is a list of field names (e.g. "LayoutSuggested") to
  3534. // unconditionally include in API requests. By default, fields with
  3535. // empty values are omitted from API requests. However, any non-pointer,
  3536. // non-interface field appearing in ForceSendFields will be sent to the
  3537. // server regardless of whether the field is empty or not. This may be
  3538. // used to include empty fields in Patch requests.
  3539. ForceSendFields []string `json:"-"`
  3540. // NullFields is a list of field names (e.g. "LayoutSuggested") to
  3541. // include in API requests with the JSON null value. By default, fields
  3542. // with empty values are omitted from API requests. However, any field
  3543. // with an empty value appearing in NullFields will be sent to the
  3544. // server as null. It is an error if a field in this list has a
  3545. // non-empty value. This may be used to include null fields in Patch
  3546. // requests.
  3547. NullFields []string `json:"-"`
  3548. }
  3549. func (s *PositionedObjectPositioningSuggestionState) MarshalJSON() ([]byte, error) {
  3550. type NoMethod PositionedObjectPositioningSuggestionState
  3551. raw := NoMethod(*s)
  3552. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3553. }
  3554. // PositionedObjectProperties: Properties of a PositionedObject.
  3555. type PositionedObjectProperties struct {
  3556. // EmbeddedObject: The embedded object of this positioned object.
  3557. EmbeddedObject *EmbeddedObject `json:"embeddedObject,omitempty"`
  3558. // Positioning: The positioning of this positioned object relative to
  3559. // the newline of the
  3560. // Paragraph that references this positioned
  3561. // object.
  3562. Positioning *PositionedObjectPositioning `json:"positioning,omitempty"`
  3563. // ForceSendFields is a list of field names (e.g. "EmbeddedObject") to
  3564. // unconditionally include in API requests. By default, fields with
  3565. // empty values are omitted from API requests. However, any non-pointer,
  3566. // non-interface field appearing in ForceSendFields will be sent to the
  3567. // server regardless of whether the field is empty or not. This may be
  3568. // used to include empty fields in Patch requests.
  3569. ForceSendFields []string `json:"-"`
  3570. // NullFields is a list of field names (e.g. "EmbeddedObject") to
  3571. // include in API requests with the JSON null value. By default, fields
  3572. // with empty values are omitted from API requests. However, any field
  3573. // with an empty value appearing in NullFields will be sent to the
  3574. // server as null. It is an error if a field in this list has a
  3575. // non-empty value. This may be used to include null fields in Patch
  3576. // requests.
  3577. NullFields []string `json:"-"`
  3578. }
  3579. func (s *PositionedObjectProperties) MarshalJSON() ([]byte, error) {
  3580. type NoMethod PositionedObjectProperties
  3581. raw := NoMethod(*s)
  3582. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3583. }
  3584. // PositionedObjectPropertiesSuggestionState: A mask that indicates
  3585. // which of the fields on the base
  3586. // PositionedObjectProperties
  3587. // have been changed in this suggestion. For any field set to true,
  3588. // there is a
  3589. // new suggested value.
  3590. type PositionedObjectPropertiesSuggestionState struct {
  3591. // EmbeddedObjectSuggestionState: A mask that indicates which of the
  3592. // fields in embedded_object have been
  3593. // changed in this suggestion.
  3594. EmbeddedObjectSuggestionState *EmbeddedObjectSuggestionState `json:"embeddedObjectSuggestionState,omitempty"`
  3595. // PositioningSuggestionState: A mask that indicates which of the fields
  3596. // in positioning have been
  3597. // changed in this suggestion.
  3598. PositioningSuggestionState *PositionedObjectPositioningSuggestionState `json:"positioningSuggestionState,omitempty"`
  3599. // ForceSendFields is a list of field names (e.g.
  3600. // "EmbeddedObjectSuggestionState") to unconditionally include in API
  3601. // requests. By default, fields with empty values are omitted from API
  3602. // requests. However, any non-pointer, non-interface field appearing in
  3603. // ForceSendFields will be sent to the server regardless of whether the
  3604. // field is empty or not. This may be used to include empty fields in
  3605. // Patch requests.
  3606. ForceSendFields []string `json:"-"`
  3607. // NullFields is a list of field names (e.g.
  3608. // "EmbeddedObjectSuggestionState") to include in API requests with the
  3609. // JSON null value. By default, fields with empty values are omitted
  3610. // from API requests. However, any field with an empty value appearing
  3611. // in NullFields will be sent to the server as null. It is an error if a
  3612. // field in this list has a non-empty value. This may be used to include
  3613. // null fields in Patch requests.
  3614. NullFields []string `json:"-"`
  3615. }
  3616. func (s *PositionedObjectPropertiesSuggestionState) MarshalJSON() ([]byte, error) {
  3617. type NoMethod PositionedObjectPropertiesSuggestionState
  3618. raw := NoMethod(*s)
  3619. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3620. }
  3621. // Range: Specifies a contiguous range of text.
  3622. type Range struct {
  3623. // EndIndex: The zero-based end index of this range, exclusive, in
  3624. // UTF-16 code units.
  3625. //
  3626. // In all current uses, an end index must be provided. This field is
  3627. // an
  3628. // Int32Value in order to accommodate future use cases with open-ended
  3629. // ranges.
  3630. EndIndex int64 `json:"endIndex,omitempty"`
  3631. // SegmentId: The ID of the header, footer or footnote that this range
  3632. // is contained in.
  3633. // An empty segment ID signifies the document's body.
  3634. SegmentId string `json:"segmentId,omitempty"`
  3635. // StartIndex: The zero-based start index of this range, in UTF-16 code
  3636. // units.
  3637. //
  3638. // In all current uses, a start index must be provided. This field is
  3639. // an
  3640. // Int32Value in order to accommodate future use cases with open-ended
  3641. // ranges.
  3642. StartIndex int64 `json:"startIndex,omitempty"`
  3643. // ForceSendFields is a list of field names (e.g. "EndIndex") to
  3644. // unconditionally include in API requests. By default, fields with
  3645. // empty values are omitted from API requests. However, any non-pointer,
  3646. // non-interface field appearing in ForceSendFields will be sent to the
  3647. // server regardless of whether the field is empty or not. This may be
  3648. // used to include empty fields in Patch requests.
  3649. ForceSendFields []string `json:"-"`
  3650. // NullFields is a list of field names (e.g. "EndIndex") to include in
  3651. // API requests with the JSON null value. By default, fields with empty
  3652. // values are omitted from API requests. However, any field with an
  3653. // empty value appearing in NullFields will be sent to the server as
  3654. // null. It is an error if a field in this list has a non-empty value.
  3655. // This may be used to include null fields in Patch requests.
  3656. NullFields []string `json:"-"`
  3657. }
  3658. func (s *Range) MarshalJSON() ([]byte, error) {
  3659. type NoMethod Range
  3660. raw := NoMethod(*s)
  3661. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3662. }
  3663. // ReplaceAllTextRequest: Replaces all instances of text matching a
  3664. // criteria with replace text.
  3665. type ReplaceAllTextRequest struct {
  3666. // ContainsText: Finds text in the document matching this substring.
  3667. ContainsText *SubstringMatchCriteria `json:"containsText,omitempty"`
  3668. // ReplaceText: The text that will replace the matched text.
  3669. ReplaceText string `json:"replaceText,omitempty"`
  3670. // ForceSendFields is a list of field names (e.g. "ContainsText") to
  3671. // unconditionally include in API requests. By default, fields with
  3672. // empty values are omitted from API requests. However, any non-pointer,
  3673. // non-interface field appearing in ForceSendFields will be sent to the
  3674. // server regardless of whether the field is empty or not. This may be
  3675. // used to include empty fields in Patch requests.
  3676. ForceSendFields []string `json:"-"`
  3677. // NullFields is a list of field names (e.g. "ContainsText") to include
  3678. // in API requests with the JSON null value. By default, fields with
  3679. // empty values are omitted from API requests. However, any field with
  3680. // an empty value appearing in NullFields will be sent to the server as
  3681. // null. It is an error if a field in this list has a non-empty value.
  3682. // This may be used to include null fields in Patch requests.
  3683. NullFields []string `json:"-"`
  3684. }
  3685. func (s *ReplaceAllTextRequest) MarshalJSON() ([]byte, error) {
  3686. type NoMethod ReplaceAllTextRequest
  3687. raw := NoMethod(*s)
  3688. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3689. }
  3690. // ReplaceAllTextResponse: The result of replacing text.
  3691. type ReplaceAllTextResponse struct {
  3692. // OccurrencesChanged: The number of occurrences changed by replacing
  3693. // all text.
  3694. OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"`
  3695. // ForceSendFields is a list of field names (e.g. "OccurrencesChanged")
  3696. // to unconditionally include in API requests. By default, fields with
  3697. // empty values are omitted from API requests. However, any non-pointer,
  3698. // non-interface field appearing in ForceSendFields will be sent to the
  3699. // server regardless of whether the field is empty or not. This may be
  3700. // used to include empty fields in Patch requests.
  3701. ForceSendFields []string `json:"-"`
  3702. // NullFields is a list of field names (e.g. "OccurrencesChanged") to
  3703. // include in API requests with the JSON null value. By default, fields
  3704. // with empty values are omitted from API requests. However, any field
  3705. // with an empty value appearing in NullFields will be sent to the
  3706. // server as null. It is an error if a field in this list has a
  3707. // non-empty value. This may be used to include null fields in Patch
  3708. // requests.
  3709. NullFields []string `json:"-"`
  3710. }
  3711. func (s *ReplaceAllTextResponse) MarshalJSON() ([]byte, error) {
  3712. type NoMethod ReplaceAllTextResponse
  3713. raw := NoMethod(*s)
  3714. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3715. }
  3716. // Request: A single update to apply to a document.
  3717. type Request struct {
  3718. // CreateNamedRange: Creates a named range.
  3719. CreateNamedRange *CreateNamedRangeRequest `json:"createNamedRange,omitempty"`
  3720. // CreateParagraphBullets: Creates bullets for paragraphs.
  3721. CreateParagraphBullets *CreateParagraphBulletsRequest `json:"createParagraphBullets,omitempty"`
  3722. // DeleteContentRange: Deletes content from the document.
  3723. DeleteContentRange *DeleteContentRangeRequest `json:"deleteContentRange,omitempty"`
  3724. // DeleteNamedRange: Deletes a named range.
  3725. DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"`
  3726. // DeleteParagraphBullets: Deletes bullets from paragraphs.
  3727. DeleteParagraphBullets *DeleteParagraphBulletsRequest `json:"deleteParagraphBullets,omitempty"`
  3728. // DeletePositionedObject: Deletes a positioned object from the
  3729. // document.
  3730. DeletePositionedObject *DeletePositionedObjectRequest `json:"deletePositionedObject,omitempty"`
  3731. // DeleteTableColumn: Deletes a column from a table.
  3732. DeleteTableColumn *DeleteTableColumnRequest `json:"deleteTableColumn,omitempty"`
  3733. // DeleteTableRow: Deletes a row from a table.
  3734. DeleteTableRow *DeleteTableRowRequest `json:"deleteTableRow,omitempty"`
  3735. // InsertInlineImage: Inserts an inline image at the specified location.
  3736. InsertInlineImage *InsertInlineImageRequest `json:"insertInlineImage,omitempty"`
  3737. // InsertTableRow: Inserts an empty row into a table.
  3738. InsertTableRow *InsertTableRowRequest `json:"insertTableRow,omitempty"`
  3739. // InsertText: Inserts text at the specified location.
  3740. InsertText *InsertTextRequest `json:"insertText,omitempty"`
  3741. // ReplaceAllText: Replaces all instances of the specified text.
  3742. ReplaceAllText *ReplaceAllTextRequest `json:"replaceAllText,omitempty"`
  3743. // UpdateParagraphStyle: Updates the paragraph style at the specified
  3744. // range.
  3745. UpdateParagraphStyle *UpdateParagraphStyleRequest `json:"updateParagraphStyle,omitempty"`
  3746. // UpdateTextStyle: Updates the text style at the specified range.
  3747. UpdateTextStyle *UpdateTextStyleRequest `json:"updateTextStyle,omitempty"`
  3748. // ForceSendFields is a list of field names (e.g. "CreateNamedRange") to
  3749. // unconditionally include in API requests. By default, fields with
  3750. // empty values are omitted from API requests. However, any non-pointer,
  3751. // non-interface field appearing in ForceSendFields will be sent to the
  3752. // server regardless of whether the field is empty or not. This may be
  3753. // used to include empty fields in Patch requests.
  3754. ForceSendFields []string `json:"-"`
  3755. // NullFields is a list of field names (e.g. "CreateNamedRange") to
  3756. // include in API requests with the JSON null value. By default, fields
  3757. // with empty values are omitted from API requests. However, any field
  3758. // with an empty value appearing in NullFields will be sent to the
  3759. // server as null. It is an error if a field in this list has a
  3760. // non-empty value. This may be used to include null fields in Patch
  3761. // requests.
  3762. NullFields []string `json:"-"`
  3763. }
  3764. func (s *Request) MarshalJSON() ([]byte, error) {
  3765. type NoMethod Request
  3766. raw := NoMethod(*s)
  3767. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3768. }
  3769. // Response: A single response from an update.
  3770. type Response struct {
  3771. // CreateNamedRange: The result of creating a named range.
  3772. CreateNamedRange *CreateNamedRangeResponse `json:"createNamedRange,omitempty"`
  3773. // InsertInlineImage: The result of inserting an inline image.
  3774. InsertInlineImage *InsertInlineImageResponse `json:"insertInlineImage,omitempty"`
  3775. // InsertInlineSheetsChart: The result of inserting an inline Google
  3776. // Sheets chart.
  3777. InsertInlineSheetsChart *InsertInlineSheetsChartResponse `json:"insertInlineSheetsChart,omitempty"`
  3778. // ReplaceAllText: The result of replacing text.
  3779. ReplaceAllText *ReplaceAllTextResponse `json:"replaceAllText,omitempty"`
  3780. // ForceSendFields is a list of field names (e.g. "CreateNamedRange") to
  3781. // unconditionally include in API requests. By default, fields with
  3782. // empty values are omitted from API requests. However, any non-pointer,
  3783. // non-interface field appearing in ForceSendFields will be sent to the
  3784. // server regardless of whether the field is empty or not. This may be
  3785. // used to include empty fields in Patch requests.
  3786. ForceSendFields []string `json:"-"`
  3787. // NullFields is a list of field names (e.g. "CreateNamedRange") to
  3788. // include in API requests with the JSON null value. By default, fields
  3789. // with empty values are omitted from API requests. However, any field
  3790. // with an empty value appearing in NullFields will be sent to the
  3791. // server as null. It is an error if a field in this list has a
  3792. // non-empty value. This may be used to include null fields in Patch
  3793. // requests.
  3794. NullFields []string `json:"-"`
  3795. }
  3796. func (s *Response) MarshalJSON() ([]byte, error) {
  3797. type NoMethod Response
  3798. raw := NoMethod(*s)
  3799. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3800. }
  3801. // RgbColor: An RGB color.
  3802. type RgbColor struct {
  3803. // Blue: The blue component of the color, from 0.0 to 1.0.
  3804. Blue float64 `json:"blue,omitempty"`
  3805. // Green: The green component of the color, from 0.0 to 1.0.
  3806. Green float64 `json:"green,omitempty"`
  3807. // Red: The red component of the color, from 0.0 to 1.0.
  3808. Red float64 `json:"red,omitempty"`
  3809. // ForceSendFields is a list of field names (e.g. "Blue") to
  3810. // unconditionally include in API requests. By default, fields with
  3811. // empty values are omitted from API requests. However, any non-pointer,
  3812. // non-interface field appearing in ForceSendFields will be sent to the
  3813. // server regardless of whether the field is empty or not. This may be
  3814. // used to include empty fields in Patch requests.
  3815. ForceSendFields []string `json:"-"`
  3816. // NullFields is a list of field names (e.g. "Blue") to include in API
  3817. // requests with the JSON null value. By default, fields with empty
  3818. // values are omitted from API requests. However, any field with an
  3819. // empty value appearing in NullFields will be sent to the server as
  3820. // null. It is an error if a field in this list has a non-empty value.
  3821. // This may be used to include null fields in Patch requests.
  3822. NullFields []string `json:"-"`
  3823. }
  3824. func (s *RgbColor) MarshalJSON() ([]byte, error) {
  3825. type NoMethod RgbColor
  3826. raw := NoMethod(*s)
  3827. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3828. }
  3829. func (s *RgbColor) UnmarshalJSON(data []byte) error {
  3830. type NoMethod RgbColor
  3831. var s1 struct {
  3832. Blue gensupport.JSONFloat64 `json:"blue"`
  3833. Green gensupport.JSONFloat64 `json:"green"`
  3834. Red gensupport.JSONFloat64 `json:"red"`
  3835. *NoMethod
  3836. }
  3837. s1.NoMethod = (*NoMethod)(s)
  3838. if err := json.Unmarshal(data, &s1); err != nil {
  3839. return err
  3840. }
  3841. s.Blue = float64(s1.Blue)
  3842. s.Green = float64(s1.Green)
  3843. s.Red = float64(s1.Red)
  3844. return nil
  3845. }
  3846. // SectionBreak: A StructuralElement representing a
  3847. // section break. A section is a range of content which has the
  3848. // same
  3849. // SectionStyle. A section break represents
  3850. // the start of a new section, and the section style applies to the
  3851. // section
  3852. // after the section break.
  3853. //
  3854. // The document body always begins with a section break.
  3855. type SectionBreak struct {
  3856. // SectionStyle: The style of the section after this section break.
  3857. SectionStyle *SectionStyle `json:"sectionStyle,omitempty"`
  3858. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  3859. // there are no suggested deletions
  3860. // of this content.
  3861. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  3862. // SuggestedInsertionIds: The suggested insertion IDs. A SectionBreak
  3863. // may have multiple insertion IDs if it is
  3864. // a nested suggested change. If empty, then this is not a
  3865. // suggested
  3866. // insertion.
  3867. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  3868. // ForceSendFields is a list of field names (e.g. "SectionStyle") to
  3869. // unconditionally include in API requests. By default, fields with
  3870. // empty values are omitted from API requests. However, any non-pointer,
  3871. // non-interface field appearing in ForceSendFields will be sent to the
  3872. // server regardless of whether the field is empty or not. This may be
  3873. // used to include empty fields in Patch requests.
  3874. ForceSendFields []string `json:"-"`
  3875. // NullFields is a list of field names (e.g. "SectionStyle") to include
  3876. // in API requests with the JSON null value. By default, fields with
  3877. // empty values are omitted from API requests. However, any field with
  3878. // an empty value appearing in NullFields will be sent to the server as
  3879. // null. It is an error if a field in this list has a non-empty value.
  3880. // This may be used to include null fields in Patch requests.
  3881. NullFields []string `json:"-"`
  3882. }
  3883. func (s *SectionBreak) MarshalJSON() ([]byte, error) {
  3884. type NoMethod SectionBreak
  3885. raw := NoMethod(*s)
  3886. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3887. }
  3888. // SectionColumnProperties: Properties that apply to a section's column.
  3889. type SectionColumnProperties struct {
  3890. // PaddingEnd: The padding at the end of the column.
  3891. PaddingEnd *Dimension `json:"paddingEnd,omitempty"`
  3892. // Width: The width of the column.
  3893. Width *Dimension `json:"width,omitempty"`
  3894. // ForceSendFields is a list of field names (e.g. "PaddingEnd") to
  3895. // unconditionally include in API requests. By default, fields with
  3896. // empty values are omitted from API requests. However, any non-pointer,
  3897. // non-interface field appearing in ForceSendFields will be sent to the
  3898. // server regardless of whether the field is empty or not. This may be
  3899. // used to include empty fields in Patch requests.
  3900. ForceSendFields []string `json:"-"`
  3901. // NullFields is a list of field names (e.g. "PaddingEnd") to include in
  3902. // API requests with the JSON null value. By default, fields with empty
  3903. // values are omitted from API requests. However, any field with an
  3904. // empty value appearing in NullFields will be sent to the server as
  3905. // null. It is an error if a field in this list has a non-empty value.
  3906. // This may be used to include null fields in Patch requests.
  3907. NullFields []string `json:"-"`
  3908. }
  3909. func (s *SectionColumnProperties) MarshalJSON() ([]byte, error) {
  3910. type NoMethod SectionColumnProperties
  3911. raw := NoMethod(*s)
  3912. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3913. }
  3914. // SectionStyle: The styling that applies to a section.
  3915. type SectionStyle struct {
  3916. // ColumnProperties: The section's columns properties.
  3917. //
  3918. // If empty, the section contains one column with the default properties
  3919. // in
  3920. // the Docs editor.
  3921. ColumnProperties []*SectionColumnProperties `json:"columnProperties,omitempty"`
  3922. // ColumnSeparatorStyle: The style of column separators.
  3923. //
  3924. // This style can be set even when there is one column in the section.
  3925. //
  3926. // Possible values:
  3927. // "COLUMN_SEPARATOR_STYLE_UNSPECIFIED" - An unspecified column
  3928. // separator style.
  3929. // "NONE" - No column separator lines between columns.
  3930. // "BETWEEN_EACH_COLUMN" - Renders a column separator line between
  3931. // each column.
  3932. ColumnSeparatorStyle string `json:"columnSeparatorStyle,omitempty"`
  3933. // ContentDirection: The content direction of this section. If unset,
  3934. // the value defaults to
  3935. // LEFT_TO_RIGHT.
  3936. //
  3937. // Possible values:
  3938. // "CONTENT_DIRECTION_UNSPECIFIED" - The content direction is
  3939. // unspecified.
  3940. // "LEFT_TO_RIGHT" - The content goes from left to right.
  3941. // "RIGHT_TO_LEFT" - The content goes from right to left.
  3942. ContentDirection string `json:"contentDirection,omitempty"`
  3943. // ForceSendFields is a list of field names (e.g. "ColumnProperties") to
  3944. // unconditionally include in API requests. By default, fields with
  3945. // empty values are omitted from API requests. However, any non-pointer,
  3946. // non-interface field appearing in ForceSendFields will be sent to the
  3947. // server regardless of whether the field is empty or not. This may be
  3948. // used to include empty fields in Patch requests.
  3949. ForceSendFields []string `json:"-"`
  3950. // NullFields is a list of field names (e.g. "ColumnProperties") to
  3951. // include in API requests with the JSON null value. By default, fields
  3952. // with empty values are omitted from API requests. However, any field
  3953. // with an empty value appearing in NullFields will be sent to the
  3954. // server as null. It is an error if a field in this list has a
  3955. // non-empty value. This may be used to include null fields in Patch
  3956. // requests.
  3957. NullFields []string `json:"-"`
  3958. }
  3959. func (s *SectionStyle) MarshalJSON() ([]byte, error) {
  3960. type NoMethod SectionStyle
  3961. raw := NoMethod(*s)
  3962. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3963. }
  3964. // Shading: The shading of a paragraph.
  3965. type Shading struct {
  3966. // BackgroundColor: The background color of this paragraph shading.
  3967. BackgroundColor *OptionalColor `json:"backgroundColor,omitempty"`
  3968. // ForceSendFields is a list of field names (e.g. "BackgroundColor") to
  3969. // unconditionally include in API requests. By default, fields with
  3970. // empty values are omitted from API requests. However, any non-pointer,
  3971. // non-interface field appearing in ForceSendFields will be sent to the
  3972. // server regardless of whether the field is empty or not. This may be
  3973. // used to include empty fields in Patch requests.
  3974. ForceSendFields []string `json:"-"`
  3975. // NullFields is a list of field names (e.g. "BackgroundColor") to
  3976. // include in API requests with the JSON null value. By default, fields
  3977. // with empty values are omitted from API requests. However, any field
  3978. // with an empty value appearing in NullFields will be sent to the
  3979. // server as null. It is an error if a field in this list has a
  3980. // non-empty value. This may be used to include null fields in Patch
  3981. // requests.
  3982. NullFields []string `json:"-"`
  3983. }
  3984. func (s *Shading) MarshalJSON() ([]byte, error) {
  3985. type NoMethod Shading
  3986. raw := NoMethod(*s)
  3987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3988. }
  3989. // ShadingSuggestionState: A mask that indicates which of the fields on
  3990. // the base Shading have been changed in this
  3991. // suggested change. For any field set to true, there is a new suggested
  3992. // value.
  3993. type ShadingSuggestionState struct {
  3994. // BackgroundColorSuggested: Indicates if there was a suggested change
  3995. // to the Shading.
  3996. BackgroundColorSuggested bool `json:"backgroundColorSuggested,omitempty"`
  3997. // ForceSendFields is a list of field names (e.g.
  3998. // "BackgroundColorSuggested") to unconditionally include in API
  3999. // requests. By default, fields with empty values are omitted from API
  4000. // requests. However, any non-pointer, non-interface field appearing in
  4001. // ForceSendFields will be sent to the server regardless of whether the
  4002. // field is empty or not. This may be used to include empty fields in
  4003. // Patch requests.
  4004. ForceSendFields []string `json:"-"`
  4005. // NullFields is a list of field names (e.g. "BackgroundColorSuggested")
  4006. // to include in API requests with the JSON null value. By default,
  4007. // fields with empty values are omitted from API requests. However, any
  4008. // field with an empty value appearing in NullFields will be sent to the
  4009. // server as null. It is an error if a field in this list has a
  4010. // non-empty value. This may be used to include null fields in Patch
  4011. // requests.
  4012. NullFields []string `json:"-"`
  4013. }
  4014. func (s *ShadingSuggestionState) MarshalJSON() ([]byte, error) {
  4015. type NoMethod ShadingSuggestionState
  4016. raw := NoMethod(*s)
  4017. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4018. }
  4019. // SheetsChartReference: A reference to a linked chart embedded from
  4020. // Google Sheets.
  4021. type SheetsChartReference struct {
  4022. // ChartId: The ID of the specific chart in the Google Sheets
  4023. // spreadsheet that is
  4024. // embedded.
  4025. ChartId int64 `json:"chartId,omitempty"`
  4026. // SpreadsheetId: The ID of the Google Sheets spreadsheet that contains
  4027. // the source chart.
  4028. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  4029. // ForceSendFields is a list of field names (e.g. "ChartId") to
  4030. // unconditionally include in API requests. By default, fields with
  4031. // empty values are omitted from API requests. However, any non-pointer,
  4032. // non-interface field appearing in ForceSendFields will be sent to the
  4033. // server regardless of whether the field is empty or not. This may be
  4034. // used to include empty fields in Patch requests.
  4035. ForceSendFields []string `json:"-"`
  4036. // NullFields is a list of field names (e.g. "ChartId") to include in
  4037. // API requests with the JSON null value. By default, fields with empty
  4038. // values are omitted from API requests. However, any field with an
  4039. // empty value appearing in NullFields will be sent to the server as
  4040. // null. It is an error if a field in this list has a non-empty value.
  4041. // This may be used to include null fields in Patch requests.
  4042. NullFields []string `json:"-"`
  4043. }
  4044. func (s *SheetsChartReference) MarshalJSON() ([]byte, error) {
  4045. type NoMethod SheetsChartReference
  4046. raw := NoMethod(*s)
  4047. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4048. }
  4049. // SheetsChartReferenceSuggestionState: A mask that indicates which of
  4050. // the fields on the base SheetsChartReference have been changed in
  4051. // this
  4052. // suggestion. For any field set to true, there is a new suggested
  4053. // value.
  4054. type SheetsChartReferenceSuggestionState struct {
  4055. // ChartIdSuggested: Indicates if there was a suggested change to
  4056. // chart_id.
  4057. ChartIdSuggested bool `json:"chartIdSuggested,omitempty"`
  4058. // SpreadsheetIdSuggested: Indicates if there was a suggested change to
  4059. // spreadsheet_id.
  4060. SpreadsheetIdSuggested bool `json:"spreadsheetIdSuggested,omitempty"`
  4061. // ForceSendFields is a list of field names (e.g. "ChartIdSuggested") to
  4062. // unconditionally include in API requests. By default, fields with
  4063. // empty values are omitted from API requests. However, any non-pointer,
  4064. // non-interface field appearing in ForceSendFields will be sent to the
  4065. // server regardless of whether the field is empty or not. This may be
  4066. // used to include empty fields in Patch requests.
  4067. ForceSendFields []string `json:"-"`
  4068. // NullFields is a list of field names (e.g. "ChartIdSuggested") to
  4069. // include in API requests with the JSON null value. By default, fields
  4070. // with empty values are omitted from API requests. However, any field
  4071. // with an empty value appearing in NullFields will be sent to the
  4072. // server as null. It is an error if a field in this list has a
  4073. // non-empty value. This may be used to include null fields in Patch
  4074. // requests.
  4075. NullFields []string `json:"-"`
  4076. }
  4077. func (s *SheetsChartReferenceSuggestionState) MarshalJSON() ([]byte, error) {
  4078. type NoMethod SheetsChartReferenceSuggestionState
  4079. raw := NoMethod(*s)
  4080. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4081. }
  4082. // Size: A width and height.
  4083. type Size struct {
  4084. // Height: The height of the object.
  4085. Height *Dimension `json:"height,omitempty"`
  4086. // Width: The width of the object.
  4087. Width *Dimension `json:"width,omitempty"`
  4088. // ForceSendFields is a list of field names (e.g. "Height") to
  4089. // unconditionally include in API requests. By default, fields with
  4090. // empty values are omitted from API requests. However, any non-pointer,
  4091. // non-interface field appearing in ForceSendFields will be sent to the
  4092. // server regardless of whether the field is empty or not. This may be
  4093. // used to include empty fields in Patch requests.
  4094. ForceSendFields []string `json:"-"`
  4095. // NullFields is a list of field names (e.g. "Height") to include in API
  4096. // requests with the JSON null value. By default, fields with empty
  4097. // values are omitted from API requests. However, any field with an
  4098. // empty value appearing in NullFields will be sent to the server as
  4099. // null. It is an error if a field in this list has a non-empty value.
  4100. // This may be used to include null fields in Patch requests.
  4101. NullFields []string `json:"-"`
  4102. }
  4103. func (s *Size) MarshalJSON() ([]byte, error) {
  4104. type NoMethod Size
  4105. raw := NoMethod(*s)
  4106. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4107. }
  4108. // SizeSuggestionState: A mask that indicates which of the fields on the
  4109. // base Size have been changed in this suggestion.
  4110. // For any field set to true, the Size has
  4111. // a new suggested value.
  4112. type SizeSuggestionState struct {
  4113. // HeightSuggested: Indicates if there was a suggested change to height.
  4114. HeightSuggested bool `json:"heightSuggested,omitempty"`
  4115. // WidthSuggested: Indicates if there was a suggested change to width.
  4116. WidthSuggested bool `json:"widthSuggested,omitempty"`
  4117. // ForceSendFields is a list of field names (e.g. "HeightSuggested") to
  4118. // unconditionally include in API requests. By default, fields with
  4119. // empty values are omitted from API requests. However, any non-pointer,
  4120. // non-interface field appearing in ForceSendFields will be sent to the
  4121. // server regardless of whether the field is empty or not. This may be
  4122. // used to include empty fields in Patch requests.
  4123. ForceSendFields []string `json:"-"`
  4124. // NullFields is a list of field names (e.g. "HeightSuggested") to
  4125. // include in API requests with the JSON null value. By default, fields
  4126. // with empty values are omitted from API requests. However, any field
  4127. // with an empty value appearing in NullFields will be sent to the
  4128. // server as null. It is an error if a field in this list has a
  4129. // non-empty value. This may be used to include null fields in Patch
  4130. // requests.
  4131. NullFields []string `json:"-"`
  4132. }
  4133. func (s *SizeSuggestionState) MarshalJSON() ([]byte, error) {
  4134. type NoMethod SizeSuggestionState
  4135. raw := NoMethod(*s)
  4136. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4137. }
  4138. // StructuralElement: A StructuralElement describes content that
  4139. // provides structure to the
  4140. // document.
  4141. type StructuralElement struct {
  4142. // EndIndex: The zero-based end index of this structural element,
  4143. // exclusive, in UTF-16
  4144. // code units.
  4145. EndIndex int64 `json:"endIndex,omitempty"`
  4146. // Paragraph: A paragraph type of structural element.
  4147. Paragraph *Paragraph `json:"paragraph,omitempty"`
  4148. // SectionBreak: A section break type of structural element.
  4149. SectionBreak *SectionBreak `json:"sectionBreak,omitempty"`
  4150. // StartIndex: The zero-based start index of this structural element, in
  4151. // UTF-16 code
  4152. // units.
  4153. StartIndex int64 `json:"startIndex,omitempty"`
  4154. // Table: A table type of structural element.
  4155. Table *Table `json:"table,omitempty"`
  4156. // TableOfContents: A table of contents type of structural element.
  4157. TableOfContents *TableOfContents `json:"tableOfContents,omitempty"`
  4158. // ForceSendFields is a list of field names (e.g. "EndIndex") to
  4159. // unconditionally include in API requests. By default, fields with
  4160. // empty values are omitted from API requests. However, any non-pointer,
  4161. // non-interface field appearing in ForceSendFields will be sent to the
  4162. // server regardless of whether the field is empty or not. This may be
  4163. // used to include empty fields in Patch requests.
  4164. ForceSendFields []string `json:"-"`
  4165. // NullFields is a list of field names (e.g. "EndIndex") to include in
  4166. // API requests with the JSON null value. By default, fields with empty
  4167. // values are omitted from API requests. However, any field with an
  4168. // empty value appearing in NullFields will be sent to the server as
  4169. // null. It is an error if a field in this list has a non-empty value.
  4170. // This may be used to include null fields in Patch requests.
  4171. NullFields []string `json:"-"`
  4172. }
  4173. func (s *StructuralElement) MarshalJSON() ([]byte, error) {
  4174. type NoMethod StructuralElement
  4175. raw := NoMethod(*s)
  4176. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4177. }
  4178. // SubstringMatchCriteria: A criteria that matches a specific string of
  4179. // text in the document.
  4180. type SubstringMatchCriteria struct {
  4181. // MatchCase: Indicates whether the search should respect case:
  4182. //
  4183. // - `True`: the search is case sensitive.
  4184. // - `False`: the search is case insensitive.
  4185. MatchCase bool `json:"matchCase,omitempty"`
  4186. // Text: The text to search for in the document.
  4187. Text string `json:"text,omitempty"`
  4188. // ForceSendFields is a list of field names (e.g. "MatchCase") to
  4189. // unconditionally include in API requests. By default, fields with
  4190. // empty values are omitted from API requests. However, any non-pointer,
  4191. // non-interface field appearing in ForceSendFields will be sent to the
  4192. // server regardless of whether the field is empty or not. This may be
  4193. // used to include empty fields in Patch requests.
  4194. ForceSendFields []string `json:"-"`
  4195. // NullFields is a list of field names (e.g. "MatchCase") to include in
  4196. // API requests with the JSON null value. By default, fields with empty
  4197. // values are omitted from API requests. However, any field with an
  4198. // empty value appearing in NullFields will be sent to the server as
  4199. // null. It is an error if a field in this list has a non-empty value.
  4200. // This may be used to include null fields in Patch requests.
  4201. NullFields []string `json:"-"`
  4202. }
  4203. func (s *SubstringMatchCriteria) MarshalJSON() ([]byte, error) {
  4204. type NoMethod SubstringMatchCriteria
  4205. raw := NoMethod(*s)
  4206. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4207. }
  4208. // SuggestedBullet: A suggested change to a Bullet.
  4209. type SuggestedBullet struct {
  4210. // Bullet: A Bullet that only includes the changes made
  4211. // in this suggestion. This can be used along with
  4212. // the
  4213. // bullet_suggestion_state to see which
  4214. // fields have changed and their new values.
  4215. Bullet *Bullet `json:"bullet,omitempty"`
  4216. // BulletSuggestionState: A mask that indicates which of the fields on
  4217. // the base
  4218. // Bullet have been changed in this suggestion.
  4219. BulletSuggestionState *BulletSuggestionState `json:"bulletSuggestionState,omitempty"`
  4220. // ForceSendFields is a list of field names (e.g. "Bullet") to
  4221. // unconditionally include in API requests. By default, fields with
  4222. // empty values are omitted from API requests. However, any non-pointer,
  4223. // non-interface field appearing in ForceSendFields will be sent to the
  4224. // server regardless of whether the field is empty or not. This may be
  4225. // used to include empty fields in Patch requests.
  4226. ForceSendFields []string `json:"-"`
  4227. // NullFields is a list of field names (e.g. "Bullet") to include in API
  4228. // requests with the JSON null value. By default, fields with empty
  4229. // values are omitted from API requests. However, any field with an
  4230. // empty value appearing in NullFields will be sent to the server as
  4231. // null. It is an error if a field in this list has a non-empty value.
  4232. // This may be used to include null fields in Patch requests.
  4233. NullFields []string `json:"-"`
  4234. }
  4235. func (s *SuggestedBullet) MarshalJSON() ([]byte, error) {
  4236. type NoMethod SuggestedBullet
  4237. raw := NoMethod(*s)
  4238. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4239. }
  4240. // SuggestedDocumentStyle: A suggested change to the DocumentStyle.
  4241. type SuggestedDocumentStyle struct {
  4242. // DocumentStyle: A DocumentStyle that only includes
  4243. // the changes made in this suggestion. This can be used along with
  4244. // the
  4245. // document_style_suggestion_state
  4246. // to see which fields have changed and their new values.
  4247. DocumentStyle *DocumentStyle `json:"documentStyle,omitempty"`
  4248. // DocumentStyleSuggestionState: A mask that indicates which of the
  4249. // fields on the base DocumentStyle have been changed in this
  4250. // suggestion.
  4251. DocumentStyleSuggestionState *DocumentStyleSuggestionState `json:"documentStyleSuggestionState,omitempty"`
  4252. // ForceSendFields is a list of field names (e.g. "DocumentStyle") to
  4253. // unconditionally include in API requests. By default, fields with
  4254. // empty values are omitted from API requests. However, any non-pointer,
  4255. // non-interface field appearing in ForceSendFields will be sent to the
  4256. // server regardless of whether the field is empty or not. This may be
  4257. // used to include empty fields in Patch requests.
  4258. ForceSendFields []string `json:"-"`
  4259. // NullFields is a list of field names (e.g. "DocumentStyle") to include
  4260. // in API requests with the JSON null value. By default, fields with
  4261. // empty values are omitted from API requests. However, any field with
  4262. // an empty value appearing in NullFields will be sent to the server as
  4263. // null. It is an error if a field in this list has a non-empty value.
  4264. // This may be used to include null fields in Patch requests.
  4265. NullFields []string `json:"-"`
  4266. }
  4267. func (s *SuggestedDocumentStyle) MarshalJSON() ([]byte, error) {
  4268. type NoMethod SuggestedDocumentStyle
  4269. raw := NoMethod(*s)
  4270. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4271. }
  4272. // SuggestedInlineObjectProperties: A suggested change to
  4273. // InlineObjectProperties.
  4274. type SuggestedInlineObjectProperties struct {
  4275. // InlineObjectProperties: An InlineObjectProperties
  4276. // that only includes the changes made in this suggestion. This can be
  4277. // used
  4278. // along with the inline_object_properties_suggestion_state
  4279. // to see which fields have changed and their new values.
  4280. InlineObjectProperties *InlineObjectProperties `json:"inlineObjectProperties,omitempty"`
  4281. // InlineObjectPropertiesSuggestionState: A mask that indicates which of
  4282. // the fields on the base
  4283. // InlineObjectProperties have
  4284. // been changed in this suggestion.
  4285. InlineObjectPropertiesSuggestionState *InlineObjectPropertiesSuggestionState `json:"inlineObjectPropertiesSuggestionState,omitempty"`
  4286. // ForceSendFields is a list of field names (e.g.
  4287. // "InlineObjectProperties") to unconditionally include in API requests.
  4288. // By default, fields with empty values are omitted from API requests.
  4289. // However, any non-pointer, non-interface field appearing in
  4290. // ForceSendFields will be sent to the server regardless of whether the
  4291. // field is empty or not. This may be used to include empty fields in
  4292. // Patch requests.
  4293. ForceSendFields []string `json:"-"`
  4294. // NullFields is a list of field names (e.g. "InlineObjectProperties")
  4295. // to include in API requests with the JSON null value. By default,
  4296. // fields with empty values are omitted from API requests. However, any
  4297. // field with an empty value appearing in NullFields will be sent to the
  4298. // server as null. It is an error if a field in this list has a
  4299. // non-empty value. This may be used to include null fields in Patch
  4300. // requests.
  4301. NullFields []string `json:"-"`
  4302. }
  4303. func (s *SuggestedInlineObjectProperties) MarshalJSON() ([]byte, error) {
  4304. type NoMethod SuggestedInlineObjectProperties
  4305. raw := NoMethod(*s)
  4306. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4307. }
  4308. // SuggestedListProperties: A suggested change to ListProperties.
  4309. type SuggestedListProperties struct {
  4310. // ListProperties: A ListProperties that only includes
  4311. // the changes made in this suggestion. This can be used along with
  4312. // the
  4313. // list_properties_suggestion_state
  4314. // to see which fields have changed and their new values.
  4315. ListProperties *ListProperties `json:"listProperties,omitempty"`
  4316. // ListPropertiesSuggestionState: A mask that indicates which of the
  4317. // fields on the base ListProperties have been changed in this
  4318. // suggestion.
  4319. ListPropertiesSuggestionState *ListPropertiesSuggestionState `json:"listPropertiesSuggestionState,omitempty"`
  4320. // ForceSendFields is a list of field names (e.g. "ListProperties") to
  4321. // unconditionally include in API requests. By default, fields with
  4322. // empty values are omitted from API requests. However, any non-pointer,
  4323. // non-interface field appearing in ForceSendFields will be sent to the
  4324. // server regardless of whether the field is empty or not. This may be
  4325. // used to include empty fields in Patch requests.
  4326. ForceSendFields []string `json:"-"`
  4327. // NullFields is a list of field names (e.g. "ListProperties") to
  4328. // include in API requests with the JSON null value. By default, fields
  4329. // with empty values are omitted from API requests. However, any field
  4330. // with an empty value appearing in NullFields will be sent to the
  4331. // server as null. It is an error if a field in this list has a
  4332. // non-empty value. This may be used to include null fields in Patch
  4333. // requests.
  4334. NullFields []string `json:"-"`
  4335. }
  4336. func (s *SuggestedListProperties) MarshalJSON() ([]byte, error) {
  4337. type NoMethod SuggestedListProperties
  4338. raw := NoMethod(*s)
  4339. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4340. }
  4341. // SuggestedNamedStyles: A suggested change to the NamedStyles.
  4342. type SuggestedNamedStyles struct {
  4343. // NamedStyles: A NamedStyles that only includes the
  4344. // changes made in this suggestion. This can be used along with
  4345. // the
  4346. // named_styles_suggestion_state to
  4347. // see which fields have changed and their new values.
  4348. NamedStyles *NamedStyles `json:"namedStyles,omitempty"`
  4349. // NamedStylesSuggestionState: A mask that indicates which of the fields
  4350. // on the base NamedStyles have been changed in this suggestion.
  4351. NamedStylesSuggestionState *NamedStylesSuggestionState `json:"namedStylesSuggestionState,omitempty"`
  4352. // ForceSendFields is a list of field names (e.g. "NamedStyles") to
  4353. // unconditionally include in API requests. By default, fields with
  4354. // empty values are omitted from API requests. However, any non-pointer,
  4355. // non-interface field appearing in ForceSendFields will be sent to the
  4356. // server regardless of whether the field is empty or not. This may be
  4357. // used to include empty fields in Patch requests.
  4358. ForceSendFields []string `json:"-"`
  4359. // NullFields is a list of field names (e.g. "NamedStyles") to include
  4360. // in API requests with the JSON null value. By default, fields with
  4361. // empty values are omitted from API requests. However, any field with
  4362. // an empty value appearing in NullFields will be sent to the server as
  4363. // null. It is an error if a field in this list has a non-empty value.
  4364. // This may be used to include null fields in Patch requests.
  4365. NullFields []string `json:"-"`
  4366. }
  4367. func (s *SuggestedNamedStyles) MarshalJSON() ([]byte, error) {
  4368. type NoMethod SuggestedNamedStyles
  4369. raw := NoMethod(*s)
  4370. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4371. }
  4372. // SuggestedParagraphStyle: A suggested change to a
  4373. // ParagraphStyle.
  4374. type SuggestedParagraphStyle struct {
  4375. // ParagraphStyle: A ParagraphStyle that only includes
  4376. // the changes made in this suggestion. This can be used along with
  4377. // the
  4378. // paragraph_suggestion_state
  4379. // to see which fields have changed and their new values.
  4380. ParagraphStyle *ParagraphStyle `json:"paragraphStyle,omitempty"`
  4381. // ParagraphStyleSuggestionState: A mask that indicates which of the
  4382. // fields on the base ParagraphStyle have been changed in this
  4383. // suggestion.
  4384. ParagraphStyleSuggestionState *ParagraphStyleSuggestionState `json:"paragraphStyleSuggestionState,omitempty"`
  4385. // ForceSendFields is a list of field names (e.g. "ParagraphStyle") to
  4386. // unconditionally include in API requests. By default, fields with
  4387. // empty values are omitted from API requests. However, any non-pointer,
  4388. // non-interface field appearing in ForceSendFields will be sent to the
  4389. // server regardless of whether the field is empty or not. This may be
  4390. // used to include empty fields in Patch requests.
  4391. ForceSendFields []string `json:"-"`
  4392. // NullFields is a list of field names (e.g. "ParagraphStyle") to
  4393. // include in API requests with the JSON null value. By default, fields
  4394. // with empty values are omitted from API requests. However, any field
  4395. // with an empty value appearing in NullFields will be sent to the
  4396. // server as null. It is an error if a field in this list has a
  4397. // non-empty value. This may be used to include null fields in Patch
  4398. // requests.
  4399. NullFields []string `json:"-"`
  4400. }
  4401. func (s *SuggestedParagraphStyle) MarshalJSON() ([]byte, error) {
  4402. type NoMethod SuggestedParagraphStyle
  4403. raw := NoMethod(*s)
  4404. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4405. }
  4406. // SuggestedPositionedObjectProperties: A suggested change to
  4407. // PositionedObjectProperties.
  4408. type SuggestedPositionedObjectProperties struct {
  4409. // PositionedObjectProperties: A PositionedObjectProperties that only
  4410. // includes the
  4411. // changes made in this suggestion. This can be used along with
  4412. // the
  4413. // positioned_object_properties_suggestion_state
  4414. // to see which fields have changed and their new values.
  4415. PositionedObjectProperties *PositionedObjectProperties `json:"positionedObjectProperties,omitempty"`
  4416. // PositionedObjectPropertiesSuggestionState: A mask that indicates
  4417. // which of the fields on the base
  4418. // PositionedObjectProperties have been changed in this
  4419. // suggestion.
  4420. PositionedObjectPropertiesSuggestionState *PositionedObjectPropertiesSuggestionState `json:"positionedObjectPropertiesSuggestionState,omitempty"`
  4421. // ForceSendFields is a list of field names (e.g.
  4422. // "PositionedObjectProperties") to unconditionally include in API
  4423. // requests. By default, fields with empty values are omitted from API
  4424. // requests. However, any non-pointer, non-interface field appearing in
  4425. // ForceSendFields will be sent to the server regardless of whether the
  4426. // field is empty or not. This may be used to include empty fields in
  4427. // Patch requests.
  4428. ForceSendFields []string `json:"-"`
  4429. // NullFields is a list of field names (e.g.
  4430. // "PositionedObjectProperties") to include in API requests with the
  4431. // JSON null value. By default, fields with empty values are omitted
  4432. // from API requests. However, any field with an empty value appearing
  4433. // in NullFields will be sent to the server as null. It is an error if a
  4434. // field in this list has a non-empty value. This may be used to include
  4435. // null fields in Patch requests.
  4436. NullFields []string `json:"-"`
  4437. }
  4438. func (s *SuggestedPositionedObjectProperties) MarshalJSON() ([]byte, error) {
  4439. type NoMethod SuggestedPositionedObjectProperties
  4440. raw := NoMethod(*s)
  4441. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4442. }
  4443. // SuggestedTableCellStyle: A suggested change to a TableCellStyle.
  4444. type SuggestedTableCellStyle struct {
  4445. // TableCellStyle: A TableCellStyle that only includes
  4446. // the changes made in this suggestion. This can be used along with
  4447. // the
  4448. // table_cell_style_suggestion_state
  4449. // to see which fields have changed and their new values.
  4450. TableCellStyle *TableCellStyle `json:"tableCellStyle,omitempty"`
  4451. // TableCellStyleSuggestionState: A mask that indicates which of the
  4452. // fields on the base TableCellStyle have been changed in this
  4453. // suggestion.
  4454. TableCellStyleSuggestionState *TableCellStyleSuggestionState `json:"tableCellStyleSuggestionState,omitempty"`
  4455. // ForceSendFields is a list of field names (e.g. "TableCellStyle") to
  4456. // unconditionally include in API requests. By default, fields with
  4457. // empty values are omitted from API requests. However, any non-pointer,
  4458. // non-interface field appearing in ForceSendFields will be sent to the
  4459. // server regardless of whether the field is empty or not. This may be
  4460. // used to include empty fields in Patch requests.
  4461. ForceSendFields []string `json:"-"`
  4462. // NullFields is a list of field names (e.g. "TableCellStyle") to
  4463. // include in API requests with the JSON null value. By default, fields
  4464. // with empty values are omitted from API requests. However, any field
  4465. // with an empty value appearing in NullFields will be sent to the
  4466. // server as null. It is an error if a field in this list has a
  4467. // non-empty value. This may be used to include null fields in Patch
  4468. // requests.
  4469. NullFields []string `json:"-"`
  4470. }
  4471. func (s *SuggestedTableCellStyle) MarshalJSON() ([]byte, error) {
  4472. type NoMethod SuggestedTableCellStyle
  4473. raw := NoMethod(*s)
  4474. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4475. }
  4476. // SuggestedTableRowStyle: A suggested change to a
  4477. // TableRowStyle.
  4478. type SuggestedTableRowStyle struct {
  4479. // TableRowStyle: A TableRowStyle that only includes
  4480. // the changes made in this suggestion. This can be used along with
  4481. // the
  4482. // table_row_style_suggestion_state
  4483. // to see which fields have changed and their new values.
  4484. TableRowStyle *TableRowStyle `json:"tableRowStyle,omitempty"`
  4485. // TableRowStyleSuggestionState: A mask that indicates which of the
  4486. // fields on the base TableRowStyle have been changed in this
  4487. // suggestion.
  4488. TableRowStyleSuggestionState *TableRowStyleSuggestionState `json:"tableRowStyleSuggestionState,omitempty"`
  4489. // ForceSendFields is a list of field names (e.g. "TableRowStyle") to
  4490. // unconditionally include in API requests. By default, fields with
  4491. // empty values are omitted from API requests. However, any non-pointer,
  4492. // non-interface field appearing in ForceSendFields will be sent to the
  4493. // server regardless of whether the field is empty or not. This may be
  4494. // used to include empty fields in Patch requests.
  4495. ForceSendFields []string `json:"-"`
  4496. // NullFields is a list of field names (e.g. "TableRowStyle") to include
  4497. // in API requests with the JSON null value. By default, fields with
  4498. // empty values are omitted from API requests. However, any field with
  4499. // an empty value appearing in NullFields will be sent to the server as
  4500. // null. It is an error if a field in this list has a non-empty value.
  4501. // This may be used to include null fields in Patch requests.
  4502. NullFields []string `json:"-"`
  4503. }
  4504. func (s *SuggestedTableRowStyle) MarshalJSON() ([]byte, error) {
  4505. type NoMethod SuggestedTableRowStyle
  4506. raw := NoMethod(*s)
  4507. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4508. }
  4509. // SuggestedTextStyle: A suggested change to a TextStyle.
  4510. type SuggestedTextStyle struct {
  4511. // TextStyle: A TextStyle that only includes
  4512. // the changes made in this suggestion. This can be used along with
  4513. // the
  4514. // text_style_suggestion_state
  4515. // to see which fields have changed and their new values.
  4516. TextStyle *TextStyle `json:"textStyle,omitempty"`
  4517. // TextStyleSuggestionState: A mask that indicates which of the fields
  4518. // on the base TextStyle have been changed in this suggestion.
  4519. TextStyleSuggestionState *TextStyleSuggestionState `json:"textStyleSuggestionState,omitempty"`
  4520. // ForceSendFields is a list of field names (e.g. "TextStyle") to
  4521. // unconditionally include in API requests. By default, fields with
  4522. // empty values are omitted from API requests. However, any non-pointer,
  4523. // non-interface field appearing in ForceSendFields will be sent to the
  4524. // server regardless of whether the field is empty or not. This may be
  4525. // used to include empty fields in Patch requests.
  4526. ForceSendFields []string `json:"-"`
  4527. // NullFields is a list of field names (e.g. "TextStyle") to include in
  4528. // API requests with the JSON null value. By default, fields with empty
  4529. // values are omitted from API requests. However, any field with an
  4530. // empty value appearing in NullFields will be sent to the server as
  4531. // null. It is an error if a field in this list has a non-empty value.
  4532. // This may be used to include null fields in Patch requests.
  4533. NullFields []string `json:"-"`
  4534. }
  4535. func (s *SuggestedTextStyle) MarshalJSON() ([]byte, error) {
  4536. type NoMethod SuggestedTextStyle
  4537. raw := NoMethod(*s)
  4538. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4539. }
  4540. // TabStop: A tab stop within a paragraph.
  4541. type TabStop struct {
  4542. // Alignment: The alignment of this tab stop. If unset, the value
  4543. // defaults to START.
  4544. //
  4545. // Possible values:
  4546. // "TAB_STOP_ALIGNMENT_UNSPECIFIED" - The tab stop alignment is
  4547. // unspecified.
  4548. // "START" - The tab stop is aligned to the start of the line. This is
  4549. // the default.
  4550. // "CENTER" - The tab stop is aligned to the center of the line.
  4551. // "END" - The tab stop is aligned to the end of the line.
  4552. Alignment string `json:"alignment,omitempty"`
  4553. // Offset: The offset between this tab stop and the start margin.
  4554. Offset *Dimension `json:"offset,omitempty"`
  4555. // ForceSendFields is a list of field names (e.g. "Alignment") to
  4556. // unconditionally include in API requests. By default, fields with
  4557. // empty values are omitted from API requests. However, any non-pointer,
  4558. // non-interface field appearing in ForceSendFields will be sent to the
  4559. // server regardless of whether the field is empty or not. This may be
  4560. // used to include empty fields in Patch requests.
  4561. ForceSendFields []string `json:"-"`
  4562. // NullFields is a list of field names (e.g. "Alignment") to include in
  4563. // API requests with the JSON null value. By default, fields with empty
  4564. // values are omitted from API requests. However, any field with an
  4565. // empty value appearing in NullFields will be sent to the server as
  4566. // null. It is an error if a field in this list has a non-empty value.
  4567. // This may be used to include null fields in Patch requests.
  4568. NullFields []string `json:"-"`
  4569. }
  4570. func (s *TabStop) MarshalJSON() ([]byte, error) {
  4571. type NoMethod TabStop
  4572. raw := NoMethod(*s)
  4573. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4574. }
  4575. // Table: A StructuralElement representing a
  4576. // table.
  4577. type Table struct {
  4578. // Columns: Number of columns in the table.
  4579. //
  4580. // It is possible for a table to be non-rectangular, so some rows may
  4581. // have a
  4582. // different number of cells.
  4583. Columns int64 `json:"columns,omitempty"`
  4584. // Rows: Number of rows in the table.
  4585. Rows int64 `json:"rows,omitempty"`
  4586. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  4587. // there are no suggested deletions
  4588. // of this content.
  4589. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  4590. // SuggestedInsertionIds: The suggested insertion IDs. A Table may
  4591. // have
  4592. // multiple insertion IDs if it is a nested suggested change. If empty,
  4593. // then
  4594. // this is not a suggested insertion.
  4595. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  4596. // TableRows: The contents and style of each row.
  4597. TableRows []*TableRow `json:"tableRows,omitempty"`
  4598. // TableStyle: The style of the table.
  4599. TableStyle *TableStyle `json:"tableStyle,omitempty"`
  4600. // ForceSendFields is a list of field names (e.g. "Columns") to
  4601. // unconditionally include in API requests. By default, fields with
  4602. // empty values are omitted from API requests. However, any non-pointer,
  4603. // non-interface field appearing in ForceSendFields will be sent to the
  4604. // server regardless of whether the field is empty or not. This may be
  4605. // used to include empty fields in Patch requests.
  4606. ForceSendFields []string `json:"-"`
  4607. // NullFields is a list of field names (e.g. "Columns") to include in
  4608. // API requests with the JSON null value. By default, fields with empty
  4609. // values are omitted from API requests. However, any field with an
  4610. // empty value appearing in NullFields will be sent to the server as
  4611. // null. It is an error if a field in this list has a non-empty value.
  4612. // This may be used to include null fields in Patch requests.
  4613. NullFields []string `json:"-"`
  4614. }
  4615. func (s *Table) MarshalJSON() ([]byte, error) {
  4616. type NoMethod Table
  4617. raw := NoMethod(*s)
  4618. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4619. }
  4620. // TableCell: The contents and style of a cell in a Table.
  4621. type TableCell struct {
  4622. // Content: The content of the cell.
  4623. Content []*StructuralElement `json:"content,omitempty"`
  4624. // EndIndex: The zero-based end index of this cell, exclusive, in UTF-16
  4625. // code units.
  4626. EndIndex int64 `json:"endIndex,omitempty"`
  4627. // StartIndex: The zero-based start index of this cell, in UTF-16 code
  4628. // units.
  4629. StartIndex int64 `json:"startIndex,omitempty"`
  4630. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  4631. // there are no suggested deletions
  4632. // of this content.
  4633. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  4634. // SuggestedInsertionIds: The suggested insertion IDs. A TableCell
  4635. // may have multiple insertion IDs if it is a nested suggested change.
  4636. // If
  4637. // empty, then this is not a suggested insertion.
  4638. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  4639. // SuggestedTableCellStyleChanges: The suggested changes to the table
  4640. // cell style, keyed by suggestion ID.
  4641. SuggestedTableCellStyleChanges map[string]SuggestedTableCellStyle `json:"suggestedTableCellStyleChanges,omitempty"`
  4642. // TableCellStyle: The style of the cell.
  4643. TableCellStyle *TableCellStyle `json:"tableCellStyle,omitempty"`
  4644. // ForceSendFields is a list of field names (e.g. "Content") to
  4645. // unconditionally include in API requests. By default, fields with
  4646. // empty values are omitted from API requests. However, any non-pointer,
  4647. // non-interface field appearing in ForceSendFields will be sent to the
  4648. // server regardless of whether the field is empty or not. This may be
  4649. // used to include empty fields in Patch requests.
  4650. ForceSendFields []string `json:"-"`
  4651. // NullFields is a list of field names (e.g. "Content") to include in
  4652. // API requests with the JSON null value. By default, fields with empty
  4653. // values are omitted from API requests. However, any field with an
  4654. // empty value appearing in NullFields will be sent to the server as
  4655. // null. It is an error if a field in this list has a non-empty value.
  4656. // This may be used to include null fields in Patch requests.
  4657. NullFields []string `json:"-"`
  4658. }
  4659. func (s *TableCell) MarshalJSON() ([]byte, error) {
  4660. type NoMethod TableCell
  4661. raw := NoMethod(*s)
  4662. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4663. }
  4664. // TableCellBorder: A border around a table cell.
  4665. type TableCellBorder struct {
  4666. // Color: The color of the border.
  4667. Color *OptionalColor `json:"color,omitempty"`
  4668. // DashStyle: The dash style of the border.
  4669. //
  4670. // Possible values:
  4671. // "DASH_STYLE_UNSPECIFIED" - Unspecified dash style.
  4672. // "SOLID" - Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal
  4673. // value 'solid'.
  4674. // This is the default dash style.
  4675. // "DOT" - Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal
  4676. // value 'dot'.
  4677. // "DASH" - Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal
  4678. // value 'dash'.
  4679. DashStyle string `json:"dashStyle,omitempty"`
  4680. // Width: The width of the border.
  4681. Width *Dimension `json:"width,omitempty"`
  4682. // ForceSendFields is a list of field names (e.g. "Color") to
  4683. // unconditionally include in API requests. By default, fields with
  4684. // empty values are omitted from API requests. However, any non-pointer,
  4685. // non-interface field appearing in ForceSendFields will be sent to the
  4686. // server regardless of whether the field is empty or not. This may be
  4687. // used to include empty fields in Patch requests.
  4688. ForceSendFields []string `json:"-"`
  4689. // NullFields is a list of field names (e.g. "Color") to include in API
  4690. // requests with the JSON null value. By default, fields with empty
  4691. // values are omitted from API requests. However, any field with an
  4692. // empty value appearing in NullFields will be sent to the server as
  4693. // null. It is an error if a field in this list has a non-empty value.
  4694. // This may be used to include null fields in Patch requests.
  4695. NullFields []string `json:"-"`
  4696. }
  4697. func (s *TableCellBorder) MarshalJSON() ([]byte, error) {
  4698. type NoMethod TableCellBorder
  4699. raw := NoMethod(*s)
  4700. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4701. }
  4702. // TableCellLocation: Location of a single cell within a table.
  4703. type TableCellLocation struct {
  4704. // ColumnIndex: The zero-based column index. For example, the second
  4705. // column in the table
  4706. // has a column index of 1.
  4707. ColumnIndex int64 `json:"columnIndex,omitempty"`
  4708. // RowIndex: The zero-based row index. For example, the second row in
  4709. // the table has a
  4710. // row index of 1.
  4711. RowIndex int64 `json:"rowIndex,omitempty"`
  4712. // TableStartLocation: The location where the table starts in the
  4713. // document.
  4714. TableStartLocation *Location `json:"tableStartLocation,omitempty"`
  4715. // ForceSendFields is a list of field names (e.g. "ColumnIndex") to
  4716. // unconditionally include in API requests. By default, fields with
  4717. // empty values are omitted from API requests. However, any non-pointer,
  4718. // non-interface field appearing in ForceSendFields will be sent to the
  4719. // server regardless of whether the field is empty or not. This may be
  4720. // used to include empty fields in Patch requests.
  4721. ForceSendFields []string `json:"-"`
  4722. // NullFields is a list of field names (e.g. "ColumnIndex") to include
  4723. // in API requests with the JSON null value. By default, fields with
  4724. // empty values are omitted from API requests. However, any field with
  4725. // an empty value appearing in NullFields will be sent to the server as
  4726. // null. It is an error if a field in this list has a non-empty value.
  4727. // This may be used to include null fields in Patch requests.
  4728. NullFields []string `json:"-"`
  4729. }
  4730. func (s *TableCellLocation) MarshalJSON() ([]byte, error) {
  4731. type NoMethod TableCellLocation
  4732. raw := NoMethod(*s)
  4733. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4734. }
  4735. // TableCellStyle: The style of a TableCell.
  4736. //
  4737. // Inherited table cell styles are represented as unset fields in this
  4738. // message.
  4739. // A table cell style can inherit from the table's style.
  4740. type TableCellStyle struct {
  4741. // BackgroundColor: The background color of the cell.
  4742. BackgroundColor *OptionalColor `json:"backgroundColor,omitempty"`
  4743. // BorderBottom: The bottom border of the cell.
  4744. BorderBottom *TableCellBorder `json:"borderBottom,omitempty"`
  4745. // BorderLeft: The left border of the cell.
  4746. BorderLeft *TableCellBorder `json:"borderLeft,omitempty"`
  4747. // BorderRight: The right border of the cell.
  4748. BorderRight *TableCellBorder `json:"borderRight,omitempty"`
  4749. // BorderTop: The top border of the cell.
  4750. BorderTop *TableCellBorder `json:"borderTop,omitempty"`
  4751. // ColumnSpan: The column span of the cell. This property is read-only.
  4752. ColumnSpan int64 `json:"columnSpan,omitempty"`
  4753. // ContentAlignment: The alignment of the content in the table cell. The
  4754. // default alignment
  4755. // matches the alignment for newly created table cells in the Docs
  4756. // editor.
  4757. //
  4758. // Possible values:
  4759. // "CONTENT_ALIGNMENT_UNSPECIFIED" - An unspecified content alignment.
  4760. // The content alignment is inherited from
  4761. // the parent if one exists.
  4762. // "CONTENT_ALIGNMENT_UNSUPPORTED" - An unsupported content alignment.
  4763. // "TOP" - An alignment that aligns the content to the top of the
  4764. // content holder.
  4765. // Corresponds to ECMA-376 ST_TextAnchoringType 't'.
  4766. // "MIDDLE" - An alignment that aligns the content to the middle of
  4767. // the content holder.
  4768. // Corresponds to ECMA-376 ST_TextAnchoringType 'ctr'.
  4769. // "BOTTOM" - An alignment that aligns the content to the bottom of
  4770. // the content holder.
  4771. // Corresponds to ECMA-376 ST_TextAnchoringType 'b'.
  4772. ContentAlignment string `json:"contentAlignment,omitempty"`
  4773. // PaddingBottom: The bottom padding of the cell.
  4774. PaddingBottom *Dimension `json:"paddingBottom,omitempty"`
  4775. // PaddingLeft: The left padding of the cell.
  4776. PaddingLeft *Dimension `json:"paddingLeft,omitempty"`
  4777. // PaddingRight: The right padding of the cell.
  4778. PaddingRight *Dimension `json:"paddingRight,omitempty"`
  4779. // PaddingTop: The top padding of the cell.
  4780. PaddingTop *Dimension `json:"paddingTop,omitempty"`
  4781. // RowSpan: The row span of the cell. This property is read-only.
  4782. RowSpan int64 `json:"rowSpan,omitempty"`
  4783. // ForceSendFields is a list of field names (e.g. "BackgroundColor") to
  4784. // unconditionally include in API requests. By default, fields with
  4785. // empty values are omitted from API requests. However, any non-pointer,
  4786. // non-interface field appearing in ForceSendFields will be sent to the
  4787. // server regardless of whether the field is empty or not. This may be
  4788. // used to include empty fields in Patch requests.
  4789. ForceSendFields []string `json:"-"`
  4790. // NullFields is a list of field names (e.g. "BackgroundColor") to
  4791. // include in API requests with the JSON null value. By default, fields
  4792. // with empty values are omitted from API requests. However, any field
  4793. // with an empty value appearing in NullFields will be sent to the
  4794. // server as null. It is an error if a field in this list has a
  4795. // non-empty value. This may be used to include null fields in Patch
  4796. // requests.
  4797. NullFields []string `json:"-"`
  4798. }
  4799. func (s *TableCellStyle) MarshalJSON() ([]byte, error) {
  4800. type NoMethod TableCellStyle
  4801. raw := NoMethod(*s)
  4802. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4803. }
  4804. // TableCellStyleSuggestionState: A mask that indicates which of the
  4805. // fields on the base TableCellStyle have been changed in this
  4806. // suggestion.
  4807. // For any field set to true, there is a new suggested value.
  4808. type TableCellStyleSuggestionState struct {
  4809. // BackgroundColorSuggested: Indicates if there was a suggested change
  4810. // to background_color.
  4811. BackgroundColorSuggested bool `json:"backgroundColorSuggested,omitempty"`
  4812. // BorderBottomSuggested: Indicates if there was a suggested change to
  4813. // border_bottom.
  4814. BorderBottomSuggested bool `json:"borderBottomSuggested,omitempty"`
  4815. // BorderLeftSuggested: Indicates if there was a suggested change to
  4816. // border_left.
  4817. BorderLeftSuggested bool `json:"borderLeftSuggested,omitempty"`
  4818. // BorderRightSuggested: Indicates if there was a suggested change to
  4819. // border_right.
  4820. BorderRightSuggested bool `json:"borderRightSuggested,omitempty"`
  4821. // BorderTopSuggested: Indicates if there was a suggested change to
  4822. // border_top.
  4823. BorderTopSuggested bool `json:"borderTopSuggested,omitempty"`
  4824. // ColumnSpanSuggested: Indicates if there was a suggested change to
  4825. // column_span.
  4826. ColumnSpanSuggested bool `json:"columnSpanSuggested,omitempty"`
  4827. // ContentAlignmentSuggested: Indicates if there was a suggested change
  4828. // to content_alignment.
  4829. ContentAlignmentSuggested bool `json:"contentAlignmentSuggested,omitempty"`
  4830. // PaddingBottomSuggested: Indicates if there was a suggested change to
  4831. // padding_bottom.
  4832. PaddingBottomSuggested bool `json:"paddingBottomSuggested,omitempty"`
  4833. // PaddingLeftSuggested: Indicates if there was a suggested change to
  4834. // padding_left.
  4835. PaddingLeftSuggested bool `json:"paddingLeftSuggested,omitempty"`
  4836. // PaddingRightSuggested: Indicates if there was a suggested change to
  4837. // padding_right.
  4838. PaddingRightSuggested bool `json:"paddingRightSuggested,omitempty"`
  4839. // PaddingTopSuggested: Indicates if there was a suggested change to
  4840. // padding_top.
  4841. PaddingTopSuggested bool `json:"paddingTopSuggested,omitempty"`
  4842. // RowSpanSuggested: Indicates if there was a suggested change to
  4843. // row_span.
  4844. RowSpanSuggested bool `json:"rowSpanSuggested,omitempty"`
  4845. // ForceSendFields is a list of field names (e.g.
  4846. // "BackgroundColorSuggested") to unconditionally include in API
  4847. // requests. By default, fields with empty values are omitted from API
  4848. // requests. However, any non-pointer, non-interface field appearing in
  4849. // ForceSendFields will be sent to the server regardless of whether the
  4850. // field is empty or not. This may be used to include empty fields in
  4851. // Patch requests.
  4852. ForceSendFields []string `json:"-"`
  4853. // NullFields is a list of field names (e.g. "BackgroundColorSuggested")
  4854. // to include in API requests with the JSON null value. By default,
  4855. // fields with empty values are omitted from API requests. However, any
  4856. // field with an empty value appearing in NullFields will be sent to the
  4857. // server as null. It is an error if a field in this list has a
  4858. // non-empty value. This may be used to include null fields in Patch
  4859. // requests.
  4860. NullFields []string `json:"-"`
  4861. }
  4862. func (s *TableCellStyleSuggestionState) MarshalJSON() ([]byte, error) {
  4863. type NoMethod TableCellStyleSuggestionState
  4864. raw := NoMethod(*s)
  4865. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4866. }
  4867. // TableColumnProperties: The properties of a column in a table.
  4868. type TableColumnProperties struct {
  4869. // Width: The width of the column. Set when the column's `width_type`
  4870. // is
  4871. // FIXED_WIDTH.
  4872. Width *Dimension `json:"width,omitempty"`
  4873. // WidthType: The width type of the column.
  4874. //
  4875. // Possible values:
  4876. // "WIDTH_TYPE_UNSPECIFIED" - The column width type is unspecified.
  4877. // "EVENLY_DISTRIBUTED" - The column width is evenly distributed among
  4878. // the other evenly distrubted
  4879. // columns.
  4880. //
  4881. // The width of the column is automatically determined and will
  4882. // have an equal portion of the width remaining for the table
  4883. // after
  4884. // accounting for all columns with specified widths.
  4885. // "FIXED_WIDTH" - A fixed column width. The
  4886. // width property
  4887. // contains the column's width.
  4888. WidthType string `json:"widthType,omitempty"`
  4889. // ForceSendFields is a list of field names (e.g. "Width") to
  4890. // unconditionally include in API requests. By default, fields with
  4891. // empty values are omitted from API requests. However, any non-pointer,
  4892. // non-interface field appearing in ForceSendFields will be sent to the
  4893. // server regardless of whether the field is empty or not. This may be
  4894. // used to include empty fields in Patch requests.
  4895. ForceSendFields []string `json:"-"`
  4896. // NullFields is a list of field names (e.g. "Width") to include in API
  4897. // requests with the JSON null value. By default, fields with empty
  4898. // values are omitted from API requests. However, any field with an
  4899. // empty value appearing in NullFields will be sent to the server as
  4900. // null. It is an error if a field in this list has a non-empty value.
  4901. // This may be used to include null fields in Patch requests.
  4902. NullFields []string `json:"-"`
  4903. }
  4904. func (s *TableColumnProperties) MarshalJSON() ([]byte, error) {
  4905. type NoMethod TableColumnProperties
  4906. raw := NoMethod(*s)
  4907. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4908. }
  4909. // TableOfContents: A StructuralElement representing
  4910. // a table of contents.
  4911. type TableOfContents struct {
  4912. // Content: The content of the table of contents.
  4913. Content []*StructuralElement `json:"content,omitempty"`
  4914. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  4915. // there are no suggested deletions
  4916. // of this content.
  4917. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  4918. // SuggestedInsertionIds: The suggested insertion IDs. A TableOfContents
  4919. // may have multiple insertion IDs if it
  4920. // is a nested suggested change. If empty, then this is not a
  4921. // suggested
  4922. // insertion.
  4923. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  4924. // ForceSendFields is a list of field names (e.g. "Content") to
  4925. // unconditionally include in API requests. By default, fields with
  4926. // empty values are omitted from API requests. However, any non-pointer,
  4927. // non-interface field appearing in ForceSendFields will be sent to the
  4928. // server regardless of whether the field is empty or not. This may be
  4929. // used to include empty fields in Patch requests.
  4930. ForceSendFields []string `json:"-"`
  4931. // NullFields is a list of field names (e.g. "Content") to include in
  4932. // API requests with the JSON null value. By default, fields with empty
  4933. // values are omitted from API requests. However, any field with an
  4934. // empty value appearing in NullFields will be sent to the server as
  4935. // null. It is an error if a field in this list has a non-empty value.
  4936. // This may be used to include null fields in Patch requests.
  4937. NullFields []string `json:"-"`
  4938. }
  4939. func (s *TableOfContents) MarshalJSON() ([]byte, error) {
  4940. type NoMethod TableOfContents
  4941. raw := NoMethod(*s)
  4942. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4943. }
  4944. // TableRow: The contents and style of a row in a Table.
  4945. type TableRow struct {
  4946. // EndIndex: The zero-based end index of this row, exclusive, in UTF-16
  4947. // code units.
  4948. EndIndex int64 `json:"endIndex,omitempty"`
  4949. // StartIndex: The zero-based start index of this row, in UTF-16 code
  4950. // units.
  4951. StartIndex int64 `json:"startIndex,omitempty"`
  4952. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  4953. // there are no suggested deletions
  4954. // of this content.
  4955. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  4956. // SuggestedInsertionIds: The suggested insertion IDs. A TableRow
  4957. // may have multiple insertion IDs if it is a nested suggested change.
  4958. // If
  4959. // empty, then this is not a suggested insertion.
  4960. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  4961. // SuggestedTableRowStyleChanges: The suggested style changes to this
  4962. // row, keyed by suggestion ID.
  4963. SuggestedTableRowStyleChanges map[string]SuggestedTableRowStyle `json:"suggestedTableRowStyleChanges,omitempty"`
  4964. // TableCells: The contents and style of each cell in this row.
  4965. //
  4966. // It is possible for a table to be non-rectangular, so some rows may
  4967. // have a
  4968. // different number of cells than other rows in the same table.
  4969. TableCells []*TableCell `json:"tableCells,omitempty"`
  4970. // TableRowStyle: The style of the table row.
  4971. TableRowStyle *TableRowStyle `json:"tableRowStyle,omitempty"`
  4972. // ForceSendFields is a list of field names (e.g. "EndIndex") to
  4973. // unconditionally include in API requests. By default, fields with
  4974. // empty values are omitted from API requests. However, any non-pointer,
  4975. // non-interface field appearing in ForceSendFields will be sent to the
  4976. // server regardless of whether the field is empty or not. This may be
  4977. // used to include empty fields in Patch requests.
  4978. ForceSendFields []string `json:"-"`
  4979. // NullFields is a list of field names (e.g. "EndIndex") to include in
  4980. // API requests with the JSON null value. By default, fields with empty
  4981. // values are omitted from API requests. However, any field with an
  4982. // empty value appearing in NullFields will be sent to the server as
  4983. // null. It is an error if a field in this list has a non-empty value.
  4984. // This may be used to include null fields in Patch requests.
  4985. NullFields []string `json:"-"`
  4986. }
  4987. func (s *TableRow) MarshalJSON() ([]byte, error) {
  4988. type NoMethod TableRow
  4989. raw := NoMethod(*s)
  4990. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4991. }
  4992. // TableRowStyle: Styles that apply to a table row.
  4993. type TableRowStyle struct {
  4994. // MinRowHeight: The minimum height of the row. The row will be rendered
  4995. // in the Docs editor
  4996. // at a height equal to or greater than this value in order to show all
  4997. // the
  4998. // content in the row's cells.
  4999. MinRowHeight *Dimension `json:"minRowHeight,omitempty"`
  5000. // ForceSendFields is a list of field names (e.g. "MinRowHeight") to
  5001. // unconditionally include in API requests. By default, fields with
  5002. // empty values are omitted from API requests. However, any non-pointer,
  5003. // non-interface field appearing in ForceSendFields will be sent to the
  5004. // server regardless of whether the field is empty or not. This may be
  5005. // used to include empty fields in Patch requests.
  5006. ForceSendFields []string `json:"-"`
  5007. // NullFields is a list of field names (e.g. "MinRowHeight") to include
  5008. // in API requests with the JSON null value. By default, fields with
  5009. // empty values are omitted from API requests. However, any field with
  5010. // an empty value appearing in NullFields will be sent to the server as
  5011. // null. It is an error if a field in this list has a non-empty value.
  5012. // This may be used to include null fields in Patch requests.
  5013. NullFields []string `json:"-"`
  5014. }
  5015. func (s *TableRowStyle) MarshalJSON() ([]byte, error) {
  5016. type NoMethod TableRowStyle
  5017. raw := NoMethod(*s)
  5018. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5019. }
  5020. // TableRowStyleSuggestionState: A mask that indicates which of the
  5021. // fields on the base TableRowStyle have been changed in this
  5022. // suggestion.
  5023. // For any field set to true, there is a new suggested value.
  5024. type TableRowStyleSuggestionState struct {
  5025. // MinRowHeightSuggested: Indicates if there was a suggested change to
  5026. // min_row_height.
  5027. MinRowHeightSuggested bool `json:"minRowHeightSuggested,omitempty"`
  5028. // ForceSendFields is a list of field names (e.g.
  5029. // "MinRowHeightSuggested") to unconditionally include in API requests.
  5030. // By default, fields with empty values are omitted from API requests.
  5031. // However, any non-pointer, non-interface field appearing in
  5032. // ForceSendFields will be sent to the server regardless of whether the
  5033. // field is empty or not. This may be used to include empty fields in
  5034. // Patch requests.
  5035. ForceSendFields []string `json:"-"`
  5036. // NullFields is a list of field names (e.g. "MinRowHeightSuggested") to
  5037. // include in API requests with the JSON null value. By default, fields
  5038. // with empty values are omitted from API requests. However, any field
  5039. // with an empty value appearing in NullFields will be sent to the
  5040. // server as null. It is an error if a field in this list has a
  5041. // non-empty value. This may be used to include null fields in Patch
  5042. // requests.
  5043. NullFields []string `json:"-"`
  5044. }
  5045. func (s *TableRowStyleSuggestionState) MarshalJSON() ([]byte, error) {
  5046. type NoMethod TableRowStyleSuggestionState
  5047. raw := NoMethod(*s)
  5048. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5049. }
  5050. // TableStyle: Styles that apply to a table.
  5051. type TableStyle struct {
  5052. // TableColumnProperties: The properties of each column.
  5053. //
  5054. // Note that in Docs, tables contain rows and rows contain cells,
  5055. // similar to
  5056. // HTML. So the properties for a row can be found on the
  5057. // row's
  5058. // table_row_style.
  5059. TableColumnProperties []*TableColumnProperties `json:"tableColumnProperties,omitempty"`
  5060. // ForceSendFields is a list of field names (e.g.
  5061. // "TableColumnProperties") to unconditionally include in API requests.
  5062. // By default, fields with empty values are omitted from API requests.
  5063. // However, any non-pointer, non-interface field appearing in
  5064. // ForceSendFields will be sent to the server regardless of whether the
  5065. // field is empty or not. This may be used to include empty fields in
  5066. // Patch requests.
  5067. ForceSendFields []string `json:"-"`
  5068. // NullFields is a list of field names (e.g. "TableColumnProperties") to
  5069. // include in API requests with the JSON null value. By default, fields
  5070. // with empty values are omitted from API requests. However, any field
  5071. // with an empty value appearing in NullFields will be sent to the
  5072. // server as null. It is an error if a field in this list has a
  5073. // non-empty value. This may be used to include null fields in Patch
  5074. // requests.
  5075. NullFields []string `json:"-"`
  5076. }
  5077. func (s *TableStyle) MarshalJSON() ([]byte, error) {
  5078. type NoMethod TableStyle
  5079. raw := NoMethod(*s)
  5080. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5081. }
  5082. // TextRun: A ParagraphElement that represents a
  5083. // run of text that all has the same styling.
  5084. type TextRun struct {
  5085. // Content: The text of this run.
  5086. //
  5087. // Any non-text elements in the run are replaced with the Unicode
  5088. // character
  5089. // U+E907.
  5090. Content string `json:"content,omitempty"`
  5091. // SuggestedDeletionIds: The suggested deletion IDs. If empty, then
  5092. // there are no suggested deletions
  5093. // of this content.
  5094. SuggestedDeletionIds []string `json:"suggestedDeletionIds,omitempty"`
  5095. // SuggestedInsertionIds: The suggested insertion IDs. A TextRun
  5096. // may
  5097. // have multiple insertion IDs if it is a nested suggested change. If
  5098. // empty,
  5099. // then this is not a suggested insertion.
  5100. SuggestedInsertionIds []string `json:"suggestedInsertionIds,omitempty"`
  5101. // SuggestedTextStyleChanges: The suggested text style changes to this
  5102. // run, keyed by suggestion ID.
  5103. SuggestedTextStyleChanges map[string]SuggestedTextStyle `json:"suggestedTextStyleChanges,omitempty"`
  5104. // TextStyle: The text style of this run.
  5105. TextStyle *TextStyle `json:"textStyle,omitempty"`
  5106. // ForceSendFields is a list of field names (e.g. "Content") to
  5107. // unconditionally include in API requests. By default, fields with
  5108. // empty values are omitted from API requests. However, any non-pointer,
  5109. // non-interface field appearing in ForceSendFields will be sent to the
  5110. // server regardless of whether the field is empty or not. This may be
  5111. // used to include empty fields in Patch requests.
  5112. ForceSendFields []string `json:"-"`
  5113. // NullFields is a list of field names (e.g. "Content") to include in
  5114. // API requests with the JSON null value. By default, fields with empty
  5115. // values are omitted from API requests. However, any field with an
  5116. // empty value appearing in NullFields will be sent to the server as
  5117. // null. It is an error if a field in this list has a non-empty value.
  5118. // This may be used to include null fields in Patch requests.
  5119. NullFields []string `json:"-"`
  5120. }
  5121. func (s *TextRun) MarshalJSON() ([]byte, error) {
  5122. type NoMethod TextRun
  5123. raw := NoMethod(*s)
  5124. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5125. }
  5126. // TextStyle: Represents the styling that can be applied to
  5127. // text.
  5128. //
  5129. // Inherited text styles are represented as unset fields in this
  5130. // message. A
  5131. // text style's parent depends on where the text style is defined:
  5132. //
  5133. // * The TextStyle of text in a Paragraph
  5134. // inherits from the paragraph's corresponding named style type.
  5135. // * The TextStyle on a named style
  5136. // inherits from the normal text named style.
  5137. // * The TextStyle of the normal text named style inherits
  5138. // from the default text style in the Docs editor.
  5139. // * The TextStyle on a Paragraph element
  5140. // that is contained in a table may inherit its text style from the
  5141. // table
  5142. // style.
  5143. //
  5144. // If the text style does not inherit from a parent, unsetting fields
  5145. // will
  5146. // revert the style to a value matching the defaults in the Docs editor.
  5147. type TextStyle struct {
  5148. // BackgroundColor: The background color of the text. If set, the color
  5149. // is either an RGB color
  5150. // or transparent, depending on the `color` field.
  5151. BackgroundColor *OptionalColor `json:"backgroundColor,omitempty"`
  5152. // BaselineOffset: The text's vertical offset from its normal
  5153. // position.
  5154. //
  5155. // Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is
  5156. // automatically
  5157. // rendered in a smaller font size, computed based on the `font_size`
  5158. // field.
  5159. // The `font_size` itself is not affected by changes in this field.
  5160. //
  5161. // Possible values:
  5162. // "BASELINE_OFFSET_UNSPECIFIED" - The text's baseline offset is
  5163. // inherited from the parent.
  5164. // "NONE" - The text is not vertically offset.
  5165. // "SUPERSCRIPT" - The text is vertically offset upwards
  5166. // (superscript).
  5167. // "SUBSCRIPT" - The text is vertically offset downwards (subscript).
  5168. BaselineOffset string `json:"baselineOffset,omitempty"`
  5169. // Bold: Whether or not the text is rendered as bold.
  5170. Bold bool `json:"bold,omitempty"`
  5171. // FontSize: The size of the text's font.
  5172. FontSize *Dimension `json:"fontSize,omitempty"`
  5173. // ForegroundColor: The foreground color of the text. If set, the color
  5174. // is either an RGB color
  5175. // or transparent, depending on the `color` field.
  5176. ForegroundColor *OptionalColor `json:"foregroundColor,omitempty"`
  5177. // Italic: Whether or not the text is italicized.
  5178. Italic bool `json:"italic,omitempty"`
  5179. // Link: The hyperlink destination of the text. If unset, there is no
  5180. // link. Links
  5181. // are not inherited from parent text.
  5182. //
  5183. // Changing the link in an update request causes some other changes to
  5184. // the
  5185. // text style of the range:
  5186. //
  5187. // * When setting a link, the text foreground color will be updated to
  5188. // the
  5189. // default link color and the text will be underlined. If these fields
  5190. // are
  5191. // modified in the same request, those values will be used instead of
  5192. // the
  5193. // link defaults.
  5194. // * Setting a link on a text range that overlaps with an existing link
  5195. // will
  5196. // also update the existing link to point to the new URL.
  5197. // * Links are not settable on newline characters. As a result, setting
  5198. // a link
  5199. // on a text range that crosses a paragraph boundary, such as
  5200. // "ABC\n123",
  5201. // will separate the newline character(s) into their own text runs.
  5202. // The
  5203. // link will be applied separately to the runs before and after the
  5204. // newline.
  5205. // * Removing a link will update the text style of the range to match
  5206. // the
  5207. // style of the preceding text (or the default text styles if the
  5208. // preceding
  5209. // text is another link) unless different styles are being set in the
  5210. // same
  5211. // request.
  5212. Link *Link `json:"link,omitempty"`
  5213. // SmallCaps: Whether or not the text is in small capital letters.
  5214. SmallCaps bool `json:"smallCaps,omitempty"`
  5215. // Strikethrough: Whether or not the text is struck through.
  5216. Strikethrough bool `json:"strikethrough,omitempty"`
  5217. // Underline: Whether or not the text is underlined.
  5218. Underline bool `json:"underline,omitempty"`
  5219. // WeightedFontFamily: The font family and rendered weight of the
  5220. // text.
  5221. //
  5222. // If an update request specifies values for both `weighted_font_family`
  5223. // and
  5224. // `bold`, the `weighted_font_family` is applied first, then `bold`.
  5225. //
  5226. // If `weighted_font_family#weight` is not set, it defaults to
  5227. // `400`.
  5228. //
  5229. // If `weighted_font_family` is set, then
  5230. // `weighted_font_family#font_family`
  5231. // must also be set with a non-empty value. Otherwise, a 400 bad request
  5232. // error
  5233. // is returned.
  5234. WeightedFontFamily *WeightedFontFamily `json:"weightedFontFamily,omitempty"`
  5235. // ForceSendFields is a list of field names (e.g. "BackgroundColor") to
  5236. // unconditionally include in API requests. By default, fields with
  5237. // empty values are omitted from API requests. However, any non-pointer,
  5238. // non-interface field appearing in ForceSendFields will be sent to the
  5239. // server regardless of whether the field is empty or not. This may be
  5240. // used to include empty fields in Patch requests.
  5241. ForceSendFields []string `json:"-"`
  5242. // NullFields is a list of field names (e.g. "BackgroundColor") to
  5243. // include in API requests with the JSON null value. By default, fields
  5244. // with empty values are omitted from API requests. However, any field
  5245. // with an empty value appearing in NullFields will be sent to the
  5246. // server as null. It is an error if a field in this list has a
  5247. // non-empty value. This may be used to include null fields in Patch
  5248. // requests.
  5249. NullFields []string `json:"-"`
  5250. }
  5251. func (s *TextStyle) MarshalJSON() ([]byte, error) {
  5252. type NoMethod TextStyle
  5253. raw := NoMethod(*s)
  5254. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5255. }
  5256. // TextStyleSuggestionState: A mask that indicates which of the fields
  5257. // on the base TextStyle have been changed in this suggestion.
  5258. // For any field set to true, there is a new suggested value.
  5259. type TextStyleSuggestionState struct {
  5260. // BackgroundColorSuggested: Indicates if there was a suggested change
  5261. // to background_color.
  5262. BackgroundColorSuggested bool `json:"backgroundColorSuggested,omitempty"`
  5263. // BaselineOffsetSuggested: Indicates if there was a suggested change to
  5264. // baseline_offset.
  5265. BaselineOffsetSuggested bool `json:"baselineOffsetSuggested,omitempty"`
  5266. // BoldSuggested: Indicates if there was a suggested change to bold.
  5267. BoldSuggested bool `json:"boldSuggested,omitempty"`
  5268. // FontSizeSuggested: Indicates if there was a suggested change to
  5269. // font_size.
  5270. FontSizeSuggested bool `json:"fontSizeSuggested,omitempty"`
  5271. // ForegroundColorSuggested: Indicates if there was a suggested change
  5272. // to foreground_color.
  5273. ForegroundColorSuggested bool `json:"foregroundColorSuggested,omitempty"`
  5274. // ItalicSuggested: Indicates if there was a suggested change to italic.
  5275. ItalicSuggested bool `json:"italicSuggested,omitempty"`
  5276. // LinkSuggested: Indicates if there was a suggested change to link.
  5277. LinkSuggested bool `json:"linkSuggested,omitempty"`
  5278. // SmallCapsSuggested: Indicates if there was a suggested change to
  5279. // small_caps.
  5280. SmallCapsSuggested bool `json:"smallCapsSuggested,omitempty"`
  5281. // StrikethroughSuggested: Indicates if there was a suggested change to
  5282. // strikethrough.
  5283. StrikethroughSuggested bool `json:"strikethroughSuggested,omitempty"`
  5284. // UnderlineSuggested: Indicates if there was a suggested change to
  5285. // underline.
  5286. UnderlineSuggested bool `json:"underlineSuggested,omitempty"`
  5287. // WeightedFontFamilySuggested: Indicates if there was a suggested
  5288. // change to weighted_font_family.
  5289. WeightedFontFamilySuggested bool `json:"weightedFontFamilySuggested,omitempty"`
  5290. // ForceSendFields is a list of field names (e.g.
  5291. // "BackgroundColorSuggested") to unconditionally include in API
  5292. // requests. By default, fields with empty values are omitted from API
  5293. // requests. However, any non-pointer, non-interface field appearing in
  5294. // ForceSendFields will be sent to the server regardless of whether the
  5295. // field is empty or not. This may be used to include empty fields in
  5296. // Patch requests.
  5297. ForceSendFields []string `json:"-"`
  5298. // NullFields is a list of field names (e.g. "BackgroundColorSuggested")
  5299. // to include in API requests with the JSON null value. By default,
  5300. // fields with empty values are omitted from API requests. However, any
  5301. // field with an empty value appearing in NullFields will be sent to the
  5302. // server as null. It is an error if a field in this list has a
  5303. // non-empty value. This may be used to include null fields in Patch
  5304. // requests.
  5305. NullFields []string `json:"-"`
  5306. }
  5307. func (s *TextStyleSuggestionState) MarshalJSON() ([]byte, error) {
  5308. type NoMethod TextStyleSuggestionState
  5309. raw := NoMethod(*s)
  5310. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5311. }
  5312. // UpdateParagraphStyleRequest: Update the styling of all paragraphs
  5313. // that overlap with the given range.
  5314. type UpdateParagraphStyleRequest struct {
  5315. // Fields: The fields that should be updated.
  5316. //
  5317. // At least one field must be specified. The root `paragraph_style` is
  5318. // implied
  5319. // and should not be specified.
  5320. //
  5321. // For example, to update the paragraph style's alignment property,
  5322. // set
  5323. // `fields` to "alignment".
  5324. //
  5325. // To reset a property to its default value, include its field name in
  5326. // the
  5327. // field mask but leave the field itself unset.
  5328. Fields string `json:"fields,omitempty"`
  5329. // ParagraphStyle: The styles to set on the paragraphs.
  5330. //
  5331. // Certain paragraph style changes may cause other changes in order to
  5332. // mirror
  5333. // the behavior of the Docs editor. See the documentation of
  5334. // ParagraphStyle for more information.
  5335. ParagraphStyle *ParagraphStyle `json:"paragraphStyle,omitempty"`
  5336. // Range: The range overlapping the paragraphs to style.
  5337. Range *Range `json:"range,omitempty"`
  5338. // ForceSendFields is a list of field names (e.g. "Fields") to
  5339. // unconditionally include in API requests. By default, fields with
  5340. // empty values are omitted from API requests. However, any non-pointer,
  5341. // non-interface field appearing in ForceSendFields will be sent to the
  5342. // server regardless of whether the field is empty or not. This may be
  5343. // used to include empty fields in Patch requests.
  5344. ForceSendFields []string `json:"-"`
  5345. // NullFields is a list of field names (e.g. "Fields") to include in API
  5346. // requests with the JSON null value. By default, fields with empty
  5347. // values are omitted from API requests. However, any field with an
  5348. // empty value appearing in NullFields will be sent to the server as
  5349. // null. It is an error if a field in this list has a non-empty value.
  5350. // This may be used to include null fields in Patch requests.
  5351. NullFields []string `json:"-"`
  5352. }
  5353. func (s *UpdateParagraphStyleRequest) MarshalJSON() ([]byte, error) {
  5354. type NoMethod UpdateParagraphStyleRequest
  5355. raw := NoMethod(*s)
  5356. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5357. }
  5358. // UpdateTextStyleRequest: Update the styling of text.
  5359. type UpdateTextStyleRequest struct {
  5360. // Fields: The fields that should be updated.
  5361. //
  5362. // At least one field must be specified. The root `text_style` is
  5363. // implied and
  5364. // should not be specified. A single "*" can be used as short-hand
  5365. // for
  5366. // listing every field.
  5367. //
  5368. // For example, to update the text style to bold, set `fields` to
  5369. // "bold".
  5370. //
  5371. // To reset a property to its default value, include its field name in
  5372. // the
  5373. // field mask but leave the field itself unset.
  5374. Fields string `json:"fields,omitempty"`
  5375. // Range: The range of text to style.
  5376. //
  5377. // The range may be extended to include adjacent newlines.
  5378. //
  5379. // If the range fully contains a paragraph belonging to a list,
  5380. // the
  5381. // paragraph's bullet is also updated with the matching text style.
  5382. Range *Range `json:"range,omitempty"`
  5383. // TextStyle: The styles to set on the text.
  5384. //
  5385. // If the value for a particular style matches that of the parent, that
  5386. // style
  5387. // will be set to inherit.
  5388. //
  5389. // Certain text style changes may cause other changes in order to to
  5390. // mirror
  5391. // the behavior of the Docs editor. See the documentation of
  5392. // TextStyle for more information.
  5393. TextStyle *TextStyle `json:"textStyle,omitempty"`
  5394. // ForceSendFields is a list of field names (e.g. "Fields") to
  5395. // unconditionally include in API requests. By default, fields with
  5396. // empty values are omitted from API requests. However, any non-pointer,
  5397. // non-interface field appearing in ForceSendFields will be sent to the
  5398. // server regardless of whether the field is empty or not. This may be
  5399. // used to include empty fields in Patch requests.
  5400. ForceSendFields []string `json:"-"`
  5401. // NullFields is a list of field names (e.g. "Fields") to include in API
  5402. // requests with the JSON null value. By default, fields with empty
  5403. // values are omitted from API requests. However, any field with an
  5404. // empty value appearing in NullFields will be sent to the server as
  5405. // null. It is an error if a field in this list has a non-empty value.
  5406. // This may be used to include null fields in Patch requests.
  5407. NullFields []string `json:"-"`
  5408. }
  5409. func (s *UpdateTextStyleRequest) MarshalJSON() ([]byte, error) {
  5410. type NoMethod UpdateTextStyleRequest
  5411. raw := NoMethod(*s)
  5412. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5413. }
  5414. // WeightedFontFamily: Represents a font family and weight of text.
  5415. type WeightedFontFamily struct {
  5416. // FontFamily: The font family of the text.
  5417. //
  5418. // The font family can be any font from the Font menu in Docs or
  5419. // from
  5420. // [Google Fonts] (https://fonts.google.com/). If the font name
  5421. // is
  5422. // unrecognized, the text is rendered in `Arial`.
  5423. FontFamily string `json:"fontFamily,omitempty"`
  5424. // Weight: The weight of the font. This field can have any value that is
  5425. // a multiple of
  5426. // `100` between `100` and `900`, inclusive. This range corresponds to
  5427. // the
  5428. // numerical values described in the CSS 2.1 Specification,
  5429. // [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness),
  5430. // with
  5431. // non-numerical values disallowed.
  5432. //
  5433. // The default value is `400` ("normal").
  5434. //
  5435. // The font weight makes up just one component of the rendered font
  5436. // weight.
  5437. // The rendered weight is determined by a combination of the `weight`
  5438. // and the
  5439. // text style's resolved `bold` value, after accounting for
  5440. // inheritance:
  5441. //
  5442. // * If the text is bold and the weight is less than `400`, the
  5443. // rendered
  5444. // weight is 400.
  5445. // * If the text is bold and the weight is greater than or equal to
  5446. // `400` but
  5447. // is less than `700`, the rendered weight is `700`.
  5448. // * If the weight is greater than or equal to `700`, the rendered
  5449. // weight is
  5450. // equal to the weight.
  5451. // * If the text is not bold, the rendered weight is equal to the
  5452. // weight.
  5453. Weight int64 `json:"weight,omitempty"`
  5454. // ForceSendFields is a list of field names (e.g. "FontFamily") to
  5455. // unconditionally include in API requests. By default, fields with
  5456. // empty values are omitted from API requests. However, any non-pointer,
  5457. // non-interface field appearing in ForceSendFields will be sent to the
  5458. // server regardless of whether the field is empty or not. This may be
  5459. // used to include empty fields in Patch requests.
  5460. ForceSendFields []string `json:"-"`
  5461. // NullFields is a list of field names (e.g. "FontFamily") to include in
  5462. // API requests with the JSON null value. By default, fields with empty
  5463. // values are omitted from API requests. However, any field with an
  5464. // empty value appearing in NullFields will be sent to the server as
  5465. // null. It is an error if a field in this list has a non-empty value.
  5466. // This may be used to include null fields in Patch requests.
  5467. NullFields []string `json:"-"`
  5468. }
  5469. func (s *WeightedFontFamily) MarshalJSON() ([]byte, error) {
  5470. type NoMethod WeightedFontFamily
  5471. raw := NoMethod(*s)
  5472. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5473. }
  5474. // WriteControl: Provides control over how write requests are executed.
  5475. type WriteControl struct {
  5476. // RequiredRevisionId: The ID of the revision of the document that the
  5477. // write request will be
  5478. // applied to. If this is not the latest revision of the document,
  5479. // the
  5480. // request will not be processed and will return a 400 bad request
  5481. // error.
  5482. //
  5483. // When a required revision ID is returned in a response, it indicates
  5484. // the
  5485. // revision ID of the document after the request was applied.
  5486. RequiredRevisionId string `json:"requiredRevisionId,omitempty"`
  5487. // ForceSendFields is a list of field names (e.g. "RequiredRevisionId")
  5488. // to unconditionally include in API requests. By default, fields with
  5489. // empty values are omitted from API requests. However, any non-pointer,
  5490. // non-interface field appearing in ForceSendFields will be sent to the
  5491. // server regardless of whether the field is empty or not. This may be
  5492. // used to include empty fields in Patch requests.
  5493. ForceSendFields []string `json:"-"`
  5494. // NullFields is a list of field names (e.g. "RequiredRevisionId") to
  5495. // include in API requests with the JSON null value. By default, fields
  5496. // with empty values are omitted from API requests. However, any field
  5497. // with an empty value appearing in NullFields will be sent to the
  5498. // server as null. It is an error if a field in this list has a
  5499. // non-empty value. This may be used to include null fields in Patch
  5500. // requests.
  5501. NullFields []string `json:"-"`
  5502. }
  5503. func (s *WriteControl) MarshalJSON() ([]byte, error) {
  5504. type NoMethod WriteControl
  5505. raw := NoMethod(*s)
  5506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5507. }
  5508. // method id "docs.documents.batchUpdate":
  5509. type DocumentsBatchUpdateCall struct {
  5510. s *Service
  5511. documentId string
  5512. batchupdatedocumentrequest *BatchUpdateDocumentRequest
  5513. urlParams_ gensupport.URLParams
  5514. ctx_ context.Context
  5515. header_ http.Header
  5516. }
  5517. // BatchUpdate: Applies one or more updates to the document.
  5518. //
  5519. // Each request is validated before
  5520. // being applied. If any request is not valid, then the entire request
  5521. // will
  5522. // fail and nothing will be applied.
  5523. //
  5524. // Some requests have replies to
  5525. // give you some information about how they are applied. Other requests
  5526. // do
  5527. // not need to return information; these each return an empty reply.
  5528. // The order of replies matches that of the requests.
  5529. //
  5530. // For example, suppose you call batchUpdate with four updates, and only
  5531. // the
  5532. // third one returns information. The response would have two empty
  5533. // replies,
  5534. // the reply to the third request, and another empty reply, in that
  5535. // order.
  5536. //
  5537. // Because other users may be editing the document, the document
  5538. // might not exactly reflect your changes: your changes may
  5539. // be altered with respect to collaborator changes. If there are
  5540. // no
  5541. // collaborators, the document should reflect your changes. In any
  5542. // case,
  5543. // the updates in your request are guaranteed to be applied
  5544. // together
  5545. // atomically.
  5546. func (r *DocumentsService) BatchUpdate(documentId string, batchupdatedocumentrequest *BatchUpdateDocumentRequest) *DocumentsBatchUpdateCall {
  5547. c := &DocumentsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5548. c.documentId = documentId
  5549. c.batchupdatedocumentrequest = batchupdatedocumentrequest
  5550. return c
  5551. }
  5552. // Fields allows partial responses to be retrieved. See
  5553. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5554. // for more information.
  5555. func (c *DocumentsBatchUpdateCall) Fields(s ...googleapi.Field) *DocumentsBatchUpdateCall {
  5556. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5557. return c
  5558. }
  5559. // Context sets the context to be used in this call's Do method. Any
  5560. // pending HTTP request will be aborted if the provided context is
  5561. // canceled.
  5562. func (c *DocumentsBatchUpdateCall) Context(ctx context.Context) *DocumentsBatchUpdateCall {
  5563. c.ctx_ = ctx
  5564. return c
  5565. }
  5566. // Header returns an http.Header that can be modified by the caller to
  5567. // add HTTP headers to the request.
  5568. func (c *DocumentsBatchUpdateCall) Header() http.Header {
  5569. if c.header_ == nil {
  5570. c.header_ = make(http.Header)
  5571. }
  5572. return c.header_
  5573. }
  5574. func (c *DocumentsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  5575. reqHeaders := make(http.Header)
  5576. for k, v := range c.header_ {
  5577. reqHeaders[k] = v
  5578. }
  5579. reqHeaders.Set("User-Agent", c.s.userAgent())
  5580. var body io.Reader = nil
  5581. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatedocumentrequest)
  5582. if err != nil {
  5583. return nil, err
  5584. }
  5585. reqHeaders.Set("Content-Type", "application/json")
  5586. c.urlParams_.Set("alt", alt)
  5587. c.urlParams_.Set("prettyPrint", "false")
  5588. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents/{documentId}:batchUpdate")
  5589. urls += "?" + c.urlParams_.Encode()
  5590. req, err := http.NewRequest("POST", urls, body)
  5591. if err != nil {
  5592. return nil, err
  5593. }
  5594. req.Header = reqHeaders
  5595. googleapi.Expand(req.URL, map[string]string{
  5596. "documentId": c.documentId,
  5597. })
  5598. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5599. }
  5600. // Do executes the "docs.documents.batchUpdate" call.
  5601. // Exactly one of *BatchUpdateDocumentResponse or error will be non-nil.
  5602. // Any non-2xx status code is an error. Response headers are in either
  5603. // *BatchUpdateDocumentResponse.ServerResponse.Header or (if a response
  5604. // was returned at all) in error.(*googleapi.Error).Header. Use
  5605. // googleapi.IsNotModified to check whether the returned error was
  5606. // because http.StatusNotModified was returned.
  5607. func (c *DocumentsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateDocumentResponse, error) {
  5608. gensupport.SetOptions(c.urlParams_, opts...)
  5609. res, err := c.doRequest("json")
  5610. if res != nil && res.StatusCode == http.StatusNotModified {
  5611. if res.Body != nil {
  5612. res.Body.Close()
  5613. }
  5614. return nil, &googleapi.Error{
  5615. Code: res.StatusCode,
  5616. Header: res.Header,
  5617. }
  5618. }
  5619. if err != nil {
  5620. return nil, err
  5621. }
  5622. defer googleapi.CloseBody(res)
  5623. if err := googleapi.CheckResponse(res); err != nil {
  5624. return nil, err
  5625. }
  5626. ret := &BatchUpdateDocumentResponse{
  5627. ServerResponse: googleapi.ServerResponse{
  5628. Header: res.Header,
  5629. HTTPStatusCode: res.StatusCode,
  5630. },
  5631. }
  5632. target := &ret
  5633. if err := gensupport.DecodeResponse(target, res); err != nil {
  5634. return nil, err
  5635. }
  5636. return ret, nil
  5637. // {
  5638. // "description": "Applies one or more updates to the document.\n\nEach request is validated before\nbeing applied. If any request is not valid, then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how they are applied. Other requests do\nnot need to return information; these each return an empty reply.\nThe order of replies matches that of the requests.\n\nFor example, suppose you call batchUpdate with four updates, and only the\nthird one returns information. The response would have two empty replies,\nthe reply to the third request, and another empty reply, in that order.\n\nBecause other users may be editing the document, the document\nmight not exactly reflect your changes: your changes may\nbe altered with respect to collaborator changes. If there are no\ncollaborators, the document should reflect your changes. In any case,\nthe updates in your request are guaranteed to be applied together\natomically.",
  5639. // "flatPath": "v1/documents/{documentId}:batchUpdate",
  5640. // "httpMethod": "POST",
  5641. // "id": "docs.documents.batchUpdate",
  5642. // "parameterOrder": [
  5643. // "documentId"
  5644. // ],
  5645. // "parameters": {
  5646. // "documentId": {
  5647. // "description": "The ID of the document to update.",
  5648. // "location": "path",
  5649. // "required": true,
  5650. // "type": "string"
  5651. // }
  5652. // },
  5653. // "path": "v1/documents/{documentId}:batchUpdate",
  5654. // "request": {
  5655. // "$ref": "BatchUpdateDocumentRequest"
  5656. // },
  5657. // "response": {
  5658. // "$ref": "BatchUpdateDocumentResponse"
  5659. // },
  5660. // "scopes": [
  5661. // "https://www.googleapis.com/auth/documents",
  5662. // "https://www.googleapis.com/auth/drive",
  5663. // "https://www.googleapis.com/auth/drive.file"
  5664. // ]
  5665. // }
  5666. }
  5667. // method id "docs.documents.create":
  5668. type DocumentsCreateCall struct {
  5669. s *Service
  5670. document *Document
  5671. urlParams_ gensupport.URLParams
  5672. ctx_ context.Context
  5673. header_ http.Header
  5674. }
  5675. // Create: Creates a blank document using the title given in the
  5676. // request. Other fields
  5677. // in the request, including any provided content, are ignored.
  5678. //
  5679. // Returns the created document.
  5680. func (r *DocumentsService) Create(document *Document) *DocumentsCreateCall {
  5681. c := &DocumentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5682. c.document = document
  5683. return c
  5684. }
  5685. // Fields allows partial responses to be retrieved. See
  5686. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5687. // for more information.
  5688. func (c *DocumentsCreateCall) Fields(s ...googleapi.Field) *DocumentsCreateCall {
  5689. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5690. return c
  5691. }
  5692. // Context sets the context to be used in this call's Do method. Any
  5693. // pending HTTP request will be aborted if the provided context is
  5694. // canceled.
  5695. func (c *DocumentsCreateCall) Context(ctx context.Context) *DocumentsCreateCall {
  5696. c.ctx_ = ctx
  5697. return c
  5698. }
  5699. // Header returns an http.Header that can be modified by the caller to
  5700. // add HTTP headers to the request.
  5701. func (c *DocumentsCreateCall) Header() http.Header {
  5702. if c.header_ == nil {
  5703. c.header_ = make(http.Header)
  5704. }
  5705. return c.header_
  5706. }
  5707. func (c *DocumentsCreateCall) doRequest(alt string) (*http.Response, error) {
  5708. reqHeaders := make(http.Header)
  5709. for k, v := range c.header_ {
  5710. reqHeaders[k] = v
  5711. }
  5712. reqHeaders.Set("User-Agent", c.s.userAgent())
  5713. var body io.Reader = nil
  5714. body, err := googleapi.WithoutDataWrapper.JSONReader(c.document)
  5715. if err != nil {
  5716. return nil, err
  5717. }
  5718. reqHeaders.Set("Content-Type", "application/json")
  5719. c.urlParams_.Set("alt", alt)
  5720. c.urlParams_.Set("prettyPrint", "false")
  5721. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents")
  5722. urls += "?" + c.urlParams_.Encode()
  5723. req, err := http.NewRequest("POST", urls, body)
  5724. if err != nil {
  5725. return nil, err
  5726. }
  5727. req.Header = reqHeaders
  5728. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5729. }
  5730. // Do executes the "docs.documents.create" call.
  5731. // Exactly one of *Document or error will be non-nil. Any non-2xx status
  5732. // code is an error. Response headers are in either
  5733. // *Document.ServerResponse.Header or (if a response was returned at
  5734. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5735. // to check whether the returned error was because
  5736. // http.StatusNotModified was returned.
  5737. func (c *DocumentsCreateCall) Do(opts ...googleapi.CallOption) (*Document, error) {
  5738. gensupport.SetOptions(c.urlParams_, opts...)
  5739. res, err := c.doRequest("json")
  5740. if res != nil && res.StatusCode == http.StatusNotModified {
  5741. if res.Body != nil {
  5742. res.Body.Close()
  5743. }
  5744. return nil, &googleapi.Error{
  5745. Code: res.StatusCode,
  5746. Header: res.Header,
  5747. }
  5748. }
  5749. if err != nil {
  5750. return nil, err
  5751. }
  5752. defer googleapi.CloseBody(res)
  5753. if err := googleapi.CheckResponse(res); err != nil {
  5754. return nil, err
  5755. }
  5756. ret := &Document{
  5757. ServerResponse: googleapi.ServerResponse{
  5758. Header: res.Header,
  5759. HTTPStatusCode: res.StatusCode,
  5760. },
  5761. }
  5762. target := &ret
  5763. if err := gensupport.DecodeResponse(target, res); err != nil {
  5764. return nil, err
  5765. }
  5766. return ret, nil
  5767. // {
  5768. // "description": "Creates a blank document using the title given in the request. Other fields\nin the request, including any provided content, are ignored.\n\nReturns the created document.",
  5769. // "flatPath": "v1/documents",
  5770. // "httpMethod": "POST",
  5771. // "id": "docs.documents.create",
  5772. // "parameterOrder": [],
  5773. // "parameters": {},
  5774. // "path": "v1/documents",
  5775. // "request": {
  5776. // "$ref": "Document"
  5777. // },
  5778. // "response": {
  5779. // "$ref": "Document"
  5780. // },
  5781. // "scopes": [
  5782. // "https://www.googleapis.com/auth/documents",
  5783. // "https://www.googleapis.com/auth/drive",
  5784. // "https://www.googleapis.com/auth/drive.file"
  5785. // ]
  5786. // }
  5787. }
  5788. // method id "docs.documents.get":
  5789. type DocumentsGetCall struct {
  5790. s *Service
  5791. documentId string
  5792. urlParams_ gensupport.URLParams
  5793. ifNoneMatch_ string
  5794. ctx_ context.Context
  5795. header_ http.Header
  5796. }
  5797. // Get: Gets the latest version of the specified document.
  5798. func (r *DocumentsService) Get(documentId string) *DocumentsGetCall {
  5799. c := &DocumentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5800. c.documentId = documentId
  5801. return c
  5802. }
  5803. // SuggestionsViewMode sets the optional parameter
  5804. // "suggestionsViewMode": The suggestions view mode to apply to the
  5805. // document. This allows viewing the
  5806. // document with all suggestions inline, accepted or rejected. If one is
  5807. // not
  5808. // specified, DEFAULT_FOR_CURRENT_ACCESS is
  5809. // used.
  5810. //
  5811. // Possible values:
  5812. // "DEFAULT_FOR_CURRENT_ACCESS"
  5813. // "SUGGESTIONS_INLINE"
  5814. // "PREVIEW_SUGGESTIONS_ACCEPTED"
  5815. // "PREVIEW_WITHOUT_SUGGESTIONS"
  5816. func (c *DocumentsGetCall) SuggestionsViewMode(suggestionsViewMode string) *DocumentsGetCall {
  5817. c.urlParams_.Set("suggestionsViewMode", suggestionsViewMode)
  5818. return c
  5819. }
  5820. // Fields allows partial responses to be retrieved. See
  5821. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5822. // for more information.
  5823. func (c *DocumentsGetCall) Fields(s ...googleapi.Field) *DocumentsGetCall {
  5824. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5825. return c
  5826. }
  5827. // IfNoneMatch sets the optional parameter which makes the operation
  5828. // fail if the object's ETag matches the given value. This is useful for
  5829. // getting updates only after the object has changed since the last
  5830. // request. Use googleapi.IsNotModified to check whether the response
  5831. // error from Do is the result of In-None-Match.
  5832. func (c *DocumentsGetCall) IfNoneMatch(entityTag string) *DocumentsGetCall {
  5833. c.ifNoneMatch_ = entityTag
  5834. return c
  5835. }
  5836. // Context sets the context to be used in this call's Do method. Any
  5837. // pending HTTP request will be aborted if the provided context is
  5838. // canceled.
  5839. func (c *DocumentsGetCall) Context(ctx context.Context) *DocumentsGetCall {
  5840. c.ctx_ = ctx
  5841. return c
  5842. }
  5843. // Header returns an http.Header that can be modified by the caller to
  5844. // add HTTP headers to the request.
  5845. func (c *DocumentsGetCall) Header() http.Header {
  5846. if c.header_ == nil {
  5847. c.header_ = make(http.Header)
  5848. }
  5849. return c.header_
  5850. }
  5851. func (c *DocumentsGetCall) doRequest(alt string) (*http.Response, error) {
  5852. reqHeaders := make(http.Header)
  5853. for k, v := range c.header_ {
  5854. reqHeaders[k] = v
  5855. }
  5856. reqHeaders.Set("User-Agent", c.s.userAgent())
  5857. if c.ifNoneMatch_ != "" {
  5858. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5859. }
  5860. var body io.Reader = nil
  5861. c.urlParams_.Set("alt", alt)
  5862. c.urlParams_.Set("prettyPrint", "false")
  5863. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/documents/{documentId}")
  5864. urls += "?" + c.urlParams_.Encode()
  5865. req, err := http.NewRequest("GET", urls, body)
  5866. if err != nil {
  5867. return nil, err
  5868. }
  5869. req.Header = reqHeaders
  5870. googleapi.Expand(req.URL, map[string]string{
  5871. "documentId": c.documentId,
  5872. })
  5873. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5874. }
  5875. // Do executes the "docs.documents.get" call.
  5876. // Exactly one of *Document or error will be non-nil. Any non-2xx status
  5877. // code is an error. Response headers are in either
  5878. // *Document.ServerResponse.Header or (if a response was returned at
  5879. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5880. // to check whether the returned error was because
  5881. // http.StatusNotModified was returned.
  5882. func (c *DocumentsGetCall) Do(opts ...googleapi.CallOption) (*Document, error) {
  5883. gensupport.SetOptions(c.urlParams_, opts...)
  5884. res, err := c.doRequest("json")
  5885. if res != nil && res.StatusCode == http.StatusNotModified {
  5886. if res.Body != nil {
  5887. res.Body.Close()
  5888. }
  5889. return nil, &googleapi.Error{
  5890. Code: res.StatusCode,
  5891. Header: res.Header,
  5892. }
  5893. }
  5894. if err != nil {
  5895. return nil, err
  5896. }
  5897. defer googleapi.CloseBody(res)
  5898. if err := googleapi.CheckResponse(res); err != nil {
  5899. return nil, err
  5900. }
  5901. ret := &Document{
  5902. ServerResponse: googleapi.ServerResponse{
  5903. Header: res.Header,
  5904. HTTPStatusCode: res.StatusCode,
  5905. },
  5906. }
  5907. target := &ret
  5908. if err := gensupport.DecodeResponse(target, res); err != nil {
  5909. return nil, err
  5910. }
  5911. return ret, nil
  5912. // {
  5913. // "description": "Gets the latest version of the specified document.",
  5914. // "flatPath": "v1/documents/{documentId}",
  5915. // "httpMethod": "GET",
  5916. // "id": "docs.documents.get",
  5917. // "parameterOrder": [
  5918. // "documentId"
  5919. // ],
  5920. // "parameters": {
  5921. // "documentId": {
  5922. // "description": "The ID of the document to retrieve.",
  5923. // "location": "path",
  5924. // "required": true,
  5925. // "type": "string"
  5926. // },
  5927. // "suggestionsViewMode": {
  5928. // "description": "The suggestions view mode to apply to the document. This allows viewing the\ndocument with all suggestions inline, accepted or rejected. If one is not\nspecified, DEFAULT_FOR_CURRENT_ACCESS is\nused.",
  5929. // "enum": [
  5930. // "DEFAULT_FOR_CURRENT_ACCESS",
  5931. // "SUGGESTIONS_INLINE",
  5932. // "PREVIEW_SUGGESTIONS_ACCEPTED",
  5933. // "PREVIEW_WITHOUT_SUGGESTIONS"
  5934. // ],
  5935. // "location": "query",
  5936. // "type": "string"
  5937. // }
  5938. // },
  5939. // "path": "v1/documents/{documentId}",
  5940. // "response": {
  5941. // "$ref": "Document"
  5942. // },
  5943. // "scopes": [
  5944. // "https://www.googleapis.com/auth/documents",
  5945. // "https://www.googleapis.com/auth/documents.readonly",
  5946. // "https://www.googleapis.com/auth/drive",
  5947. // "https://www.googleapis.com/auth/drive.file",
  5948. // "https://www.googleapis.com/auth/drive.readonly"
  5949. // ]
  5950. // }
  5951. }