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