1// Copyright 2019 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package sheets provides access to the Google Sheets API. 8// 9// For product documentation, see: https://developers.google.com/sheets/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/sheets/v4" 16// ... 17// ctx := context.Background() 18// sheetsService, err := sheets.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// sheetsService, err := sheets.NewService(ctx, option.WithScopes(sheets.SpreadsheetsReadonlyScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// sheetsService, err := sheets.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// sheetsService, err := sheets.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package sheets // import "google.golang.org/api/sheets/v4" 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 htransport "google.golang.org/api/transport/http" 60) 61 62// Always reference these packages, just in case the auto-generated code 63// below doesn't. 64var _ = bytes.NewBuffer 65var _ = strconv.Itoa 66var _ = fmt.Sprintf 67var _ = json.NewDecoder 68var _ = io.Copy 69var _ = url.Parse 70var _ = gensupport.MarshalJSON 71var _ = googleapi.Version 72var _ = errors.New 73var _ = strings.Replace 74var _ = context.Canceled 75 76const apiId = "sheets:v4" 77const apiName = "sheets" 78const apiVersion = "v4" 79const basePath = "https://sheets.googleapis.com/" 80 81// OAuth2 scopes used by this API. 82const ( 83 // See, edit, create, and delete all of your Google Drive files 84 DriveScope = "https://www.googleapis.com/auth/drive" 85 86 // View and manage Google Drive files and folders that you have opened 87 // or created with this app 88 DriveFileScope = "https://www.googleapis.com/auth/drive.file" 89 90 // See and download all your Google Drive files 91 DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly" 92 93 // See, edit, create, and delete your spreadsheets in Google Drive 94 SpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets" 95 96 // View your Google Spreadsheets 97 SpreadsheetsReadonlyScope = "https://www.googleapis.com/auth/spreadsheets.readonly" 98) 99 100// NewService creates a new Service. 101func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 102 scopesOption := option.WithScopes( 103 "https://www.googleapis.com/auth/drive", 104 "https://www.googleapis.com/auth/drive.file", 105 "https://www.googleapis.com/auth/drive.readonly", 106 "https://www.googleapis.com/auth/spreadsheets", 107 "https://www.googleapis.com/auth/spreadsheets.readonly", 108 ) 109 // NOTE: prepend, so we don't override user-specified scopes. 110 opts = append([]option.ClientOption{scopesOption}, opts...) 111 client, endpoint, err := htransport.NewClient(ctx, opts...) 112 if err != nil { 113 return nil, err 114 } 115 s, err := New(client) 116 if err != nil { 117 return nil, err 118 } 119 if endpoint != "" { 120 s.BasePath = endpoint 121 } 122 return s, nil 123} 124 125// New creates a new Service. It uses the provided http.Client for requests. 126// 127// Deprecated: please use NewService instead. 128// To provide a custom HTTP client, use option.WithHTTPClient. 129// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 130func New(client *http.Client) (*Service, error) { 131 if client == nil { 132 return nil, errors.New("client is nil") 133 } 134 s := &Service{client: client, BasePath: basePath} 135 s.Spreadsheets = NewSpreadsheetsService(s) 136 return s, nil 137} 138 139type Service struct { 140 client *http.Client 141 BasePath string // API endpoint base URL 142 UserAgent string // optional additional User-Agent fragment 143 144 Spreadsheets *SpreadsheetsService 145} 146 147func (s *Service) userAgent() string { 148 if s.UserAgent == "" { 149 return googleapi.UserAgent 150 } 151 return googleapi.UserAgent + " " + s.UserAgent 152} 153 154func NewSpreadsheetsService(s *Service) *SpreadsheetsService { 155 rs := &SpreadsheetsService{s: s} 156 rs.DeveloperMetadata = NewSpreadsheetsDeveloperMetadataService(s) 157 rs.Sheets = NewSpreadsheetsSheetsService(s) 158 rs.Values = NewSpreadsheetsValuesService(s) 159 return rs 160} 161 162type SpreadsheetsService struct { 163 s *Service 164 165 DeveloperMetadata *SpreadsheetsDeveloperMetadataService 166 167 Sheets *SpreadsheetsSheetsService 168 169 Values *SpreadsheetsValuesService 170} 171 172func NewSpreadsheetsDeveloperMetadataService(s *Service) *SpreadsheetsDeveloperMetadataService { 173 rs := &SpreadsheetsDeveloperMetadataService{s: s} 174 return rs 175} 176 177type SpreadsheetsDeveloperMetadataService struct { 178 s *Service 179} 180 181func NewSpreadsheetsSheetsService(s *Service) *SpreadsheetsSheetsService { 182 rs := &SpreadsheetsSheetsService{s: s} 183 return rs 184} 185 186type SpreadsheetsSheetsService struct { 187 s *Service 188} 189 190func NewSpreadsheetsValuesService(s *Service) *SpreadsheetsValuesService { 191 rs := &SpreadsheetsValuesService{s: s} 192 return rs 193} 194 195type SpreadsheetsValuesService struct { 196 s *Service 197} 198 199// AddBandingRequest: Adds a new banded range to the spreadsheet. 200type AddBandingRequest struct { 201 // BandedRange: The banded range to add. The bandedRangeId 202 // field is optional; if one is not set, an id will be randomly 203 // generated. (It 204 // is an error to specify the ID of a range that already exists.) 205 BandedRange *BandedRange `json:"bandedRange,omitempty"` 206 207 // ForceSendFields is a list of field names (e.g. "BandedRange") to 208 // unconditionally include in API requests. By default, fields with 209 // empty values are omitted from API requests. However, any non-pointer, 210 // non-interface field appearing in ForceSendFields will be sent to the 211 // server regardless of whether the field is empty or not. This may be 212 // used to include empty fields in Patch requests. 213 ForceSendFields []string `json:"-"` 214 215 // NullFields is a list of field names (e.g. "BandedRange") to include 216 // in API requests with the JSON null value. By default, fields with 217 // empty values are omitted from API requests. However, any field with 218 // an empty value appearing in NullFields will be sent to the server as 219 // null. It is an error if a field in this list has a non-empty value. 220 // This may be used to include null fields in Patch requests. 221 NullFields []string `json:"-"` 222} 223 224func (s *AddBandingRequest) MarshalJSON() ([]byte, error) { 225 type NoMethod AddBandingRequest 226 raw := NoMethod(*s) 227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 228} 229 230// AddBandingResponse: The result of adding a banded range. 231type AddBandingResponse struct { 232 // BandedRange: The banded range that was added. 233 BandedRange *BandedRange `json:"bandedRange,omitempty"` 234 235 // ForceSendFields is a list of field names (e.g. "BandedRange") to 236 // unconditionally include in API requests. By default, fields with 237 // empty values are omitted from API requests. However, any non-pointer, 238 // non-interface field appearing in ForceSendFields will be sent to the 239 // server regardless of whether the field is empty or not. This may be 240 // used to include empty fields in Patch requests. 241 ForceSendFields []string `json:"-"` 242 243 // NullFields is a list of field names (e.g. "BandedRange") to include 244 // in API requests with the JSON null value. By default, fields with 245 // empty values are omitted from API requests. However, any field with 246 // an empty value appearing in NullFields will be sent to the server as 247 // null. It is an error if a field in this list has a non-empty value. 248 // This may be used to include null fields in Patch requests. 249 NullFields []string `json:"-"` 250} 251 252func (s *AddBandingResponse) MarshalJSON() ([]byte, error) { 253 type NoMethod AddBandingResponse 254 raw := NoMethod(*s) 255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 256} 257 258// AddChartRequest: Adds a chart to a sheet in the spreadsheet. 259type AddChartRequest struct { 260 // Chart: The chart that should be added to the spreadsheet, including 261 // the position 262 // where it should be placed. The chartId 263 // field is optional; if one is not set, an id will be randomly 264 // generated. (It 265 // is an error to specify the ID of an embedded object that already 266 // exists.) 267 Chart *EmbeddedChart `json:"chart,omitempty"` 268 269 // ForceSendFields is a list of field names (e.g. "Chart") to 270 // unconditionally include in API requests. By default, fields with 271 // empty values are omitted from API requests. However, any non-pointer, 272 // non-interface field appearing in ForceSendFields will be sent to the 273 // server regardless of whether the field is empty or not. This may be 274 // used to include empty fields in Patch requests. 275 ForceSendFields []string `json:"-"` 276 277 // NullFields is a list of field names (e.g. "Chart") to include in API 278 // requests with the JSON null value. By default, fields with empty 279 // values are omitted from API requests. However, any field with an 280 // empty value appearing in NullFields will be sent to the server as 281 // null. It is an error if a field in this list has a non-empty value. 282 // This may be used to include null fields in Patch requests. 283 NullFields []string `json:"-"` 284} 285 286func (s *AddChartRequest) MarshalJSON() ([]byte, error) { 287 type NoMethod AddChartRequest 288 raw := NoMethod(*s) 289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 290} 291 292// AddChartResponse: The result of adding a chart to a spreadsheet. 293type AddChartResponse struct { 294 // Chart: The newly added chart. 295 Chart *EmbeddedChart `json:"chart,omitempty"` 296 297 // ForceSendFields is a list of field names (e.g. "Chart") to 298 // unconditionally include in API requests. By default, fields with 299 // empty values are omitted from API requests. However, any non-pointer, 300 // non-interface field appearing in ForceSendFields will be sent to the 301 // server regardless of whether the field is empty or not. This may be 302 // used to include empty fields in Patch requests. 303 ForceSendFields []string `json:"-"` 304 305 // NullFields is a list of field names (e.g. "Chart") to include in API 306 // requests with the JSON null value. By default, fields with empty 307 // values are omitted from API requests. However, any field with an 308 // empty value appearing in NullFields will be sent to the server as 309 // null. It is an error if a field in this list has a non-empty value. 310 // This may be used to include null fields in Patch requests. 311 NullFields []string `json:"-"` 312} 313 314func (s *AddChartResponse) MarshalJSON() ([]byte, error) { 315 type NoMethod AddChartResponse 316 raw := NoMethod(*s) 317 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 318} 319 320// AddConditionalFormatRuleRequest: Adds a new conditional format rule 321// at the given index. 322// All subsequent rules' indexes are incremented. 323type AddConditionalFormatRuleRequest struct { 324 // Index: The zero-based index where the rule should be inserted. 325 Index int64 `json:"index,omitempty"` 326 327 // Rule: The rule to add. 328 Rule *ConditionalFormatRule `json:"rule,omitempty"` 329 330 // ForceSendFields is a list of field names (e.g. "Index") to 331 // unconditionally include in API requests. By default, fields with 332 // empty values are omitted from API requests. However, any non-pointer, 333 // non-interface field appearing in ForceSendFields will be sent to the 334 // server regardless of whether the field is empty or not. This may be 335 // used to include empty fields in Patch requests. 336 ForceSendFields []string `json:"-"` 337 338 // NullFields is a list of field names (e.g. "Index") to include in API 339 // requests with the JSON null value. By default, fields with empty 340 // values are omitted from API requests. However, any field with an 341 // empty value appearing in NullFields will be sent to the server as 342 // null. It is an error if a field in this list has a non-empty value. 343 // This may be used to include null fields in Patch requests. 344 NullFields []string `json:"-"` 345} 346 347func (s *AddConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 348 type NoMethod AddConditionalFormatRuleRequest 349 raw := NoMethod(*s) 350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 351} 352 353// AddDimensionGroupRequest: Creates a group over the specified 354// range. 355// 356// If the requested range is a superset of the range of an existing 357// group G, 358// then the depth of G is incremented and this new group G' has 359// the 360// depth of that group. For example, a group [C:D, depth 1] + [B:E] 361// results in 362// groups [B:E, depth 1] and [C:D, depth 2]. 363// If the requested range is a subset of the range of an existing group 364// G, 365// then the depth of the new group G' becomes one greater than the depth 366// of G. 367// For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, 368// depth 1] 369// and [C:D, depth 2]. 370// If the requested range starts before and ends within, or starts 371// within and 372// ends after, the range of an existing group G, then the range of the 373// existing 374// group G becomes the union of the ranges, and the new group G' 375// has 376// depth one greater than the depth of G and range as the intersection 377// of the 378// ranges. For example, a group [B:D, depth 1] + [C:E] results in groups 379// [B:E, 380// depth 1] and [C:D, depth 2]. 381type AddDimensionGroupRequest struct { 382 // Range: The range over which to create a group. 383 Range *DimensionRange `json:"range,omitempty"` 384 385 // ForceSendFields is a list of field names (e.g. "Range") to 386 // unconditionally include in API requests. By default, fields with 387 // empty values are omitted from API requests. However, any non-pointer, 388 // non-interface field appearing in ForceSendFields will be sent to the 389 // server regardless of whether the field is empty or not. This may be 390 // used to include empty fields in Patch requests. 391 ForceSendFields []string `json:"-"` 392 393 // NullFields is a list of field names (e.g. "Range") to include in API 394 // requests with the JSON null value. By default, fields with empty 395 // values are omitted from API requests. However, any field with an 396 // empty value appearing in NullFields will be sent to the server as 397 // null. It is an error if a field in this list has a non-empty value. 398 // This may be used to include null fields in Patch requests. 399 NullFields []string `json:"-"` 400} 401 402func (s *AddDimensionGroupRequest) MarshalJSON() ([]byte, error) { 403 type NoMethod AddDimensionGroupRequest 404 raw := NoMethod(*s) 405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 406} 407 408// AddDimensionGroupResponse: The result of adding a group. 409type AddDimensionGroupResponse struct { 410 // DimensionGroups: All groups of a dimension after adding a group to 411 // that dimension. 412 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 413 414 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 415 // unconditionally include in API requests. By default, fields with 416 // empty values are omitted from API requests. However, any non-pointer, 417 // non-interface field appearing in ForceSendFields will be sent to the 418 // server regardless of whether the field is empty or not. This may be 419 // used to include empty fields in Patch requests. 420 ForceSendFields []string `json:"-"` 421 422 // NullFields is a list of field names (e.g. "DimensionGroups") to 423 // include in API requests with the JSON null value. By default, fields 424 // with empty values are omitted from API requests. However, any field 425 // with an empty value appearing in NullFields will be sent to the 426 // server as null. It is an error if a field in this list has a 427 // non-empty value. This may be used to include null fields in Patch 428 // requests. 429 NullFields []string `json:"-"` 430} 431 432func (s *AddDimensionGroupResponse) MarshalJSON() ([]byte, error) { 433 type NoMethod AddDimensionGroupResponse 434 raw := NoMethod(*s) 435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 436} 437 438// AddFilterViewRequest: Adds a filter view. 439type AddFilterViewRequest struct { 440 // Filter: The filter to add. The filterViewId 441 // field is optional; if one is not set, an id will be randomly 442 // generated. (It 443 // is an error to specify the ID of a filter that already exists.) 444 Filter *FilterView `json:"filter,omitempty"` 445 446 // ForceSendFields is a list of field names (e.g. "Filter") to 447 // unconditionally include in API requests. By default, fields with 448 // empty values are omitted from API requests. However, any non-pointer, 449 // non-interface field appearing in ForceSendFields will be sent to the 450 // server regardless of whether the field is empty or not. This may be 451 // used to include empty fields in Patch requests. 452 ForceSendFields []string `json:"-"` 453 454 // NullFields is a list of field names (e.g. "Filter") to include in API 455 // requests with the JSON null value. By default, fields with empty 456 // values are omitted from API requests. However, any field with an 457 // empty value appearing in NullFields will be sent to the server as 458 // null. It is an error if a field in this list has a non-empty value. 459 // This may be used to include null fields in Patch requests. 460 NullFields []string `json:"-"` 461} 462 463func (s *AddFilterViewRequest) MarshalJSON() ([]byte, error) { 464 type NoMethod AddFilterViewRequest 465 raw := NoMethod(*s) 466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 467} 468 469// AddFilterViewResponse: The result of adding a filter view. 470type AddFilterViewResponse struct { 471 // Filter: The newly added filter view. 472 Filter *FilterView `json:"filter,omitempty"` 473 474 // ForceSendFields is a list of field names (e.g. "Filter") to 475 // unconditionally include in API requests. By default, fields with 476 // empty values are omitted from API requests. However, any non-pointer, 477 // non-interface field appearing in ForceSendFields will be sent to the 478 // server regardless of whether the field is empty or not. This may be 479 // used to include empty fields in Patch requests. 480 ForceSendFields []string `json:"-"` 481 482 // NullFields is a list of field names (e.g. "Filter") to include in API 483 // requests with the JSON null value. By default, fields with empty 484 // values are omitted from API requests. However, any field with an 485 // empty value appearing in NullFields will be sent to the server as 486 // null. It is an error if a field in this list has a non-empty value. 487 // This may be used to include null fields in Patch requests. 488 NullFields []string `json:"-"` 489} 490 491func (s *AddFilterViewResponse) MarshalJSON() ([]byte, error) { 492 type NoMethod AddFilterViewResponse 493 raw := NoMethod(*s) 494 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 495} 496 497// AddNamedRangeRequest: Adds a named range to the spreadsheet. 498type AddNamedRangeRequest struct { 499 // NamedRange: The named range to add. The namedRangeId 500 // field is optional; if one is not set, an id will be randomly 501 // generated. (It 502 // is an error to specify the ID of a range that already exists.) 503 NamedRange *NamedRange `json:"namedRange,omitempty"` 504 505 // ForceSendFields is a list of field names (e.g. "NamedRange") to 506 // unconditionally include in API requests. By default, fields with 507 // empty values are omitted from API requests. However, any non-pointer, 508 // non-interface field appearing in ForceSendFields will be sent to the 509 // server regardless of whether the field is empty or not. This may be 510 // used to include empty fields in Patch requests. 511 ForceSendFields []string `json:"-"` 512 513 // NullFields is a list of field names (e.g. "NamedRange") to include in 514 // API requests with the JSON null value. By default, fields with empty 515 // values are omitted from API requests. However, any field with an 516 // empty value appearing in NullFields will be sent to the server as 517 // null. It is an error if a field in this list has a non-empty value. 518 // This may be used to include null fields in Patch requests. 519 NullFields []string `json:"-"` 520} 521 522func (s *AddNamedRangeRequest) MarshalJSON() ([]byte, error) { 523 type NoMethod AddNamedRangeRequest 524 raw := NoMethod(*s) 525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 526} 527 528// AddNamedRangeResponse: The result of adding a named range. 529type AddNamedRangeResponse struct { 530 // NamedRange: The named range to add. 531 NamedRange *NamedRange `json:"namedRange,omitempty"` 532 533 // ForceSendFields is a list of field names (e.g. "NamedRange") to 534 // unconditionally include in API requests. By default, fields with 535 // empty values are omitted from API requests. However, any non-pointer, 536 // non-interface field appearing in ForceSendFields will be sent to the 537 // server regardless of whether the field is empty or not. This may be 538 // used to include empty fields in Patch requests. 539 ForceSendFields []string `json:"-"` 540 541 // NullFields is a list of field names (e.g. "NamedRange") to include in 542 // API requests with the JSON null value. By default, fields with empty 543 // values are omitted from API requests. However, any field with an 544 // empty value appearing in NullFields will be sent to the server as 545 // null. It is an error if a field in this list has a non-empty value. 546 // This may be used to include null fields in Patch requests. 547 NullFields []string `json:"-"` 548} 549 550func (s *AddNamedRangeResponse) MarshalJSON() ([]byte, error) { 551 type NoMethod AddNamedRangeResponse 552 raw := NoMethod(*s) 553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 554} 555 556// AddProtectedRangeRequest: Adds a new protected range. 557type AddProtectedRangeRequest struct { 558 // ProtectedRange: The protected range to be added. The 559 // protectedRangeId field is optional; if 560 // one is not set, an id will be randomly generated. (It is an error 561 // to 562 // specify the ID of a range that already exists.) 563 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 564 565 // ForceSendFields is a list of field names (e.g. "ProtectedRange") to 566 // unconditionally include in API requests. By default, fields with 567 // empty values are omitted from API requests. However, any non-pointer, 568 // non-interface field appearing in ForceSendFields will be sent to the 569 // server regardless of whether the field is empty or not. This may be 570 // used to include empty fields in Patch requests. 571 ForceSendFields []string `json:"-"` 572 573 // NullFields is a list of field names (e.g. "ProtectedRange") to 574 // include in API requests with the JSON null value. By default, fields 575 // with empty values are omitted from API requests. However, any field 576 // with an empty value appearing in NullFields will be sent to the 577 // server as null. It is an error if a field in this list has a 578 // non-empty value. This may be used to include null fields in Patch 579 // requests. 580 NullFields []string `json:"-"` 581} 582 583func (s *AddProtectedRangeRequest) MarshalJSON() ([]byte, error) { 584 type NoMethod AddProtectedRangeRequest 585 raw := NoMethod(*s) 586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 587} 588 589// AddProtectedRangeResponse: The result of adding a new protected 590// range. 591type AddProtectedRangeResponse struct { 592 // ProtectedRange: The newly added protected range. 593 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 594 595 // ForceSendFields is a list of field names (e.g. "ProtectedRange") to 596 // unconditionally include in API requests. By default, fields with 597 // empty values are omitted from API requests. However, any non-pointer, 598 // non-interface field appearing in ForceSendFields will be sent to the 599 // server regardless of whether the field is empty or not. This may be 600 // used to include empty fields in Patch requests. 601 ForceSendFields []string `json:"-"` 602 603 // NullFields is a list of field names (e.g. "ProtectedRange") to 604 // include in API requests with the JSON null value. By default, fields 605 // with empty values are omitted from API requests. However, any field 606 // with an empty value appearing in NullFields will be sent to the 607 // server as null. It is an error if a field in this list has a 608 // non-empty value. This may be used to include null fields in Patch 609 // requests. 610 NullFields []string `json:"-"` 611} 612 613func (s *AddProtectedRangeResponse) MarshalJSON() ([]byte, error) { 614 type NoMethod AddProtectedRangeResponse 615 raw := NoMethod(*s) 616 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 617} 618 619// AddSheetRequest: Adds a new sheet. 620// When a sheet is added at a given index, 621// all subsequent sheets' indexes are incremented. 622// To add an object sheet, use AddChartRequest instead and 623// specify 624// EmbeddedObjectPosition.sheetId or 625// EmbeddedObjectPosition.newSheet. 626type AddSheetRequest struct { 627 // Properties: The properties the new sheet should have. 628 // All properties are optional. 629 // The sheetId field is optional; if one is not 630 // set, an id will be randomly generated. (It is an error to specify the 631 // ID 632 // of a sheet that already exists.) 633 Properties *SheetProperties `json:"properties,omitempty"` 634 635 // ForceSendFields is a list of field names (e.g. "Properties") to 636 // unconditionally include in API requests. By default, fields with 637 // empty values are omitted from API requests. However, any non-pointer, 638 // non-interface field appearing in ForceSendFields will be sent to the 639 // server regardless of whether the field is empty or not. This may be 640 // used to include empty fields in Patch requests. 641 ForceSendFields []string `json:"-"` 642 643 // NullFields is a list of field names (e.g. "Properties") to include in 644 // API requests with the JSON null value. By default, fields with empty 645 // values are omitted from API requests. However, any field with an 646 // empty value appearing in NullFields will be sent to the server as 647 // null. It is an error if a field in this list has a non-empty value. 648 // This may be used to include null fields in Patch requests. 649 NullFields []string `json:"-"` 650} 651 652func (s *AddSheetRequest) MarshalJSON() ([]byte, error) { 653 type NoMethod AddSheetRequest 654 raw := NoMethod(*s) 655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 656} 657 658// AddSheetResponse: The result of adding a sheet. 659type AddSheetResponse struct { 660 // Properties: The properties of the newly added sheet. 661 Properties *SheetProperties `json:"properties,omitempty"` 662 663 // ForceSendFields is a list of field names (e.g. "Properties") to 664 // unconditionally include in API requests. By default, fields with 665 // empty values are omitted from API requests. However, any non-pointer, 666 // non-interface field appearing in ForceSendFields will be sent to the 667 // server regardless of whether the field is empty or not. This may be 668 // used to include empty fields in Patch requests. 669 ForceSendFields []string `json:"-"` 670 671 // NullFields is a list of field names (e.g. "Properties") to include in 672 // API requests with the JSON null value. By default, fields with empty 673 // values are omitted from API requests. However, any field with an 674 // empty value appearing in NullFields will be sent to the server as 675 // null. It is an error if a field in this list has a non-empty value. 676 // This may be used to include null fields in Patch requests. 677 NullFields []string `json:"-"` 678} 679 680func (s *AddSheetResponse) MarshalJSON() ([]byte, error) { 681 type NoMethod AddSheetResponse 682 raw := NoMethod(*s) 683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 684} 685 686// AppendCellsRequest: Adds new cells after the last row with data in a 687// sheet, 688// inserting new rows into the sheet if necessary. 689type AppendCellsRequest struct { 690 // Fields: The fields of CellData that should be updated. 691 // At least one field must be specified. 692 // The root is the CellData; 'row.values.' should not be specified. 693 // A single "*" can be used as short-hand for listing every field. 694 Fields string `json:"fields,omitempty"` 695 696 // Rows: The data to append. 697 Rows []*RowData `json:"rows,omitempty"` 698 699 // SheetId: The sheet ID to append the data to. 700 SheetId int64 `json:"sheetId,omitempty"` 701 702 // ForceSendFields is a list of field names (e.g. "Fields") to 703 // unconditionally include in API requests. By default, fields with 704 // empty values are omitted from API requests. However, any non-pointer, 705 // non-interface field appearing in ForceSendFields will be sent to the 706 // server regardless of whether the field is empty or not. This may be 707 // used to include empty fields in Patch requests. 708 ForceSendFields []string `json:"-"` 709 710 // NullFields is a list of field names (e.g. "Fields") to include in API 711 // requests with the JSON null value. By default, fields with empty 712 // values are omitted from API requests. However, any field with an 713 // empty value appearing in NullFields will be sent to the server as 714 // null. It is an error if a field in this list has a non-empty value. 715 // This may be used to include null fields in Patch requests. 716 NullFields []string `json:"-"` 717} 718 719func (s *AppendCellsRequest) MarshalJSON() ([]byte, error) { 720 type NoMethod AppendCellsRequest 721 raw := NoMethod(*s) 722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 723} 724 725// AppendDimensionRequest: Appends rows or columns to the end of a 726// sheet. 727type AppendDimensionRequest struct { 728 // Dimension: Whether rows or columns should be appended. 729 // 730 // Possible values: 731 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 732 // "ROWS" - Operates on the rows of a sheet. 733 // "COLUMNS" - Operates on the columns of a sheet. 734 Dimension string `json:"dimension,omitempty"` 735 736 // Length: The number of rows or columns to append. 737 Length int64 `json:"length,omitempty"` 738 739 // SheetId: The sheet to append rows or columns to. 740 SheetId int64 `json:"sheetId,omitempty"` 741 742 // ForceSendFields is a list of field names (e.g. "Dimension") to 743 // unconditionally include in API requests. By default, fields with 744 // empty values are omitted from API requests. However, any non-pointer, 745 // non-interface field appearing in ForceSendFields will be sent to the 746 // server regardless of whether the field is empty or not. This may be 747 // used to include empty fields in Patch requests. 748 ForceSendFields []string `json:"-"` 749 750 // NullFields is a list of field names (e.g. "Dimension") to include in 751 // API requests with the JSON null value. By default, fields with empty 752 // values are omitted from API requests. However, any field with an 753 // empty value appearing in NullFields will be sent to the server as 754 // null. It is an error if a field in this list has a non-empty value. 755 // This may be used to include null fields in Patch requests. 756 NullFields []string `json:"-"` 757} 758 759func (s *AppendDimensionRequest) MarshalJSON() ([]byte, error) { 760 type NoMethod AppendDimensionRequest 761 raw := NoMethod(*s) 762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 763} 764 765// AppendValuesResponse: The response when updating a range of values in 766// a spreadsheet. 767type AppendValuesResponse struct { 768 // SpreadsheetId: The spreadsheet the updates were applied to. 769 SpreadsheetId string `json:"spreadsheetId,omitempty"` 770 771 // TableRange: The range (in A1 notation) of the table that values are 772 // being appended to 773 // (before the values were appended). 774 // Empty if no table was found. 775 TableRange string `json:"tableRange,omitempty"` 776 777 // Updates: Information about the updates that were applied. 778 Updates *UpdateValuesResponse `json:"updates,omitempty"` 779 780 // ServerResponse contains the HTTP response code and headers from the 781 // server. 782 googleapi.ServerResponse `json:"-"` 783 784 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 785 // unconditionally include in API requests. By default, fields with 786 // empty values are omitted from API requests. However, any non-pointer, 787 // non-interface field appearing in ForceSendFields will be sent to the 788 // server regardless of whether the field is empty or not. This may be 789 // used to include empty fields in Patch requests. 790 ForceSendFields []string `json:"-"` 791 792 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 793 // in API requests with the JSON null value. By default, fields with 794 // empty values are omitted from API requests. However, any field with 795 // an empty value appearing in NullFields will be sent to the server as 796 // null. It is an error if a field in this list has a non-empty value. 797 // This may be used to include null fields in Patch requests. 798 NullFields []string `json:"-"` 799} 800 801func (s *AppendValuesResponse) MarshalJSON() ([]byte, error) { 802 type NoMethod AppendValuesResponse 803 raw := NoMethod(*s) 804 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 805} 806 807// AutoFillRequest: Fills in more data based on existing data. 808type AutoFillRequest struct { 809 // Range: The range to autofill. This will examine the range and 810 // detect 811 // the location that has data and automatically fill that data 812 // in to the rest of the range. 813 Range *GridRange `json:"range,omitempty"` 814 815 // SourceAndDestination: The source and destination areas to 816 // autofill. 817 // This explicitly lists the source of the autofill and where to 818 // extend that data. 819 SourceAndDestination *SourceAndDestination `json:"sourceAndDestination,omitempty"` 820 821 // UseAlternateSeries: True if we should generate data with the 822 // "alternate" series. 823 // This differs based on the type and amount of source data. 824 UseAlternateSeries bool `json:"useAlternateSeries,omitempty"` 825 826 // ForceSendFields is a list of field names (e.g. "Range") to 827 // unconditionally include in API requests. By default, fields with 828 // empty values are omitted from API requests. However, any non-pointer, 829 // non-interface field appearing in ForceSendFields will be sent to the 830 // server regardless of whether the field is empty or not. This may be 831 // used to include empty fields in Patch requests. 832 ForceSendFields []string `json:"-"` 833 834 // NullFields is a list of field names (e.g. "Range") to include in API 835 // requests with the JSON null value. By default, fields with empty 836 // values are omitted from API requests. However, any field with an 837 // empty value appearing in NullFields will be sent to the server as 838 // null. It is an error if a field in this list has a non-empty value. 839 // This may be used to include null fields in Patch requests. 840 NullFields []string `json:"-"` 841} 842 843func (s *AutoFillRequest) MarshalJSON() ([]byte, error) { 844 type NoMethod AutoFillRequest 845 raw := NoMethod(*s) 846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 847} 848 849// AutoResizeDimensionsRequest: Automatically resizes one or more 850// dimensions based on the contents 851// of the cells in that dimension. 852type AutoResizeDimensionsRequest struct { 853 // Dimensions: The dimensions to automatically resize. 854 Dimensions *DimensionRange `json:"dimensions,omitempty"` 855 856 // ForceSendFields is a list of field names (e.g. "Dimensions") to 857 // unconditionally include in API requests. By default, fields with 858 // empty values are omitted from API requests. However, any non-pointer, 859 // non-interface field appearing in ForceSendFields will be sent to the 860 // server regardless of whether the field is empty or not. This may be 861 // used to include empty fields in Patch requests. 862 ForceSendFields []string `json:"-"` 863 864 // NullFields is a list of field names (e.g. "Dimensions") to include in 865 // API requests with the JSON null value. By default, fields with empty 866 // values are omitted from API requests. However, any field with an 867 // empty value appearing in NullFields will be sent to the server as 868 // null. It is an error if a field in this list has a non-empty value. 869 // This may be used to include null fields in Patch requests. 870 NullFields []string `json:"-"` 871} 872 873func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) { 874 type NoMethod AutoResizeDimensionsRequest 875 raw := NoMethod(*s) 876 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 877} 878 879// BandedRange: A banded (alternating colors) range in a sheet. 880type BandedRange struct { 881 // BandedRangeId: The id of the banded range. 882 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 883 884 // ColumnProperties: Properties for column bands. These properties are 885 // applied on a column- 886 // by-column basis throughout all the columns in the range. At least one 887 // of 888 // row_properties or column_properties must be specified. 889 ColumnProperties *BandingProperties `json:"columnProperties,omitempty"` 890 891 // Range: The range over which these properties are applied. 892 Range *GridRange `json:"range,omitempty"` 893 894 // RowProperties: Properties for row bands. These properties are applied 895 // on a row-by-row 896 // basis throughout all the rows in the range. At least one 897 // of 898 // row_properties or column_properties must be specified. 899 RowProperties *BandingProperties `json:"rowProperties,omitempty"` 900 901 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 902 // unconditionally include in API requests. By default, fields with 903 // empty values are omitted from API requests. However, any non-pointer, 904 // non-interface field appearing in ForceSendFields will be sent to the 905 // server regardless of whether the field is empty or not. This may be 906 // used to include empty fields in Patch requests. 907 ForceSendFields []string `json:"-"` 908 909 // NullFields is a list of field names (e.g. "BandedRangeId") to include 910 // in API requests with the JSON null value. By default, fields with 911 // empty values are omitted from API requests. However, any field with 912 // an empty value appearing in NullFields will be sent to the server as 913 // null. It is an error if a field in this list has a non-empty value. 914 // This may be used to include null fields in Patch requests. 915 NullFields []string `json:"-"` 916} 917 918func (s *BandedRange) MarshalJSON() ([]byte, error) { 919 type NoMethod BandedRange 920 raw := NoMethod(*s) 921 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 922} 923 924// BandingProperties: Properties referring a single dimension (either 925// row or column). If both 926// BandedRange.row_properties and BandedRange.column_properties are 927// set, the fill colors are applied to cells according to the following 928// rules: 929// 930// * header_color and footer_color take priority over band colors. 931// * first_band_color takes priority over second_band_color. 932// * row_properties takes priority over column_properties. 933// 934// For example, the first row color takes priority over the first 935// column 936// color, but the first column color takes priority over the second row 937// color. 938// Similarly, the row header takes priority over the column header in 939// the 940// top left cell, but the column header takes priority over the first 941// row 942// color if the row header is not set. 943type BandingProperties struct { 944 // FirstBandColor: The first color that is alternating. (Required) 945 FirstBandColor *Color `json:"firstBandColor,omitempty"` 946 947 // FooterColor: The color of the last row or column. If this field is 948 // not set, the last 949 // row or column will be filled with either first_band_color 950 // or 951 // second_band_color, depending on the color of the previous row 952 // or 953 // column. 954 FooterColor *Color `json:"footerColor,omitempty"` 955 956 // HeaderColor: The color of the first row or column. If this field is 957 // set, the first 958 // row or column will be filled with this color and the colors 959 // will 960 // alternate between first_band_color and second_band_color 961 // starting 962 // from the second row or column. Otherwise, the first row or column 963 // will be 964 // filled with first_band_color and the colors will proceed to 965 // alternate 966 // as they normally would. 967 HeaderColor *Color `json:"headerColor,omitempty"` 968 969 // SecondBandColor: The second color that is alternating. (Required) 970 SecondBandColor *Color `json:"secondBandColor,omitempty"` 971 972 // ForceSendFields is a list of field names (e.g. "FirstBandColor") to 973 // unconditionally include in API requests. By default, fields with 974 // empty values are omitted from API requests. However, any non-pointer, 975 // non-interface field appearing in ForceSendFields will be sent to the 976 // server regardless of whether the field is empty or not. This may be 977 // used to include empty fields in Patch requests. 978 ForceSendFields []string `json:"-"` 979 980 // NullFields is a list of field names (e.g. "FirstBandColor") to 981 // include in API requests with the JSON null value. By default, fields 982 // with empty values are omitted from API requests. However, any field 983 // with an empty value appearing in NullFields will be sent to the 984 // server as null. It is an error if a field in this list has a 985 // non-empty value. This may be used to include null fields in Patch 986 // requests. 987 NullFields []string `json:"-"` 988} 989 990func (s *BandingProperties) MarshalJSON() ([]byte, error) { 991 type NoMethod BandingProperties 992 raw := NoMethod(*s) 993 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 994} 995 996// BasicChartAxis: An axis of the chart. 997// A chart may not have more than one axis per 998// axis position. 999type BasicChartAxis struct { 1000 // Format: The format of the title. 1001 // Only valid if the axis is not associated with the domain. 1002 Format *TextFormat `json:"format,omitempty"` 1003 1004 // Position: The position of this axis. 1005 // 1006 // Possible values: 1007 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1008 // use. 1009 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. 1010 // For most charts, this is the standard major axis. 1011 // For bar charts, this is a minor axis. 1012 // "LEFT_AXIS" - The axis rendered at the left of a chart. 1013 // For most charts, this is a minor axis. 1014 // For bar charts, this is the standard major axis. 1015 // "RIGHT_AXIS" - The axis rendered at the right of a chart. 1016 // For most charts, this is a minor axis. 1017 // For bar charts, this is an unusual major axis. 1018 Position string `json:"position,omitempty"` 1019 1020 // Title: The title of this axis. If set, this overrides any title 1021 // inferred 1022 // from headers of the data. 1023 Title string `json:"title,omitempty"` 1024 1025 // TitleTextPosition: The axis title text position. 1026 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 1027 1028 // ViewWindowOptions: The view window options for this axis. 1029 ViewWindowOptions *ChartAxisViewWindowOptions `json:"viewWindowOptions,omitempty"` 1030 1031 // ForceSendFields is a list of field names (e.g. "Format") to 1032 // unconditionally include in API requests. By default, fields with 1033 // empty values are omitted from API requests. However, any non-pointer, 1034 // non-interface field appearing in ForceSendFields will be sent to the 1035 // server regardless of whether the field is empty or not. This may be 1036 // used to include empty fields in Patch requests. 1037 ForceSendFields []string `json:"-"` 1038 1039 // NullFields is a list of field names (e.g. "Format") to include in API 1040 // requests with the JSON null value. By default, fields with empty 1041 // values are omitted from API requests. However, any field with an 1042 // empty value appearing in NullFields will be sent to the server as 1043 // null. It is an error if a field in this list has a non-empty value. 1044 // This may be used to include null fields in Patch requests. 1045 NullFields []string `json:"-"` 1046} 1047 1048func (s *BasicChartAxis) MarshalJSON() ([]byte, error) { 1049 type NoMethod BasicChartAxis 1050 raw := NoMethod(*s) 1051 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1052} 1053 1054// BasicChartDomain: The domain of a chart. 1055// For example, if charting stock prices over time, this would be the 1056// date. 1057type BasicChartDomain struct { 1058 // Domain: The data of the domain. For example, if charting stock prices 1059 // over time, 1060 // this is the data representing the dates. 1061 Domain *ChartData `json:"domain,omitempty"` 1062 1063 // Reversed: True to reverse the order of the domain values (horizontal 1064 // axis). 1065 Reversed bool `json:"reversed,omitempty"` 1066 1067 // ForceSendFields is a list of field names (e.g. "Domain") to 1068 // unconditionally include in API requests. By default, fields with 1069 // empty values are omitted from API requests. However, any non-pointer, 1070 // non-interface field appearing in ForceSendFields will be sent to the 1071 // server regardless of whether the field is empty or not. This may be 1072 // used to include empty fields in Patch requests. 1073 ForceSendFields []string `json:"-"` 1074 1075 // NullFields is a list of field names (e.g. "Domain") to include in API 1076 // requests with the JSON null value. By default, fields with empty 1077 // values are omitted from API requests. However, any field with an 1078 // empty value appearing in NullFields will be sent to the server as 1079 // null. It is an error if a field in this list has a non-empty value. 1080 // This may be used to include null fields in Patch requests. 1081 NullFields []string `json:"-"` 1082} 1083 1084func (s *BasicChartDomain) MarshalJSON() ([]byte, error) { 1085 type NoMethod BasicChartDomain 1086 raw := NoMethod(*s) 1087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1088} 1089 1090// BasicChartSeries: A single series of data in a chart. 1091// For example, if charting stock prices over time, multiple series may 1092// exist, 1093// one for the "Open Price", "High Price", "Low Price" and "Close 1094// Price". 1095type BasicChartSeries struct { 1096 // Color: The color for elements (i.e. bars, lines, points) associated 1097 // with this 1098 // series. If empty, a default color is used. 1099 Color *Color `json:"color,omitempty"` 1100 1101 // LineStyle: The line style of this series. Valid only if the 1102 // chartType is AREA, 1103 // LINE, or SCATTER. 1104 // COMBO charts are also supported if the 1105 // series chart type is 1106 // AREA or LINE. 1107 LineStyle *LineStyle `json:"lineStyle,omitempty"` 1108 1109 // Series: The data being visualized in this chart series. 1110 Series *ChartData `json:"series,omitempty"` 1111 1112 // TargetAxis: The minor axis that will specify the range of values for 1113 // this series. 1114 // For example, if charting stocks over time, the "Volume" series 1115 // may want to be pinned to the right with the prices pinned to the 1116 // left, 1117 // because the scale of trading volume is different than the scale 1118 // of 1119 // prices. 1120 // It is an error to specify an axis that isn't a valid minor axis 1121 // for the chart's type. 1122 // 1123 // Possible values: 1124 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1125 // use. 1126 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. 1127 // For most charts, this is the standard major axis. 1128 // For bar charts, this is a minor axis. 1129 // "LEFT_AXIS" - The axis rendered at the left of a chart. 1130 // For most charts, this is a minor axis. 1131 // For bar charts, this is the standard major axis. 1132 // "RIGHT_AXIS" - The axis rendered at the right of a chart. 1133 // For most charts, this is a minor axis. 1134 // For bar charts, this is an unusual major axis. 1135 TargetAxis string `json:"targetAxis,omitempty"` 1136 1137 // Type: The type of this series. Valid only if the 1138 // chartType is 1139 // COMBO. 1140 // Different types will change the way the series is visualized. 1141 // Only LINE, AREA, 1142 // and COLUMN are supported. 1143 // 1144 // Possible values: 1145 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1146 // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar 1147 // chart</a>. 1148 // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line 1149 // chart</a>. 1150 // "AREA" - An <a 1151 // href="/chart/interactive/docs/gallery/areachart">area chart</a>. 1152 // "COLUMN" - A <a 1153 // href="/chart/interactive/docs/gallery/columnchart">column chart</a>. 1154 // "SCATTER" - A <a 1155 // href="/chart/interactive/docs/gallery/scatterchart">scatter 1156 // chart</a>. 1157 // "COMBO" - A <a 1158 // href="/chart/interactive/docs/gallery/combochart">combo chart</a>. 1159 // "STEPPED_AREA" - A <a 1160 // href="/chart/interactive/docs/gallery/steppedareachart">stepped 1161 // area 1162 // chart</a>. 1163 Type string `json:"type,omitempty"` 1164 1165 // ForceSendFields is a list of field names (e.g. "Color") to 1166 // unconditionally include in API requests. By default, fields with 1167 // empty values are omitted from API requests. However, any non-pointer, 1168 // non-interface field appearing in ForceSendFields will be sent to the 1169 // server regardless of whether the field is empty or not. This may be 1170 // used to include empty fields in Patch requests. 1171 ForceSendFields []string `json:"-"` 1172 1173 // NullFields is a list of field names (e.g. "Color") to include in API 1174 // requests with the JSON null value. By default, fields with empty 1175 // values are omitted from API requests. However, any field with an 1176 // empty value appearing in NullFields will be sent to the server as 1177 // null. It is an error if a field in this list has a non-empty value. 1178 // This may be used to include null fields in Patch requests. 1179 NullFields []string `json:"-"` 1180} 1181 1182func (s *BasicChartSeries) MarshalJSON() ([]byte, error) { 1183 type NoMethod BasicChartSeries 1184 raw := NoMethod(*s) 1185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1186} 1187 1188// BasicChartSpec: The specification for a basic chart. See 1189// BasicChartType for the list 1190// of charts this supports. 1191type BasicChartSpec struct { 1192 // Axis: The axis on the chart. 1193 Axis []*BasicChartAxis `json:"axis,omitempty"` 1194 1195 // ChartType: The type of the chart. 1196 // 1197 // Possible values: 1198 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1199 // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar 1200 // chart</a>. 1201 // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line 1202 // chart</a>. 1203 // "AREA" - An <a 1204 // href="/chart/interactive/docs/gallery/areachart">area chart</a>. 1205 // "COLUMN" - A <a 1206 // href="/chart/interactive/docs/gallery/columnchart">column chart</a>. 1207 // "SCATTER" - A <a 1208 // href="/chart/interactive/docs/gallery/scatterchart">scatter 1209 // chart</a>. 1210 // "COMBO" - A <a 1211 // href="/chart/interactive/docs/gallery/combochart">combo chart</a>. 1212 // "STEPPED_AREA" - A <a 1213 // href="/chart/interactive/docs/gallery/steppedareachart">stepped 1214 // area 1215 // chart</a>. 1216 ChartType string `json:"chartType,omitempty"` 1217 1218 // CompareMode: The behavior of tooltips and data highlighting when 1219 // hovering on data and 1220 // chart area. 1221 // 1222 // Possible values: 1223 // "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" - Default value, do not use. 1224 // "DATUM" - Only the focused data element is highlighted and shown in 1225 // the tooltip. 1226 // "CATEGORY" - All data elements with the same category (e.g., domain 1227 // value) are 1228 // highlighted and shown in the tooltip. 1229 CompareMode string `json:"compareMode,omitempty"` 1230 1231 // Domains: The domain of data this is charting. 1232 // Only a single domain is supported. 1233 Domains []*BasicChartDomain `json:"domains,omitempty"` 1234 1235 // HeaderCount: The number of rows or columns in the data that are 1236 // "headers". 1237 // If not set, Google Sheets will guess how many rows are headers 1238 // based 1239 // on the data. 1240 // 1241 // (Note that BasicChartAxis.title may override the axis title 1242 // inferred from the header values.) 1243 HeaderCount int64 `json:"headerCount,omitempty"` 1244 1245 // InterpolateNulls: If some values in a series are missing, gaps may 1246 // appear in the chart (e.g, 1247 // segments of lines in a line chart will be missing). To eliminate 1248 // these 1249 // gaps set this to true. 1250 // Applies to Line, Area, and Combo charts. 1251 InterpolateNulls bool `json:"interpolateNulls,omitempty"` 1252 1253 // LegendPosition: The position of the chart legend. 1254 // 1255 // Possible values: 1256 // "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 1257 // use. 1258 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 1259 // chart. 1260 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 1261 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 1262 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 1263 // "NO_LEGEND" - No legend is rendered. 1264 LegendPosition string `json:"legendPosition,omitempty"` 1265 1266 // LineSmoothing: Gets whether all lines should be rendered smooth or 1267 // straight by default. 1268 // Applies to Line charts. 1269 LineSmoothing bool `json:"lineSmoothing,omitempty"` 1270 1271 // Series: The data this chart is visualizing. 1272 Series []*BasicChartSeries `json:"series,omitempty"` 1273 1274 // StackedType: The stacked type for charts that support vertical 1275 // stacking. 1276 // Applies to Area, Bar, Column, Combo, and Stepped Area charts. 1277 // 1278 // Possible values: 1279 // "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 1280 // "NOT_STACKED" - Series are not stacked. 1281 // "STACKED" - Series values are stacked, each value is rendered 1282 // vertically beginning 1283 // from the top of the value below it. 1284 // "PERCENT_STACKED" - Vertical stacks are stretched to reach the top 1285 // of the chart, with 1286 // values laid out as percentages of each other. 1287 StackedType string `json:"stackedType,omitempty"` 1288 1289 // ThreeDimensional: True to make the chart 3D. 1290 // Applies to Bar and Column charts. 1291 ThreeDimensional bool `json:"threeDimensional,omitempty"` 1292 1293 // ForceSendFields is a list of field names (e.g. "Axis") to 1294 // unconditionally include in API requests. By default, fields with 1295 // empty values are omitted from API requests. However, any non-pointer, 1296 // non-interface field appearing in ForceSendFields will be sent to the 1297 // server regardless of whether the field is empty or not. This may be 1298 // used to include empty fields in Patch requests. 1299 ForceSendFields []string `json:"-"` 1300 1301 // NullFields is a list of field names (e.g. "Axis") to include in API 1302 // requests with the JSON null value. By default, fields with empty 1303 // values are omitted from API requests. However, any field with an 1304 // empty value appearing in NullFields will be sent to the server as 1305 // null. It is an error if a field in this list has a non-empty value. 1306 // This may be used to include null fields in Patch requests. 1307 NullFields []string `json:"-"` 1308} 1309 1310func (s *BasicChartSpec) MarshalJSON() ([]byte, error) { 1311 type NoMethod BasicChartSpec 1312 raw := NoMethod(*s) 1313 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1314} 1315 1316// BasicFilter: The default filter associated with a sheet. 1317type BasicFilter struct { 1318 // Criteria: The criteria for showing/hiding values per column. 1319 // The map's key is the column index, and the value is the criteria 1320 // for 1321 // that column. 1322 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 1323 1324 // Range: The range the filter covers. 1325 Range *GridRange `json:"range,omitempty"` 1326 1327 // SortSpecs: The sort order per column. Later specifications are used 1328 // when values 1329 // are equal in the earlier specifications. 1330 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 1331 1332 // ForceSendFields is a list of field names (e.g. "Criteria") to 1333 // unconditionally include in API requests. By default, fields with 1334 // empty values are omitted from API requests. However, any non-pointer, 1335 // non-interface field appearing in ForceSendFields will be sent to the 1336 // server regardless of whether the field is empty or not. This may be 1337 // used to include empty fields in Patch requests. 1338 ForceSendFields []string `json:"-"` 1339 1340 // NullFields is a list of field names (e.g. "Criteria") to include in 1341 // API requests with the JSON null value. By default, fields with empty 1342 // values are omitted from API requests. However, any field with an 1343 // empty value appearing in NullFields will be sent to the server as 1344 // null. It is an error if a field in this list has a non-empty value. 1345 // This may be used to include null fields in Patch requests. 1346 NullFields []string `json:"-"` 1347} 1348 1349func (s *BasicFilter) MarshalJSON() ([]byte, error) { 1350 type NoMethod BasicFilter 1351 raw := NoMethod(*s) 1352 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1353} 1354 1355// BatchClearValuesByDataFilterRequest: The request for clearing more 1356// than one range selected by a 1357// DataFilter in a spreadsheet. 1358type BatchClearValuesByDataFilterRequest struct { 1359 // DataFilters: The DataFilters used to determine which ranges to clear. 1360 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1361 1362 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1363 // unconditionally include in API requests. By default, fields with 1364 // empty values are omitted from API requests. However, any non-pointer, 1365 // non-interface field appearing in ForceSendFields will be sent to the 1366 // server regardless of whether the field is empty or not. This may be 1367 // used to include empty fields in Patch requests. 1368 ForceSendFields []string `json:"-"` 1369 1370 // NullFields is a list of field names (e.g. "DataFilters") to include 1371 // in API requests with the JSON null value. By default, fields with 1372 // empty values are omitted from API requests. However, any field with 1373 // an empty value appearing in NullFields will be sent to the server as 1374 // null. It is an error if a field in this list has a non-empty value. 1375 // This may be used to include null fields in Patch requests. 1376 NullFields []string `json:"-"` 1377} 1378 1379func (s *BatchClearValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1380 type NoMethod BatchClearValuesByDataFilterRequest 1381 raw := NoMethod(*s) 1382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1383} 1384 1385// BatchClearValuesByDataFilterResponse: The response when clearing a 1386// range of values selected with 1387// DataFilters in a spreadsheet. 1388type BatchClearValuesByDataFilterResponse struct { 1389 // ClearedRanges: The ranges that were cleared, in A1 notation. 1390 // (If the requests were for an unbounded range or a ranger larger 1391 // than the bounds of the sheet, this will be the actual ranges 1392 // that were cleared, bounded to the sheet's limits.) 1393 ClearedRanges []string `json:"clearedRanges,omitempty"` 1394 1395 // SpreadsheetId: The spreadsheet the updates were applied to. 1396 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1397 1398 // ServerResponse contains the HTTP response code and headers from the 1399 // server. 1400 googleapi.ServerResponse `json:"-"` 1401 1402 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1403 // unconditionally include in API requests. By default, fields with 1404 // empty values are omitted from API requests. However, any non-pointer, 1405 // non-interface field appearing in ForceSendFields will be sent to the 1406 // server regardless of whether the field is empty or not. This may be 1407 // used to include empty fields in Patch requests. 1408 ForceSendFields []string `json:"-"` 1409 1410 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1411 // in API requests with the JSON null value. By default, fields with 1412 // empty values are omitted from API requests. However, any field with 1413 // an empty value appearing in NullFields will be sent to the server as 1414 // null. It is an error if a field in this list has a non-empty value. 1415 // This may be used to include null fields in Patch requests. 1416 NullFields []string `json:"-"` 1417} 1418 1419func (s *BatchClearValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1420 type NoMethod BatchClearValuesByDataFilterResponse 1421 raw := NoMethod(*s) 1422 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1423} 1424 1425// BatchClearValuesRequest: The request for clearing more than one range 1426// of values in a spreadsheet. 1427type BatchClearValuesRequest struct { 1428 // Ranges: The ranges to clear, in A1 notation. 1429 Ranges []string `json:"ranges,omitempty"` 1430 1431 // ForceSendFields is a list of field names (e.g. "Ranges") to 1432 // unconditionally include in API requests. By default, fields with 1433 // empty values are omitted from API requests. However, any non-pointer, 1434 // non-interface field appearing in ForceSendFields will be sent to the 1435 // server regardless of whether the field is empty or not. This may be 1436 // used to include empty fields in Patch requests. 1437 ForceSendFields []string `json:"-"` 1438 1439 // NullFields is a list of field names (e.g. "Ranges") to include in API 1440 // requests with the JSON null value. By default, fields with empty 1441 // values are omitted from API requests. However, any field with an 1442 // empty value appearing in NullFields will be sent to the server as 1443 // null. It is an error if a field in this list has a non-empty value. 1444 // This may be used to include null fields in Patch requests. 1445 NullFields []string `json:"-"` 1446} 1447 1448func (s *BatchClearValuesRequest) MarshalJSON() ([]byte, error) { 1449 type NoMethod BatchClearValuesRequest 1450 raw := NoMethod(*s) 1451 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1452} 1453 1454// BatchClearValuesResponse: The response when clearing a range of 1455// values in a spreadsheet. 1456type BatchClearValuesResponse struct { 1457 // ClearedRanges: The ranges that were cleared, in A1 notation. 1458 // (If the requests were for an unbounded range or a ranger larger 1459 // than the bounds of the sheet, this will be the actual ranges 1460 // that were cleared, bounded to the sheet's limits.) 1461 ClearedRanges []string `json:"clearedRanges,omitempty"` 1462 1463 // SpreadsheetId: The spreadsheet the updates were applied to. 1464 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1465 1466 // ServerResponse contains the HTTP response code and headers from the 1467 // server. 1468 googleapi.ServerResponse `json:"-"` 1469 1470 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1471 // unconditionally include in API requests. By default, fields with 1472 // empty values are omitted from API requests. However, any non-pointer, 1473 // non-interface field appearing in ForceSendFields will be sent to the 1474 // server regardless of whether the field is empty or not. This may be 1475 // used to include empty fields in Patch requests. 1476 ForceSendFields []string `json:"-"` 1477 1478 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1479 // in API requests with the JSON null value. By default, fields with 1480 // empty values are omitted from API requests. However, any field with 1481 // an empty value appearing in NullFields will be sent to the server as 1482 // null. It is an error if a field in this list has a non-empty value. 1483 // This may be used to include null fields in Patch requests. 1484 NullFields []string `json:"-"` 1485} 1486 1487func (s *BatchClearValuesResponse) MarshalJSON() ([]byte, error) { 1488 type NoMethod BatchClearValuesResponse 1489 raw := NoMethod(*s) 1490 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1491} 1492 1493// BatchGetValuesByDataFilterRequest: The request for retrieving a range 1494// of values in a spreadsheet selected by a 1495// set of DataFilters. 1496type BatchGetValuesByDataFilterRequest struct { 1497 // DataFilters: The data filters used to match the ranges of values to 1498 // retrieve. Ranges 1499 // that match any of the specified data filters will be included in 1500 // the 1501 // response. 1502 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1503 1504 // DateTimeRenderOption: How dates, times, and durations should be 1505 // represented in the output. 1506 // This is ignored if value_render_option is 1507 // FORMATTED_VALUE. 1508 // The default dateTime render option is 1509 // [DateTimeRenderOption.SERIAL_NUMBER]. 1510 // 1511 // Possible values: 1512 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1513 // fields to be output 1514 // as doubles in "serial number" format, as popularized by Lotus 1515 // 1-2-3. 1516 // The whole number portion of the value (left of the decimal) 1517 // counts 1518 // the days since December 30th 1899. The fractional portion (right 1519 // of 1520 // the decimal) counts the time as a fraction of the day. For 1521 // example, 1522 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1523 // after 1524 // December 30st 1899, and .5 because noon is half a day. February 1525 // 1st 1526 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1527 // as 1528 // not a leap year. 1529 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1530 // fields to be output 1531 // as strings in their given number format (which is dependent 1532 // on the spreadsheet locale). 1533 DateTimeRenderOption string `json:"dateTimeRenderOption,omitempty"` 1534 1535 // MajorDimension: The major dimension that results should use. 1536 // 1537 // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 1538 // then a request that selects that range and sets `majorDimension=ROWS` 1539 // will 1540 // return `[[1,2],[3,4]]`, 1541 // whereas a request that sets `majorDimension=COLUMNS` will 1542 // return 1543 // `[[1,3],[2,4]]`. 1544 // 1545 // Possible values: 1546 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 1547 // "ROWS" - Operates on the rows of a sheet. 1548 // "COLUMNS" - Operates on the columns of a sheet. 1549 MajorDimension string `json:"majorDimension,omitempty"` 1550 1551 // ValueRenderOption: How values should be represented in the 1552 // output. 1553 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1554 // 1555 // Possible values: 1556 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1557 // reply according to the 1558 // cell's formatting. Formatting is based on the spreadsheet's 1559 // locale, 1560 // not the requesting user's locale. 1561 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1562 // currency, 1563 // then `A2` would return "$1.23". 1564 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1565 // in the reply. 1566 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1567 // currency, 1568 // then `A2` would return the number `1.23`. 1569 // "FORMULA" - Values will not be calculated. The reply will include 1570 // the formulas. 1571 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1572 // currency, 1573 // then A2 would return "=A1". 1574 ValueRenderOption string `json:"valueRenderOption,omitempty"` 1575 1576 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1577 // unconditionally include in API requests. By default, fields with 1578 // empty values are omitted from API requests. However, any non-pointer, 1579 // non-interface field appearing in ForceSendFields will be sent to the 1580 // server regardless of whether the field is empty or not. This may be 1581 // used to include empty fields in Patch requests. 1582 ForceSendFields []string `json:"-"` 1583 1584 // NullFields is a list of field names (e.g. "DataFilters") to include 1585 // in API requests with the JSON null value. By default, fields with 1586 // empty values are omitted from API requests. However, any field with 1587 // an empty value appearing in NullFields will be sent to the server as 1588 // null. It is an error if a field in this list has a non-empty value. 1589 // This may be used to include null fields in Patch requests. 1590 NullFields []string `json:"-"` 1591} 1592 1593func (s *BatchGetValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1594 type NoMethod BatchGetValuesByDataFilterRequest 1595 raw := NoMethod(*s) 1596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1597} 1598 1599// BatchGetValuesByDataFilterResponse: The response when retrieving more 1600// than one range of values in a spreadsheet 1601// selected by DataFilters. 1602type BatchGetValuesByDataFilterResponse struct { 1603 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1604 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1605 1606 // ValueRanges: The requested values with the list of data filters that 1607 // matched them. 1608 ValueRanges []*MatchedValueRange `json:"valueRanges,omitempty"` 1609 1610 // ServerResponse contains the HTTP response code and headers from the 1611 // server. 1612 googleapi.ServerResponse `json:"-"` 1613 1614 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1615 // unconditionally include in API requests. By default, fields with 1616 // empty values are omitted from API requests. However, any non-pointer, 1617 // non-interface field appearing in ForceSendFields will be sent to the 1618 // server regardless of whether the field is empty or not. This may be 1619 // used to include empty fields in Patch requests. 1620 ForceSendFields []string `json:"-"` 1621 1622 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1623 // in API requests with the JSON null value. By default, fields with 1624 // empty values are omitted from API requests. However, any field with 1625 // an empty value appearing in NullFields will be sent to the server as 1626 // null. It is an error if a field in this list has a non-empty value. 1627 // This may be used to include null fields in Patch requests. 1628 NullFields []string `json:"-"` 1629} 1630 1631func (s *BatchGetValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1632 type NoMethod BatchGetValuesByDataFilterResponse 1633 raw := NoMethod(*s) 1634 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1635} 1636 1637// BatchGetValuesResponse: The response when retrieving more than one 1638// range of values in a spreadsheet. 1639type BatchGetValuesResponse struct { 1640 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1641 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1642 1643 // ValueRanges: The requested values. The order of the ValueRanges is 1644 // the same as the 1645 // order of the requested ranges. 1646 ValueRanges []*ValueRange `json:"valueRanges,omitempty"` 1647 1648 // ServerResponse contains the HTTP response code and headers from the 1649 // server. 1650 googleapi.ServerResponse `json:"-"` 1651 1652 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1653 // unconditionally include in API requests. By default, fields with 1654 // empty values are omitted from API requests. However, any non-pointer, 1655 // non-interface field appearing in ForceSendFields will be sent to the 1656 // server regardless of whether the field is empty or not. This may be 1657 // used to include empty fields in Patch requests. 1658 ForceSendFields []string `json:"-"` 1659 1660 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1661 // in API requests with the JSON null value. By default, fields with 1662 // empty values are omitted from API requests. However, any field with 1663 // an empty value appearing in NullFields will be sent to the server as 1664 // null. It is an error if a field in this list has a non-empty value. 1665 // This may be used to include null fields in Patch requests. 1666 NullFields []string `json:"-"` 1667} 1668 1669func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) { 1670 type NoMethod BatchGetValuesResponse 1671 raw := NoMethod(*s) 1672 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1673} 1674 1675// BatchUpdateSpreadsheetRequest: The request for updating any aspect of 1676// a spreadsheet. 1677type BatchUpdateSpreadsheetRequest struct { 1678 // IncludeSpreadsheetInResponse: Determines if the update response 1679 // should include the spreadsheet 1680 // resource. 1681 IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"` 1682 1683 // Requests: A list of updates to apply to the spreadsheet. 1684 // Requests will be applied in the order they are specified. 1685 // If any request is not valid, no requests will be applied. 1686 Requests []*Request `json:"requests,omitempty"` 1687 1688 // ResponseIncludeGridData: True if grid data should be returned. 1689 // Meaningful only if 1690 // if include_spreadsheet_in_response is 'true'. 1691 // This parameter is ignored if a field mask was set in the request. 1692 ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"` 1693 1694 // ResponseRanges: Limits the ranges included in the response 1695 // spreadsheet. 1696 // Meaningful only if include_spreadsheet_response is 'true'. 1697 ResponseRanges []string `json:"responseRanges,omitempty"` 1698 1699 // ForceSendFields is a list of field names (e.g. 1700 // "IncludeSpreadsheetInResponse") to unconditionally include in API 1701 // requests. By default, fields with empty values are omitted from API 1702 // requests. However, any non-pointer, non-interface field appearing in 1703 // ForceSendFields will be sent to the server regardless of whether the 1704 // field is empty or not. This may be used to include empty fields in 1705 // Patch requests. 1706 ForceSendFields []string `json:"-"` 1707 1708 // NullFields is a list of field names (e.g. 1709 // "IncludeSpreadsheetInResponse") to include in API requests with the 1710 // JSON null value. By default, fields with empty values are omitted 1711 // from API requests. However, any field with an empty value appearing 1712 // in NullFields will be sent to the server as null. It is an error if a 1713 // field in this list has a non-empty value. This may be used to include 1714 // null fields in Patch requests. 1715 NullFields []string `json:"-"` 1716} 1717 1718func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) { 1719 type NoMethod BatchUpdateSpreadsheetRequest 1720 raw := NoMethod(*s) 1721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1722} 1723 1724// BatchUpdateSpreadsheetResponse: The reply for batch updating a 1725// spreadsheet. 1726type BatchUpdateSpreadsheetResponse struct { 1727 // Replies: The reply of the updates. This maps 1:1 with the updates, 1728 // although 1729 // replies to some requests may be empty. 1730 Replies []*Response `json:"replies,omitempty"` 1731 1732 // SpreadsheetId: The spreadsheet the updates were applied to. 1733 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1734 1735 // UpdatedSpreadsheet: The spreadsheet after updates were applied. This 1736 // is only set 1737 // if 1738 // [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is 1739 // `true`. 1740 UpdatedSpreadsheet *Spreadsheet `json:"updatedSpreadsheet,omitempty"` 1741 1742 // ServerResponse contains the HTTP response code and headers from the 1743 // server. 1744 googleapi.ServerResponse `json:"-"` 1745 1746 // ForceSendFields is a list of field names (e.g. "Replies") to 1747 // unconditionally include in API requests. By default, fields with 1748 // empty values are omitted from API requests. However, any non-pointer, 1749 // non-interface field appearing in ForceSendFields will be sent to the 1750 // server regardless of whether the field is empty or not. This may be 1751 // used to include empty fields in Patch requests. 1752 ForceSendFields []string `json:"-"` 1753 1754 // NullFields is a list of field names (e.g. "Replies") to include in 1755 // API requests with the JSON null value. By default, fields with empty 1756 // values are omitted from API requests. However, any field with an 1757 // empty value appearing in NullFields will be sent to the server as 1758 // null. It is an error if a field in this list has a non-empty value. 1759 // This may be used to include null fields in Patch requests. 1760 NullFields []string `json:"-"` 1761} 1762 1763func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) { 1764 type NoMethod BatchUpdateSpreadsheetResponse 1765 raw := NoMethod(*s) 1766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1767} 1768 1769// BatchUpdateValuesByDataFilterRequest: The request for updating more 1770// than one range of values in a spreadsheet. 1771type BatchUpdateValuesByDataFilterRequest struct { 1772 // Data: The new values to apply to the spreadsheet. If more than one 1773 // range is 1774 // matched by the specified DataFilter the specified values will 1775 // be 1776 // applied to all of those ranges. 1777 Data []*DataFilterValueRange `json:"data,omitempty"` 1778 1779 // IncludeValuesInResponse: Determines if the update response should 1780 // include the values 1781 // of the cells that were updated. By default, responses 1782 // do not include the updated values. The `updatedData` field 1783 // within 1784 // each of the BatchUpdateValuesResponse.responses will contain 1785 // the updated values. If the range to write was larger than than the 1786 // range 1787 // actually written, the response will include all values in the 1788 // requested 1789 // range (excluding trailing empty rows and columns). 1790 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 1791 1792 // ResponseDateTimeRenderOption: Determines how dates, times, and 1793 // durations in the response should be 1794 // rendered. This is ignored if response_value_render_option 1795 // is 1796 // FORMATTED_VALUE. 1797 // The default dateTime render option 1798 // is 1799 // DateTimeRenderOption.SERIAL_NUMBER. 1800 // 1801 // Possible values: 1802 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1803 // fields to be output 1804 // as doubles in "serial number" format, as popularized by Lotus 1805 // 1-2-3. 1806 // The whole number portion of the value (left of the decimal) 1807 // counts 1808 // the days since December 30th 1899. The fractional portion (right 1809 // of 1810 // the decimal) counts the time as a fraction of the day. For 1811 // example, 1812 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1813 // after 1814 // December 30st 1899, and .5 because noon is half a day. February 1815 // 1st 1816 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1817 // as 1818 // not a leap year. 1819 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1820 // fields to be output 1821 // as strings in their given number format (which is dependent 1822 // on the spreadsheet locale). 1823 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 1824 1825 // ResponseValueRenderOption: Determines how values in the response 1826 // should be rendered. 1827 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1828 // 1829 // Possible values: 1830 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1831 // reply according to the 1832 // cell's formatting. Formatting is based on the spreadsheet's 1833 // locale, 1834 // not the requesting user's locale. 1835 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1836 // currency, 1837 // then `A2` would return "$1.23". 1838 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1839 // in the reply. 1840 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1841 // currency, 1842 // then `A2` would return the number `1.23`. 1843 // "FORMULA" - Values will not be calculated. The reply will include 1844 // the formulas. 1845 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1846 // currency, 1847 // then A2 would return "=A1". 1848 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 1849 1850 // ValueInputOption: How the input data should be interpreted. 1851 // 1852 // Possible values: 1853 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 1854 // must not be used. 1855 // "RAW" - The values the user has entered will not be parsed and will 1856 // be stored 1857 // as-is. 1858 // "USER_ENTERED" - The values will be parsed as if the user typed 1859 // them into the UI. 1860 // Numbers will stay as numbers, but strings may be converted to 1861 // numbers, 1862 // dates, etc. following the same rules that are applied when 1863 // entering 1864 // text into a cell via the Google Sheets UI. 1865 ValueInputOption string `json:"valueInputOption,omitempty"` 1866 1867 // ForceSendFields is a list of field names (e.g. "Data") to 1868 // unconditionally include in API requests. By default, fields with 1869 // empty values are omitted from API requests. However, any non-pointer, 1870 // non-interface field appearing in ForceSendFields will be sent to the 1871 // server regardless of whether the field is empty or not. This may be 1872 // used to include empty fields in Patch requests. 1873 ForceSendFields []string `json:"-"` 1874 1875 // NullFields is a list of field names (e.g. "Data") to include in API 1876 // requests with the JSON null value. By default, fields with empty 1877 // values are omitted from API requests. However, any field with an 1878 // empty value appearing in NullFields will be sent to the server as 1879 // null. It is an error if a field in this list has a non-empty value. 1880 // This may be used to include null fields in Patch requests. 1881 NullFields []string `json:"-"` 1882} 1883 1884func (s *BatchUpdateValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1885 type NoMethod BatchUpdateValuesByDataFilterRequest 1886 raw := NoMethod(*s) 1887 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1888} 1889 1890// BatchUpdateValuesByDataFilterResponse: The response when updating a 1891// range of values in a spreadsheet. 1892type BatchUpdateValuesByDataFilterResponse struct { 1893 // Responses: The response for each range updated. 1894 Responses []*UpdateValuesByDataFilterResponse `json:"responses,omitempty"` 1895 1896 // SpreadsheetId: The spreadsheet the updates were applied to. 1897 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1898 1899 // TotalUpdatedCells: The total number of cells updated. 1900 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 1901 1902 // TotalUpdatedColumns: The total number of columns where at least one 1903 // cell in the column was 1904 // updated. 1905 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 1906 1907 // TotalUpdatedRows: The total number of rows where at least one cell in 1908 // the row was updated. 1909 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 1910 1911 // TotalUpdatedSheets: The total number of sheets where at least one 1912 // cell in the sheet was 1913 // updated. 1914 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 1915 1916 // ServerResponse contains the HTTP response code and headers from the 1917 // server. 1918 googleapi.ServerResponse `json:"-"` 1919 1920 // ForceSendFields is a list of field names (e.g. "Responses") to 1921 // unconditionally include in API requests. By default, fields with 1922 // empty values are omitted from API requests. However, any non-pointer, 1923 // non-interface field appearing in ForceSendFields will be sent to the 1924 // server regardless of whether the field is empty or not. This may be 1925 // used to include empty fields in Patch requests. 1926 ForceSendFields []string `json:"-"` 1927 1928 // NullFields is a list of field names (e.g. "Responses") to include in 1929 // API requests with the JSON null value. By default, fields with empty 1930 // values are omitted from API requests. However, any field with an 1931 // empty value appearing in NullFields will be sent to the server as 1932 // null. It is an error if a field in this list has a non-empty value. 1933 // This may be used to include null fields in Patch requests. 1934 NullFields []string `json:"-"` 1935} 1936 1937func (s *BatchUpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1938 type NoMethod BatchUpdateValuesByDataFilterResponse 1939 raw := NoMethod(*s) 1940 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1941} 1942 1943// BatchUpdateValuesRequest: The request for updating more than one 1944// range of values in a spreadsheet. 1945type BatchUpdateValuesRequest struct { 1946 // Data: The new values to apply to the spreadsheet. 1947 Data []*ValueRange `json:"data,omitempty"` 1948 1949 // IncludeValuesInResponse: Determines if the update response should 1950 // include the values 1951 // of the cells that were updated. By default, responses 1952 // do not include the updated values. The `updatedData` field 1953 // within 1954 // each of the BatchUpdateValuesResponse.responses will contain 1955 // the updated values. If the range to write was larger than than the 1956 // range 1957 // actually written, the response will include all values in the 1958 // requested 1959 // range (excluding trailing empty rows and columns). 1960 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 1961 1962 // ResponseDateTimeRenderOption: Determines how dates, times, and 1963 // durations in the response should be 1964 // rendered. This is ignored if response_value_render_option 1965 // is 1966 // FORMATTED_VALUE. 1967 // The default dateTime render option 1968 // is 1969 // DateTimeRenderOption.SERIAL_NUMBER. 1970 // 1971 // Possible values: 1972 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1973 // fields to be output 1974 // as doubles in "serial number" format, as popularized by Lotus 1975 // 1-2-3. 1976 // The whole number portion of the value (left of the decimal) 1977 // counts 1978 // the days since December 30th 1899. The fractional portion (right 1979 // of 1980 // the decimal) counts the time as a fraction of the day. For 1981 // example, 1982 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1983 // after 1984 // December 30st 1899, and .5 because noon is half a day. February 1985 // 1st 1986 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1987 // as 1988 // not a leap year. 1989 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1990 // fields to be output 1991 // as strings in their given number format (which is dependent 1992 // on the spreadsheet locale). 1993 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 1994 1995 // ResponseValueRenderOption: Determines how values in the response 1996 // should be rendered. 1997 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1998 // 1999 // Possible values: 2000 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 2001 // reply according to the 2002 // cell's formatting. Formatting is based on the spreadsheet's 2003 // locale, 2004 // not the requesting user's locale. 2005 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2006 // currency, 2007 // then `A2` would return "$1.23". 2008 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 2009 // in the reply. 2010 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2011 // currency, 2012 // then `A2` would return the number `1.23`. 2013 // "FORMULA" - Values will not be calculated. The reply will include 2014 // the formulas. 2015 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2016 // currency, 2017 // then A2 would return "=A1". 2018 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 2019 2020 // ValueInputOption: How the input data should be interpreted. 2021 // 2022 // Possible values: 2023 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 2024 // must not be used. 2025 // "RAW" - The values the user has entered will not be parsed and will 2026 // be stored 2027 // as-is. 2028 // "USER_ENTERED" - The values will be parsed as if the user typed 2029 // them into the UI. 2030 // Numbers will stay as numbers, but strings may be converted to 2031 // numbers, 2032 // dates, etc. following the same rules that are applied when 2033 // entering 2034 // text into a cell via the Google Sheets UI. 2035 ValueInputOption string `json:"valueInputOption,omitempty"` 2036 2037 // ForceSendFields is a list of field names (e.g. "Data") to 2038 // unconditionally include in API requests. By default, fields with 2039 // empty values are omitted from API requests. However, any non-pointer, 2040 // non-interface field appearing in ForceSendFields will be sent to the 2041 // server regardless of whether the field is empty or not. This may be 2042 // used to include empty fields in Patch requests. 2043 ForceSendFields []string `json:"-"` 2044 2045 // NullFields is a list of field names (e.g. "Data") to include in API 2046 // requests with the JSON null value. By default, fields with empty 2047 // values are omitted from API requests. However, any field with an 2048 // empty value appearing in NullFields will be sent to the server as 2049 // null. It is an error if a field in this list has a non-empty value. 2050 // This may be used to include null fields in Patch requests. 2051 NullFields []string `json:"-"` 2052} 2053 2054func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) { 2055 type NoMethod BatchUpdateValuesRequest 2056 raw := NoMethod(*s) 2057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2058} 2059 2060// BatchUpdateValuesResponse: The response when updating a range of 2061// values in a spreadsheet. 2062type BatchUpdateValuesResponse struct { 2063 // Responses: One UpdateValuesResponse per requested range, in the same 2064 // order as 2065 // the requests appeared. 2066 Responses []*UpdateValuesResponse `json:"responses,omitempty"` 2067 2068 // SpreadsheetId: The spreadsheet the updates were applied to. 2069 SpreadsheetId string `json:"spreadsheetId,omitempty"` 2070 2071 // TotalUpdatedCells: The total number of cells updated. 2072 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 2073 2074 // TotalUpdatedColumns: The total number of columns where at least one 2075 // cell in the column was 2076 // updated. 2077 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 2078 2079 // TotalUpdatedRows: The total number of rows where at least one cell in 2080 // the row was updated. 2081 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 2082 2083 // TotalUpdatedSheets: The total number of sheets where at least one 2084 // cell in the sheet was 2085 // updated. 2086 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 2087 2088 // ServerResponse contains the HTTP response code and headers from the 2089 // server. 2090 googleapi.ServerResponse `json:"-"` 2091 2092 // ForceSendFields is a list of field names (e.g. "Responses") to 2093 // unconditionally include in API requests. By default, fields with 2094 // empty values are omitted from API requests. However, any non-pointer, 2095 // non-interface field appearing in ForceSendFields will be sent to the 2096 // server regardless of whether the field is empty or not. This may be 2097 // used to include empty fields in Patch requests. 2098 ForceSendFields []string `json:"-"` 2099 2100 // NullFields is a list of field names (e.g. "Responses") to include in 2101 // API requests with the JSON null value. By default, fields with empty 2102 // values are omitted from API requests. However, any field with an 2103 // empty value appearing in NullFields will be sent to the server as 2104 // null. It is an error if a field in this list has a non-empty value. 2105 // This may be used to include null fields in Patch requests. 2106 NullFields []string `json:"-"` 2107} 2108 2109func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) { 2110 type NoMethod BatchUpdateValuesResponse 2111 raw := NoMethod(*s) 2112 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2113} 2114 2115// BooleanCondition: A condition that can evaluate to true or 2116// false. 2117// BooleanConditions are used by conditional formatting, 2118// data validation, and the criteria in filters. 2119type BooleanCondition struct { 2120 // Type: The type of condition. 2121 // 2122 // Possible values: 2123 // "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use. 2124 // "NUMBER_GREATER" - The cell's value must be greater than the 2125 // condition's value. 2126 // Supported by data validation, conditional formatting and 2127 // filters. 2128 // Requires a single ConditionValue. 2129 // "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or 2130 // equal to the condition's value. 2131 // Supported by data validation, conditional formatting and 2132 // filters. 2133 // Requires a single ConditionValue. 2134 // "NUMBER_LESS" - The cell's value must be less than the condition's 2135 // value. 2136 // Supported by data validation, conditional formatting and 2137 // filters. 2138 // Requires a single ConditionValue. 2139 // "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal 2140 // to the condition's value. 2141 // Supported by data validation, conditional formatting and 2142 // filters. 2143 // Requires a single ConditionValue. 2144 // "NUMBER_EQ" - The cell's value must be equal to the condition's 2145 // value. 2146 // Supported by data validation, conditional formatting and 2147 // filters. 2148 // Requires a single ConditionValue. 2149 // "NUMBER_NOT_EQ" - The cell's value must be not equal to the 2150 // condition's value. 2151 // Supported by data validation, conditional formatting and 2152 // filters. 2153 // Requires a single ConditionValue. 2154 // "NUMBER_BETWEEN" - The cell's value must be between the two 2155 // condition values. 2156 // Supported by data validation, conditional formatting and 2157 // filters. 2158 // Requires exactly two ConditionValues. 2159 // "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two 2160 // condition values. 2161 // Supported by data validation, conditional formatting and 2162 // filters. 2163 // Requires exactly two ConditionValues. 2164 // "TEXT_CONTAINS" - The cell's value must contain the condition's 2165 // value. 2166 // Supported by data validation, conditional formatting and 2167 // filters. 2168 // Requires a single ConditionValue. 2169 // "TEXT_NOT_CONTAINS" - The cell's value must not contain the 2170 // condition's value. 2171 // Supported by data validation, conditional formatting and 2172 // filters. 2173 // Requires a single ConditionValue. 2174 // "TEXT_STARTS_WITH" - The cell's value must start with the 2175 // condition's value. 2176 // Supported by conditional formatting and filters. 2177 // Requires a single ConditionValue. 2178 // "TEXT_ENDS_WITH" - The cell's value must end with the condition's 2179 // value. 2180 // Supported by conditional formatting and filters. 2181 // Requires a single ConditionValue. 2182 // "TEXT_EQ" - The cell's value must be exactly the condition's 2183 // value. 2184 // Supported by data validation, conditional formatting and 2185 // filters. 2186 // Requires a single ConditionValue. 2187 // "TEXT_IS_EMAIL" - The cell's value must be a valid email 2188 // address. 2189 // Supported by data validation. 2190 // Requires no ConditionValues. 2191 // "TEXT_IS_URL" - The cell's value must be a valid URL. 2192 // Supported by data validation. 2193 // Requires no ConditionValues. 2194 // "DATE_EQ" - The cell's value must be the same date as the 2195 // condition's value. 2196 // Supported by data validation, conditional formatting and 2197 // filters. 2198 // Requires a single ConditionValue. 2199 // "DATE_BEFORE" - The cell's value must be before the date of the 2200 // condition's value. 2201 // Supported by data validation, conditional formatting and 2202 // filters. 2203 // Requires a single ConditionValue 2204 // that may be a relative date. 2205 // "DATE_AFTER" - The cell's value must be after the date of the 2206 // condition's value. 2207 // Supported by data validation, conditional formatting and 2208 // filters. 2209 // Requires a single ConditionValue 2210 // that may be a relative date. 2211 // "DATE_ON_OR_BEFORE" - The cell's value must be on or before the 2212 // date of the condition's value. 2213 // Supported by data validation. 2214 // Requires a single ConditionValue 2215 // that may be a relative date. 2216 // "DATE_ON_OR_AFTER" - The cell's value must be on or after the date 2217 // of the condition's value. 2218 // Supported by data validation. 2219 // Requires a single ConditionValue 2220 // that may be a relative date. 2221 // "DATE_BETWEEN" - The cell's value must be between the dates of the 2222 // two condition values. 2223 // Supported by data validation. 2224 // Requires exactly two ConditionValues. 2225 // "DATE_NOT_BETWEEN" - The cell's value must be outside the dates of 2226 // the two condition values. 2227 // Supported by data validation. 2228 // Requires exactly two ConditionValues. 2229 // "DATE_IS_VALID" - The cell's value must be a date. 2230 // Supported by data validation. 2231 // Requires no ConditionValues. 2232 // "ONE_OF_RANGE" - The cell's value must be listed in the grid in 2233 // condition value's range. 2234 // Supported by data validation. 2235 // Requires a single ConditionValue, 2236 // and the value must be a valid range in A1 notation. 2237 // "ONE_OF_LIST" - The cell's value must be in the list of condition 2238 // values. 2239 // Supported by data validation. 2240 // Supports any number of condition values, 2241 // one per item in the list. 2242 // Formulas are not supported in the values. 2243 // "BLANK" - The cell's value must be empty. 2244 // Supported by conditional formatting and filters. 2245 // Requires no ConditionValues. 2246 // "NOT_BLANK" - The cell's value must not be empty. 2247 // Supported by conditional formatting and filters. 2248 // Requires no ConditionValues. 2249 // "CUSTOM_FORMULA" - The condition's formula must evaluate to 2250 // true. 2251 // Supported by data validation, conditional formatting and 2252 // filters. 2253 // Requires a single ConditionValue. 2254 // "BOOLEAN" - The cell's value must be TRUE/FALSE or in the list of 2255 // condition values. 2256 // Supported by data validation. 2257 // Renders as a cell checkbox. 2258 // Supports zero, one or two ConditionValues. No 2259 // values indicates the cell must be TRUE or FALSE, where TRUE renders 2260 // as 2261 // checked and FALSE renders as unchecked. One value indicates the 2262 // cell 2263 // will render as checked when it contains that value and unchecked when 2264 // it 2265 // is blank. Two values indicate that the cell will render as checked 2266 // when 2267 // it contains the first value and unchecked when it contains the 2268 // second 2269 // value. For example, ["Yes","No"] indicates that the cell will render 2270 // a 2271 // checked box when it has the value "Yes" and an unchecked box when it 2272 // has 2273 // the value "No". 2274 Type string `json:"type,omitempty"` 2275 2276 // Values: The values of the condition. The number of supported values 2277 // depends 2278 // on the condition type. Some support zero values, 2279 // others one or two values, 2280 // and ConditionType.ONE_OF_LIST supports an arbitrary number of values. 2281 Values []*ConditionValue `json:"values,omitempty"` 2282 2283 // ForceSendFields is a list of field names (e.g. "Type") to 2284 // unconditionally include in API requests. By default, fields with 2285 // empty values are omitted from API requests. However, any non-pointer, 2286 // non-interface field appearing in ForceSendFields will be sent to the 2287 // server regardless of whether the field is empty or not. This may be 2288 // used to include empty fields in Patch requests. 2289 ForceSendFields []string `json:"-"` 2290 2291 // NullFields is a list of field names (e.g. "Type") to include in API 2292 // requests with the JSON null value. By default, fields with empty 2293 // values are omitted from API requests. However, any field with an 2294 // empty value appearing in NullFields will be sent to the server as 2295 // null. It is an error if a field in this list has a non-empty value. 2296 // This may be used to include null fields in Patch requests. 2297 NullFields []string `json:"-"` 2298} 2299 2300func (s *BooleanCondition) MarshalJSON() ([]byte, error) { 2301 type NoMethod BooleanCondition 2302 raw := NoMethod(*s) 2303 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2304} 2305 2306// BooleanRule: A rule that may or may not match, depending on the 2307// condition. 2308type BooleanRule struct { 2309 // Condition: The condition of the rule. If the condition evaluates to 2310 // true, 2311 // the format is applied. 2312 Condition *BooleanCondition `json:"condition,omitempty"` 2313 2314 // Format: The format to apply. 2315 // Conditional formatting can only apply a subset of formatting: 2316 // bold, italic, 2317 // strikethrough, 2318 // foreground color & 2319 // background color. 2320 Format *CellFormat `json:"format,omitempty"` 2321 2322 // ForceSendFields is a list of field names (e.g. "Condition") to 2323 // unconditionally include in API requests. By default, fields with 2324 // empty values are omitted from API requests. However, any non-pointer, 2325 // non-interface field appearing in ForceSendFields will be sent to the 2326 // server regardless of whether the field is empty or not. This may be 2327 // used to include empty fields in Patch requests. 2328 ForceSendFields []string `json:"-"` 2329 2330 // NullFields is a list of field names (e.g. "Condition") to include in 2331 // API requests with the JSON null value. By default, fields with empty 2332 // values are omitted from API requests. However, any field with an 2333 // empty value appearing in NullFields will be sent to the server as 2334 // null. It is an error if a field in this list has a non-empty value. 2335 // This may be used to include null fields in Patch requests. 2336 NullFields []string `json:"-"` 2337} 2338 2339func (s *BooleanRule) MarshalJSON() ([]byte, error) { 2340 type NoMethod BooleanRule 2341 raw := NoMethod(*s) 2342 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2343} 2344 2345// Border: A border along a cell. 2346type Border struct { 2347 // Color: The color of the border. 2348 Color *Color `json:"color,omitempty"` 2349 2350 // Style: The style of the border. 2351 // 2352 // Possible values: 2353 // "STYLE_UNSPECIFIED" - The style is not specified. Do not use this. 2354 // "DOTTED" - The border is dotted. 2355 // "DASHED" - The border is dashed. 2356 // "SOLID" - The border is a thin solid line. 2357 // "SOLID_MEDIUM" - The border is a medium solid line. 2358 // "SOLID_THICK" - The border is a thick solid line. 2359 // "NONE" - No border. 2360 // Used only when updating a border in order to erase it. 2361 // "DOUBLE" - The border is two solid lines. 2362 Style string `json:"style,omitempty"` 2363 2364 // Width: The width of the border, in pixels. 2365 // Deprecated; the width is determined by the "style" field. 2366 Width int64 `json:"width,omitempty"` 2367 2368 // ForceSendFields is a list of field names (e.g. "Color") to 2369 // unconditionally include in API requests. By default, fields with 2370 // empty values are omitted from API requests. However, any non-pointer, 2371 // non-interface field appearing in ForceSendFields will be sent to the 2372 // server regardless of whether the field is empty or not. This may be 2373 // used to include empty fields in Patch requests. 2374 ForceSendFields []string `json:"-"` 2375 2376 // NullFields is a list of field names (e.g. "Color") to include in API 2377 // requests with the JSON null value. By default, fields with empty 2378 // values are omitted from API requests. However, any field with an 2379 // empty value appearing in NullFields will be sent to the server as 2380 // null. It is an error if a field in this list has a non-empty value. 2381 // This may be used to include null fields in Patch requests. 2382 NullFields []string `json:"-"` 2383} 2384 2385func (s *Border) MarshalJSON() ([]byte, error) { 2386 type NoMethod Border 2387 raw := NoMethod(*s) 2388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2389} 2390 2391// Borders: The borders of the cell. 2392type Borders struct { 2393 // Bottom: The bottom border of the cell. 2394 Bottom *Border `json:"bottom,omitempty"` 2395 2396 // Left: The left border of the cell. 2397 Left *Border `json:"left,omitempty"` 2398 2399 // Right: The right border of the cell. 2400 Right *Border `json:"right,omitempty"` 2401 2402 // Top: The top border of the cell. 2403 Top *Border `json:"top,omitempty"` 2404 2405 // ForceSendFields is a list of field names (e.g. "Bottom") to 2406 // unconditionally include in API requests. By default, fields with 2407 // empty values are omitted from API requests. However, any non-pointer, 2408 // non-interface field appearing in ForceSendFields will be sent to the 2409 // server regardless of whether the field is empty or not. This may be 2410 // used to include empty fields in Patch requests. 2411 ForceSendFields []string `json:"-"` 2412 2413 // NullFields is a list of field names (e.g. "Bottom") to include in API 2414 // requests with the JSON null value. By default, fields with empty 2415 // values are omitted from API requests. However, any field with an 2416 // empty value appearing in NullFields will be sent to the server as 2417 // null. It is an error if a field in this list has a non-empty value. 2418 // This may be used to include null fields in Patch requests. 2419 NullFields []string `json:"-"` 2420} 2421 2422func (s *Borders) MarshalJSON() ([]byte, error) { 2423 type NoMethod Borders 2424 raw := NoMethod(*s) 2425 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2426} 2427 2428// BubbleChartSpec: A <a 2429// href="/chart/interactive/docs/gallery/bubblechart">bubble chart</a>. 2430type BubbleChartSpec struct { 2431 // BubbleBorderColor: The bubble border color. 2432 BubbleBorderColor *Color `json:"bubbleBorderColor,omitempty"` 2433 2434 // BubbleLabels: The data containing the bubble labels. These do not 2435 // need to be unique. 2436 BubbleLabels *ChartData `json:"bubbleLabels,omitempty"` 2437 2438 // BubbleMaxRadiusSize: The max radius size of the bubbles, in 2439 // pixels. 2440 // If specified, the field must be a positive value. 2441 BubbleMaxRadiusSize int64 `json:"bubbleMaxRadiusSize,omitempty"` 2442 2443 // BubbleMinRadiusSize: The minimum radius size of the bubbles, in 2444 // pixels. 2445 // If specific, the field must be a positive value. 2446 BubbleMinRadiusSize int64 `json:"bubbleMinRadiusSize,omitempty"` 2447 2448 // BubbleOpacity: The opacity of the bubbles between 0 and 1.0. 2449 // 0 is fully transparent and 1 is fully opaque. 2450 BubbleOpacity float64 `json:"bubbleOpacity,omitempty"` 2451 2452 // BubbleSizes: The data contianing the bubble sizes. Bubble sizes are 2453 // used to draw 2454 // the bubbles at different sizes relative to each other. 2455 // If specified, group_ids must also be specified. This field 2456 // is 2457 // optional. 2458 BubbleSizes *ChartData `json:"bubbleSizes,omitempty"` 2459 2460 // BubbleTextStyle: The format of the text inside the bubbles. 2461 // Underline and Strikethrough are not supported. 2462 BubbleTextStyle *TextFormat `json:"bubbleTextStyle,omitempty"` 2463 2464 // Domain: The data containing the bubble x-values. These values locate 2465 // the bubbles 2466 // in the chart horizontally. 2467 Domain *ChartData `json:"domain,omitempty"` 2468 2469 // GroupIds: The data containing the bubble group IDs. All bubbles with 2470 // the same group 2471 // ID are drawn in the same color. If bubble_sizes is specified 2472 // then 2473 // this field must also be specified but may contain blank values. 2474 // This field is optional. 2475 GroupIds *ChartData `json:"groupIds,omitempty"` 2476 2477 // LegendPosition: Where the legend of the chart should be drawn. 2478 // 2479 // Possible values: 2480 // "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 2481 // use. 2482 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 2483 // chart. 2484 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 2485 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 2486 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 2487 // "NO_LEGEND" - No legend is rendered. 2488 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 2489 LegendPosition string `json:"legendPosition,omitempty"` 2490 2491 // Series: The data contianing the bubble y-values. These values locate 2492 // the bubbles 2493 // in the chart vertically. 2494 Series *ChartData `json:"series,omitempty"` 2495 2496 // ForceSendFields is a list of field names (e.g. "BubbleBorderColor") 2497 // to unconditionally include in API requests. By default, fields with 2498 // empty values are omitted from API requests. However, any non-pointer, 2499 // non-interface field appearing in ForceSendFields will be sent to the 2500 // server regardless of whether the field is empty or not. This may be 2501 // used to include empty fields in Patch requests. 2502 ForceSendFields []string `json:"-"` 2503 2504 // NullFields is a list of field names (e.g. "BubbleBorderColor") to 2505 // include in API requests with the JSON null value. By default, fields 2506 // with empty values are omitted from API requests. However, any field 2507 // with an empty value appearing in NullFields will be sent to the 2508 // server as null. It is an error if a field in this list has a 2509 // non-empty value. This may be used to include null fields in Patch 2510 // requests. 2511 NullFields []string `json:"-"` 2512} 2513 2514func (s *BubbleChartSpec) MarshalJSON() ([]byte, error) { 2515 type NoMethod BubbleChartSpec 2516 raw := NoMethod(*s) 2517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2518} 2519 2520func (s *BubbleChartSpec) UnmarshalJSON(data []byte) error { 2521 type NoMethod BubbleChartSpec 2522 var s1 struct { 2523 BubbleOpacity gensupport.JSONFloat64 `json:"bubbleOpacity"` 2524 *NoMethod 2525 } 2526 s1.NoMethod = (*NoMethod)(s) 2527 if err := json.Unmarshal(data, &s1); err != nil { 2528 return err 2529 } 2530 s.BubbleOpacity = float64(s1.BubbleOpacity) 2531 return nil 2532} 2533 2534// CandlestickChartSpec: A <a 2535// href="/chart/interactive/docs/gallery/candlestickchart">candlestick 2536// ch 2537// art</a>. 2538type CandlestickChartSpec struct { 2539 // Data: The Candlestick chart data. 2540 // Only one CandlestickData is supported. 2541 Data []*CandlestickData `json:"data,omitempty"` 2542 2543 // Domain: The domain data (horizontal axis) for the candlestick chart. 2544 // String data 2545 // will be treated as discrete labels, other data will be treated 2546 // as 2547 // continuous values. 2548 Domain *CandlestickDomain `json:"domain,omitempty"` 2549 2550 // ForceSendFields is a list of field names (e.g. "Data") to 2551 // unconditionally include in API requests. By default, fields with 2552 // empty values are omitted from API requests. However, any non-pointer, 2553 // non-interface field appearing in ForceSendFields will be sent to the 2554 // server regardless of whether the field is empty or not. This may be 2555 // used to include empty fields in Patch requests. 2556 ForceSendFields []string `json:"-"` 2557 2558 // NullFields is a list of field names (e.g. "Data") to include in API 2559 // requests with the JSON null value. By default, fields with empty 2560 // values are omitted from API requests. However, any field with an 2561 // empty value appearing in NullFields will be sent to the server as 2562 // null. It is an error if a field in this list has a non-empty value. 2563 // This may be used to include null fields in Patch requests. 2564 NullFields []string `json:"-"` 2565} 2566 2567func (s *CandlestickChartSpec) MarshalJSON() ([]byte, error) { 2568 type NoMethod CandlestickChartSpec 2569 raw := NoMethod(*s) 2570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2571} 2572 2573// CandlestickData: The Candlestick chart data, each containing the low, 2574// open, close, and high 2575// values for a series. 2576type CandlestickData struct { 2577 // CloseSeries: The range data (vertical axis) for the close/final value 2578 // for each candle. 2579 // This is the top of the candle body. If greater than the open value 2580 // the 2581 // candle will be filled. Otherwise the candle will be hollow. 2582 CloseSeries *CandlestickSeries `json:"closeSeries,omitempty"` 2583 2584 // HighSeries: The range data (vertical axis) for the high/maximum value 2585 // for each 2586 // candle. This is the top of the candle's center line. 2587 HighSeries *CandlestickSeries `json:"highSeries,omitempty"` 2588 2589 // LowSeries: The range data (vertical axis) for the low/minimum value 2590 // for each candle. 2591 // This is the bottom of the candle's center line. 2592 LowSeries *CandlestickSeries `json:"lowSeries,omitempty"` 2593 2594 // OpenSeries: The range data (vertical axis) for the open/initial value 2595 // for each 2596 // candle. This is the bottom of the candle body. If less than the 2597 // close 2598 // value the candle will be filled. Otherwise the candle will be 2599 // hollow. 2600 OpenSeries *CandlestickSeries `json:"openSeries,omitempty"` 2601 2602 // ForceSendFields is a list of field names (e.g. "CloseSeries") to 2603 // unconditionally include in API requests. By default, fields with 2604 // empty values are omitted from API requests. However, any non-pointer, 2605 // non-interface field appearing in ForceSendFields will be sent to the 2606 // server regardless of whether the field is empty or not. This may be 2607 // used to include empty fields in Patch requests. 2608 ForceSendFields []string `json:"-"` 2609 2610 // NullFields is a list of field names (e.g. "CloseSeries") to include 2611 // in API requests with the JSON null value. By default, fields with 2612 // empty values are omitted from API requests. However, any field with 2613 // an empty value appearing in NullFields will be sent to the server as 2614 // null. It is an error if a field in this list has a non-empty value. 2615 // This may be used to include null fields in Patch requests. 2616 NullFields []string `json:"-"` 2617} 2618 2619func (s *CandlestickData) MarshalJSON() ([]byte, error) { 2620 type NoMethod CandlestickData 2621 raw := NoMethod(*s) 2622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2623} 2624 2625// CandlestickDomain: The domain of a CandlestickChart. 2626type CandlestickDomain struct { 2627 // Data: The data of the CandlestickDomain. 2628 Data *ChartData `json:"data,omitempty"` 2629 2630 // Reversed: True to reverse the order of the domain values (horizontal 2631 // axis). 2632 Reversed bool `json:"reversed,omitempty"` 2633 2634 // ForceSendFields is a list of field names (e.g. "Data") to 2635 // unconditionally include in API requests. By default, fields with 2636 // empty values are omitted from API requests. However, any non-pointer, 2637 // non-interface field appearing in ForceSendFields will be sent to the 2638 // server regardless of whether the field is empty or not. This may be 2639 // used to include empty fields in Patch requests. 2640 ForceSendFields []string `json:"-"` 2641 2642 // NullFields is a list of field names (e.g. "Data") to include in API 2643 // requests with the JSON null value. By default, fields with empty 2644 // values are omitted from API requests. However, any field with an 2645 // empty value appearing in NullFields will be sent to the server as 2646 // null. It is an error if a field in this list has a non-empty value. 2647 // This may be used to include null fields in Patch requests. 2648 NullFields []string `json:"-"` 2649} 2650 2651func (s *CandlestickDomain) MarshalJSON() ([]byte, error) { 2652 type NoMethod CandlestickDomain 2653 raw := NoMethod(*s) 2654 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2655} 2656 2657// CandlestickSeries: The series of a CandlestickData. 2658type CandlestickSeries struct { 2659 // Data: The data of the CandlestickSeries. 2660 Data *ChartData `json:"data,omitempty"` 2661 2662 // ForceSendFields is a list of field names (e.g. "Data") to 2663 // unconditionally include in API requests. By default, fields with 2664 // empty values are omitted from API requests. However, any non-pointer, 2665 // non-interface field appearing in ForceSendFields will be sent to the 2666 // server regardless of whether the field is empty or not. This may be 2667 // used to include empty fields in Patch requests. 2668 ForceSendFields []string `json:"-"` 2669 2670 // NullFields is a list of field names (e.g. "Data") to include in API 2671 // requests with the JSON null value. By default, fields with empty 2672 // values are omitted from API requests. However, any field with an 2673 // empty value appearing in NullFields will be sent to the server as 2674 // null. It is an error if a field in this list has a non-empty value. 2675 // This may be used to include null fields in Patch requests. 2676 NullFields []string `json:"-"` 2677} 2678 2679func (s *CandlestickSeries) MarshalJSON() ([]byte, error) { 2680 type NoMethod CandlestickSeries 2681 raw := NoMethod(*s) 2682 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2683} 2684 2685// CellData: Data about a specific cell. 2686type CellData struct { 2687 // DataValidation: A data validation rule on the cell, if any. 2688 // 2689 // When writing, the new data validation rule will overwrite any prior 2690 // rule. 2691 DataValidation *DataValidationRule `json:"dataValidation,omitempty"` 2692 2693 // EffectiveFormat: The effective format being used by the cell. 2694 // This includes the results of applying any conditional formatting 2695 // and, 2696 // if the cell contains a formula, the computed number format. 2697 // If the effective format is the default format, effective format 2698 // will 2699 // not be written. 2700 // This field is read-only. 2701 EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"` 2702 2703 // EffectiveValue: The effective value of the cell. For cells with 2704 // formulas, this is 2705 // the calculated value. For cells with literals, this is 2706 // the same as the user_entered_value. 2707 // This field is read-only. 2708 EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"` 2709 2710 // FormattedValue: The formatted value of the cell. 2711 // This is the value as it's shown to the user. 2712 // This field is read-only. 2713 FormattedValue string `json:"formattedValue,omitempty"` 2714 2715 // Hyperlink: A hyperlink this cell points to, if any. 2716 // This field is read-only. (To set it, use a `=HYPERLINK` formula 2717 // in the userEnteredValue.formulaValue 2718 // field.) 2719 Hyperlink string `json:"hyperlink,omitempty"` 2720 2721 // Note: Any note on the cell. 2722 Note string `json:"note,omitempty"` 2723 2724 // PivotTable: A pivot table anchored at this cell. The size of pivot 2725 // table itself 2726 // is computed dynamically based on its data, grouping, filters, 2727 // values, 2728 // etc. Only the top-left cell of the pivot table contains the pivot 2729 // table 2730 // definition. The other cells will contain the calculated values of 2731 // the 2732 // results of the pivot in their effective_value fields. 2733 PivotTable *PivotTable `json:"pivotTable,omitempty"` 2734 2735 // TextFormatRuns: Runs of rich text applied to subsections of the cell. 2736 // Runs are only valid 2737 // on user entered strings, not formulas, bools, or numbers. 2738 // Runs start at specific indexes in the text and continue until the 2739 // next 2740 // run. Properties of a run will continue unless explicitly changed 2741 // in a subsequent run (and properties of the first run will 2742 // continue 2743 // the properties of the cell unless explicitly changed). 2744 // 2745 // When writing, the new runs will overwrite any prior runs. When 2746 // writing a 2747 // new user_entered_value, previous runs are erased. 2748 TextFormatRuns []*TextFormatRun `json:"textFormatRuns,omitempty"` 2749 2750 // UserEnteredFormat: The format the user entered for the cell. 2751 // 2752 // When writing, the new format will be merged with the existing format. 2753 UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"` 2754 2755 // UserEnteredValue: The value the user entered in the cell. e.g, 2756 // `1234`, `'Hello'`, or `=NOW()` 2757 // Note: Dates, Times and DateTimes are represented as doubles in 2758 // serial number format. 2759 UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"` 2760 2761 // ForceSendFields is a list of field names (e.g. "DataValidation") to 2762 // unconditionally include in API requests. By default, fields with 2763 // empty values are omitted from API requests. However, any non-pointer, 2764 // non-interface field appearing in ForceSendFields will be sent to the 2765 // server regardless of whether the field is empty or not. This may be 2766 // used to include empty fields in Patch requests. 2767 ForceSendFields []string `json:"-"` 2768 2769 // NullFields is a list of field names (e.g. "DataValidation") to 2770 // include in API requests with the JSON null value. By default, fields 2771 // with empty values are omitted from API requests. However, any field 2772 // with an empty value appearing in NullFields will be sent to the 2773 // server as null. It is an error if a field in this list has a 2774 // non-empty value. This may be used to include null fields in Patch 2775 // requests. 2776 NullFields []string `json:"-"` 2777} 2778 2779func (s *CellData) MarshalJSON() ([]byte, error) { 2780 type NoMethod CellData 2781 raw := NoMethod(*s) 2782 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2783} 2784 2785// CellFormat: The format of a cell. 2786type CellFormat struct { 2787 // BackgroundColor: The background color of the cell. 2788 BackgroundColor *Color `json:"backgroundColor,omitempty"` 2789 2790 // Borders: The borders of the cell. 2791 Borders *Borders `json:"borders,omitempty"` 2792 2793 // HorizontalAlignment: The horizontal alignment of the value in the 2794 // cell. 2795 // 2796 // Possible values: 2797 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 2798 // specified. Do not use this. 2799 // "LEFT" - The text is explicitly aligned to the left of the cell. 2800 // "CENTER" - The text is explicitly aligned to the center of the 2801 // cell. 2802 // "RIGHT" - The text is explicitly aligned to the right of the cell. 2803 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 2804 2805 // HyperlinkDisplayType: How a hyperlink, if it exists, should be 2806 // displayed in the cell. 2807 // 2808 // Possible values: 2809 // "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" - The default value: the 2810 // hyperlink is rendered. Do not use this. 2811 // "LINKED" - A hyperlink should be explicitly rendered. 2812 // "PLAIN_TEXT" - A hyperlink should not be rendered. 2813 HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"` 2814 2815 // NumberFormat: A format describing how number values should be 2816 // represented to the user. 2817 NumberFormat *NumberFormat `json:"numberFormat,omitempty"` 2818 2819 // Padding: The padding of the cell. 2820 Padding *Padding `json:"padding,omitempty"` 2821 2822 // TextDirection: The direction of the text in the cell. 2823 // 2824 // Possible values: 2825 // "TEXT_DIRECTION_UNSPECIFIED" - The text direction is not specified. 2826 // Do not use this. 2827 // "LEFT_TO_RIGHT" - The text direction of left-to-right was set by 2828 // the user. 2829 // "RIGHT_TO_LEFT" - The text direction of right-to-left was set by 2830 // the user. 2831 TextDirection string `json:"textDirection,omitempty"` 2832 2833 // TextFormat: The format of the text in the cell (unless overridden by 2834 // a format run). 2835 TextFormat *TextFormat `json:"textFormat,omitempty"` 2836 2837 // TextRotation: The rotation applied to text in a cell 2838 TextRotation *TextRotation `json:"textRotation,omitempty"` 2839 2840 // VerticalAlignment: The vertical alignment of the value in the cell. 2841 // 2842 // Possible values: 2843 // "VERTICAL_ALIGN_UNSPECIFIED" - The vertical alignment is not 2844 // specified. Do not use this. 2845 // "TOP" - The text is explicitly aligned to the top of the cell. 2846 // "MIDDLE" - The text is explicitly aligned to the middle of the 2847 // cell. 2848 // "BOTTOM" - The text is explicitly aligned to the bottom of the 2849 // cell. 2850 VerticalAlignment string `json:"verticalAlignment,omitempty"` 2851 2852 // WrapStrategy: The wrap strategy for the value in the cell. 2853 // 2854 // Possible values: 2855 // "WRAP_STRATEGY_UNSPECIFIED" - The default value, do not use. 2856 // "OVERFLOW_CELL" - Lines that are longer than the cell width will be 2857 // written in the next 2858 // cell over, so long as that cell is empty. If the next cell over 2859 // is 2860 // non-empty, this behaves the same as CLIP. The text will never wrap 2861 // to the next line unless the user manually inserts a new 2862 // line. 2863 // Example: 2864 // 2865 // | First sentence. | 2866 // | Manual newline that is very long. <- Text continues into next 2867 // cell 2868 // | Next newline. | 2869 // "LEGACY_WRAP" - This wrap strategy represents the old Google Sheets 2870 // wrap strategy where 2871 // words that are longer than a line are clipped rather than broken. 2872 // This 2873 // strategy is not supported on all platforms and is being phased 2874 // out. 2875 // Example: 2876 // 2877 // | Cell has a | 2878 // | loooooooooo| <- Word is clipped. 2879 // | word. | 2880 // "CLIP" - Lines that are longer than the cell width will be 2881 // clipped. 2882 // The text will never wrap to the next line unless the user 2883 // manually 2884 // inserts a new line. 2885 // Example: 2886 // 2887 // | First sentence. | 2888 // | Manual newline t| <- Text is clipped 2889 // | Next newline. | 2890 // "WRAP" - Words that are longer than a line are wrapped at the 2891 // character level 2892 // rather than clipped. 2893 // Example: 2894 // 2895 // | Cell has a | 2896 // | loooooooooo| <- Word is broken. 2897 // | ong word. | 2898 WrapStrategy string `json:"wrapStrategy,omitempty"` 2899 2900 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 2901 // unconditionally include in API requests. By default, fields with 2902 // empty values are omitted from API requests. However, any non-pointer, 2903 // non-interface field appearing in ForceSendFields will be sent to the 2904 // server regardless of whether the field is empty or not. This may be 2905 // used to include empty fields in Patch requests. 2906 ForceSendFields []string `json:"-"` 2907 2908 // NullFields is a list of field names (e.g. "BackgroundColor") to 2909 // include in API requests with the JSON null value. By default, fields 2910 // with empty values are omitted from API requests. However, any field 2911 // with an empty value appearing in NullFields will be sent to the 2912 // server as null. It is an error if a field in this list has a 2913 // non-empty value. This may be used to include null fields in Patch 2914 // requests. 2915 NullFields []string `json:"-"` 2916} 2917 2918func (s *CellFormat) MarshalJSON() ([]byte, error) { 2919 type NoMethod CellFormat 2920 raw := NoMethod(*s) 2921 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2922} 2923 2924// ChartAxisViewWindowOptions: The options that define a "view window" 2925// for a chart (such as the visible 2926// values in an axis). 2927type ChartAxisViewWindowOptions struct { 2928 // ViewWindowMax: The maximum numeric value to be shown in this view 2929 // window. If unset, will 2930 // automatically determine a maximum value that looks good for the data. 2931 ViewWindowMax float64 `json:"viewWindowMax,omitempty"` 2932 2933 // ViewWindowMin: The minimum numeric value to be shown in this view 2934 // window. If unset, will 2935 // automatically determine a minimum value that looks good for the data. 2936 ViewWindowMin float64 `json:"viewWindowMin,omitempty"` 2937 2938 // ViewWindowMode: The view window's mode. 2939 // 2940 // Possible values: 2941 // "DEFAULT_VIEW_WINDOW_MODE" - The default view window mode used in 2942 // the Sheets editor for this chart 2943 // type. In most cases, if set, the default mode is equivalent 2944 // to 2945 // `PRETTY`. 2946 // "VIEW_WINDOW_MODE_UNSUPPORTED" - Do not use. Represents that the 2947 // currently set mode is not supported by 2948 // the API. 2949 // "EXPLICIT" - Follows the min and max exactly if specified. If a 2950 // value is unspecified, 2951 // it will fall back to the `PRETTY` value. 2952 // "PRETTY" - Chooses a min and max that make the chart look good. 2953 // Both min and max are 2954 // ignored in this mode. 2955 ViewWindowMode string `json:"viewWindowMode,omitempty"` 2956 2957 // ForceSendFields is a list of field names (e.g. "ViewWindowMax") to 2958 // unconditionally include in API requests. By default, fields with 2959 // empty values are omitted from API requests. However, any non-pointer, 2960 // non-interface field appearing in ForceSendFields will be sent to the 2961 // server regardless of whether the field is empty or not. This may be 2962 // used to include empty fields in Patch requests. 2963 ForceSendFields []string `json:"-"` 2964 2965 // NullFields is a list of field names (e.g. "ViewWindowMax") to include 2966 // in API requests with the JSON null value. By default, fields with 2967 // empty values are omitted from API requests. However, any field with 2968 // an empty value appearing in NullFields will be sent to the server as 2969 // null. It is an error if a field in this list has a non-empty value. 2970 // This may be used to include null fields in Patch requests. 2971 NullFields []string `json:"-"` 2972} 2973 2974func (s *ChartAxisViewWindowOptions) MarshalJSON() ([]byte, error) { 2975 type NoMethod ChartAxisViewWindowOptions 2976 raw := NoMethod(*s) 2977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2978} 2979 2980func (s *ChartAxisViewWindowOptions) UnmarshalJSON(data []byte) error { 2981 type NoMethod ChartAxisViewWindowOptions 2982 var s1 struct { 2983 ViewWindowMax gensupport.JSONFloat64 `json:"viewWindowMax"` 2984 ViewWindowMin gensupport.JSONFloat64 `json:"viewWindowMin"` 2985 *NoMethod 2986 } 2987 s1.NoMethod = (*NoMethod)(s) 2988 if err := json.Unmarshal(data, &s1); err != nil { 2989 return err 2990 } 2991 s.ViewWindowMax = float64(s1.ViewWindowMax) 2992 s.ViewWindowMin = float64(s1.ViewWindowMin) 2993 return nil 2994} 2995 2996// ChartData: The data included in a domain or series. 2997type ChartData struct { 2998 // SourceRange: The source ranges of the data. 2999 SourceRange *ChartSourceRange `json:"sourceRange,omitempty"` 3000 3001 // ForceSendFields is a list of field names (e.g. "SourceRange") to 3002 // unconditionally include in API requests. By default, fields with 3003 // empty values are omitted from API requests. However, any non-pointer, 3004 // non-interface field appearing in ForceSendFields will be sent to the 3005 // server regardless of whether the field is empty or not. This may be 3006 // used to include empty fields in Patch requests. 3007 ForceSendFields []string `json:"-"` 3008 3009 // NullFields is a list of field names (e.g. "SourceRange") to include 3010 // in API requests with the JSON null value. By default, fields with 3011 // empty values are omitted from API requests. However, any field with 3012 // an empty value appearing in NullFields will be sent to the server as 3013 // null. It is an error if a field in this list has a non-empty value. 3014 // This may be used to include null fields in Patch requests. 3015 NullFields []string `json:"-"` 3016} 3017 3018func (s *ChartData) MarshalJSON() ([]byte, error) { 3019 type NoMethod ChartData 3020 raw := NoMethod(*s) 3021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3022} 3023 3024// ChartSourceRange: Source ranges for a chart. 3025type ChartSourceRange struct { 3026 // Sources: The ranges of data for a series or domain. 3027 // Exactly one dimension must have a length of 1, 3028 // and all sources in the list must have the same dimension 3029 // with length 1. 3030 // The domain (if it exists) & all series must have the same number 3031 // of source ranges. If using more than one source range, then the 3032 // source 3033 // range at a given offset must be in order and contiguous across the 3034 // domain 3035 // and series. 3036 // 3037 // For example, these are valid configurations: 3038 // 3039 // domain sources: A1:A5 3040 // series1 sources: B1:B5 3041 // series2 sources: D6:D10 3042 // 3043 // domain sources: A1:A5, C10:C12 3044 // series1 sources: B1:B5, D10:D12 3045 // series2 sources: C1:C5, E10:E12 3046 Sources []*GridRange `json:"sources,omitempty"` 3047 3048 // ForceSendFields is a list of field names (e.g. "Sources") to 3049 // unconditionally include in API requests. By default, fields with 3050 // empty values are omitted from API requests. However, any non-pointer, 3051 // non-interface field appearing in ForceSendFields will be sent to the 3052 // server regardless of whether the field is empty or not. This may be 3053 // used to include empty fields in Patch requests. 3054 ForceSendFields []string `json:"-"` 3055 3056 // NullFields is a list of field names (e.g. "Sources") to include in 3057 // API requests with the JSON null value. By default, fields with empty 3058 // values are omitted from API requests. However, any field with an 3059 // empty value appearing in NullFields will be sent to the server as 3060 // null. It is an error if a field in this list has a non-empty value. 3061 // This may be used to include null fields in Patch requests. 3062 NullFields []string `json:"-"` 3063} 3064 3065func (s *ChartSourceRange) MarshalJSON() ([]byte, error) { 3066 type NoMethod ChartSourceRange 3067 raw := NoMethod(*s) 3068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3069} 3070 3071// ChartSpec: The specifications of a chart. 3072type ChartSpec struct { 3073 // AltText: The alternative text that describes the chart. This is 3074 // often used 3075 // for accessibility. 3076 AltText string `json:"altText,omitempty"` 3077 3078 // BackgroundColor: The background color of the entire chart. 3079 // Not applicable to Org charts. 3080 BackgroundColor *Color `json:"backgroundColor,omitempty"` 3081 3082 // BasicChart: A basic chart specification, can be one of many kinds of 3083 // charts. 3084 // See BasicChartType for the list of all 3085 // charts this supports. 3086 BasicChart *BasicChartSpec `json:"basicChart,omitempty"` 3087 3088 // BubbleChart: A bubble chart specification. 3089 BubbleChart *BubbleChartSpec `json:"bubbleChart,omitempty"` 3090 3091 // CandlestickChart: A candlestick chart specification. 3092 CandlestickChart *CandlestickChartSpec `json:"candlestickChart,omitempty"` 3093 3094 // FontName: The name of the font to use by default for all chart text 3095 // (e.g. title, 3096 // axis labels, legend). If a font is specified for a specific part of 3097 // the 3098 // chart it will override this font name. 3099 FontName string `json:"fontName,omitempty"` 3100 3101 // HiddenDimensionStrategy: Determines how the charts will use hidden 3102 // rows or columns. 3103 // 3104 // Possible values: 3105 // "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" - Default value, do 3106 // not use. 3107 // "SKIP_HIDDEN_ROWS_AND_COLUMNS" - Charts will skip hidden rows and 3108 // columns. 3109 // "SKIP_HIDDEN_ROWS" - Charts will skip hidden rows only. 3110 // "SKIP_HIDDEN_COLUMNS" - Charts will skip hidden columns only. 3111 // "SHOW_ALL" - Charts will not skip any hidden rows or columns. 3112 HiddenDimensionStrategy string `json:"hiddenDimensionStrategy,omitempty"` 3113 3114 // HistogramChart: A histogram chart specification. 3115 HistogramChart *HistogramChartSpec `json:"histogramChart,omitempty"` 3116 3117 // Maximized: True to make a chart fill the entire space in which it's 3118 // rendered with 3119 // minimum padding. False to use the default padding. 3120 // (Not applicable to Geo and Org charts.) 3121 Maximized bool `json:"maximized,omitempty"` 3122 3123 // OrgChart: An org chart specification. 3124 OrgChart *OrgChartSpec `json:"orgChart,omitempty"` 3125 3126 // PieChart: A pie chart specification. 3127 PieChart *PieChartSpec `json:"pieChart,omitempty"` 3128 3129 // Subtitle: The subtitle of the chart. 3130 Subtitle string `json:"subtitle,omitempty"` 3131 3132 // SubtitleTextFormat: The subtitle text format. 3133 // Strikethrough and underline are not supported. 3134 SubtitleTextFormat *TextFormat `json:"subtitleTextFormat,omitempty"` 3135 3136 // SubtitleTextPosition: The subtitle text position. 3137 // This field is optional. 3138 SubtitleTextPosition *TextPosition `json:"subtitleTextPosition,omitempty"` 3139 3140 // Title: The title of the chart. 3141 Title string `json:"title,omitempty"` 3142 3143 // TitleTextFormat: The title text format. 3144 // Strikethrough and underline are not supported. 3145 TitleTextFormat *TextFormat `json:"titleTextFormat,omitempty"` 3146 3147 // TitleTextPosition: The title text position. 3148 // This field is optional. 3149 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 3150 3151 // TreemapChart: A treemap chart specification. 3152 TreemapChart *TreemapChartSpec `json:"treemapChart,omitempty"` 3153 3154 // WaterfallChart: A waterfall chart specification. 3155 WaterfallChart *WaterfallChartSpec `json:"waterfallChart,omitempty"` 3156 3157 // ForceSendFields is a list of field names (e.g. "AltText") to 3158 // unconditionally include in API requests. By default, fields with 3159 // empty values are omitted from API requests. However, any non-pointer, 3160 // non-interface field appearing in ForceSendFields will be sent to the 3161 // server regardless of whether the field is empty or not. This may be 3162 // used to include empty fields in Patch requests. 3163 ForceSendFields []string `json:"-"` 3164 3165 // NullFields is a list of field names (e.g. "AltText") to include in 3166 // API requests with the JSON null value. By default, fields with empty 3167 // values are omitted from API requests. However, any field with an 3168 // empty value appearing in NullFields will be sent to the server as 3169 // null. It is an error if a field in this list has a non-empty value. 3170 // This may be used to include null fields in Patch requests. 3171 NullFields []string `json:"-"` 3172} 3173 3174func (s *ChartSpec) MarshalJSON() ([]byte, error) { 3175 type NoMethod ChartSpec 3176 raw := NoMethod(*s) 3177 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3178} 3179 3180// ClearBasicFilterRequest: Clears the basic filter, if any exists on 3181// the sheet. 3182type ClearBasicFilterRequest struct { 3183 // SheetId: The sheet ID on which the basic filter should be cleared. 3184 SheetId int64 `json:"sheetId,omitempty"` 3185 3186 // ForceSendFields is a list of field names (e.g. "SheetId") to 3187 // unconditionally include in API requests. By default, fields with 3188 // empty values are omitted from API requests. However, any non-pointer, 3189 // non-interface field appearing in ForceSendFields will be sent to the 3190 // server regardless of whether the field is empty or not. This may be 3191 // used to include empty fields in Patch requests. 3192 ForceSendFields []string `json:"-"` 3193 3194 // NullFields is a list of field names (e.g. "SheetId") to include in 3195 // API requests with the JSON null value. By default, fields with empty 3196 // values are omitted from API requests. However, any field with an 3197 // empty value appearing in NullFields will be sent to the server as 3198 // null. It is an error if a field in this list has a non-empty value. 3199 // This may be used to include null fields in Patch requests. 3200 NullFields []string `json:"-"` 3201} 3202 3203func (s *ClearBasicFilterRequest) MarshalJSON() ([]byte, error) { 3204 type NoMethod ClearBasicFilterRequest 3205 raw := NoMethod(*s) 3206 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3207} 3208 3209// ClearValuesRequest: The request for clearing a range of values in a 3210// spreadsheet. 3211type ClearValuesRequest struct { 3212} 3213 3214// ClearValuesResponse: The response when clearing a range of values in 3215// a spreadsheet. 3216type ClearValuesResponse struct { 3217 // ClearedRange: The range (in A1 notation) that was cleared. 3218 // (If the request was for an unbounded range or a ranger larger 3219 // than the bounds of the sheet, this will be the actual range 3220 // that was cleared, bounded to the sheet's limits.) 3221 ClearedRange string `json:"clearedRange,omitempty"` 3222 3223 // SpreadsheetId: The spreadsheet the updates were applied to. 3224 SpreadsheetId string `json:"spreadsheetId,omitempty"` 3225 3226 // ServerResponse contains the HTTP response code and headers from the 3227 // server. 3228 googleapi.ServerResponse `json:"-"` 3229 3230 // ForceSendFields is a list of field names (e.g. "ClearedRange") to 3231 // unconditionally include in API requests. By default, fields with 3232 // empty values are omitted from API requests. However, any non-pointer, 3233 // non-interface field appearing in ForceSendFields will be sent to the 3234 // server regardless of whether the field is empty or not. This may be 3235 // used to include empty fields in Patch requests. 3236 ForceSendFields []string `json:"-"` 3237 3238 // NullFields is a list of field names (e.g. "ClearedRange") to include 3239 // in API requests with the JSON null value. By default, fields with 3240 // empty values are omitted from API requests. However, any field with 3241 // an empty value appearing in NullFields will be sent to the server as 3242 // null. It is an error if a field in this list has a non-empty value. 3243 // This may be used to include null fields in Patch requests. 3244 NullFields []string `json:"-"` 3245} 3246 3247func (s *ClearValuesResponse) MarshalJSON() ([]byte, error) { 3248 type NoMethod ClearValuesResponse 3249 raw := NoMethod(*s) 3250 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3251} 3252 3253// Color: Represents a color in the RGBA color space. This 3254// representation is designed 3255// for simplicity of conversion to/from color representations in 3256// various 3257// languages over compactness; for example, the fields of this 3258// representation 3259// can be trivially provided to the constructor of "java.awt.Color" in 3260// Java; it 3261// can also be trivially provided to UIColor's 3262// "+colorWithRed:green:blue:alpha" 3263// method in iOS; and, with just a little work, it can be easily 3264// formatted into 3265// a CSS "rgba()" string in JavaScript, as well. 3266// 3267// Note: this proto does not carry information about the absolute color 3268// space 3269// that should be used to interpret the RGB value (e.g. sRGB, Adobe 3270// RGB, 3271// DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the 3272// sRGB color 3273// space. 3274// 3275// Example (Java): 3276// 3277// import com.google.type.Color; 3278// 3279// // ... 3280// public static java.awt.Color fromProto(Color protocolor) { 3281// float alpha = protocolor.hasAlpha() 3282// ? protocolor.getAlpha().getValue() 3283// : 1.0; 3284// 3285// return new java.awt.Color( 3286// protocolor.getRed(), 3287// protocolor.getGreen(), 3288// protocolor.getBlue(), 3289// alpha); 3290// } 3291// 3292// public static Color toProto(java.awt.Color color) { 3293// float red = (float) color.getRed(); 3294// float green = (float) color.getGreen(); 3295// float blue = (float) color.getBlue(); 3296// float denominator = 255.0; 3297// Color.Builder resultBuilder = 3298// Color 3299// .newBuilder() 3300// .setRed(red / denominator) 3301// .setGreen(green / denominator) 3302// .setBlue(blue / denominator); 3303// int alpha = color.getAlpha(); 3304// if (alpha != 255) { 3305// result.setAlpha( 3306// FloatValue 3307// .newBuilder() 3308// .setValue(((float) alpha) / denominator) 3309// .build()); 3310// } 3311// return resultBuilder.build(); 3312// } 3313// // ... 3314// 3315// Example (iOS / Obj-C): 3316// 3317// // ... 3318// static UIColor* fromProto(Color* protocolor) { 3319// float red = [protocolor red]; 3320// float green = [protocolor green]; 3321// float blue = [protocolor blue]; 3322// FloatValue* alpha_wrapper = [protocolor alpha]; 3323// float alpha = 1.0; 3324// if (alpha_wrapper != nil) { 3325// alpha = [alpha_wrapper value]; 3326// } 3327// return [UIColor colorWithRed:red green:green blue:blue 3328// alpha:alpha]; 3329// } 3330// 3331// static Color* toProto(UIColor* color) { 3332// CGFloat red, green, blue, alpha; 3333// if (![color getRed:&red green:&green blue:&blue 3334// alpha:&alpha]) { 3335// return nil; 3336// } 3337// Color* result = [[Color alloc] init]; 3338// [result setRed:red]; 3339// [result setGreen:green]; 3340// [result setBlue:blue]; 3341// if (alpha <= 0.9999) { 3342// [result setAlpha:floatWrapperWithValue(alpha)]; 3343// } 3344// [result autorelease]; 3345// return result; 3346// } 3347// // ... 3348// 3349// Example (JavaScript): 3350// 3351// // ... 3352// 3353// var protoToCssColor = function(rgb_color) { 3354// var redFrac = rgb_color.red || 0.0; 3355// var greenFrac = rgb_color.green || 0.0; 3356// var blueFrac = rgb_color.blue || 0.0; 3357// var red = Math.floor(redFrac * 255); 3358// var green = Math.floor(greenFrac * 255); 3359// var blue = Math.floor(blueFrac * 255); 3360// 3361// if (!('alpha' in rgb_color)) { 3362// return rgbToCssColor_(red, green, blue); 3363// } 3364// 3365// var alphaFrac = rgb_color.alpha.value || 0.0; 3366// var rgbParams = [red, green, blue].join(','); 3367// return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); 3368// }; 3369// 3370// var rgbToCssColor_ = function(red, green, blue) { 3371// var rgbNumber = new Number((red << 16) | (green << 8) | blue); 3372// var hexString = rgbNumber.toString(16); 3373// var missingZeros = 6 - hexString.length; 3374// var resultBuilder = ['#']; 3375// for (var i = 0; i < missingZeros; i++) { 3376// resultBuilder.push('0'); 3377// } 3378// resultBuilder.push(hexString); 3379// return resultBuilder.join(''); 3380// }; 3381// 3382// // ... 3383type Color struct { 3384 // Alpha: The fraction of this color that should be applied to the 3385 // pixel. That is, 3386 // the final pixel color is defined by the equation: 3387 // 3388 // pixel color = alpha * (this color) + (1.0 - alpha) * (background 3389 // color) 3390 // 3391 // This means that a value of 1.0 corresponds to a solid color, 3392 // whereas 3393 // a value of 0.0 corresponds to a completely transparent color. 3394 // This 3395 // uses a wrapper message rather than a simple float scalar so that it 3396 // is 3397 // possible to distinguish between a default value and the value being 3398 // unset. 3399 // If omitted, this color object is to be rendered as a solid color 3400 // (as if the alpha value had been explicitly given with a value of 3401 // 1.0). 3402 Alpha float64 `json:"alpha,omitempty"` 3403 3404 // Blue: The amount of blue in the color as a value in the interval [0, 3405 // 1]. 3406 Blue float64 `json:"blue,omitempty"` 3407 3408 // Green: The amount of green in the color as a value in the interval 3409 // [0, 1]. 3410 Green float64 `json:"green,omitempty"` 3411 3412 // Red: The amount of red in the color as a value in the interval [0, 3413 // 1]. 3414 Red float64 `json:"red,omitempty"` 3415 3416 // ForceSendFields is a list of field names (e.g. "Alpha") to 3417 // unconditionally include in API requests. By default, fields with 3418 // empty values are omitted from API requests. However, any non-pointer, 3419 // non-interface field appearing in ForceSendFields will be sent to the 3420 // server regardless of whether the field is empty or not. This may be 3421 // used to include empty fields in Patch requests. 3422 ForceSendFields []string `json:"-"` 3423 3424 // NullFields is a list of field names (e.g. "Alpha") to include in API 3425 // requests with the JSON null value. By default, fields with empty 3426 // values are omitted from API requests. However, any field with an 3427 // empty value appearing in NullFields will be sent to the server as 3428 // null. It is an error if a field in this list has a non-empty value. 3429 // This may be used to include null fields in Patch requests. 3430 NullFields []string `json:"-"` 3431} 3432 3433func (s *Color) MarshalJSON() ([]byte, error) { 3434 type NoMethod Color 3435 raw := NoMethod(*s) 3436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3437} 3438 3439func (s *Color) UnmarshalJSON(data []byte) error { 3440 type NoMethod Color 3441 var s1 struct { 3442 Alpha gensupport.JSONFloat64 `json:"alpha"` 3443 Blue gensupport.JSONFloat64 `json:"blue"` 3444 Green gensupport.JSONFloat64 `json:"green"` 3445 Red gensupport.JSONFloat64 `json:"red"` 3446 *NoMethod 3447 } 3448 s1.NoMethod = (*NoMethod)(s) 3449 if err := json.Unmarshal(data, &s1); err != nil { 3450 return err 3451 } 3452 s.Alpha = float64(s1.Alpha) 3453 s.Blue = float64(s1.Blue) 3454 s.Green = float64(s1.Green) 3455 s.Red = float64(s1.Red) 3456 return nil 3457} 3458 3459// ConditionValue: The value of the condition. 3460type ConditionValue struct { 3461 // RelativeDate: A relative date (based on the current date). 3462 // Valid only if the type is 3463 // DATE_BEFORE, 3464 // DATE_AFTER, 3465 // DATE_ON_OR_BEFORE or 3466 // DATE_ON_OR_AFTER. 3467 // 3468 // Relative dates are not supported in data validation. 3469 // They are supported only in conditional formatting and 3470 // conditional filters. 3471 // 3472 // Possible values: 3473 // "RELATIVE_DATE_UNSPECIFIED" - Default value, do not use. 3474 // "PAST_YEAR" - The value is one year before today. 3475 // "PAST_MONTH" - The value is one month before today. 3476 // "PAST_WEEK" - The value is one week before today. 3477 // "YESTERDAY" - The value is yesterday. 3478 // "TODAY" - The value is today. 3479 // "TOMORROW" - The value is tomorrow. 3480 RelativeDate string `json:"relativeDate,omitempty"` 3481 3482 // UserEnteredValue: A value the condition is based on. 3483 // The value is parsed as if the user typed into a cell. 3484 // Formulas are supported (and must begin with an `=` or a '+'). 3485 UserEnteredValue string `json:"userEnteredValue,omitempty"` 3486 3487 // ForceSendFields is a list of field names (e.g. "RelativeDate") to 3488 // unconditionally include in API requests. By default, fields with 3489 // empty values are omitted from API requests. However, any non-pointer, 3490 // non-interface field appearing in ForceSendFields will be sent to the 3491 // server regardless of whether the field is empty or not. This may be 3492 // used to include empty fields in Patch requests. 3493 ForceSendFields []string `json:"-"` 3494 3495 // NullFields is a list of field names (e.g. "RelativeDate") to include 3496 // in API requests with the JSON null value. By default, fields with 3497 // empty values are omitted from API requests. However, any field with 3498 // an empty value appearing in NullFields will be sent to the server as 3499 // null. It is an error if a field in this list has a non-empty value. 3500 // This may be used to include null fields in Patch requests. 3501 NullFields []string `json:"-"` 3502} 3503 3504func (s *ConditionValue) MarshalJSON() ([]byte, error) { 3505 type NoMethod ConditionValue 3506 raw := NoMethod(*s) 3507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3508} 3509 3510// ConditionalFormatRule: A rule describing a conditional format. 3511type ConditionalFormatRule struct { 3512 // BooleanRule: The formatting is either "on" or "off" according to the 3513 // rule. 3514 BooleanRule *BooleanRule `json:"booleanRule,omitempty"` 3515 3516 // GradientRule: The formatting will vary based on the gradients in the 3517 // rule. 3518 GradientRule *GradientRule `json:"gradientRule,omitempty"` 3519 3520 // Ranges: The ranges that are formatted if the condition is true. 3521 // All the ranges must be on the same grid. 3522 Ranges []*GridRange `json:"ranges,omitempty"` 3523 3524 // ForceSendFields is a list of field names (e.g. "BooleanRule") to 3525 // unconditionally include in API requests. By default, fields with 3526 // empty values are omitted from API requests. However, any non-pointer, 3527 // non-interface field appearing in ForceSendFields will be sent to the 3528 // server regardless of whether the field is empty or not. This may be 3529 // used to include empty fields in Patch requests. 3530 ForceSendFields []string `json:"-"` 3531 3532 // NullFields is a list of field names (e.g. "BooleanRule") to include 3533 // in API requests with the JSON null value. By default, fields with 3534 // empty values are omitted from API requests. However, any field with 3535 // an empty value appearing in NullFields will be sent to the server as 3536 // null. It is an error if a field in this list has a non-empty value. 3537 // This may be used to include null fields in Patch requests. 3538 NullFields []string `json:"-"` 3539} 3540 3541func (s *ConditionalFormatRule) MarshalJSON() ([]byte, error) { 3542 type NoMethod ConditionalFormatRule 3543 raw := NoMethod(*s) 3544 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3545} 3546 3547// CopyPasteRequest: Copies data from the source to the destination. 3548type CopyPasteRequest struct { 3549 // Destination: The location to paste to. If the range covers a span 3550 // that's 3551 // a multiple of the source's height or width, then the 3552 // data will be repeated to fill in the destination range. 3553 // If the range is smaller than the source range, the entire 3554 // source data will still be copied (beyond the end of the destination 3555 // range). 3556 Destination *GridRange `json:"destination,omitempty"` 3557 3558 // PasteOrientation: How that data should be oriented when pasting. 3559 // 3560 // Possible values: 3561 // "NORMAL" - Paste normally. 3562 // "TRANSPOSE" - Paste transposed, where all rows become columns and 3563 // vice versa. 3564 PasteOrientation string `json:"pasteOrientation,omitempty"` 3565 3566 // PasteType: What kind of data to paste. 3567 // 3568 // Possible values: 3569 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3570 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3571 // or merges. 3572 // "PASTE_FORMAT" - Paste the format and data validation only. 3573 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 3574 // "PASTE_FORMULA" - Paste the formulas only. 3575 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3576 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3577 // rules only. 3578 PasteType string `json:"pasteType,omitempty"` 3579 3580 // Source: The source range to copy. 3581 Source *GridRange `json:"source,omitempty"` 3582 3583 // ForceSendFields is a list of field names (e.g. "Destination") to 3584 // unconditionally include in API requests. By default, fields with 3585 // empty values are omitted from API requests. However, any non-pointer, 3586 // non-interface field appearing in ForceSendFields will be sent to the 3587 // server regardless of whether the field is empty or not. This may be 3588 // used to include empty fields in Patch requests. 3589 ForceSendFields []string `json:"-"` 3590 3591 // NullFields is a list of field names (e.g. "Destination") to include 3592 // in API requests with the JSON null value. By default, fields with 3593 // empty values are omitted from API requests. However, any field with 3594 // an empty value appearing in NullFields will be sent to the server as 3595 // null. It is an error if a field in this list has a non-empty value. 3596 // This may be used to include null fields in Patch requests. 3597 NullFields []string `json:"-"` 3598} 3599 3600func (s *CopyPasteRequest) MarshalJSON() ([]byte, error) { 3601 type NoMethod CopyPasteRequest 3602 raw := NoMethod(*s) 3603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3604} 3605 3606// CopySheetToAnotherSpreadsheetRequest: The request to copy a sheet 3607// across spreadsheets. 3608type CopySheetToAnotherSpreadsheetRequest struct { 3609 // DestinationSpreadsheetId: The ID of the spreadsheet to copy the sheet 3610 // to. 3611 DestinationSpreadsheetId string `json:"destinationSpreadsheetId,omitempty"` 3612 3613 // ForceSendFields is a list of field names (e.g. 3614 // "DestinationSpreadsheetId") to unconditionally include in API 3615 // requests. By default, fields with empty values are omitted from API 3616 // requests. However, any non-pointer, non-interface field appearing in 3617 // ForceSendFields will be sent to the server regardless of whether the 3618 // field is empty or not. This may be used to include empty fields in 3619 // Patch requests. 3620 ForceSendFields []string `json:"-"` 3621 3622 // NullFields is a list of field names (e.g. "DestinationSpreadsheetId") 3623 // to include in API requests with the JSON null value. By default, 3624 // fields with empty values are omitted from API requests. However, any 3625 // field with an empty value appearing in NullFields will be sent to the 3626 // server as null. It is an error if a field in this list has a 3627 // non-empty value. This may be used to include null fields in Patch 3628 // requests. 3629 NullFields []string `json:"-"` 3630} 3631 3632func (s *CopySheetToAnotherSpreadsheetRequest) MarshalJSON() ([]byte, error) { 3633 type NoMethod CopySheetToAnotherSpreadsheetRequest 3634 raw := NoMethod(*s) 3635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3636} 3637 3638// CreateDeveloperMetadataRequest: A request to create developer 3639// metadata. 3640type CreateDeveloperMetadataRequest struct { 3641 // DeveloperMetadata: The developer metadata to create. 3642 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3643 3644 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3645 // to unconditionally include in API requests. By default, fields with 3646 // empty values are omitted from API requests. However, any non-pointer, 3647 // non-interface field appearing in ForceSendFields will be sent to the 3648 // server regardless of whether the field is empty or not. This may be 3649 // used to include empty fields in Patch requests. 3650 ForceSendFields []string `json:"-"` 3651 3652 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3653 // include in API requests with the JSON null value. By default, fields 3654 // with empty values are omitted from API requests. However, any field 3655 // with an empty value appearing in NullFields will be sent to the 3656 // server as null. It is an error if a field in this list has a 3657 // non-empty value. This may be used to include null fields in Patch 3658 // requests. 3659 NullFields []string `json:"-"` 3660} 3661 3662func (s *CreateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 3663 type NoMethod CreateDeveloperMetadataRequest 3664 raw := NoMethod(*s) 3665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3666} 3667 3668// CreateDeveloperMetadataResponse: The response from creating developer 3669// metadata. 3670type CreateDeveloperMetadataResponse struct { 3671 // DeveloperMetadata: The developer metadata that was created. 3672 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3673 3674 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3675 // to unconditionally include in API requests. By default, fields with 3676 // empty values are omitted from API requests. However, any non-pointer, 3677 // non-interface field appearing in ForceSendFields will be sent to the 3678 // server regardless of whether the field is empty or not. This may be 3679 // used to include empty fields in Patch requests. 3680 ForceSendFields []string `json:"-"` 3681 3682 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3683 // include in API requests with the JSON null value. By default, fields 3684 // with empty values are omitted from API requests. However, any field 3685 // with an empty value appearing in NullFields will be sent to the 3686 // server as null. It is an error if a field in this list has a 3687 // non-empty value. This may be used to include null fields in Patch 3688 // requests. 3689 NullFields []string `json:"-"` 3690} 3691 3692func (s *CreateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 3693 type NoMethod CreateDeveloperMetadataResponse 3694 raw := NoMethod(*s) 3695 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3696} 3697 3698// CutPasteRequest: Moves data from the source to the destination. 3699type CutPasteRequest struct { 3700 // Destination: The top-left coordinate where the data should be pasted. 3701 Destination *GridCoordinate `json:"destination,omitempty"` 3702 3703 // PasteType: What kind of data to paste. All the source data will be 3704 // cut, regardless 3705 // of what is pasted. 3706 // 3707 // Possible values: 3708 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3709 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3710 // or merges. 3711 // "PASTE_FORMAT" - Paste the format and data validation only. 3712 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 3713 // "PASTE_FORMULA" - Paste the formulas only. 3714 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3715 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3716 // rules only. 3717 PasteType string `json:"pasteType,omitempty"` 3718 3719 // Source: The source data to cut. 3720 Source *GridRange `json:"source,omitempty"` 3721 3722 // ForceSendFields is a list of field names (e.g. "Destination") to 3723 // unconditionally include in API requests. By default, fields with 3724 // empty values are omitted from API requests. However, any non-pointer, 3725 // non-interface field appearing in ForceSendFields will be sent to the 3726 // server regardless of whether the field is empty or not. This may be 3727 // used to include empty fields in Patch requests. 3728 ForceSendFields []string `json:"-"` 3729 3730 // NullFields is a list of field names (e.g. "Destination") to include 3731 // in API requests with the JSON null value. By default, fields with 3732 // empty values are omitted from API requests. However, any field with 3733 // an empty value appearing in NullFields will be sent to the server as 3734 // null. It is an error if a field in this list has a non-empty value. 3735 // This may be used to include null fields in Patch requests. 3736 NullFields []string `json:"-"` 3737} 3738 3739func (s *CutPasteRequest) MarshalJSON() ([]byte, error) { 3740 type NoMethod CutPasteRequest 3741 raw := NoMethod(*s) 3742 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3743} 3744 3745// DataFilter: Filter that describes what data should be selected or 3746// returned from a 3747// request. 3748type DataFilter struct { 3749 // A1Range: Selects data that matches the specified A1 range. 3750 A1Range string `json:"a1Range,omitempty"` 3751 3752 // DeveloperMetadataLookup: Selects data associated with the developer 3753 // metadata matching the criteria 3754 // described by this DeveloperMetadataLookup. 3755 DeveloperMetadataLookup *DeveloperMetadataLookup `json:"developerMetadataLookup,omitempty"` 3756 3757 // GridRange: Selects data that matches the range described by the 3758 // GridRange. 3759 GridRange *GridRange `json:"gridRange,omitempty"` 3760 3761 // ForceSendFields is a list of field names (e.g. "A1Range") to 3762 // unconditionally include in API requests. By default, fields with 3763 // empty values are omitted from API requests. However, any non-pointer, 3764 // non-interface field appearing in ForceSendFields will be sent to the 3765 // server regardless of whether the field is empty or not. This may be 3766 // used to include empty fields in Patch requests. 3767 ForceSendFields []string `json:"-"` 3768 3769 // NullFields is a list of field names (e.g. "A1Range") to include in 3770 // API requests with the JSON null value. By default, fields with empty 3771 // values are omitted from API requests. However, any field with an 3772 // empty value appearing in NullFields will be sent to the server as 3773 // null. It is an error if a field in this list has a non-empty value. 3774 // This may be used to include null fields in Patch requests. 3775 NullFields []string `json:"-"` 3776} 3777 3778func (s *DataFilter) MarshalJSON() ([]byte, error) { 3779 type NoMethod DataFilter 3780 raw := NoMethod(*s) 3781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3782} 3783 3784// DataFilterValueRange: A range of values whose location is specified 3785// by a DataFilter. 3786type DataFilterValueRange struct { 3787 // DataFilter: The data filter describing the location of the values in 3788 // the spreadsheet. 3789 DataFilter *DataFilter `json:"dataFilter,omitempty"` 3790 3791 // MajorDimension: The major dimension of the values. 3792 // 3793 // Possible values: 3794 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 3795 // "ROWS" - Operates on the rows of a sheet. 3796 // "COLUMNS" - Operates on the columns of a sheet. 3797 MajorDimension string `json:"majorDimension,omitempty"` 3798 3799 // Values: The data to be written. If the provided values exceed any of 3800 // the ranges 3801 // matched by the data filter then the request will fail. If the 3802 // provided 3803 // values are less than the matched ranges only the specified values 3804 // will be 3805 // written, existing values in the matched ranges will remain 3806 // unaffected. 3807 Values [][]interface{} `json:"values,omitempty"` 3808 3809 // ForceSendFields is a list of field names (e.g. "DataFilter") to 3810 // unconditionally include in API requests. By default, fields with 3811 // empty values are omitted from API requests. However, any non-pointer, 3812 // non-interface field appearing in ForceSendFields will be sent to the 3813 // server regardless of whether the field is empty or not. This may be 3814 // used to include empty fields in Patch requests. 3815 ForceSendFields []string `json:"-"` 3816 3817 // NullFields is a list of field names (e.g. "DataFilter") to include in 3818 // API requests with the JSON null value. By default, fields with empty 3819 // values are omitted from API requests. However, any field with an 3820 // empty value appearing in NullFields will be sent to the server as 3821 // null. It is an error if a field in this list has a non-empty value. 3822 // This may be used to include null fields in Patch requests. 3823 NullFields []string `json:"-"` 3824} 3825 3826func (s *DataFilterValueRange) MarshalJSON() ([]byte, error) { 3827 type NoMethod DataFilterValueRange 3828 raw := NoMethod(*s) 3829 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3830} 3831 3832// DataValidationRule: A data validation rule. 3833type DataValidationRule struct { 3834 // Condition: The condition that data in the cell must match. 3835 Condition *BooleanCondition `json:"condition,omitempty"` 3836 3837 // InputMessage: A message to show the user when adding data to the 3838 // cell. 3839 InputMessage string `json:"inputMessage,omitempty"` 3840 3841 // ShowCustomUi: True if the UI should be customized based on the kind 3842 // of condition. 3843 // If true, "List" conditions will show a dropdown. 3844 ShowCustomUi bool `json:"showCustomUi,omitempty"` 3845 3846 // Strict: True if invalid data should be rejected. 3847 Strict bool `json:"strict,omitempty"` 3848 3849 // ForceSendFields is a list of field names (e.g. "Condition") to 3850 // unconditionally include in API requests. By default, fields with 3851 // empty values are omitted from API requests. However, any non-pointer, 3852 // non-interface field appearing in ForceSendFields will be sent to the 3853 // server regardless of whether the field is empty or not. This may be 3854 // used to include empty fields in Patch requests. 3855 ForceSendFields []string `json:"-"` 3856 3857 // NullFields is a list of field names (e.g. "Condition") to include in 3858 // API requests with the JSON null value. By default, fields with empty 3859 // values are omitted from API requests. However, any field with an 3860 // empty value appearing in NullFields will be sent to the server as 3861 // null. It is an error if a field in this list has a non-empty value. 3862 // This may be used to include null fields in Patch requests. 3863 NullFields []string `json:"-"` 3864} 3865 3866func (s *DataValidationRule) MarshalJSON() ([]byte, error) { 3867 type NoMethod DataValidationRule 3868 raw := NoMethod(*s) 3869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3870} 3871 3872// DateTimeRule: Allows you to organize the date-time values in a source 3873// data column into 3874// buckets based on selected parts of their date or time values. For 3875// example, 3876// consider a pivot table showing sales transactions by date: 3877// 3878// +----------+--------------+ 3879// | Date | SUM of Sales | 3880// +----------+--------------+ 3881// | 1/1/2017 | $621.14 | 3882// | 2/3/2017 | $708.84 | 3883// | 5/8/2017 | $326.84 | 3884// ... 3885// +----------+--------------+ 3886// Applying a date-time group rule with a DateTimeRuleType of 3887// YEAR_MONTH 3888// results in the following pivot table. 3889// 3890// +--------------+--------------+ 3891// | Grouped Date | SUM of Sales | 3892// +--------------+--------------+ 3893// | 2017-Jan | $53,731.78 | 3894// | 2017-Feb | $83,475.32 | 3895// | 2017-Mar | $94,385.05 | 3896// ... 3897// +--------------+--------------+ 3898type DateTimeRule struct { 3899 // Type: The type of date-time grouping to apply. 3900 // 3901 // Possible values: 3902 // "DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not use. 3903 // "SECOND" - Group dates by second, from 0 to 59. 3904 // "MINUTE" - Group dates by minute, from 0 to 59. 3905 // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23. 3906 // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour 3907 // system, for example 19:45. 3908 // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour 3909 // system, for example 7:45 3910 // PM. The AM/PM designation is translated based on the 3911 // spreadsheet 3912 // locale. 3913 // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The 3914 // days of the week will 3915 // be translated based on the spreadsheet locale. 3916 // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note 3917 // that dates after Feb. 29 3918 // fall in different buckets in leap years than in non-leap years. 3919 // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31. 3920 // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The 3921 // month is 3922 // translated based on the spreadsheet locale. 3923 // "MONTH" - Group dates by month, for example Nov. The month is 3924 // translated based 3925 // on the spreadsheet locale. 3926 // "QUARTER" - Group dates by quarter, for example Q1 (which 3927 // represents Jan-Mar). 3928 // "YEAR" - Group dates by year, for example 2008. 3929 // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov. 3930 // The month is 3931 // translated based on the spreadsheet locale. 3932 // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008 3933 // Q4. 3934 // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example 3935 // 2008-11-22. 3936 Type string `json:"type,omitempty"` 3937 3938 // ForceSendFields is a list of field names (e.g. "Type") to 3939 // unconditionally include in API requests. By default, fields with 3940 // empty values are omitted from API requests. However, any non-pointer, 3941 // non-interface field appearing in ForceSendFields will be sent to the 3942 // server regardless of whether the field is empty or not. This may be 3943 // used to include empty fields in Patch requests. 3944 ForceSendFields []string `json:"-"` 3945 3946 // NullFields is a list of field names (e.g. "Type") to include in API 3947 // requests with the JSON null value. By default, fields with empty 3948 // values are omitted from API requests. However, any field with an 3949 // empty value appearing in NullFields will be sent to the server as 3950 // null. It is an error if a field in this list has a non-empty value. 3951 // This may be used to include null fields in Patch requests. 3952 NullFields []string `json:"-"` 3953} 3954 3955func (s *DateTimeRule) MarshalJSON() ([]byte, error) { 3956 type NoMethod DateTimeRule 3957 raw := NoMethod(*s) 3958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3959} 3960 3961// DeleteBandingRequest: Removes the banded range with the given ID from 3962// the spreadsheet. 3963type DeleteBandingRequest struct { 3964 // BandedRangeId: The ID of the banded range to delete. 3965 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 3966 3967 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 3968 // unconditionally include in API requests. By default, fields with 3969 // empty values are omitted from API requests. However, any non-pointer, 3970 // non-interface field appearing in ForceSendFields will be sent to the 3971 // server regardless of whether the field is empty or not. This may be 3972 // used to include empty fields in Patch requests. 3973 ForceSendFields []string `json:"-"` 3974 3975 // NullFields is a list of field names (e.g. "BandedRangeId") to include 3976 // in API requests with the JSON null value. By default, fields with 3977 // empty values are omitted from API requests. However, any field with 3978 // an empty value appearing in NullFields will be sent to the server as 3979 // null. It is an error if a field in this list has a non-empty value. 3980 // This may be used to include null fields in Patch requests. 3981 NullFields []string `json:"-"` 3982} 3983 3984func (s *DeleteBandingRequest) MarshalJSON() ([]byte, error) { 3985 type NoMethod DeleteBandingRequest 3986 raw := NoMethod(*s) 3987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3988} 3989 3990// DeleteConditionalFormatRuleRequest: Deletes a conditional format rule 3991// at the given index. 3992// All subsequent rules' indexes are decremented. 3993type DeleteConditionalFormatRuleRequest struct { 3994 // Index: The zero-based index of the rule to be deleted. 3995 Index int64 `json:"index,omitempty"` 3996 3997 // SheetId: The sheet the rule is being deleted from. 3998 SheetId int64 `json:"sheetId,omitempty"` 3999 4000 // ForceSendFields is a list of field names (e.g. "Index") to 4001 // unconditionally include in API requests. By default, fields with 4002 // empty values are omitted from API requests. However, any non-pointer, 4003 // non-interface field appearing in ForceSendFields will be sent to the 4004 // server regardless of whether the field is empty or not. This may be 4005 // used to include empty fields in Patch requests. 4006 ForceSendFields []string `json:"-"` 4007 4008 // NullFields is a list of field names (e.g. "Index") to include in API 4009 // requests with the JSON null value. By default, fields with empty 4010 // values are omitted from API requests. However, any field with an 4011 // empty value appearing in NullFields will be sent to the server as 4012 // null. It is an error if a field in this list has a non-empty value. 4013 // This may be used to include null fields in Patch requests. 4014 NullFields []string `json:"-"` 4015} 4016 4017func (s *DeleteConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 4018 type NoMethod DeleteConditionalFormatRuleRequest 4019 raw := NoMethod(*s) 4020 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4021} 4022 4023// DeleteConditionalFormatRuleResponse: The result of deleting a 4024// conditional format rule. 4025type DeleteConditionalFormatRuleResponse struct { 4026 // Rule: The rule that was deleted. 4027 Rule *ConditionalFormatRule `json:"rule,omitempty"` 4028 4029 // ForceSendFields is a list of field names (e.g. "Rule") to 4030 // unconditionally include in API requests. By default, fields with 4031 // empty values are omitted from API requests. However, any non-pointer, 4032 // non-interface field appearing in ForceSendFields will be sent to the 4033 // server regardless of whether the field is empty or not. This may be 4034 // used to include empty fields in Patch requests. 4035 ForceSendFields []string `json:"-"` 4036 4037 // NullFields is a list of field names (e.g. "Rule") to include in API 4038 // requests with the JSON null value. By default, fields with empty 4039 // values are omitted from API requests. However, any field with an 4040 // empty value appearing in NullFields will be sent to the server as 4041 // null. It is an error if a field in this list has a non-empty value. 4042 // This may be used to include null fields in Patch requests. 4043 NullFields []string `json:"-"` 4044} 4045 4046func (s *DeleteConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 4047 type NoMethod DeleteConditionalFormatRuleResponse 4048 raw := NoMethod(*s) 4049 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4050} 4051 4052// DeleteDeveloperMetadataRequest: A request to delete developer 4053// metadata. 4054type DeleteDeveloperMetadataRequest struct { 4055 // DataFilter: The data filter describing the criteria used to select 4056 // which developer 4057 // metadata entry to delete. 4058 DataFilter *DataFilter `json:"dataFilter,omitempty"` 4059 4060 // ForceSendFields is a list of field names (e.g. "DataFilter") to 4061 // unconditionally include in API requests. By default, fields with 4062 // empty values are omitted from API requests. However, any non-pointer, 4063 // non-interface field appearing in ForceSendFields will be sent to the 4064 // server regardless of whether the field is empty or not. This may be 4065 // used to include empty fields in Patch requests. 4066 ForceSendFields []string `json:"-"` 4067 4068 // NullFields is a list of field names (e.g. "DataFilter") to include in 4069 // API requests with the JSON null value. By default, fields with empty 4070 // values are omitted from API requests. However, any field with an 4071 // empty value appearing in NullFields will be sent to the server as 4072 // null. It is an error if a field in this list has a non-empty value. 4073 // This may be used to include null fields in Patch requests. 4074 NullFields []string `json:"-"` 4075} 4076 4077func (s *DeleteDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 4078 type NoMethod DeleteDeveloperMetadataRequest 4079 raw := NoMethod(*s) 4080 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4081} 4082 4083// DeleteDeveloperMetadataResponse: The response from deleting developer 4084// metadata. 4085type DeleteDeveloperMetadataResponse struct { 4086 // DeletedDeveloperMetadata: The metadata that was deleted. 4087 DeletedDeveloperMetadata []*DeveloperMetadata `json:"deletedDeveloperMetadata,omitempty"` 4088 4089 // ForceSendFields is a list of field names (e.g. 4090 // "DeletedDeveloperMetadata") to unconditionally include in API 4091 // requests. By default, fields with empty values are omitted from API 4092 // requests. However, any non-pointer, non-interface field appearing in 4093 // ForceSendFields will be sent to the server regardless of whether the 4094 // field is empty or not. This may be used to include empty fields in 4095 // Patch requests. 4096 ForceSendFields []string `json:"-"` 4097 4098 // NullFields is a list of field names (e.g. "DeletedDeveloperMetadata") 4099 // to include in API requests with the JSON null value. By default, 4100 // fields with empty values are omitted from API requests. However, any 4101 // field with an empty value appearing in NullFields will be sent to the 4102 // server as null. It is an error if a field in this list has a 4103 // non-empty value. This may be used to include null fields in Patch 4104 // requests. 4105 NullFields []string `json:"-"` 4106} 4107 4108func (s *DeleteDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 4109 type NoMethod DeleteDeveloperMetadataResponse 4110 raw := NoMethod(*s) 4111 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4112} 4113 4114// DeleteDimensionGroupRequest: Deletes a group over the specified range 4115// by decrementing the depth of the 4116// dimensions in the range. 4117// 4118// For example, assume the sheet has a depth-1 group over B:E and a 4119// depth-2 4120// group over C:D. Deleting a group over D:E leaves the sheet with 4121// a 4122// depth-1 group over B:D and a depth-2 group over C:C. 4123type DeleteDimensionGroupRequest struct { 4124 // Range: The range of the group to be deleted. 4125 Range *DimensionRange `json:"range,omitempty"` 4126 4127 // ForceSendFields is a list of field names (e.g. "Range") to 4128 // unconditionally include in API requests. By default, fields with 4129 // empty values are omitted from API requests. However, any non-pointer, 4130 // non-interface field appearing in ForceSendFields will be sent to the 4131 // server regardless of whether the field is empty or not. This may be 4132 // used to include empty fields in Patch requests. 4133 ForceSendFields []string `json:"-"` 4134 4135 // NullFields is a list of field names (e.g. "Range") to include in API 4136 // requests with the JSON null value. By default, fields with empty 4137 // values are omitted from API requests. However, any field with an 4138 // empty value appearing in NullFields will be sent to the server as 4139 // null. It is an error if a field in this list has a non-empty value. 4140 // This may be used to include null fields in Patch requests. 4141 NullFields []string `json:"-"` 4142} 4143 4144func (s *DeleteDimensionGroupRequest) MarshalJSON() ([]byte, error) { 4145 type NoMethod DeleteDimensionGroupRequest 4146 raw := NoMethod(*s) 4147 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4148} 4149 4150// DeleteDimensionGroupResponse: The result of deleting a group. 4151type DeleteDimensionGroupResponse struct { 4152 // DimensionGroups: All groups of a dimension after deleting a group 4153 // from that dimension. 4154 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 4155 4156 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 4157 // unconditionally include in API requests. By default, fields with 4158 // empty values are omitted from API requests. However, any non-pointer, 4159 // non-interface field appearing in ForceSendFields will be sent to the 4160 // server regardless of whether the field is empty or not. This may be 4161 // used to include empty fields in Patch requests. 4162 ForceSendFields []string `json:"-"` 4163 4164 // NullFields is a list of field names (e.g. "DimensionGroups") to 4165 // include in API requests with the JSON null value. By default, fields 4166 // with empty values are omitted from API requests. However, any field 4167 // with an empty value appearing in NullFields will be sent to the 4168 // server as null. It is an error if a field in this list has a 4169 // non-empty value. This may be used to include null fields in Patch 4170 // requests. 4171 NullFields []string `json:"-"` 4172} 4173 4174func (s *DeleteDimensionGroupResponse) MarshalJSON() ([]byte, error) { 4175 type NoMethod DeleteDimensionGroupResponse 4176 raw := NoMethod(*s) 4177 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4178} 4179 4180// DeleteDimensionRequest: Deletes the dimensions from the sheet. 4181type DeleteDimensionRequest struct { 4182 // Range: The dimensions to delete from the sheet. 4183 Range *DimensionRange `json:"range,omitempty"` 4184 4185 // ForceSendFields is a list of field names (e.g. "Range") to 4186 // unconditionally include in API requests. By default, fields with 4187 // empty values are omitted from API requests. However, any non-pointer, 4188 // non-interface field appearing in ForceSendFields will be sent to the 4189 // server regardless of whether the field is empty or not. This may be 4190 // used to include empty fields in Patch requests. 4191 ForceSendFields []string `json:"-"` 4192 4193 // NullFields is a list of field names (e.g. "Range") to include in API 4194 // requests with the JSON null value. By default, fields with empty 4195 // values are omitted from API requests. However, any field with an 4196 // empty value appearing in NullFields will be sent to the server as 4197 // null. It is an error if a field in this list has a non-empty value. 4198 // This may be used to include null fields in Patch requests. 4199 NullFields []string `json:"-"` 4200} 4201 4202func (s *DeleteDimensionRequest) MarshalJSON() ([]byte, error) { 4203 type NoMethod DeleteDimensionRequest 4204 raw := NoMethod(*s) 4205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4206} 4207 4208// DeleteDuplicatesRequest: Removes rows within this range that contain 4209// values in the specified columns 4210// that are duplicates of values in any previous row. Rows with 4211// identical values 4212// but different letter cases, formatting, or formulas are considered to 4213// be 4214// duplicates. 4215// 4216// This request also removes duplicate rows hidden from view (for 4217// example, due 4218// to a filter). When removing duplicates, the first instance of each 4219// duplicate 4220// row scanning from the top downwards is kept in the resulting range. 4221// Content 4222// outside of the specified range isn't removed, and rows considered 4223// duplicates 4224// do not have to be adjacent to each other in the range. 4225type DeleteDuplicatesRequest struct { 4226 // ComparisonColumns: The columns in the range to analyze for duplicate 4227 // values. If no columns are 4228 // selected then all columns are analyzed for duplicates. 4229 ComparisonColumns []*DimensionRange `json:"comparisonColumns,omitempty"` 4230 4231 // Range: The range to remove duplicates rows from. 4232 Range *GridRange `json:"range,omitempty"` 4233 4234 // ForceSendFields is a list of field names (e.g. "ComparisonColumns") 4235 // to unconditionally include in API requests. By default, fields with 4236 // empty values are omitted from API requests. However, any non-pointer, 4237 // non-interface field appearing in ForceSendFields will be sent to the 4238 // server regardless of whether the field is empty or not. This may be 4239 // used to include empty fields in Patch requests. 4240 ForceSendFields []string `json:"-"` 4241 4242 // NullFields is a list of field names (e.g. "ComparisonColumns") to 4243 // include in API requests with the JSON null value. By default, fields 4244 // with empty values are omitted from API requests. However, any field 4245 // with an empty value appearing in NullFields will be sent to the 4246 // server as null. It is an error if a field in this list has a 4247 // non-empty value. This may be used to include null fields in Patch 4248 // requests. 4249 NullFields []string `json:"-"` 4250} 4251 4252func (s *DeleteDuplicatesRequest) MarshalJSON() ([]byte, error) { 4253 type NoMethod DeleteDuplicatesRequest 4254 raw := NoMethod(*s) 4255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4256} 4257 4258// DeleteDuplicatesResponse: The result of removing duplicates in a 4259// range. 4260type DeleteDuplicatesResponse struct { 4261 // DuplicatesRemovedCount: The number of duplicate rows removed. 4262 DuplicatesRemovedCount int64 `json:"duplicatesRemovedCount,omitempty"` 4263 4264 // ForceSendFields is a list of field names (e.g. 4265 // "DuplicatesRemovedCount") to unconditionally include in API requests. 4266 // By default, fields with empty values are omitted from API requests. 4267 // However, any non-pointer, non-interface field appearing in 4268 // ForceSendFields will be sent to the server regardless of whether the 4269 // field is empty or not. This may be used to include empty fields in 4270 // Patch requests. 4271 ForceSendFields []string `json:"-"` 4272 4273 // NullFields is a list of field names (e.g. "DuplicatesRemovedCount") 4274 // to include in API requests with the JSON null value. By default, 4275 // fields with empty values are omitted from API requests. However, any 4276 // field with an empty value appearing in NullFields will be sent to the 4277 // server as null. It is an error if a field in this list has a 4278 // non-empty value. This may be used to include null fields in Patch 4279 // requests. 4280 NullFields []string `json:"-"` 4281} 4282 4283func (s *DeleteDuplicatesResponse) MarshalJSON() ([]byte, error) { 4284 type NoMethod DeleteDuplicatesResponse 4285 raw := NoMethod(*s) 4286 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4287} 4288 4289// DeleteEmbeddedObjectRequest: Deletes the embedded object with the 4290// given ID. 4291type DeleteEmbeddedObjectRequest struct { 4292 // ObjectId: The ID of the embedded object to delete. 4293 ObjectId int64 `json:"objectId,omitempty"` 4294 4295 // ForceSendFields is a list of field names (e.g. "ObjectId") to 4296 // unconditionally include in API requests. By default, fields with 4297 // empty values are omitted from API requests. However, any non-pointer, 4298 // non-interface field appearing in ForceSendFields will be sent to the 4299 // server regardless of whether the field is empty or not. This may be 4300 // used to include empty fields in Patch requests. 4301 ForceSendFields []string `json:"-"` 4302 4303 // NullFields is a list of field names (e.g. "ObjectId") to include in 4304 // API requests with the JSON null value. By default, fields with empty 4305 // values are omitted from API requests. However, any field with an 4306 // empty value appearing in NullFields will be sent to the server as 4307 // null. It is an error if a field in this list has a non-empty value. 4308 // This may be used to include null fields in Patch requests. 4309 NullFields []string `json:"-"` 4310} 4311 4312func (s *DeleteEmbeddedObjectRequest) MarshalJSON() ([]byte, error) { 4313 type NoMethod DeleteEmbeddedObjectRequest 4314 raw := NoMethod(*s) 4315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4316} 4317 4318// DeleteFilterViewRequest: Deletes a particular filter view. 4319type DeleteFilterViewRequest struct { 4320 // FilterId: The ID of the filter to delete. 4321 FilterId int64 `json:"filterId,omitempty"` 4322 4323 // ForceSendFields is a list of field names (e.g. "FilterId") to 4324 // unconditionally include in API requests. By default, fields with 4325 // empty values are omitted from API requests. However, any non-pointer, 4326 // non-interface field appearing in ForceSendFields will be sent to the 4327 // server regardless of whether the field is empty or not. This may be 4328 // used to include empty fields in Patch requests. 4329 ForceSendFields []string `json:"-"` 4330 4331 // NullFields is a list of field names (e.g. "FilterId") to include in 4332 // API requests with the JSON null value. By default, fields with empty 4333 // values are omitted from API requests. However, any field with an 4334 // empty value appearing in NullFields will be sent to the server as 4335 // null. It is an error if a field in this list has a non-empty value. 4336 // This may be used to include null fields in Patch requests. 4337 NullFields []string `json:"-"` 4338} 4339 4340func (s *DeleteFilterViewRequest) MarshalJSON() ([]byte, error) { 4341 type NoMethod DeleteFilterViewRequest 4342 raw := NoMethod(*s) 4343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4344} 4345 4346// DeleteNamedRangeRequest: Removes the named range with the given ID 4347// from the spreadsheet. 4348type DeleteNamedRangeRequest struct { 4349 // NamedRangeId: The ID of the named range to delete. 4350 NamedRangeId string `json:"namedRangeId,omitempty"` 4351 4352 // ForceSendFields is a list of field names (e.g. "NamedRangeId") to 4353 // unconditionally include in API requests. By default, fields with 4354 // empty values are omitted from API requests. However, any non-pointer, 4355 // non-interface field appearing in ForceSendFields will be sent to the 4356 // server regardless of whether the field is empty or not. This may be 4357 // used to include empty fields in Patch requests. 4358 ForceSendFields []string `json:"-"` 4359 4360 // NullFields is a list of field names (e.g. "NamedRangeId") to include 4361 // in API requests with the JSON null value. By default, fields with 4362 // empty values are omitted from API requests. However, any field with 4363 // an empty value appearing in NullFields will be sent to the server as 4364 // null. It is an error if a field in this list has a non-empty value. 4365 // This may be used to include null fields in Patch requests. 4366 NullFields []string `json:"-"` 4367} 4368 4369func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) { 4370 type NoMethod DeleteNamedRangeRequest 4371 raw := NoMethod(*s) 4372 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4373} 4374 4375// DeleteProtectedRangeRequest: Deletes the protected range with the 4376// given ID. 4377type DeleteProtectedRangeRequest struct { 4378 // ProtectedRangeId: The ID of the protected range to delete. 4379 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 4380 4381 // ForceSendFields is a list of field names (e.g. "ProtectedRangeId") to 4382 // unconditionally include in API requests. By default, fields with 4383 // empty values are omitted from API requests. However, any non-pointer, 4384 // non-interface field appearing in ForceSendFields will be sent to the 4385 // server regardless of whether the field is empty or not. This may be 4386 // used to include empty fields in Patch requests. 4387 ForceSendFields []string `json:"-"` 4388 4389 // NullFields is a list of field names (e.g. "ProtectedRangeId") to 4390 // include in API requests with the JSON null value. By default, fields 4391 // with empty values are omitted from API requests. However, any field 4392 // with an empty value appearing in NullFields will be sent to the 4393 // server as null. It is an error if a field in this list has a 4394 // non-empty value. This may be used to include null fields in Patch 4395 // requests. 4396 NullFields []string `json:"-"` 4397} 4398 4399func (s *DeleteProtectedRangeRequest) MarshalJSON() ([]byte, error) { 4400 type NoMethod DeleteProtectedRangeRequest 4401 raw := NoMethod(*s) 4402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4403} 4404 4405// DeleteRangeRequest: Deletes a range of cells, shifting other cells 4406// into the deleted area. 4407type DeleteRangeRequest struct { 4408 // Range: The range of cells to delete. 4409 Range *GridRange `json:"range,omitempty"` 4410 4411 // ShiftDimension: The dimension from which deleted cells will be 4412 // replaced with. 4413 // If ROWS, existing cells will be shifted upward to 4414 // replace the deleted cells. If COLUMNS, existing cells 4415 // will be shifted left to replace the deleted cells. 4416 // 4417 // Possible values: 4418 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 4419 // "ROWS" - Operates on the rows of a sheet. 4420 // "COLUMNS" - Operates on the columns of a sheet. 4421 ShiftDimension string `json:"shiftDimension,omitempty"` 4422 4423 // ForceSendFields is a list of field names (e.g. "Range") to 4424 // unconditionally include in API requests. By default, fields with 4425 // empty values are omitted from API requests. However, any non-pointer, 4426 // non-interface field appearing in ForceSendFields will be sent to the 4427 // server regardless of whether the field is empty or not. This may be 4428 // used to include empty fields in Patch requests. 4429 ForceSendFields []string `json:"-"` 4430 4431 // NullFields is a list of field names (e.g. "Range") to include in API 4432 // requests with the JSON null value. By default, fields with empty 4433 // values are omitted from API requests. However, any field with an 4434 // empty value appearing in NullFields will be sent to the server as 4435 // null. It is an error if a field in this list has a non-empty value. 4436 // This may be used to include null fields in Patch requests. 4437 NullFields []string `json:"-"` 4438} 4439 4440func (s *DeleteRangeRequest) MarshalJSON() ([]byte, error) { 4441 type NoMethod DeleteRangeRequest 4442 raw := NoMethod(*s) 4443 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4444} 4445 4446// DeleteSheetRequest: Deletes the requested sheet. 4447type DeleteSheetRequest struct { 4448 // SheetId: The ID of the sheet to delete. 4449 SheetId int64 `json:"sheetId,omitempty"` 4450 4451 // ForceSendFields is a list of field names (e.g. "SheetId") to 4452 // unconditionally include in API requests. By default, fields with 4453 // empty values are omitted from API requests. However, any non-pointer, 4454 // non-interface field appearing in ForceSendFields will be sent to the 4455 // server regardless of whether the field is empty or not. This may be 4456 // used to include empty fields in Patch requests. 4457 ForceSendFields []string `json:"-"` 4458 4459 // NullFields is a list of field names (e.g. "SheetId") to include in 4460 // API requests with the JSON null value. By default, fields with empty 4461 // values are omitted from API requests. However, any field with an 4462 // empty value appearing in NullFields will be sent to the server as 4463 // null. It is an error if a field in this list has a non-empty value. 4464 // This may be used to include null fields in Patch requests. 4465 NullFields []string `json:"-"` 4466} 4467 4468func (s *DeleteSheetRequest) MarshalJSON() ([]byte, error) { 4469 type NoMethod DeleteSheetRequest 4470 raw := NoMethod(*s) 4471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4472} 4473 4474// DeveloperMetadata: Developer metadata associated with a location or 4475// object in a spreadsheet. 4476// Developer metadata may be used to associate arbitrary data with 4477// various 4478// parts of a spreadsheet and will remain associated at those locations 4479// as they 4480// move around and the spreadsheet is edited. For example, if 4481// developer 4482// metadata is associated with row 5 and another row is then 4483// subsequently 4484// inserted above row 5, that original metadata will still be associated 4485// with 4486// the row it was first associated with (what is now row 6). If the 4487// associated 4488// object is deleted its metadata is deleted too. 4489type DeveloperMetadata struct { 4490 // Location: The location where the metadata is associated. 4491 Location *DeveloperMetadataLocation `json:"location,omitempty"` 4492 4493 // MetadataId: The spreadsheet-scoped unique ID that identifies the 4494 // metadata. IDs may be 4495 // specified when metadata is created, otherwise one will be 4496 // randomly 4497 // generated and assigned. Must be positive. 4498 MetadataId int64 `json:"metadataId,omitempty"` 4499 4500 // MetadataKey: The metadata key. There may be multiple metadata in a 4501 // spreadsheet with the 4502 // same key. Developer metadata must always have a key specified. 4503 MetadataKey string `json:"metadataKey,omitempty"` 4504 4505 // MetadataValue: Data associated with the metadata's key. 4506 MetadataValue string `json:"metadataValue,omitempty"` 4507 4508 // Visibility: The metadata visibility. Developer metadata must always 4509 // have a visibility 4510 // specified. 4511 // 4512 // Possible values: 4513 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 4514 // "DOCUMENT" - Document-visible metadata is accessible from any 4515 // developer project with 4516 // access to the document. 4517 // "PROJECT" - Project-visible metadata is only visible to and 4518 // accessible by the developer 4519 // project that created the metadata. 4520 Visibility string `json:"visibility,omitempty"` 4521 4522 // ServerResponse contains the HTTP response code and headers from the 4523 // server. 4524 googleapi.ServerResponse `json:"-"` 4525 4526 // ForceSendFields is a list of field names (e.g. "Location") to 4527 // unconditionally include in API requests. By default, fields with 4528 // empty values are omitted from API requests. However, any non-pointer, 4529 // non-interface field appearing in ForceSendFields will be sent to the 4530 // server regardless of whether the field is empty or not. This may be 4531 // used to include empty fields in Patch requests. 4532 ForceSendFields []string `json:"-"` 4533 4534 // NullFields is a list of field names (e.g. "Location") to include in 4535 // API requests with the JSON null value. By default, fields with empty 4536 // values are omitted from API requests. However, any field with an 4537 // empty value appearing in NullFields will be sent to the server as 4538 // null. It is an error if a field in this list has a non-empty value. 4539 // This may be used to include null fields in Patch requests. 4540 NullFields []string `json:"-"` 4541} 4542 4543func (s *DeveloperMetadata) MarshalJSON() ([]byte, error) { 4544 type NoMethod DeveloperMetadata 4545 raw := NoMethod(*s) 4546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4547} 4548 4549// DeveloperMetadataLocation: A location where metadata may be 4550// associated in a spreadsheet. 4551type DeveloperMetadataLocation struct { 4552 // DimensionRange: Represents the row or column when metadata is 4553 // associated with 4554 // a dimension. The specified DimensionRange must represent a single 4555 // row 4556 // or column; it cannot be unbounded or span multiple rows or columns. 4557 DimensionRange *DimensionRange `json:"dimensionRange,omitempty"` 4558 4559 // LocationType: The type of location this object represents. This 4560 // field is read-only. 4561 // 4562 // Possible values: 4563 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 4564 // "ROW" - Developer metadata associated on an entire row dimension. 4565 // "COLUMN" - Developer metadata associated on an entire column 4566 // dimension. 4567 // "SHEET" - Developer metadata associated on an entire sheet. 4568 // "SPREADSHEET" - Developer metadata associated on the entire 4569 // spreadsheet. 4570 LocationType string `json:"locationType,omitempty"` 4571 4572 // SheetId: The ID of the sheet when metadata is associated with an 4573 // entire sheet. 4574 SheetId int64 `json:"sheetId,omitempty"` 4575 4576 // Spreadsheet: True when metadata is associated with an entire 4577 // spreadsheet. 4578 Spreadsheet bool `json:"spreadsheet,omitempty"` 4579 4580 // ForceSendFields is a list of field names (e.g. "DimensionRange") to 4581 // unconditionally include in API requests. By default, fields with 4582 // empty values are omitted from API requests. However, any non-pointer, 4583 // non-interface field appearing in ForceSendFields will be sent to the 4584 // server regardless of whether the field is empty or not. This may be 4585 // used to include empty fields in Patch requests. 4586 ForceSendFields []string `json:"-"` 4587 4588 // NullFields is a list of field names (e.g. "DimensionRange") to 4589 // include in API requests with the JSON null value. By default, fields 4590 // with empty values are omitted from API requests. However, any field 4591 // with an empty value appearing in NullFields will be sent to the 4592 // server as null. It is an error if a field in this list has a 4593 // non-empty value. This may be used to include null fields in Patch 4594 // requests. 4595 NullFields []string `json:"-"` 4596} 4597 4598func (s *DeveloperMetadataLocation) MarshalJSON() ([]byte, error) { 4599 type NoMethod DeveloperMetadataLocation 4600 raw := NoMethod(*s) 4601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4602} 4603 4604// DeveloperMetadataLookup: Selects DeveloperMetadata that matches all 4605// of the specified fields. For 4606// example, if only a metadata ID is specified this considers 4607// the 4608// DeveloperMetadata with that particular unique ID. If a metadata key 4609// is 4610// specified, this considers all developer metadata with that key. If 4611// a 4612// key, visibility, and location type are all specified, this considers 4613// all 4614// developer metadata with that key and visibility that are associated 4615// with a 4616// location of that type. In general, this 4617// selects all DeveloperMetadata that matches the intersection of all 4618// the 4619// specified fields; any field or combination of fields may be 4620// specified. 4621type DeveloperMetadataLookup struct { 4622 // LocationMatchingStrategy: Determines how this lookup matches the 4623 // location. If this field is 4624 // specified as EXACT, only developer metadata associated on the 4625 // exact 4626 // location specified is matched. If this field is specified to 4627 // INTERSECTING, 4628 // developer metadata associated on intersecting locations is 4629 // also 4630 // matched. If left unspecified, this field assumes a default value 4631 // of 4632 // INTERSECTING. 4633 // If this field is specified, a metadataLocation 4634 // must also be specified. 4635 // 4636 // Possible values: 4637 // "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" - 4638 // Default value. This value must not be used. 4639 // "EXACT_LOCATION" - Indicates that a specified location should be 4640 // matched exactly. For 4641 // example, if row three were specified as a location this matching 4642 // strategy 4643 // would only match developer metadata also associated on row three. 4644 // Metadata 4645 // associated on other locations would not be considered. 4646 // "INTERSECTING_LOCATION" - Indicates that a specified location 4647 // should match that exact location as 4648 // well as any intersecting locations. For example, if row three 4649 // were 4650 // specified as a location this matching strategy would match 4651 // developer 4652 // metadata associated on row three as well as metadata associated 4653 // on 4654 // locations that intersect row three. If, for instance, there was 4655 // developer 4656 // metadata associated on column B, this matching strategy would also 4657 // match 4658 // that location because column B intersects row three. 4659 LocationMatchingStrategy string `json:"locationMatchingStrategy,omitempty"` 4660 4661 // LocationType: Limits the selected developer metadata to those entries 4662 // which are 4663 // associated with locations of the specified type. For example, when 4664 // this 4665 // field is specified as ROW this lookup 4666 // only considers developer metadata associated on rows. If the field 4667 // is left 4668 // unspecified, all location types are considered. This field cannot 4669 // be 4670 // specified as SPREADSHEET when 4671 // the locationMatchingStrategy 4672 // is specified as INTERSECTING or when the 4673 // metadataLocation is specified as a 4674 // non-spreadsheet location: spreadsheet metadata cannot intersect any 4675 // other 4676 // developer metadata location. This field also must be left 4677 // unspecified when 4678 // the locationMatchingStrategy 4679 // is specified as EXACT. 4680 // 4681 // Possible values: 4682 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 4683 // "ROW" - Developer metadata associated on an entire row dimension. 4684 // "COLUMN" - Developer metadata associated on an entire column 4685 // dimension. 4686 // "SHEET" - Developer metadata associated on an entire sheet. 4687 // "SPREADSHEET" - Developer metadata associated on the entire 4688 // spreadsheet. 4689 LocationType string `json:"locationType,omitempty"` 4690 4691 // MetadataId: Limits the selected developer metadata to that which has 4692 // a matching 4693 // DeveloperMetadata.metadata_id. 4694 MetadataId int64 `json:"metadataId,omitempty"` 4695 4696 // MetadataKey: Limits the selected developer metadata to that which has 4697 // a matching 4698 // DeveloperMetadata.metadata_key. 4699 MetadataKey string `json:"metadataKey,omitempty"` 4700 4701 // MetadataLocation: Limits the selected developer metadata to those 4702 // entries associated with 4703 // the specified location. This field either matches exact locations or 4704 // all 4705 // intersecting locations according the 4706 // specified 4707 // locationMatchingStrategy. 4708 MetadataLocation *DeveloperMetadataLocation `json:"metadataLocation,omitempty"` 4709 4710 // MetadataValue: Limits the selected developer metadata to that which 4711 // has a matching 4712 // DeveloperMetadata.metadata_value. 4713 MetadataValue string `json:"metadataValue,omitempty"` 4714 4715 // Visibility: Limits the selected developer metadata to that which has 4716 // a matching 4717 // DeveloperMetadata.visibility. If left unspecified, all 4718 // developer 4719 // metadata visibile to the requesting project is considered. 4720 // 4721 // Possible values: 4722 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 4723 // "DOCUMENT" - Document-visible metadata is accessible from any 4724 // developer project with 4725 // access to the document. 4726 // "PROJECT" - Project-visible metadata is only visible to and 4727 // accessible by the developer 4728 // project that created the metadata. 4729 Visibility string `json:"visibility,omitempty"` 4730 4731 // ForceSendFields is a list of field names (e.g. 4732 // "LocationMatchingStrategy") to unconditionally include in API 4733 // requests. By default, fields with empty values are omitted from API 4734 // requests. However, any non-pointer, non-interface field appearing in 4735 // ForceSendFields will be sent to the server regardless of whether the 4736 // field is empty or not. This may be used to include empty fields in 4737 // Patch requests. 4738 ForceSendFields []string `json:"-"` 4739 4740 // NullFields is a list of field names (e.g. "LocationMatchingStrategy") 4741 // to include in API requests with the JSON null value. By default, 4742 // fields with empty values are omitted from API requests. However, any 4743 // field with an empty value appearing in NullFields will be sent to the 4744 // server as null. It is an error if a field in this list has a 4745 // non-empty value. This may be used to include null fields in Patch 4746 // requests. 4747 NullFields []string `json:"-"` 4748} 4749 4750func (s *DeveloperMetadataLookup) MarshalJSON() ([]byte, error) { 4751 type NoMethod DeveloperMetadataLookup 4752 raw := NoMethod(*s) 4753 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4754} 4755 4756// DimensionGroup: A group over an interval of rows or columns on a 4757// sheet, which can contain or 4758// be contained within other groups. A group can be collapsed or 4759// expanded as a 4760// unit on the sheet. 4761type DimensionGroup struct { 4762 // Collapsed: This field is true if this group is collapsed. A collapsed 4763 // group remains 4764 // collapsed if an overlapping group at a shallower depth is 4765 // expanded. 4766 // 4767 // A true value does not imply that all dimensions within the group 4768 // are 4769 // hidden, since a dimension's visibility can change independently from 4770 // this 4771 // group property. However, when this property is updated, all 4772 // dimensions 4773 // within it are set to hidden if this field is true, or set to visible 4774 // if 4775 // this field is false. 4776 Collapsed bool `json:"collapsed,omitempty"` 4777 4778 // Depth: The depth of the group, representing how many groups have a 4779 // range that 4780 // wholly contains the range of this group. 4781 Depth int64 `json:"depth,omitempty"` 4782 4783 // Range: The range over which this group exists. 4784 Range *DimensionRange `json:"range,omitempty"` 4785 4786 // ForceSendFields is a list of field names (e.g. "Collapsed") to 4787 // unconditionally include in API requests. By default, fields with 4788 // empty values are omitted from API requests. However, any non-pointer, 4789 // non-interface field appearing in ForceSendFields will be sent to the 4790 // server regardless of whether the field is empty or not. This may be 4791 // used to include empty fields in Patch requests. 4792 ForceSendFields []string `json:"-"` 4793 4794 // NullFields is a list of field names (e.g. "Collapsed") to include in 4795 // API requests with the JSON null value. By default, fields with empty 4796 // values are omitted from API requests. However, any field with an 4797 // empty value appearing in NullFields will be sent to the server as 4798 // null. It is an error if a field in this list has a non-empty value. 4799 // This may be used to include null fields in Patch requests. 4800 NullFields []string `json:"-"` 4801} 4802 4803func (s *DimensionGroup) MarshalJSON() ([]byte, error) { 4804 type NoMethod DimensionGroup 4805 raw := NoMethod(*s) 4806 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4807} 4808 4809// DimensionProperties: Properties about a dimension. 4810type DimensionProperties struct { 4811 // DeveloperMetadata: The developer metadata associated with a single 4812 // row or column. 4813 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 4814 4815 // HiddenByFilter: True if this dimension is being filtered. 4816 // This field is read-only. 4817 HiddenByFilter bool `json:"hiddenByFilter,omitempty"` 4818 4819 // HiddenByUser: True if this dimension is explicitly hidden. 4820 HiddenByUser bool `json:"hiddenByUser,omitempty"` 4821 4822 // PixelSize: The height (if a row) or width (if a column) of the 4823 // dimension in pixels. 4824 PixelSize int64 `json:"pixelSize,omitempty"` 4825 4826 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 4827 // to unconditionally include in API requests. By default, fields with 4828 // empty values are omitted from API requests. However, any non-pointer, 4829 // non-interface field appearing in ForceSendFields will be sent to the 4830 // server regardless of whether the field is empty or not. This may be 4831 // used to include empty fields in Patch requests. 4832 ForceSendFields []string `json:"-"` 4833 4834 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 4835 // include in API requests with the JSON null value. By default, fields 4836 // with empty values are omitted from API requests. However, any field 4837 // with an empty value appearing in NullFields will be sent to the 4838 // server as null. It is an error if a field in this list has a 4839 // non-empty value. This may be used to include null fields in Patch 4840 // requests. 4841 NullFields []string `json:"-"` 4842} 4843 4844func (s *DimensionProperties) MarshalJSON() ([]byte, error) { 4845 type NoMethod DimensionProperties 4846 raw := NoMethod(*s) 4847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4848} 4849 4850// DimensionRange: A range along a single dimension on a sheet. 4851// All indexes are zero-based. 4852// Indexes are half open: the start index is inclusive 4853// and the end index is exclusive. 4854// Missing indexes indicate the range is unbounded on that side. 4855type DimensionRange struct { 4856 // Dimension: The dimension of the span. 4857 // 4858 // Possible values: 4859 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 4860 // "ROWS" - Operates on the rows of a sheet. 4861 // "COLUMNS" - Operates on the columns of a sheet. 4862 Dimension string `json:"dimension,omitempty"` 4863 4864 // EndIndex: The end (exclusive) of the span, or not set if unbounded. 4865 EndIndex int64 `json:"endIndex,omitempty"` 4866 4867 // SheetId: The sheet this span is on. 4868 SheetId int64 `json:"sheetId,omitempty"` 4869 4870 // StartIndex: The start (inclusive) of the span, or not set if 4871 // unbounded. 4872 StartIndex int64 `json:"startIndex,omitempty"` 4873 4874 // ForceSendFields is a list of field names (e.g. "Dimension") to 4875 // unconditionally include in API requests. By default, fields with 4876 // empty values are omitted from API requests. However, any non-pointer, 4877 // non-interface field appearing in ForceSendFields will be sent to the 4878 // server regardless of whether the field is empty or not. This may be 4879 // used to include empty fields in Patch requests. 4880 ForceSendFields []string `json:"-"` 4881 4882 // NullFields is a list of field names (e.g. "Dimension") to include in 4883 // API requests with the JSON null value. By default, fields with empty 4884 // values are omitted from API requests. However, any field with an 4885 // empty value appearing in NullFields will be sent to the server as 4886 // null. It is an error if a field in this list has a non-empty value. 4887 // This may be used to include null fields in Patch requests. 4888 NullFields []string `json:"-"` 4889} 4890 4891func (s *DimensionRange) MarshalJSON() ([]byte, error) { 4892 type NoMethod DimensionRange 4893 raw := NoMethod(*s) 4894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4895} 4896 4897// DuplicateFilterViewRequest: Duplicates a particular filter view. 4898type DuplicateFilterViewRequest struct { 4899 // FilterId: The ID of the filter being duplicated. 4900 FilterId int64 `json:"filterId,omitempty"` 4901 4902 // ForceSendFields is a list of field names (e.g. "FilterId") to 4903 // unconditionally include in API requests. By default, fields with 4904 // empty values are omitted from API requests. However, any non-pointer, 4905 // non-interface field appearing in ForceSendFields will be sent to the 4906 // server regardless of whether the field is empty or not. This may be 4907 // used to include empty fields in Patch requests. 4908 ForceSendFields []string `json:"-"` 4909 4910 // NullFields is a list of field names (e.g. "FilterId") to include in 4911 // API requests with the JSON null value. By default, fields with empty 4912 // values are omitted from API requests. However, any field with an 4913 // empty value appearing in NullFields will be sent to the server as 4914 // null. It is an error if a field in this list has a non-empty value. 4915 // This may be used to include null fields in Patch requests. 4916 NullFields []string `json:"-"` 4917} 4918 4919func (s *DuplicateFilterViewRequest) MarshalJSON() ([]byte, error) { 4920 type NoMethod DuplicateFilterViewRequest 4921 raw := NoMethod(*s) 4922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4923} 4924 4925// DuplicateFilterViewResponse: The result of a filter view being 4926// duplicated. 4927type DuplicateFilterViewResponse struct { 4928 // Filter: The newly created filter. 4929 Filter *FilterView `json:"filter,omitempty"` 4930 4931 // ForceSendFields is a list of field names (e.g. "Filter") to 4932 // unconditionally include in API requests. By default, fields with 4933 // empty values are omitted from API requests. However, any non-pointer, 4934 // non-interface field appearing in ForceSendFields will be sent to the 4935 // server regardless of whether the field is empty or not. This may be 4936 // used to include empty fields in Patch requests. 4937 ForceSendFields []string `json:"-"` 4938 4939 // NullFields is a list of field names (e.g. "Filter") to include in API 4940 // requests with the JSON null value. By default, fields with empty 4941 // values are omitted from API requests. However, any field with an 4942 // empty value appearing in NullFields will be sent to the server as 4943 // null. It is an error if a field in this list has a non-empty value. 4944 // This may be used to include null fields in Patch requests. 4945 NullFields []string `json:"-"` 4946} 4947 4948func (s *DuplicateFilterViewResponse) MarshalJSON() ([]byte, error) { 4949 type NoMethod DuplicateFilterViewResponse 4950 raw := NoMethod(*s) 4951 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4952} 4953 4954// DuplicateSheetRequest: Duplicates the contents of a sheet. 4955type DuplicateSheetRequest struct { 4956 // InsertSheetIndex: The zero-based index where the new sheet should be 4957 // inserted. 4958 // The index of all sheets after this are incremented. 4959 InsertSheetIndex int64 `json:"insertSheetIndex,omitempty"` 4960 4961 // NewSheetId: If set, the ID of the new sheet. If not set, an ID is 4962 // chosen. 4963 // If set, the ID must not conflict with any existing sheet ID. 4964 // If set, it must be non-negative. 4965 NewSheetId int64 `json:"newSheetId,omitempty"` 4966 4967 // NewSheetName: The name of the new sheet. If empty, a new name is 4968 // chosen for you. 4969 NewSheetName string `json:"newSheetName,omitempty"` 4970 4971 // SourceSheetId: The sheet to duplicate. 4972 SourceSheetId int64 `json:"sourceSheetId,omitempty"` 4973 4974 // ForceSendFields is a list of field names (e.g. "InsertSheetIndex") to 4975 // unconditionally include in API requests. By default, fields with 4976 // empty values are omitted from API requests. However, any non-pointer, 4977 // non-interface field appearing in ForceSendFields will be sent to the 4978 // server regardless of whether the field is empty or not. This may be 4979 // used to include empty fields in Patch requests. 4980 ForceSendFields []string `json:"-"` 4981 4982 // NullFields is a list of field names (e.g. "InsertSheetIndex") to 4983 // include in API requests with the JSON null value. By default, fields 4984 // with empty values are omitted from API requests. However, any field 4985 // with an empty value appearing in NullFields will be sent to the 4986 // server as null. It is an error if a field in this list has a 4987 // non-empty value. This may be used to include null fields in Patch 4988 // requests. 4989 NullFields []string `json:"-"` 4990} 4991 4992func (s *DuplicateSheetRequest) MarshalJSON() ([]byte, error) { 4993 type NoMethod DuplicateSheetRequest 4994 raw := NoMethod(*s) 4995 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4996} 4997 4998// DuplicateSheetResponse: The result of duplicating a sheet. 4999type DuplicateSheetResponse struct { 5000 // Properties: The properties of the duplicate sheet. 5001 Properties *SheetProperties `json:"properties,omitempty"` 5002 5003 // ForceSendFields is a list of field names (e.g. "Properties") to 5004 // unconditionally include in API requests. By default, fields with 5005 // empty values are omitted from API requests. However, any non-pointer, 5006 // non-interface field appearing in ForceSendFields will be sent to the 5007 // server regardless of whether the field is empty or not. This may be 5008 // used to include empty fields in Patch requests. 5009 ForceSendFields []string `json:"-"` 5010 5011 // NullFields is a list of field names (e.g. "Properties") to include in 5012 // API requests with the JSON null value. By default, fields with empty 5013 // values are omitted from API requests. However, any field with an 5014 // empty value appearing in NullFields will be sent to the server as 5015 // null. It is an error if a field in this list has a non-empty value. 5016 // This may be used to include null fields in Patch requests. 5017 NullFields []string `json:"-"` 5018} 5019 5020func (s *DuplicateSheetResponse) MarshalJSON() ([]byte, error) { 5021 type NoMethod DuplicateSheetResponse 5022 raw := NoMethod(*s) 5023 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5024} 5025 5026// Editors: The editors of a protected range. 5027type Editors struct { 5028 // DomainUsersCanEdit: True if anyone in the document's domain has edit 5029 // access to the protected 5030 // range. Domain protection is only supported on documents within a 5031 // domain. 5032 DomainUsersCanEdit bool `json:"domainUsersCanEdit,omitempty"` 5033 5034 // Groups: The email addresses of groups with edit access to the 5035 // protected range. 5036 Groups []string `json:"groups,omitempty"` 5037 5038 // Users: The email addresses of users with edit access to the protected 5039 // range. 5040 Users []string `json:"users,omitempty"` 5041 5042 // ForceSendFields is a list of field names (e.g. "DomainUsersCanEdit") 5043 // to unconditionally include in API requests. By default, fields with 5044 // empty values are omitted from API requests. However, any non-pointer, 5045 // non-interface field appearing in ForceSendFields will be sent to the 5046 // server regardless of whether the field is empty or not. This may be 5047 // used to include empty fields in Patch requests. 5048 ForceSendFields []string `json:"-"` 5049 5050 // NullFields is a list of field names (e.g. "DomainUsersCanEdit") to 5051 // include in API requests with the JSON null value. By default, fields 5052 // with empty values are omitted from API requests. However, any field 5053 // with an empty value appearing in NullFields will be sent to the 5054 // server as null. It is an error if a field in this list has a 5055 // non-empty value. This may be used to include null fields in Patch 5056 // requests. 5057 NullFields []string `json:"-"` 5058} 5059 5060func (s *Editors) MarshalJSON() ([]byte, error) { 5061 type NoMethod Editors 5062 raw := NoMethod(*s) 5063 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5064} 5065 5066// EmbeddedChart: A chart embedded in a sheet. 5067type EmbeddedChart struct { 5068 // ChartId: The ID of the chart. 5069 ChartId int64 `json:"chartId,omitempty"` 5070 5071 // Position: The position of the chart. 5072 Position *EmbeddedObjectPosition `json:"position,omitempty"` 5073 5074 // Spec: The specification of the chart. 5075 Spec *ChartSpec `json:"spec,omitempty"` 5076 5077 // ForceSendFields is a list of field names (e.g. "ChartId") to 5078 // unconditionally include in API requests. By default, fields with 5079 // empty values are omitted from API requests. However, any non-pointer, 5080 // non-interface field appearing in ForceSendFields will be sent to the 5081 // server regardless of whether the field is empty or not. This may be 5082 // used to include empty fields in Patch requests. 5083 ForceSendFields []string `json:"-"` 5084 5085 // NullFields is a list of field names (e.g. "ChartId") to include in 5086 // API requests with the JSON null value. By default, fields with empty 5087 // values are omitted from API requests. However, any field with an 5088 // empty value appearing in NullFields will be sent to the server as 5089 // null. It is an error if a field in this list has a non-empty value. 5090 // This may be used to include null fields in Patch requests. 5091 NullFields []string `json:"-"` 5092} 5093 5094func (s *EmbeddedChart) MarshalJSON() ([]byte, error) { 5095 type NoMethod EmbeddedChart 5096 raw := NoMethod(*s) 5097 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5098} 5099 5100// EmbeddedObjectPosition: The position of an embedded object such as a 5101// chart. 5102type EmbeddedObjectPosition struct { 5103 // NewSheet: If true, the embedded object is put on a new sheet whose 5104 // ID 5105 // is chosen for you. Used only when writing. 5106 NewSheet bool `json:"newSheet,omitempty"` 5107 5108 // OverlayPosition: The position at which the object is overlaid on top 5109 // of a grid. 5110 OverlayPosition *OverlayPosition `json:"overlayPosition,omitempty"` 5111 5112 // SheetId: The sheet this is on. Set only if the embedded object 5113 // is on its own sheet. Must be non-negative. 5114 SheetId int64 `json:"sheetId,omitempty"` 5115 5116 // ForceSendFields is a list of field names (e.g. "NewSheet") to 5117 // unconditionally include in API requests. By default, fields with 5118 // empty values are omitted from API requests. However, any non-pointer, 5119 // non-interface field appearing in ForceSendFields will be sent to the 5120 // server regardless of whether the field is empty or not. This may be 5121 // used to include empty fields in Patch requests. 5122 ForceSendFields []string `json:"-"` 5123 5124 // NullFields is a list of field names (e.g. "NewSheet") to include in 5125 // API requests with the JSON null value. By default, fields with empty 5126 // values are omitted from API requests. However, any field with an 5127 // empty value appearing in NullFields will be sent to the server as 5128 // null. It is an error if a field in this list has a non-empty value. 5129 // This may be used to include null fields in Patch requests. 5130 NullFields []string `json:"-"` 5131} 5132 5133func (s *EmbeddedObjectPosition) MarshalJSON() ([]byte, error) { 5134 type NoMethod EmbeddedObjectPosition 5135 raw := NoMethod(*s) 5136 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5137} 5138 5139// ErrorValue: An error in a cell. 5140type ErrorValue struct { 5141 // Message: A message with more information about the error 5142 // (in the spreadsheet's locale). 5143 Message string `json:"message,omitempty"` 5144 5145 // Type: The type of error. 5146 // 5147 // Possible values: 5148 // "ERROR_TYPE_UNSPECIFIED" - The default error type, do not use this. 5149 // "ERROR" - Corresponds to the `#ERROR!` error. 5150 // "NULL_VALUE" - Corresponds to the `#NULL!` error. 5151 // "DIVIDE_BY_ZERO" - Corresponds to the `#DIV/0` error. 5152 // "VALUE" - Corresponds to the `#VALUE!` error. 5153 // "REF" - Corresponds to the `#REF!` error. 5154 // "NAME" - Corresponds to the `#NAME?` error. 5155 // "NUM" - Corresponds to the `#NUM`! error. 5156 // "N_A" - Corresponds to the `#N/A` error. 5157 // "LOADING" - Corresponds to the `Loading...` state. 5158 Type string `json:"type,omitempty"` 5159 5160 // ForceSendFields is a list of field names (e.g. "Message") to 5161 // unconditionally include in API requests. By default, fields with 5162 // empty values are omitted from API requests. However, any non-pointer, 5163 // non-interface field appearing in ForceSendFields will be sent to the 5164 // server regardless of whether the field is empty or not. This may be 5165 // used to include empty fields in Patch requests. 5166 ForceSendFields []string `json:"-"` 5167 5168 // NullFields is a list of field names (e.g. "Message") to include in 5169 // API requests with the JSON null value. By default, fields with empty 5170 // values are omitted from API requests. However, any field with an 5171 // empty value appearing in NullFields will be sent to the server as 5172 // null. It is an error if a field in this list has a non-empty value. 5173 // This may be used to include null fields in Patch requests. 5174 NullFields []string `json:"-"` 5175} 5176 5177func (s *ErrorValue) MarshalJSON() ([]byte, error) { 5178 type NoMethod ErrorValue 5179 raw := NoMethod(*s) 5180 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5181} 5182 5183// ExtendedValue: The kinds of value that a cell in a spreadsheet can 5184// have. 5185type ExtendedValue struct { 5186 // BoolValue: Represents a boolean value. 5187 BoolValue bool `json:"boolValue,omitempty"` 5188 5189 // ErrorValue: Represents an error. 5190 // This field is read-only. 5191 ErrorValue *ErrorValue `json:"errorValue,omitempty"` 5192 5193 // FormulaValue: Represents a formula. 5194 FormulaValue string `json:"formulaValue,omitempty"` 5195 5196 // NumberValue: Represents a double value. 5197 // Note: Dates, Times and DateTimes are represented as doubles 5198 // in 5199 // "serial number" format. 5200 NumberValue float64 `json:"numberValue,omitempty"` 5201 5202 // StringValue: Represents a string value. 5203 // Leading single quotes are not included. For example, if the user 5204 // typed 5205 // `'123` into the UI, this would be represented as a `stringValue` 5206 // of 5207 // "123". 5208 StringValue string `json:"stringValue,omitempty"` 5209 5210 // ForceSendFields is a list of field names (e.g. "BoolValue") to 5211 // unconditionally include in API requests. By default, fields with 5212 // empty values are omitted from API requests. However, any non-pointer, 5213 // non-interface field appearing in ForceSendFields will be sent to the 5214 // server regardless of whether the field is empty or not. This may be 5215 // used to include empty fields in Patch requests. 5216 ForceSendFields []string `json:"-"` 5217 5218 // NullFields is a list of field names (e.g. "BoolValue") to include in 5219 // API requests with the JSON null value. By default, fields with empty 5220 // values are omitted from API requests. However, any field with an 5221 // empty value appearing in NullFields will be sent to the server as 5222 // null. It is an error if a field in this list has a non-empty value. 5223 // This may be used to include null fields in Patch requests. 5224 NullFields []string `json:"-"` 5225} 5226 5227func (s *ExtendedValue) MarshalJSON() ([]byte, error) { 5228 type NoMethod ExtendedValue 5229 raw := NoMethod(*s) 5230 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5231} 5232 5233func (s *ExtendedValue) UnmarshalJSON(data []byte) error { 5234 type NoMethod ExtendedValue 5235 var s1 struct { 5236 NumberValue gensupport.JSONFloat64 `json:"numberValue"` 5237 *NoMethod 5238 } 5239 s1.NoMethod = (*NoMethod)(s) 5240 if err := json.Unmarshal(data, &s1); err != nil { 5241 return err 5242 } 5243 s.NumberValue = float64(s1.NumberValue) 5244 return nil 5245} 5246 5247// FilterCriteria: Criteria for showing/hiding rows in a filter or 5248// filter view. 5249type FilterCriteria struct { 5250 // Condition: A condition that must be true for values to be 5251 // shown. 5252 // (This does not override hiddenValues -- if a value is listed there, 5253 // it will still be hidden.) 5254 Condition *BooleanCondition `json:"condition,omitempty"` 5255 5256 // HiddenValues: Values that should be hidden. 5257 HiddenValues []string `json:"hiddenValues,omitempty"` 5258 5259 // ForceSendFields is a list of field names (e.g. "Condition") to 5260 // unconditionally include in API requests. By default, fields with 5261 // empty values are omitted from API requests. However, any non-pointer, 5262 // non-interface field appearing in ForceSendFields will be sent to the 5263 // server regardless of whether the field is empty or not. This may be 5264 // used to include empty fields in Patch requests. 5265 ForceSendFields []string `json:"-"` 5266 5267 // NullFields is a list of field names (e.g. "Condition") to include in 5268 // API requests with the JSON null value. By default, fields with empty 5269 // values are omitted from API requests. However, any field with an 5270 // empty value appearing in NullFields will be sent to the server as 5271 // null. It is an error if a field in this list has a non-empty value. 5272 // This may be used to include null fields in Patch requests. 5273 NullFields []string `json:"-"` 5274} 5275 5276func (s *FilterCriteria) MarshalJSON() ([]byte, error) { 5277 type NoMethod FilterCriteria 5278 raw := NoMethod(*s) 5279 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5280} 5281 5282// FilterView: A filter view. 5283type FilterView struct { 5284 // Criteria: The criteria for showing/hiding values per column. 5285 // The map's key is the column index, and the value is the criteria 5286 // for 5287 // that column. 5288 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 5289 5290 // FilterViewId: The ID of the filter view. 5291 FilterViewId int64 `json:"filterViewId,omitempty"` 5292 5293 // NamedRangeId: The named range this filter view is backed by, if 5294 // any. 5295 // 5296 // When writing, only one of range or named_range_id 5297 // may be set. 5298 NamedRangeId string `json:"namedRangeId,omitempty"` 5299 5300 // Range: The range this filter view covers. 5301 // 5302 // When writing, only one of range or named_range_id 5303 // may be set. 5304 Range *GridRange `json:"range,omitempty"` 5305 5306 // SortSpecs: The sort order per column. Later specifications are used 5307 // when values 5308 // are equal in the earlier specifications. 5309 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 5310 5311 // Title: The name of the filter view. 5312 Title string `json:"title,omitempty"` 5313 5314 // ForceSendFields is a list of field names (e.g. "Criteria") 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. "Criteria") 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 *FilterView) MarshalJSON() ([]byte, error) { 5332 type NoMethod FilterView 5333 raw := NoMethod(*s) 5334 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5335} 5336 5337// FindReplaceRequest: Finds and replaces data in cells over a range, 5338// sheet, or all sheets. 5339type FindReplaceRequest struct { 5340 // AllSheets: True to find/replace over all sheets. 5341 AllSheets bool `json:"allSheets,omitempty"` 5342 5343 // Find: The value to search. 5344 Find string `json:"find,omitempty"` 5345 5346 // IncludeFormulas: True if the search should include cells with 5347 // formulas. 5348 // False to skip cells with formulas. 5349 IncludeFormulas bool `json:"includeFormulas,omitempty"` 5350 5351 // MatchCase: True if the search is case sensitive. 5352 MatchCase bool `json:"matchCase,omitempty"` 5353 5354 // MatchEntireCell: True if the find value should match the entire cell. 5355 MatchEntireCell bool `json:"matchEntireCell,omitempty"` 5356 5357 // Range: The range to find/replace over. 5358 Range *GridRange `json:"range,omitempty"` 5359 5360 // Replacement: The value to use as the replacement. 5361 Replacement string `json:"replacement,omitempty"` 5362 5363 // SearchByRegex: True if the find value is a regex. 5364 // The regular expression and replacement should follow Java regex 5365 // rules 5366 // at 5367 // https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. 5368 // The replacement string is allowed to refer to capturing groups. 5369 // For example, if one cell has the contents "Google Sheets" and 5370 // another 5371 // has "Google Docs", then searching for "o.* (.*)" with a 5372 // replacement of 5373 // "$1 Rocks" would change the contents of the cells to 5374 // "GSheets Rocks" and "GDocs Rocks" respectively. 5375 SearchByRegex bool `json:"searchByRegex,omitempty"` 5376 5377 // SheetId: The sheet to find/replace over. 5378 SheetId int64 `json:"sheetId,omitempty"` 5379 5380 // ForceSendFields is a list of field names (e.g. "AllSheets") to 5381 // unconditionally include in API requests. By default, fields with 5382 // empty values are omitted from API requests. However, any non-pointer, 5383 // non-interface field appearing in ForceSendFields will be sent to the 5384 // server regardless of whether the field is empty or not. This may be 5385 // used to include empty fields in Patch requests. 5386 ForceSendFields []string `json:"-"` 5387 5388 // NullFields is a list of field names (e.g. "AllSheets") to include in 5389 // API requests with the JSON null value. By default, fields with empty 5390 // values are omitted from API requests. However, any field with an 5391 // empty value appearing in NullFields will be sent to the server as 5392 // null. It is an error if a field in this list has a non-empty value. 5393 // This may be used to include null fields in Patch requests. 5394 NullFields []string `json:"-"` 5395} 5396 5397func (s *FindReplaceRequest) MarshalJSON() ([]byte, error) { 5398 type NoMethod FindReplaceRequest 5399 raw := NoMethod(*s) 5400 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5401} 5402 5403// FindReplaceResponse: The result of the find/replace. 5404type FindReplaceResponse struct { 5405 // FormulasChanged: The number of formula cells changed. 5406 FormulasChanged int64 `json:"formulasChanged,omitempty"` 5407 5408 // OccurrencesChanged: The number of occurrences (possibly multiple 5409 // within a cell) changed. 5410 // For example, if replacing "e" with "o" in "Google Sheets", this 5411 // would 5412 // be "3" because "Google Sheets" -> "Googlo Shoots". 5413 OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"` 5414 5415 // RowsChanged: The number of rows changed. 5416 RowsChanged int64 `json:"rowsChanged,omitempty"` 5417 5418 // SheetsChanged: The number of sheets changed. 5419 SheetsChanged int64 `json:"sheetsChanged,omitempty"` 5420 5421 // ValuesChanged: The number of non-formula cells changed. 5422 ValuesChanged int64 `json:"valuesChanged,omitempty"` 5423 5424 // ForceSendFields is a list of field names (e.g. "FormulasChanged") to 5425 // unconditionally include in API requests. By default, fields with 5426 // empty values are omitted from API requests. However, any non-pointer, 5427 // non-interface field appearing in ForceSendFields will be sent to the 5428 // server regardless of whether the field is empty or not. This may be 5429 // used to include empty fields in Patch requests. 5430 ForceSendFields []string `json:"-"` 5431 5432 // NullFields is a list of field names (e.g. "FormulasChanged") to 5433 // include in API requests with the JSON null value. By default, fields 5434 // with empty values are omitted from API requests. However, any field 5435 // with an empty value appearing in NullFields will be sent to the 5436 // server as null. It is an error if a field in this list has a 5437 // non-empty value. This may be used to include null fields in Patch 5438 // requests. 5439 NullFields []string `json:"-"` 5440} 5441 5442func (s *FindReplaceResponse) MarshalJSON() ([]byte, error) { 5443 type NoMethod FindReplaceResponse 5444 raw := NoMethod(*s) 5445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5446} 5447 5448// GetSpreadsheetByDataFilterRequest: The request for retrieving a 5449// Spreadsheet. 5450type GetSpreadsheetByDataFilterRequest struct { 5451 // DataFilters: The DataFilters used to select which ranges to retrieve 5452 // from 5453 // the spreadsheet. 5454 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 5455 5456 // IncludeGridData: True if grid data should be returned. 5457 // This parameter is ignored if a field mask was set in the request. 5458 IncludeGridData bool `json:"includeGridData,omitempty"` 5459 5460 // ForceSendFields is a list of field names (e.g. "DataFilters") to 5461 // unconditionally include in API requests. By default, fields with 5462 // empty values are omitted from API requests. However, any non-pointer, 5463 // non-interface field appearing in ForceSendFields will be sent to the 5464 // server regardless of whether the field is empty or not. This may be 5465 // used to include empty fields in Patch requests. 5466 ForceSendFields []string `json:"-"` 5467 5468 // NullFields is a list of field names (e.g. "DataFilters") to include 5469 // in API requests with the JSON null value. By default, fields with 5470 // empty values are omitted from API requests. However, any field with 5471 // an empty value appearing in NullFields will be sent to the server as 5472 // null. It is an error if a field in this list has a non-empty value. 5473 // This may be used to include null fields in Patch requests. 5474 NullFields []string `json:"-"` 5475} 5476 5477func (s *GetSpreadsheetByDataFilterRequest) MarshalJSON() ([]byte, error) { 5478 type NoMethod GetSpreadsheetByDataFilterRequest 5479 raw := NoMethod(*s) 5480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5481} 5482 5483// GradientRule: A rule that applies a gradient color scale format, 5484// based on 5485// the interpolation points listed. The format of a cell will vary 5486// based on its contents as compared to the values of the 5487// interpolation 5488// points. 5489type GradientRule struct { 5490 // Maxpoint: The final interpolation point. 5491 Maxpoint *InterpolationPoint `json:"maxpoint,omitempty"` 5492 5493 // Midpoint: An optional midway interpolation point. 5494 Midpoint *InterpolationPoint `json:"midpoint,omitempty"` 5495 5496 // Minpoint: The starting interpolation point. 5497 Minpoint *InterpolationPoint `json:"minpoint,omitempty"` 5498 5499 // ForceSendFields is a list of field names (e.g. "Maxpoint") to 5500 // unconditionally include in API requests. By default, fields with 5501 // empty values are omitted from API requests. However, any non-pointer, 5502 // non-interface field appearing in ForceSendFields will be sent to the 5503 // server regardless of whether the field is empty or not. This may be 5504 // used to include empty fields in Patch requests. 5505 ForceSendFields []string `json:"-"` 5506 5507 // NullFields is a list of field names (e.g. "Maxpoint") to include in 5508 // API requests with the JSON null value. By default, fields with empty 5509 // values are omitted from API requests. However, any field with an 5510 // empty value appearing in NullFields will be sent to the server as 5511 // null. It is an error if a field in this list has a non-empty value. 5512 // This may be used to include null fields in Patch requests. 5513 NullFields []string `json:"-"` 5514} 5515 5516func (s *GradientRule) MarshalJSON() ([]byte, error) { 5517 type NoMethod GradientRule 5518 raw := NoMethod(*s) 5519 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5520} 5521 5522// GridCoordinate: A coordinate in a sheet. 5523// All indexes are zero-based. 5524type GridCoordinate struct { 5525 // ColumnIndex: The column index of the coordinate. 5526 ColumnIndex int64 `json:"columnIndex,omitempty"` 5527 5528 // RowIndex: The row index of the coordinate. 5529 RowIndex int64 `json:"rowIndex,omitempty"` 5530 5531 // SheetId: The sheet this coordinate is on. 5532 SheetId int64 `json:"sheetId,omitempty"` 5533 5534 // ForceSendFields is a list of field names (e.g. "ColumnIndex") to 5535 // unconditionally include in API requests. By default, fields with 5536 // empty values are omitted from API requests. However, any non-pointer, 5537 // non-interface field appearing in ForceSendFields will be sent to the 5538 // server regardless of whether the field is empty or not. This may be 5539 // used to include empty fields in Patch requests. 5540 ForceSendFields []string `json:"-"` 5541 5542 // NullFields is a list of field names (e.g. "ColumnIndex") to include 5543 // in API requests with the JSON null value. By default, fields with 5544 // empty values are omitted from API requests. However, any field with 5545 // an empty value appearing in NullFields will be sent to the server as 5546 // null. It is an error if a field in this list has a non-empty value. 5547 // This may be used to include null fields in Patch requests. 5548 NullFields []string `json:"-"` 5549} 5550 5551func (s *GridCoordinate) MarshalJSON() ([]byte, error) { 5552 type NoMethod GridCoordinate 5553 raw := NoMethod(*s) 5554 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5555} 5556 5557// GridData: Data in the grid, as well as metadata about the dimensions. 5558type GridData struct { 5559 // ColumnMetadata: Metadata about the requested columns in the grid, 5560 // starting with the column 5561 // in start_column. 5562 ColumnMetadata []*DimensionProperties `json:"columnMetadata,omitempty"` 5563 5564 // RowData: The data in the grid, one entry per row, 5565 // starting with the row in startRow. 5566 // The values in RowData will correspond to columns starting 5567 // at start_column. 5568 RowData []*RowData `json:"rowData,omitempty"` 5569 5570 // RowMetadata: Metadata about the requested rows in the grid, starting 5571 // with the row 5572 // in start_row. 5573 RowMetadata []*DimensionProperties `json:"rowMetadata,omitempty"` 5574 5575 // StartColumn: The first column this GridData refers to, zero-based. 5576 StartColumn int64 `json:"startColumn,omitempty"` 5577 5578 // StartRow: The first row this GridData refers to, zero-based. 5579 StartRow int64 `json:"startRow,omitempty"` 5580 5581 // ForceSendFields is a list of field names (e.g. "ColumnMetadata") to 5582 // unconditionally include in API requests. By default, fields with 5583 // empty values are omitted from API requests. However, any non-pointer, 5584 // non-interface field appearing in ForceSendFields will be sent to the 5585 // server regardless of whether the field is empty or not. This may be 5586 // used to include empty fields in Patch requests. 5587 ForceSendFields []string `json:"-"` 5588 5589 // NullFields is a list of field names (e.g. "ColumnMetadata") to 5590 // include in API requests with the JSON null value. By default, fields 5591 // with empty values are omitted from API requests. However, any field 5592 // with an empty value appearing in NullFields will be sent to the 5593 // server as null. It is an error if a field in this list has a 5594 // non-empty value. This may be used to include null fields in Patch 5595 // requests. 5596 NullFields []string `json:"-"` 5597} 5598 5599func (s *GridData) MarshalJSON() ([]byte, error) { 5600 type NoMethod GridData 5601 raw := NoMethod(*s) 5602 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5603} 5604 5605// GridProperties: Properties of a grid. 5606type GridProperties struct { 5607 // ColumnCount: The number of columns in the grid. 5608 ColumnCount int64 `json:"columnCount,omitempty"` 5609 5610 // ColumnGroupControlAfter: True if the column grouping control toggle 5611 // is shown after the group. 5612 ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"` 5613 5614 // FrozenColumnCount: The number of columns that are frozen in the grid. 5615 FrozenColumnCount int64 `json:"frozenColumnCount,omitempty"` 5616 5617 // FrozenRowCount: The number of rows that are frozen in the grid. 5618 FrozenRowCount int64 `json:"frozenRowCount,omitempty"` 5619 5620 // HideGridlines: True if the grid isn't showing gridlines in the UI. 5621 HideGridlines bool `json:"hideGridlines,omitempty"` 5622 5623 // RowCount: The number of rows in the grid. 5624 RowCount int64 `json:"rowCount,omitempty"` 5625 5626 // RowGroupControlAfter: True if the row grouping control toggle is 5627 // shown after the group. 5628 RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"` 5629 5630 // ForceSendFields is a list of field names (e.g. "ColumnCount") to 5631 // unconditionally include in API requests. By default, fields with 5632 // empty values are omitted from API requests. However, any non-pointer, 5633 // non-interface field appearing in ForceSendFields will be sent to the 5634 // server regardless of whether the field is empty or not. This may be 5635 // used to include empty fields in Patch requests. 5636 ForceSendFields []string `json:"-"` 5637 5638 // NullFields is a list of field names (e.g. "ColumnCount") to include 5639 // in API requests with the JSON null value. By default, fields with 5640 // empty values are omitted from API requests. However, any field with 5641 // an empty value appearing in NullFields will be sent to the server as 5642 // null. It is an error if a field in this list has a non-empty value. 5643 // This may be used to include null fields in Patch requests. 5644 NullFields []string `json:"-"` 5645} 5646 5647func (s *GridProperties) MarshalJSON() ([]byte, error) { 5648 type NoMethod GridProperties 5649 raw := NoMethod(*s) 5650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5651} 5652 5653// GridRange: A range on a sheet. 5654// All indexes are zero-based. 5655// Indexes are half open, e.g the start index is inclusive 5656// and the end index is exclusive -- [start_index, end_index). 5657// Missing indexes indicate the range is unbounded on that side. 5658// 5659// For example, if "Sheet1" is sheet ID 0, then: 5660// 5661// `Sheet1!A1:A1 == sheet_id: 0, 5662// start_row_index: 0, end_row_index: 1, 5663// start_column_index: 0, end_column_index: 1` 5664// 5665// `Sheet1!A3:B4 == sheet_id: 0, 5666// start_row_index: 2, end_row_index: 4, 5667// start_column_index: 0, end_column_index: 2` 5668// 5669// `Sheet1!A:B == sheet_id: 0, 5670// start_column_index: 0, end_column_index: 2` 5671// 5672// `Sheet1!A5:B == sheet_id: 0, 5673// start_row_index: 4, 5674// start_column_index: 0, end_column_index: 2` 5675// 5676// `Sheet1 == sheet_id:0` 5677// 5678// The start index must always be less than or equal to the end 5679// index. 5680// If the start index equals the end index, then the range is 5681// empty. 5682// Empty ranges are typically not meaningful and are usually rendered in 5683// the 5684// UI as `#REF!`. 5685type GridRange struct { 5686 // EndColumnIndex: The end column (exclusive) of the range, or not set 5687 // if unbounded. 5688 EndColumnIndex int64 `json:"endColumnIndex,omitempty"` 5689 5690 // EndRowIndex: The end row (exclusive) of the range, or not set if 5691 // unbounded. 5692 EndRowIndex int64 `json:"endRowIndex,omitempty"` 5693 5694 // SheetId: The sheet this range is on. 5695 SheetId int64 `json:"sheetId,omitempty"` 5696 5697 // StartColumnIndex: The start column (inclusive) of the range, or not 5698 // set if unbounded. 5699 StartColumnIndex int64 `json:"startColumnIndex,omitempty"` 5700 5701 // StartRowIndex: The start row (inclusive) of the range, or not set if 5702 // unbounded. 5703 StartRowIndex int64 `json:"startRowIndex,omitempty"` 5704 5705 // ForceSendFields is a list of field names (e.g. "EndColumnIndex") to 5706 // unconditionally include in API requests. By default, fields with 5707 // empty values are omitted from API requests. However, any non-pointer, 5708 // non-interface field appearing in ForceSendFields will be sent to the 5709 // server regardless of whether the field is empty or not. This may be 5710 // used to include empty fields in Patch requests. 5711 ForceSendFields []string `json:"-"` 5712 5713 // NullFields is a list of field names (e.g. "EndColumnIndex") to 5714 // include in API requests with the JSON null value. By default, fields 5715 // with empty values are omitted from API requests. However, any field 5716 // with an empty value appearing in NullFields will be sent to the 5717 // server as null. It is an error if a field in this list has a 5718 // non-empty value. This may be used to include null fields in Patch 5719 // requests. 5720 NullFields []string `json:"-"` 5721} 5722 5723func (s *GridRange) MarshalJSON() ([]byte, error) { 5724 type NoMethod GridRange 5725 raw := NoMethod(*s) 5726 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5727} 5728 5729// HistogramChartSpec: A <a 5730// href="/chart/interactive/docs/gallery/histogram">histogram 5731// chart</a>. 5732// A histogram chart groups data items into bins, displaying each bin as 5733// a 5734// column of stacked items. Histograms are used to display the 5735// distribution 5736// of a dataset. Each column of items represents a range into which 5737// those 5738// items fall. The number of bins can be chosen automatically or 5739// specified 5740// explicitly. 5741type HistogramChartSpec struct { 5742 // BucketSize: By default the bucket size (the range of values stacked 5743 // in a single 5744 // column) is chosen automatically, but it may be overridden here. 5745 // E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 5746 // 3.0, etc. 5747 // Cannot be negative. 5748 // This field is optional. 5749 BucketSize float64 `json:"bucketSize,omitempty"` 5750 5751 // LegendPosition: The position of the chart legend. 5752 // 5753 // Possible values: 5754 // "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do 5755 // not use. 5756 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 5757 // chart. 5758 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 5759 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 5760 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 5761 // "NO_LEGEND" - No legend is rendered. 5762 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 5763 LegendPosition string `json:"legendPosition,omitempty"` 5764 5765 // OutlierPercentile: The outlier percentile is used to ensure that 5766 // outliers do not adversely 5767 // affect the calculation of bucket sizes. For example, setting an 5768 // outlier 5769 // percentile of 0.05 indicates that the top and bottom 5% of values 5770 // when 5771 // calculating buckets. The values are still included in the chart, 5772 // they will 5773 // be added to the first or last buckets instead of their own 5774 // buckets. 5775 // Must be between 0.0 and 0.5. 5776 OutlierPercentile float64 `json:"outlierPercentile,omitempty"` 5777 5778 // Series: The series for a histogram may be either a single series of 5779 // values to be 5780 // bucketed or multiple series, each of the same length, containing the 5781 // name 5782 // of the series followed by the values to be bucketed for that series. 5783 Series []*HistogramSeries `json:"series,omitempty"` 5784 5785 // ShowItemDividers: Whether horizontal divider lines should be 5786 // displayed between items in each 5787 // column. 5788 ShowItemDividers bool `json:"showItemDividers,omitempty"` 5789 5790 // ForceSendFields is a list of field names (e.g. "BucketSize") to 5791 // unconditionally include in API requests. By default, fields with 5792 // empty values are omitted from API requests. However, any non-pointer, 5793 // non-interface field appearing in ForceSendFields will be sent to the 5794 // server regardless of whether the field is empty or not. This may be 5795 // used to include empty fields in Patch requests. 5796 ForceSendFields []string `json:"-"` 5797 5798 // NullFields is a list of field names (e.g. "BucketSize") to include in 5799 // API requests with the JSON null value. By default, fields with empty 5800 // values are omitted from API requests. However, any field with an 5801 // empty value appearing in NullFields will be sent to the server as 5802 // null. It is an error if a field in this list has a non-empty value. 5803 // This may be used to include null fields in Patch requests. 5804 NullFields []string `json:"-"` 5805} 5806 5807func (s *HistogramChartSpec) MarshalJSON() ([]byte, error) { 5808 type NoMethod HistogramChartSpec 5809 raw := NoMethod(*s) 5810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5811} 5812 5813func (s *HistogramChartSpec) UnmarshalJSON(data []byte) error { 5814 type NoMethod HistogramChartSpec 5815 var s1 struct { 5816 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 5817 OutlierPercentile gensupport.JSONFloat64 `json:"outlierPercentile"` 5818 *NoMethod 5819 } 5820 s1.NoMethod = (*NoMethod)(s) 5821 if err := json.Unmarshal(data, &s1); err != nil { 5822 return err 5823 } 5824 s.BucketSize = float64(s1.BucketSize) 5825 s.OutlierPercentile = float64(s1.OutlierPercentile) 5826 return nil 5827} 5828 5829// HistogramRule: Allows you to organize the numeric values in a source 5830// data column into 5831// buckets of a constant size. All values from HistogramRule.start 5832// to 5833// HistogramRule.end are placed into groups of 5834// size 5835// HistogramRule.interval. In addition, all values 5836// below 5837// HistogramRule.start are placed in one group, and all values 5838// above 5839// HistogramRule.end are placed in another. Only 5840// HistogramRule.interval is required, though if HistogramRule.start 5841// and HistogramRule.end are both provided, HistogramRule.start must 5842// be less than HistogramRule.end. For example, a pivot table 5843// showing 5844// average purchase amount by age that has 50+ rows: 5845// 5846// +-----+-------------------+ 5847// | Age | AVERAGE of Amount | 5848// +-----+-------------------+ 5849// | 16 | $27.13 | 5850// | 17 | $5.24 | 5851// | 18 | $20.15 | 5852// ... 5853// +-----+-------------------+ 5854// could be turned into a pivot table that looks like the one below 5855// by 5856// applying a histogram group rule with a HistogramRule.start of 25, 5857// an HistogramRule.interval of 20, and an HistogramRule.end 5858// of 65. 5859// 5860// +-------------+-------------------+ 5861// | Grouped Age | AVERAGE of Amount | 5862// +-------------+-------------------+ 5863// | < 25 | $19.34 | 5864// | 25-45 | $31.43 | 5865// | 45-65 | $35.87 | 5866// | > 65 | $27.55 | 5867// +-------------+-------------------+ 5868// | Grand Total | $29.12 | 5869// +-------------+-------------------+ 5870type HistogramRule struct { 5871 // End: The maximum value at which items are placed into buckets 5872 // of constant size. Values above end are lumped into a single 5873 // bucket. 5874 // This field is optional. 5875 End float64 `json:"end,omitempty"` 5876 5877 // Interval: The size of the buckets that are created. Must be positive. 5878 Interval float64 `json:"interval,omitempty"` 5879 5880 // Start: The minimum value at which items are placed into buckets 5881 // of constant size. Values below start are lumped into a single 5882 // bucket. 5883 // This field is optional. 5884 Start float64 `json:"start,omitempty"` 5885 5886 // ForceSendFields is a list of field names (e.g. "End") to 5887 // unconditionally include in API requests. By default, fields with 5888 // empty values are omitted from API requests. However, any non-pointer, 5889 // non-interface field appearing in ForceSendFields will be sent to the 5890 // server regardless of whether the field is empty or not. This may be 5891 // used to include empty fields in Patch requests. 5892 ForceSendFields []string `json:"-"` 5893 5894 // NullFields is a list of field names (e.g. "End") to include in API 5895 // requests with the JSON null value. By default, fields with empty 5896 // values are omitted from API requests. However, any field with an 5897 // empty value appearing in NullFields will be sent to the server as 5898 // null. It is an error if a field in this list has a non-empty value. 5899 // This may be used to include null fields in Patch requests. 5900 NullFields []string `json:"-"` 5901} 5902 5903func (s *HistogramRule) MarshalJSON() ([]byte, error) { 5904 type NoMethod HistogramRule 5905 raw := NoMethod(*s) 5906 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5907} 5908 5909func (s *HistogramRule) UnmarshalJSON(data []byte) error { 5910 type NoMethod HistogramRule 5911 var s1 struct { 5912 End gensupport.JSONFloat64 `json:"end"` 5913 Interval gensupport.JSONFloat64 `json:"interval"` 5914 Start gensupport.JSONFloat64 `json:"start"` 5915 *NoMethod 5916 } 5917 s1.NoMethod = (*NoMethod)(s) 5918 if err := json.Unmarshal(data, &s1); err != nil { 5919 return err 5920 } 5921 s.End = float64(s1.End) 5922 s.Interval = float64(s1.Interval) 5923 s.Start = float64(s1.Start) 5924 return nil 5925} 5926 5927// HistogramSeries: A histogram series containing the series color and 5928// data. 5929type HistogramSeries struct { 5930 // BarColor: The color of the column representing this series in each 5931 // bucket. 5932 // This field is optional. 5933 BarColor *Color `json:"barColor,omitempty"` 5934 5935 // Data: The data for this histogram series. 5936 Data *ChartData `json:"data,omitempty"` 5937 5938 // ForceSendFields is a list of field names (e.g. "BarColor") to 5939 // unconditionally include in API requests. By default, fields with 5940 // empty values are omitted from API requests. However, any non-pointer, 5941 // non-interface field appearing in ForceSendFields will be sent to the 5942 // server regardless of whether the field is empty or not. This may be 5943 // used to include empty fields in Patch requests. 5944 ForceSendFields []string `json:"-"` 5945 5946 // NullFields is a list of field names (e.g. "BarColor") to include in 5947 // API requests with the JSON null value. By default, fields with empty 5948 // values are omitted from API requests. However, any field with an 5949 // empty value appearing in NullFields will be sent to the server as 5950 // null. It is an error if a field in this list has a non-empty value. 5951 // This may be used to include null fields in Patch requests. 5952 NullFields []string `json:"-"` 5953} 5954 5955func (s *HistogramSeries) MarshalJSON() ([]byte, error) { 5956 type NoMethod HistogramSeries 5957 raw := NoMethod(*s) 5958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5959} 5960 5961// InsertDimensionRequest: Inserts rows or columns in a sheet at a 5962// particular index. 5963type InsertDimensionRequest struct { 5964 // InheritFromBefore: Whether dimension properties should be extended 5965 // from the dimensions 5966 // before or after the newly inserted dimensions. 5967 // True to inherit from the dimensions before (in which case the 5968 // start 5969 // index must be greater than 0), and false to inherit from the 5970 // dimensions 5971 // after. 5972 // 5973 // For example, if row index 0 has red background and row index 1 5974 // has a green background, then inserting 2 rows at index 1 can 5975 // inherit 5976 // either the green or red background. If `inheritFromBefore` is 5977 // true, 5978 // the two new rows will be red (because the row before the insertion 5979 // point 5980 // was red), whereas if `inheritFromBefore` is false, the two new rows 5981 // will 5982 // be green (because the row after the insertion point was green). 5983 InheritFromBefore bool `json:"inheritFromBefore,omitempty"` 5984 5985 // Range: The dimensions to insert. Both the start and end indexes must 5986 // be bounded. 5987 Range *DimensionRange `json:"range,omitempty"` 5988 5989 // ForceSendFields is a list of field names (e.g. "InheritFromBefore") 5990 // to unconditionally include in API requests. By default, fields with 5991 // empty values are omitted from API requests. However, any non-pointer, 5992 // non-interface field appearing in ForceSendFields will be sent to the 5993 // server regardless of whether the field is empty or not. This may be 5994 // used to include empty fields in Patch requests. 5995 ForceSendFields []string `json:"-"` 5996 5997 // NullFields is a list of field names (e.g. "InheritFromBefore") to 5998 // include in API requests with the JSON null value. By default, fields 5999 // with empty values are omitted from API requests. However, any field 6000 // with an empty value appearing in NullFields will be sent to the 6001 // server as null. It is an error if a field in this list has a 6002 // non-empty value. This may be used to include null fields in Patch 6003 // requests. 6004 NullFields []string `json:"-"` 6005} 6006 6007func (s *InsertDimensionRequest) MarshalJSON() ([]byte, error) { 6008 type NoMethod InsertDimensionRequest 6009 raw := NoMethod(*s) 6010 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6011} 6012 6013// InsertRangeRequest: Inserts cells into a range, shifting the existing 6014// cells over or down. 6015type InsertRangeRequest struct { 6016 // Range: The range to insert new cells into. 6017 Range *GridRange `json:"range,omitempty"` 6018 6019 // ShiftDimension: The dimension which will be shifted when inserting 6020 // cells. 6021 // If ROWS, existing cells will be shifted down. 6022 // If COLUMNS, existing cells will be shifted right. 6023 // 6024 // Possible values: 6025 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 6026 // "ROWS" - Operates on the rows of a sheet. 6027 // "COLUMNS" - Operates on the columns of a sheet. 6028 ShiftDimension string `json:"shiftDimension,omitempty"` 6029 6030 // ForceSendFields is a list of field names (e.g. "Range") to 6031 // unconditionally include in API requests. By default, fields with 6032 // empty values are omitted from API requests. However, any non-pointer, 6033 // non-interface field appearing in ForceSendFields will be sent to the 6034 // server regardless of whether the field is empty or not. This may be 6035 // used to include empty fields in Patch requests. 6036 ForceSendFields []string `json:"-"` 6037 6038 // NullFields is a list of field names (e.g. "Range") to include in API 6039 // requests with the JSON null value. By default, fields with empty 6040 // values are omitted from API requests. However, any field with an 6041 // empty value appearing in NullFields will be sent to the server as 6042 // null. It is an error if a field in this list has a non-empty value. 6043 // This may be used to include null fields in Patch requests. 6044 NullFields []string `json:"-"` 6045} 6046 6047func (s *InsertRangeRequest) MarshalJSON() ([]byte, error) { 6048 type NoMethod InsertRangeRequest 6049 raw := NoMethod(*s) 6050 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6051} 6052 6053// InterpolationPoint: A single interpolation point on a gradient 6054// conditional format. 6055// These pin the gradient color scale according to the color, 6056// type and value chosen. 6057type InterpolationPoint struct { 6058 // Color: The color this interpolation point should use. 6059 Color *Color `json:"color,omitempty"` 6060 6061 // Type: How the value should be interpreted. 6062 // 6063 // Possible values: 6064 // "INTERPOLATION_POINT_TYPE_UNSPECIFIED" - The default value, do not 6065 // use. 6066 // "MIN" - The interpolation point uses the minimum value in the 6067 // cells over the range of the conditional format. 6068 // "MAX" - The interpolation point uses the maximum value in the 6069 // cells over the range of the conditional format. 6070 // "NUMBER" - The interpolation point uses exactly the value 6071 // in 6072 // InterpolationPoint.value. 6073 // "PERCENT" - The interpolation point is the given percentage 6074 // over 6075 // all the cells in the range of the conditional format. 6076 // This is equivalent to NUMBER if the value was: 6077 // `=(MAX(FLATTEN(range)) * (value / 100)) 6078 // + (MIN(FLATTEN(range)) * (1 - (value / 100)))` 6079 // (where errors in the range are ignored when flattening). 6080 // "PERCENTILE" - The interpolation point is the given percentile 6081 // over all the cells in the range of the conditional format. 6082 // This is equivalent to NUMBER if the value 6083 // was: 6084 // `=PERCENTILE(FLATTEN(range), value / 100)` 6085 // (where errors in the range are ignored when flattening). 6086 Type string `json:"type,omitempty"` 6087 6088 // Value: The value this interpolation point uses. May be a 6089 // formula. 6090 // Unused if type is MIN or 6091 // MAX. 6092 Value string `json:"value,omitempty"` 6093 6094 // ForceSendFields is a list of field names (e.g. "Color") to 6095 // unconditionally include in API requests. By default, fields with 6096 // empty values are omitted from API requests. However, any non-pointer, 6097 // non-interface field appearing in ForceSendFields will be sent to the 6098 // server regardless of whether the field is empty or not. This may be 6099 // used to include empty fields in Patch requests. 6100 ForceSendFields []string `json:"-"` 6101 6102 // NullFields is a list of field names (e.g. "Color") to include in API 6103 // requests with the JSON null value. By default, fields with empty 6104 // values are omitted from API requests. However, any field with an 6105 // empty value appearing in NullFields will be sent to the server as 6106 // null. It is an error if a field in this list has a non-empty value. 6107 // This may be used to include null fields in Patch requests. 6108 NullFields []string `json:"-"` 6109} 6110 6111func (s *InterpolationPoint) MarshalJSON() ([]byte, error) { 6112 type NoMethod InterpolationPoint 6113 raw := NoMethod(*s) 6114 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6115} 6116 6117// IterativeCalculationSettings: Settings to control how circular 6118// dependencies are resolved with iterative 6119// calculation. 6120type IterativeCalculationSettings struct { 6121 // ConvergenceThreshold: When iterative calculation is enabled and 6122 // successive results differ by 6123 // less than this threshold value, the calculation rounds stop. 6124 ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"` 6125 6126 // MaxIterations: When iterative calculation is enabled, the maximum 6127 // number of calculation 6128 // rounds to perform. 6129 MaxIterations int64 `json:"maxIterations,omitempty"` 6130 6131 // ForceSendFields is a list of field names (e.g. 6132 // "ConvergenceThreshold") to unconditionally include in API requests. 6133 // By default, fields with empty values are omitted from API requests. 6134 // However, any non-pointer, non-interface field appearing in 6135 // ForceSendFields will be sent to the server regardless of whether the 6136 // field is empty or not. This may be used to include empty fields in 6137 // Patch requests. 6138 ForceSendFields []string `json:"-"` 6139 6140 // NullFields is a list of field names (e.g. "ConvergenceThreshold") to 6141 // include in API requests with the JSON null value. By default, fields 6142 // with empty values are omitted from API requests. However, any field 6143 // with an empty value appearing in NullFields will be sent to the 6144 // server as null. It is an error if a field in this list has a 6145 // non-empty value. This may be used to include null fields in Patch 6146 // requests. 6147 NullFields []string `json:"-"` 6148} 6149 6150func (s *IterativeCalculationSettings) MarshalJSON() ([]byte, error) { 6151 type NoMethod IterativeCalculationSettings 6152 raw := NoMethod(*s) 6153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6154} 6155 6156func (s *IterativeCalculationSettings) UnmarshalJSON(data []byte) error { 6157 type NoMethod IterativeCalculationSettings 6158 var s1 struct { 6159 ConvergenceThreshold gensupport.JSONFloat64 `json:"convergenceThreshold"` 6160 *NoMethod 6161 } 6162 s1.NoMethod = (*NoMethod)(s) 6163 if err := json.Unmarshal(data, &s1); err != nil { 6164 return err 6165 } 6166 s.ConvergenceThreshold = float64(s1.ConvergenceThreshold) 6167 return nil 6168} 6169 6170// LineStyle: Properties that describe the style of a line. 6171type LineStyle struct { 6172 // Type: The dash type of the line. 6173 // 6174 // Possible values: 6175 // "LINE_DASH_TYPE_UNSPECIFIED" - Default value, do not use. 6176 // "INVISIBLE" - No dash type, which is equivalent to a non-visible 6177 // line. 6178 // "CUSTOM" - A custom dash for a line. Modifying the exact custom 6179 // dash style is 6180 // currently unsupported. 6181 // "SOLID" - A solid line. 6182 // "DOTTED" - A dotted line. 6183 // "MEDIUM_DASHED" - A dashed line where the dashes have "medium" 6184 // length. 6185 // "MEDIUM_DASHED_DOTTED" - A line that alternates between a "medium" 6186 // dash and a dot. 6187 // "LONG_DASHED" - A dashed line where the dashes have "long" length. 6188 // "LONG_DASHED_DOTTED" - A line that alternates between a "long" dash 6189 // and a dot. 6190 Type string `json:"type,omitempty"` 6191 6192 // Width: The thickness of the line, in px. 6193 Width int64 `json:"width,omitempty"` 6194 6195 // ForceSendFields is a list of field names (e.g. "Type") to 6196 // unconditionally include in API requests. By default, fields with 6197 // empty values are omitted from API requests. However, any non-pointer, 6198 // non-interface field appearing in ForceSendFields will be sent to the 6199 // server regardless of whether the field is empty or not. This may be 6200 // used to include empty fields in Patch requests. 6201 ForceSendFields []string `json:"-"` 6202 6203 // NullFields is a list of field names (e.g. "Type") to include in API 6204 // requests with the JSON null value. By default, fields with empty 6205 // values are omitted from API requests. However, any field with an 6206 // empty value appearing in NullFields will be sent to the server as 6207 // null. It is an error if a field in this list has a non-empty value. 6208 // This may be used to include null fields in Patch requests. 6209 NullFields []string `json:"-"` 6210} 6211 6212func (s *LineStyle) MarshalJSON() ([]byte, error) { 6213 type NoMethod LineStyle 6214 raw := NoMethod(*s) 6215 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6216} 6217 6218// ManualRule: Allows you to manually organize the values in a source 6219// data column into 6220// buckets with names of your choosing. For example, a pivot table 6221// that 6222// aggregates population by state: 6223// 6224// +-------+-------------------+ 6225// | State | SUM of Population | 6226// +-------+-------------------+ 6227// | AK | 0.7 | 6228// | AL | 4.8 | 6229// | AR | 2.9 | 6230// ... 6231// +-------+-------------------+ 6232// could be turned into a pivot table that aggregates population by time 6233// zone 6234// by providing a list of groups (for example, groupName = 6235// 'Central', 6236// items = ['AL', 'AR', 'IA', ...]) to a manual group rule. 6237// Note that a similar effect could be achieved by adding a time zone 6238// column 6239// to the source data and adjusting the pivot table. 6240// 6241// +-----------+-------------------+ 6242// | Time Zone | SUM of Population | 6243// +-----------+-------------------+ 6244// | Central | 106.3 | 6245// | Eastern | 151.9 | 6246// | Mountain | 17.4 | 6247// ... 6248// +-----------+-------------------+ 6249type ManualRule struct { 6250 // Groups: The list of group names and the corresponding items from the 6251 // source data 6252 // that map to each group name. 6253 Groups []*ManualRuleGroup `json:"groups,omitempty"` 6254 6255 // ForceSendFields is a list of field names (e.g. "Groups") to 6256 // unconditionally include in API requests. By default, fields with 6257 // empty values are omitted from API requests. However, any non-pointer, 6258 // non-interface field appearing in ForceSendFields will be sent to the 6259 // server regardless of whether the field is empty or not. This may be 6260 // used to include empty fields in Patch requests. 6261 ForceSendFields []string `json:"-"` 6262 6263 // NullFields is a list of field names (e.g. "Groups") to include in API 6264 // requests with the JSON null value. By default, fields with empty 6265 // values are omitted from API requests. However, any field with an 6266 // empty value appearing in NullFields will be sent to the server as 6267 // null. It is an error if a field in this list has a non-empty value. 6268 // This may be used to include null fields in Patch requests. 6269 NullFields []string `json:"-"` 6270} 6271 6272func (s *ManualRule) MarshalJSON() ([]byte, error) { 6273 type NoMethod ManualRule 6274 raw := NoMethod(*s) 6275 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6276} 6277 6278// ManualRuleGroup: A group name and a list of items from the source 6279// data that should be placed 6280// in the group with this name. 6281type ManualRuleGroup struct { 6282 // GroupName: The group name, which must be a string. Each group in a 6283 // given 6284 // ManualRule must have a unique group name. 6285 GroupName *ExtendedValue `json:"groupName,omitempty"` 6286 6287 // Items: The items in the source data that should be placed into this 6288 // group. Each 6289 // item may be a string, number, or boolean. Items may appear in at most 6290 // one 6291 // group within a given ManualRule. Items that do not appear in 6292 // any 6293 // group will appear on their own. 6294 Items []*ExtendedValue `json:"items,omitempty"` 6295 6296 // ForceSendFields is a list of field names (e.g. "GroupName") to 6297 // unconditionally include in API requests. By default, fields with 6298 // empty values are omitted from API requests. However, any non-pointer, 6299 // non-interface field appearing in ForceSendFields will be sent to the 6300 // server regardless of whether the field is empty or not. This may be 6301 // used to include empty fields in Patch requests. 6302 ForceSendFields []string `json:"-"` 6303 6304 // NullFields is a list of field names (e.g. "GroupName") to include in 6305 // API requests with the JSON null value. By default, fields with empty 6306 // values are omitted from API requests. However, any field with an 6307 // empty value appearing in NullFields will be sent to the server as 6308 // null. It is an error if a field in this list has a non-empty value. 6309 // This may be used to include null fields in Patch requests. 6310 NullFields []string `json:"-"` 6311} 6312 6313func (s *ManualRuleGroup) MarshalJSON() ([]byte, error) { 6314 type NoMethod ManualRuleGroup 6315 raw := NoMethod(*s) 6316 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6317} 6318 6319// MatchedDeveloperMetadata: A developer metadata entry and the data 6320// filters specified in the original 6321// request that matched it. 6322type MatchedDeveloperMetadata struct { 6323 // DataFilters: All filters matching the returned developer metadata. 6324 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6325 6326 // DeveloperMetadata: The developer metadata matching the specified 6327 // filters. 6328 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 6329 6330 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6331 // unconditionally include in API requests. By default, fields with 6332 // empty values are omitted from API requests. However, any non-pointer, 6333 // non-interface field appearing in ForceSendFields will be sent to the 6334 // server regardless of whether the field is empty or not. This may be 6335 // used to include empty fields in Patch requests. 6336 ForceSendFields []string `json:"-"` 6337 6338 // NullFields is a list of field names (e.g. "DataFilters") to include 6339 // in API requests with the JSON null value. By default, fields with 6340 // empty values are omitted from API requests. However, any field with 6341 // an empty value appearing in NullFields will be sent to the server as 6342 // null. It is an error if a field in this list has a non-empty value. 6343 // This may be used to include null fields in Patch requests. 6344 NullFields []string `json:"-"` 6345} 6346 6347func (s *MatchedDeveloperMetadata) MarshalJSON() ([]byte, error) { 6348 type NoMethod MatchedDeveloperMetadata 6349 raw := NoMethod(*s) 6350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6351} 6352 6353// MatchedValueRange: A value range that was matched by one or more data 6354// filers. 6355type MatchedValueRange struct { 6356 // DataFilters: The DataFilters from the request that matched the range 6357 // of 6358 // values. 6359 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6360 6361 // ValueRange: The values matched by the DataFilter. 6362 ValueRange *ValueRange `json:"valueRange,omitempty"` 6363 6364 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6365 // unconditionally include in API requests. By default, fields with 6366 // empty values are omitted from API requests. However, any non-pointer, 6367 // non-interface field appearing in ForceSendFields will be sent to the 6368 // server regardless of whether the field is empty or not. This may be 6369 // used to include empty fields in Patch requests. 6370 ForceSendFields []string `json:"-"` 6371 6372 // NullFields is a list of field names (e.g. "DataFilters") to include 6373 // in API requests with the JSON null value. By default, fields with 6374 // empty values are omitted from API requests. However, any field with 6375 // an empty value appearing in NullFields will be sent to the server as 6376 // null. It is an error if a field in this list has a non-empty value. 6377 // This may be used to include null fields in Patch requests. 6378 NullFields []string `json:"-"` 6379} 6380 6381func (s *MatchedValueRange) MarshalJSON() ([]byte, error) { 6382 type NoMethod MatchedValueRange 6383 raw := NoMethod(*s) 6384 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6385} 6386 6387// MergeCellsRequest: Merges all cells in the range. 6388type MergeCellsRequest struct { 6389 // MergeType: How the cells should be merged. 6390 // 6391 // Possible values: 6392 // "MERGE_ALL" - Create a single merge from the range 6393 // "MERGE_COLUMNS" - Create a merge for each column in the range 6394 // "MERGE_ROWS" - Create a merge for each row in the range 6395 MergeType string `json:"mergeType,omitempty"` 6396 6397 // Range: The range of cells to merge. 6398 Range *GridRange `json:"range,omitempty"` 6399 6400 // ForceSendFields is a list of field names (e.g. "MergeType") to 6401 // unconditionally include in API requests. By default, fields with 6402 // empty values are omitted from API requests. However, any non-pointer, 6403 // non-interface field appearing in ForceSendFields will be sent to the 6404 // server regardless of whether the field is empty or not. This may be 6405 // used to include empty fields in Patch requests. 6406 ForceSendFields []string `json:"-"` 6407 6408 // NullFields is a list of field names (e.g. "MergeType") to include in 6409 // API requests with the JSON null value. By default, fields with empty 6410 // values are omitted from API requests. However, any field with an 6411 // empty value appearing in NullFields will be sent to the server as 6412 // null. It is an error if a field in this list has a non-empty value. 6413 // This may be used to include null fields in Patch requests. 6414 NullFields []string `json:"-"` 6415} 6416 6417func (s *MergeCellsRequest) MarshalJSON() ([]byte, error) { 6418 type NoMethod MergeCellsRequest 6419 raw := NoMethod(*s) 6420 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6421} 6422 6423// MoveDimensionRequest: Moves one or more rows or columns. 6424type MoveDimensionRequest struct { 6425 // DestinationIndex: The zero-based start index of where to move the 6426 // source data to, 6427 // based on the coordinates *before* the source data is removed 6428 // from the grid. Existing data will be shifted down or 6429 // right 6430 // (depending on the dimension) to make room for the moved 6431 // dimensions. 6432 // The source dimensions are removed from the grid, so the 6433 // the data may end up in a different index than specified. 6434 // 6435 // For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to 6436 // move 6437 // "1" and "2" to between "3" and "4", the source would be 6438 // `ROWS [1..3)`,and the destination index would be "4" 6439 // (the zero-based index of row 5). 6440 // The end result would be `A1..A5` of `0, 3, 1, 2, 4`. 6441 DestinationIndex int64 `json:"destinationIndex,omitempty"` 6442 6443 // Source: The source dimensions to move. 6444 Source *DimensionRange `json:"source,omitempty"` 6445 6446 // ForceSendFields is a list of field names (e.g. "DestinationIndex") to 6447 // unconditionally include in API requests. By default, fields with 6448 // empty values are omitted from API requests. However, any non-pointer, 6449 // non-interface field appearing in ForceSendFields will be sent to the 6450 // server regardless of whether the field is empty or not. This may be 6451 // used to include empty fields in Patch requests. 6452 ForceSendFields []string `json:"-"` 6453 6454 // NullFields is a list of field names (e.g. "DestinationIndex") to 6455 // include in API requests with the JSON null value. By default, fields 6456 // with empty values are omitted from API requests. However, any field 6457 // with an empty value appearing in NullFields will be sent to the 6458 // server as null. It is an error if a field in this list has a 6459 // non-empty value. This may be used to include null fields in Patch 6460 // requests. 6461 NullFields []string `json:"-"` 6462} 6463 6464func (s *MoveDimensionRequest) MarshalJSON() ([]byte, error) { 6465 type NoMethod MoveDimensionRequest 6466 raw := NoMethod(*s) 6467 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6468} 6469 6470// NamedRange: A named range. 6471type NamedRange struct { 6472 // Name: The name of the named range. 6473 Name string `json:"name,omitempty"` 6474 6475 // NamedRangeId: The ID of the named range. 6476 NamedRangeId string `json:"namedRangeId,omitempty"` 6477 6478 // Range: The range this represents. 6479 Range *GridRange `json:"range,omitempty"` 6480 6481 // ForceSendFields is a list of field names (e.g. "Name") to 6482 // unconditionally include in API requests. By default, fields with 6483 // empty values are omitted from API requests. However, any non-pointer, 6484 // non-interface field appearing in ForceSendFields will be sent to the 6485 // server regardless of whether the field is empty or not. This may be 6486 // used to include empty fields in Patch requests. 6487 ForceSendFields []string `json:"-"` 6488 6489 // NullFields is a list of field names (e.g. "Name") to include in API 6490 // requests with the JSON null value. By default, fields with empty 6491 // values are omitted from API requests. However, any field with an 6492 // empty value appearing in NullFields will be sent to the server as 6493 // null. It is an error if a field in this list has a non-empty value. 6494 // This may be used to include null fields in Patch requests. 6495 NullFields []string `json:"-"` 6496} 6497 6498func (s *NamedRange) MarshalJSON() ([]byte, error) { 6499 type NoMethod NamedRange 6500 raw := NoMethod(*s) 6501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6502} 6503 6504// NumberFormat: The number format of a cell. 6505type NumberFormat struct { 6506 // Pattern: Pattern string used for formatting. If not set, a default 6507 // pattern based on 6508 // the user's locale will be used if necessary for the given type. 6509 // See the [Date and Number Formats guide](/sheets/api/guides/formats) 6510 // for 6511 // more information about the supported patterns. 6512 Pattern string `json:"pattern,omitempty"` 6513 6514 // Type: The type of the number format. 6515 // When writing, this field must be set. 6516 // 6517 // Possible values: 6518 // "NUMBER_FORMAT_TYPE_UNSPECIFIED" - The number format is not 6519 // specified 6520 // and is based on the contents of the cell. 6521 // Do not explicitly use this. 6522 // "TEXT" - Text formatting, e.g `1000.12` 6523 // "NUMBER" - Number formatting, e.g, `1,000.12` 6524 // "PERCENT" - Percent formatting, e.g `10.12%` 6525 // "CURRENCY" - Currency formatting, e.g `$1,000.12` 6526 // "DATE" - Date formatting, e.g `9/26/2008` 6527 // "TIME" - Time formatting, e.g `3:59:00 PM` 6528 // "DATE_TIME" - Date+Time formatting, e.g `9/26/08 15:59:00` 6529 // "SCIENTIFIC" - Scientific number formatting, e.g `1.01E+03` 6530 Type string `json:"type,omitempty"` 6531 6532 // ForceSendFields is a list of field names (e.g. "Pattern") to 6533 // unconditionally include in API requests. By default, fields with 6534 // empty values are omitted from API requests. However, any non-pointer, 6535 // non-interface field appearing in ForceSendFields will be sent to the 6536 // server regardless of whether the field is empty or not. This may be 6537 // used to include empty fields in Patch requests. 6538 ForceSendFields []string `json:"-"` 6539 6540 // NullFields is a list of field names (e.g. "Pattern") to include in 6541 // API requests with the JSON null value. By default, fields with empty 6542 // values are omitted from API requests. However, any field with an 6543 // empty value appearing in NullFields will be sent to the server as 6544 // null. It is an error if a field in this list has a non-empty value. 6545 // This may be used to include null fields in Patch requests. 6546 NullFields []string `json:"-"` 6547} 6548 6549func (s *NumberFormat) MarshalJSON() ([]byte, error) { 6550 type NoMethod NumberFormat 6551 raw := NoMethod(*s) 6552 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6553} 6554 6555// OrgChartSpec: An <a 6556// href="/chart/interactive/docs/gallery/orgchart">org chart</a>. 6557// Org charts require a unique set of labels in labels and 6558// may 6559// optionally include parent_labels and tooltips. 6560// parent_labels contain, for each node, the label identifying the 6561// parent 6562// node. tooltips contain, for each node, an optional tooltip. 6563// 6564// For example, to describe an OrgChart with Alice as the CEO, Bob as 6565// the 6566// President (reporting to Alice) and Cathy as VP of Sales (also 6567// reporting to 6568// Alice), have labels contain "Alice", "Bob", "Cathy", 6569// parent_labels contain "", "Alice", "Alice" and tooltips 6570// contain 6571// "CEO", "President", "VP Sales". 6572type OrgChartSpec struct { 6573 // Labels: The data containing the labels for all the nodes in the 6574 // chart. Labels 6575 // must be unique. 6576 Labels *ChartData `json:"labels,omitempty"` 6577 6578 // NodeColor: The color of the org chart nodes. 6579 NodeColor *Color `json:"nodeColor,omitempty"` 6580 6581 // NodeSize: The size of the org chart nodes. 6582 // 6583 // Possible values: 6584 // "ORG_CHART_LABEL_SIZE_UNSPECIFIED" - Default value, do not use. 6585 // "SMALL" - The small org chart node size. 6586 // "MEDIUM" - The medium org chart node size. 6587 // "LARGE" - The large org chart node size. 6588 NodeSize string `json:"nodeSize,omitempty"` 6589 6590 // ParentLabels: The data containing the label of the parent for the 6591 // corresponding node. 6592 // A blank value indicates that the node has no parent and is a 6593 // top-level 6594 // node. 6595 // This field is optional. 6596 ParentLabels *ChartData `json:"parentLabels,omitempty"` 6597 6598 // SelectedNodeColor: The color of the selected org chart nodes. 6599 SelectedNodeColor *Color `json:"selectedNodeColor,omitempty"` 6600 6601 // Tooltips: The data containing the tooltip for the corresponding node. 6602 // A blank value 6603 // results in no tooltip being displayed for the node. 6604 // This field is optional. 6605 Tooltips *ChartData `json:"tooltips,omitempty"` 6606 6607 // ForceSendFields is a list of field names (e.g. "Labels") to 6608 // unconditionally include in API requests. By default, fields with 6609 // empty values are omitted from API requests. However, any non-pointer, 6610 // non-interface field appearing in ForceSendFields will be sent to the 6611 // server regardless of whether the field is empty or not. This may be 6612 // used to include empty fields in Patch requests. 6613 ForceSendFields []string `json:"-"` 6614 6615 // NullFields is a list of field names (e.g. "Labels") to include in API 6616 // requests with the JSON null value. By default, fields with empty 6617 // values are omitted from API requests. However, any field with an 6618 // empty value appearing in NullFields will be sent to the server as 6619 // null. It is an error if a field in this list has a non-empty value. 6620 // This may be used to include null fields in Patch requests. 6621 NullFields []string `json:"-"` 6622} 6623 6624func (s *OrgChartSpec) MarshalJSON() ([]byte, error) { 6625 type NoMethod OrgChartSpec 6626 raw := NoMethod(*s) 6627 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6628} 6629 6630// OverlayPosition: The location an object is overlaid on top of a grid. 6631type OverlayPosition struct { 6632 // AnchorCell: The cell the object is anchored to. 6633 AnchorCell *GridCoordinate `json:"anchorCell,omitempty"` 6634 6635 // HeightPixels: The height of the object, in pixels. Defaults to 371. 6636 HeightPixels int64 `json:"heightPixels,omitempty"` 6637 6638 // OffsetXPixels: The horizontal offset, in pixels, that the object is 6639 // offset 6640 // from the anchor cell. 6641 OffsetXPixels int64 `json:"offsetXPixels,omitempty"` 6642 6643 // OffsetYPixels: The vertical offset, in pixels, that the object is 6644 // offset 6645 // from the anchor cell. 6646 OffsetYPixels int64 `json:"offsetYPixels,omitempty"` 6647 6648 // WidthPixels: The width of the object, in pixels. Defaults to 600. 6649 WidthPixels int64 `json:"widthPixels,omitempty"` 6650 6651 // ForceSendFields is a list of field names (e.g. "AnchorCell") to 6652 // unconditionally include in API requests. By default, fields with 6653 // empty values are omitted from API requests. However, any non-pointer, 6654 // non-interface field appearing in ForceSendFields will be sent to the 6655 // server regardless of whether the field is empty or not. This may be 6656 // used to include empty fields in Patch requests. 6657 ForceSendFields []string `json:"-"` 6658 6659 // NullFields is a list of field names (e.g. "AnchorCell") to include in 6660 // API requests with the JSON null value. By default, fields with empty 6661 // values are omitted from API requests. However, any field with an 6662 // empty value appearing in NullFields will be sent to the server as 6663 // null. It is an error if a field in this list has a non-empty value. 6664 // This may be used to include null fields in Patch requests. 6665 NullFields []string `json:"-"` 6666} 6667 6668func (s *OverlayPosition) MarshalJSON() ([]byte, error) { 6669 type NoMethod OverlayPosition 6670 raw := NoMethod(*s) 6671 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6672} 6673 6674// Padding: The amount of padding around the cell, in pixels. 6675// When updating padding, every field must be specified. 6676type Padding struct { 6677 // Bottom: The bottom padding of the cell. 6678 Bottom int64 `json:"bottom,omitempty"` 6679 6680 // Left: The left padding of the cell. 6681 Left int64 `json:"left,omitempty"` 6682 6683 // Right: The right padding of the cell. 6684 Right int64 `json:"right,omitempty"` 6685 6686 // Top: The top padding of the cell. 6687 Top int64 `json:"top,omitempty"` 6688 6689 // ForceSendFields is a list of field names (e.g. "Bottom") to 6690 // unconditionally include in API requests. By default, fields with 6691 // empty values are omitted from API requests. However, any non-pointer, 6692 // non-interface field appearing in ForceSendFields will be sent to the 6693 // server regardless of whether the field is empty or not. This may be 6694 // used to include empty fields in Patch requests. 6695 ForceSendFields []string `json:"-"` 6696 6697 // NullFields is a list of field names (e.g. "Bottom") to include in API 6698 // requests with the JSON null value. By default, fields with empty 6699 // values are omitted from API requests. However, any field with an 6700 // empty value appearing in NullFields will be sent to the server as 6701 // null. It is an error if a field in this list has a non-empty value. 6702 // This may be used to include null fields in Patch requests. 6703 NullFields []string `json:"-"` 6704} 6705 6706func (s *Padding) MarshalJSON() ([]byte, error) { 6707 type NoMethod Padding 6708 raw := NoMethod(*s) 6709 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6710} 6711 6712// PasteDataRequest: Inserts data into the spreadsheet starting at the 6713// specified coordinate. 6714type PasteDataRequest struct { 6715 // Coordinate: The coordinate at which the data should start being 6716 // inserted. 6717 Coordinate *GridCoordinate `json:"coordinate,omitempty"` 6718 6719 // Data: The data to insert. 6720 Data string `json:"data,omitempty"` 6721 6722 // Delimiter: The delimiter in the data. 6723 Delimiter string `json:"delimiter,omitempty"` 6724 6725 // Html: True if the data is HTML. 6726 Html bool `json:"html,omitempty"` 6727 6728 // Type: How the data should be pasted. 6729 // 6730 // Possible values: 6731 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 6732 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 6733 // or merges. 6734 // "PASTE_FORMAT" - Paste the format and data validation only. 6735 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 6736 // "PASTE_FORMULA" - Paste the formulas only. 6737 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 6738 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 6739 // rules only. 6740 Type string `json:"type,omitempty"` 6741 6742 // ForceSendFields is a list of field names (e.g. "Coordinate") to 6743 // unconditionally include in API requests. By default, fields with 6744 // empty values are omitted from API requests. However, any non-pointer, 6745 // non-interface field appearing in ForceSendFields will be sent to the 6746 // server regardless of whether the field is empty or not. This may be 6747 // used to include empty fields in Patch requests. 6748 ForceSendFields []string `json:"-"` 6749 6750 // NullFields is a list of field names (e.g. "Coordinate") to include in 6751 // API requests with the JSON null value. By default, fields with empty 6752 // values are omitted from API requests. However, any field with an 6753 // empty value appearing in NullFields will be sent to the server as 6754 // null. It is an error if a field in this list has a non-empty value. 6755 // This may be used to include null fields in Patch requests. 6756 NullFields []string `json:"-"` 6757} 6758 6759func (s *PasteDataRequest) MarshalJSON() ([]byte, error) { 6760 type NoMethod PasteDataRequest 6761 raw := NoMethod(*s) 6762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6763} 6764 6765// PieChartSpec: A <a 6766// href="/chart/interactive/docs/gallery/piechart">pie chart</a>. 6767type PieChartSpec struct { 6768 // Domain: The data that covers the domain of the pie chart. 6769 Domain *ChartData `json:"domain,omitempty"` 6770 6771 // LegendPosition: Where the legend of the pie chart should be drawn. 6772 // 6773 // Possible values: 6774 // "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 6775 // use. 6776 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 6777 // chart. 6778 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 6779 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 6780 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 6781 // "NO_LEGEND" - No legend is rendered. 6782 // "LABELED_LEGEND" - Each pie slice has a label attached to it. 6783 LegendPosition string `json:"legendPosition,omitempty"` 6784 6785 // PieHole: The size of the hole in the pie chart. 6786 PieHole float64 `json:"pieHole,omitempty"` 6787 6788 // Series: The data that covers the one and only series of the pie 6789 // chart. 6790 Series *ChartData `json:"series,omitempty"` 6791 6792 // ThreeDimensional: True if the pie is three dimensional. 6793 ThreeDimensional bool `json:"threeDimensional,omitempty"` 6794 6795 // ForceSendFields is a list of field names (e.g. "Domain") to 6796 // unconditionally include in API requests. By default, fields with 6797 // empty values are omitted from API requests. However, any non-pointer, 6798 // non-interface field appearing in ForceSendFields will be sent to the 6799 // server regardless of whether the field is empty or not. This may be 6800 // used to include empty fields in Patch requests. 6801 ForceSendFields []string `json:"-"` 6802 6803 // NullFields is a list of field names (e.g. "Domain") to include in API 6804 // requests with the JSON null value. By default, fields with empty 6805 // values are omitted from API requests. However, any field with an 6806 // empty value appearing in NullFields will be sent to the server as 6807 // null. It is an error if a field in this list has a non-empty value. 6808 // This may be used to include null fields in Patch requests. 6809 NullFields []string `json:"-"` 6810} 6811 6812func (s *PieChartSpec) MarshalJSON() ([]byte, error) { 6813 type NoMethod PieChartSpec 6814 raw := NoMethod(*s) 6815 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6816} 6817 6818func (s *PieChartSpec) UnmarshalJSON(data []byte) error { 6819 type NoMethod PieChartSpec 6820 var s1 struct { 6821 PieHole gensupport.JSONFloat64 `json:"pieHole"` 6822 *NoMethod 6823 } 6824 s1.NoMethod = (*NoMethod)(s) 6825 if err := json.Unmarshal(data, &s1); err != nil { 6826 return err 6827 } 6828 s.PieHole = float64(s1.PieHole) 6829 return nil 6830} 6831 6832// PivotFilterCriteria: Criteria for showing/hiding rows in a pivot 6833// table. 6834type PivotFilterCriteria struct { 6835 // VisibleValues: Values that should be included. Values not listed 6836 // here are excluded. 6837 VisibleValues []string `json:"visibleValues,omitempty"` 6838 6839 // ForceSendFields is a list of field names (e.g. "VisibleValues") to 6840 // unconditionally include in API requests. By default, fields with 6841 // empty values are omitted from API requests. However, any non-pointer, 6842 // non-interface field appearing in ForceSendFields will be sent to the 6843 // server regardless of whether the field is empty or not. This may be 6844 // used to include empty fields in Patch requests. 6845 ForceSendFields []string `json:"-"` 6846 6847 // NullFields is a list of field names (e.g. "VisibleValues") to include 6848 // in API requests with the JSON null value. By default, fields with 6849 // empty values are omitted from API requests. However, any field with 6850 // an empty value appearing in NullFields will be sent to the server as 6851 // null. It is an error if a field in this list has a non-empty value. 6852 // This may be used to include null fields in Patch requests. 6853 NullFields []string `json:"-"` 6854} 6855 6856func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) { 6857 type NoMethod PivotFilterCriteria 6858 raw := NoMethod(*s) 6859 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6860} 6861 6862// PivotGroup: A single grouping (either row or column) in a pivot 6863// table. 6864type PivotGroup struct { 6865 // GroupRule: The group rule to apply to this row/column group. 6866 GroupRule *PivotGroupRule `json:"groupRule,omitempty"` 6867 6868 // Label: The labels to use for the row/column groups which can be 6869 // customized. For 6870 // example, in the following pivot table, the row label is `Region` 6871 // (which 6872 // could be renamed to `State`) and the column label is `Product` 6873 // (which 6874 // could be renamed `Item`). Pivot tables created before December 2017 6875 // do 6876 // not have header labels. If you'd like to add header labels to an 6877 // existing 6878 // pivot table, please delete the existing pivot table and then create a 6879 // new 6880 // pivot table with same parameters. 6881 // 6882 // +--------------+---------+-------+ 6883 // | SUM of Units | Product | | 6884 // | Region | Pen | Paper | 6885 // +--------------+---------+-------+ 6886 // | New York | 345 | 98 | 6887 // | Oregon | 234 | 123 | 6888 // | Tennessee | 531 | 415 | 6889 // +--------------+---------+-------+ 6890 // | Grand Total | 1110 | 636 | 6891 // +--------------+---------+-------+ 6892 Label string `json:"label,omitempty"` 6893 6894 // RepeatHeadings: True if the headings in this pivot group should be 6895 // repeated. 6896 // This is only valid for row groupings and is ignored by columns. 6897 // 6898 // By default, we minimize repitition of headings by not showing 6899 // higher 6900 // level headings where they are the same. For example, even though 6901 // the 6902 // third row below corresponds to "Q1 Mar", "Q1" is not shown because 6903 // it is redundant with previous rows. Setting repeat_headings to 6904 // true 6905 // would cause "Q1" to be repeated for "Feb" and "Mar". 6906 // 6907 // +--------------+ 6908 // | Q1 | Jan | 6909 // | | Feb | 6910 // | | Mar | 6911 // +--------+-----+ 6912 // | Q1 Total | 6913 // +--------------+ 6914 RepeatHeadings bool `json:"repeatHeadings,omitempty"` 6915 6916 // ShowTotals: True if the pivot table should include the totals for 6917 // this grouping. 6918 ShowTotals bool `json:"showTotals,omitempty"` 6919 6920 // SortOrder: The order the values in this group should be sorted. 6921 // 6922 // Possible values: 6923 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 6924 // "ASCENDING" - Sort ascending. 6925 // "DESCENDING" - Sort descending. 6926 SortOrder string `json:"sortOrder,omitempty"` 6927 6928 // SourceColumnOffset: The column offset of the source range that this 6929 // grouping is based on. 6930 // 6931 // For example, if the source was `C10:E15`, a `sourceColumnOffset` of 6932 // `0` 6933 // means this group refers to column `C`, whereas the offset `1` would 6934 // refer 6935 // to column `D`. 6936 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 6937 6938 // ValueBucket: The bucket of the opposite pivot group to sort by. 6939 // If not specified, sorting is alphabetical by this group's values. 6940 ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"` 6941 6942 // ValueMetadata: Metadata about values in the grouping. 6943 ValueMetadata []*PivotGroupValueMetadata `json:"valueMetadata,omitempty"` 6944 6945 // ForceSendFields is a list of field names (e.g. "GroupRule") to 6946 // unconditionally include in API requests. By default, fields with 6947 // empty values are omitted from API requests. However, any non-pointer, 6948 // non-interface field appearing in ForceSendFields will be sent to the 6949 // server regardless of whether the field is empty or not. This may be 6950 // used to include empty fields in Patch requests. 6951 ForceSendFields []string `json:"-"` 6952 6953 // NullFields is a list of field names (e.g. "GroupRule") to include in 6954 // API requests with the JSON null value. By default, fields with empty 6955 // values are omitted from API requests. However, any field with an 6956 // empty value appearing in NullFields will be sent to the server as 6957 // null. It is an error if a field in this list has a non-empty value. 6958 // This may be used to include null fields in Patch requests. 6959 NullFields []string `json:"-"` 6960} 6961 6962func (s *PivotGroup) MarshalJSON() ([]byte, error) { 6963 type NoMethod PivotGroup 6964 raw := NoMethod(*s) 6965 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6966} 6967 6968// PivotGroupRule: An optional setting on a PivotGroup that defines 6969// buckets for the values 6970// in the source data column rather than breaking out each individual 6971// value. 6972// Only one PivotGroup with a group rule may be added for each column 6973// in 6974// the source data, though on any given column you may add both 6975// a 6976// PivotGroup that has a rule and a PivotGroup that does not. 6977type PivotGroupRule struct { 6978 // DateTimeRule: A DateTimeRule. 6979 DateTimeRule *DateTimeRule `json:"dateTimeRule,omitempty"` 6980 6981 // HistogramRule: A HistogramRule. 6982 HistogramRule *HistogramRule `json:"histogramRule,omitempty"` 6983 6984 // ManualRule: A ManualRule. 6985 ManualRule *ManualRule `json:"manualRule,omitempty"` 6986 6987 // ForceSendFields is a list of field names (e.g. "DateTimeRule") to 6988 // unconditionally include in API requests. By default, fields with 6989 // empty values are omitted from API requests. However, any non-pointer, 6990 // non-interface field appearing in ForceSendFields will be sent to the 6991 // server regardless of whether the field is empty or not. This may be 6992 // used to include empty fields in Patch requests. 6993 ForceSendFields []string `json:"-"` 6994 6995 // NullFields is a list of field names (e.g. "DateTimeRule") to include 6996 // in API requests with the JSON null value. By default, fields with 6997 // empty values are omitted from API requests. However, any field with 6998 // an empty value appearing in NullFields will be sent to the server as 6999 // null. It is an error if a field in this list has a non-empty value. 7000 // This may be used to include null fields in Patch requests. 7001 NullFields []string `json:"-"` 7002} 7003 7004func (s *PivotGroupRule) MarshalJSON() ([]byte, error) { 7005 type NoMethod PivotGroupRule 7006 raw := NoMethod(*s) 7007 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7008} 7009 7010// PivotGroupSortValueBucket: Information about which values in a pivot 7011// group should be used for sorting. 7012type PivotGroupSortValueBucket struct { 7013 // Buckets: Determines the bucket from which values are chosen to 7014 // sort. 7015 // 7016 // For example, in a pivot table with one row group & two column 7017 // groups, 7018 // the row group can list up to two values. The first value 7019 // corresponds 7020 // to a value within the first column group, and the second 7021 // value 7022 // corresponds to a value in the second column group. If no values 7023 // are listed, this would indicate that the row should be sorted 7024 // according 7025 // to the "Grand Total" over the column groups. If a single value is 7026 // listed, 7027 // this would correspond to using the "Total" of that bucket. 7028 Buckets []*ExtendedValue `json:"buckets,omitempty"` 7029 7030 // ValuesIndex: The offset in the PivotTable.values list which the 7031 // values in this 7032 // grouping should be sorted by. 7033 ValuesIndex int64 `json:"valuesIndex,omitempty"` 7034 7035 // ForceSendFields is a list of field names (e.g. "Buckets") to 7036 // unconditionally include in API requests. By default, fields with 7037 // empty values are omitted from API requests. However, any non-pointer, 7038 // non-interface field appearing in ForceSendFields will be sent to the 7039 // server regardless of whether the field is empty or not. This may be 7040 // used to include empty fields in Patch requests. 7041 ForceSendFields []string `json:"-"` 7042 7043 // NullFields is a list of field names (e.g. "Buckets") to include in 7044 // API requests with the JSON null value. By default, fields with empty 7045 // values are omitted from API requests. However, any field with an 7046 // empty value appearing in NullFields will be sent to the server as 7047 // null. It is an error if a field in this list has a non-empty value. 7048 // This may be used to include null fields in Patch requests. 7049 NullFields []string `json:"-"` 7050} 7051 7052func (s *PivotGroupSortValueBucket) MarshalJSON() ([]byte, error) { 7053 type NoMethod PivotGroupSortValueBucket 7054 raw := NoMethod(*s) 7055 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7056} 7057 7058// PivotGroupValueMetadata: Metadata about a value in a pivot grouping. 7059type PivotGroupValueMetadata struct { 7060 // Collapsed: True if the data corresponding to the value is collapsed. 7061 Collapsed bool `json:"collapsed,omitempty"` 7062 7063 // Value: The calculated value the metadata corresponds to. 7064 // (Note that formulaValue is not valid, 7065 // because the values will be calculated.) 7066 Value *ExtendedValue `json:"value,omitempty"` 7067 7068 // ForceSendFields is a list of field names (e.g. "Collapsed") to 7069 // unconditionally include in API requests. By default, fields with 7070 // empty values are omitted from API requests. However, any non-pointer, 7071 // non-interface field appearing in ForceSendFields will be sent to the 7072 // server regardless of whether the field is empty or not. This may be 7073 // used to include empty fields in Patch requests. 7074 ForceSendFields []string `json:"-"` 7075 7076 // NullFields is a list of field names (e.g. "Collapsed") to include in 7077 // API requests with the JSON null value. By default, fields with empty 7078 // values are omitted from API requests. However, any field with an 7079 // empty value appearing in NullFields will be sent to the server as 7080 // null. It is an error if a field in this list has a non-empty value. 7081 // This may be used to include null fields in Patch requests. 7082 NullFields []string `json:"-"` 7083} 7084 7085func (s *PivotGroupValueMetadata) MarshalJSON() ([]byte, error) { 7086 type NoMethod PivotGroupValueMetadata 7087 raw := NoMethod(*s) 7088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7089} 7090 7091// PivotTable: A pivot table. 7092type PivotTable struct { 7093 // Columns: Each column grouping in the pivot table. 7094 Columns []*PivotGroup `json:"columns,omitempty"` 7095 7096 // Criteria: An optional mapping of filters per source column 7097 // offset. 7098 // 7099 // The filters are applied before aggregating data into the pivot 7100 // table. 7101 // The map's key is the column offset of the source range that you want 7102 // to 7103 // filter, and the value is the criteria for that column. 7104 // 7105 // For example, if the source was `C10:E15`, a key of `0` will have the 7106 // filter 7107 // for column `C`, whereas the key `1` is for column `D`. 7108 Criteria map[string]PivotFilterCriteria `json:"criteria,omitempty"` 7109 7110 // Rows: Each row grouping in the pivot table. 7111 Rows []*PivotGroup `json:"rows,omitempty"` 7112 7113 // Source: The range the pivot table is reading data from. 7114 Source *GridRange `json:"source,omitempty"` 7115 7116 // ValueLayout: Whether values should be listed horizontally (as 7117 // columns) 7118 // or vertically (as rows). 7119 // 7120 // Possible values: 7121 // "HORIZONTAL" - Values are laid out horizontally (as columns). 7122 // "VERTICAL" - Values are laid out vertically (as rows). 7123 ValueLayout string `json:"valueLayout,omitempty"` 7124 7125 // Values: A list of values to include in the pivot table. 7126 Values []*PivotValue `json:"values,omitempty"` 7127 7128 // ForceSendFields is a list of field names (e.g. "Columns") to 7129 // unconditionally include in API requests. By default, fields with 7130 // empty values are omitted from API requests. However, any non-pointer, 7131 // non-interface field appearing in ForceSendFields will be sent to the 7132 // server regardless of whether the field is empty or not. This may be 7133 // used to include empty fields in Patch requests. 7134 ForceSendFields []string `json:"-"` 7135 7136 // NullFields is a list of field names (e.g. "Columns") to include in 7137 // API requests with the JSON null value. By default, fields with empty 7138 // values are omitted from API requests. However, any field with an 7139 // empty value appearing in NullFields will be sent to the server as 7140 // null. It is an error if a field in this list has a non-empty value. 7141 // This may be used to include null fields in Patch requests. 7142 NullFields []string `json:"-"` 7143} 7144 7145func (s *PivotTable) MarshalJSON() ([]byte, error) { 7146 type NoMethod PivotTable 7147 raw := NoMethod(*s) 7148 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7149} 7150 7151// PivotValue: The definition of how a value in a pivot table should be 7152// calculated. 7153type PivotValue struct { 7154 // CalculatedDisplayType: If specified, indicates that pivot values 7155 // should be displayed as 7156 // the result of a calculation with another pivot value. For example, 7157 // if 7158 // calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all 7159 // the 7160 // pivot values are displayed as the percentage of the grand total. 7161 // In 7162 // the Sheets UI, this is referred to as "Show As" in the value section 7163 // of a 7164 // pivot table. 7165 // 7166 // Possible values: 7167 // "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" - Default value, 7168 // do not use. 7169 // "PERCENT_OF_ROW_TOTAL" - Shows the pivot values as percentage of 7170 // the row total values. 7171 // "PERCENT_OF_COLUMN_TOTAL" - Shows the pivot values as percentage of 7172 // the column total values. 7173 // "PERCENT_OF_GRAND_TOTAL" - Shows the pivot values as percentage of 7174 // the grand total values. 7175 CalculatedDisplayType string `json:"calculatedDisplayType,omitempty"` 7176 7177 // Formula: A custom formula to calculate the value. The formula must 7178 // start 7179 // with an `=` character. 7180 Formula string `json:"formula,omitempty"` 7181 7182 // Name: A name to use for the value. 7183 Name string `json:"name,omitempty"` 7184 7185 // SourceColumnOffset: The column offset of the source range that this 7186 // value reads from. 7187 // 7188 // For example, if the source was `C10:E15`, a `sourceColumnOffset` of 7189 // `0` 7190 // means this value refers to column `C`, whereas the offset `1` 7191 // would 7192 // refer to column `D`. 7193 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 7194 7195 // SummarizeFunction: A function to summarize the value. 7196 // If formula is set, the only supported values are 7197 // SUM and 7198 // CUSTOM. 7199 // If sourceColumnOffset is set, then `CUSTOM` 7200 // is not supported. 7201 // 7202 // Possible values: 7203 // "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" - The default, do not 7204 // use. 7205 // "SUM" - Corresponds to the `SUM` function. 7206 // "COUNTA" - Corresponds to the `COUNTA` function. 7207 // "COUNT" - Corresponds to the `COUNT` function. 7208 // "COUNTUNIQUE" - Corresponds to the `COUNTUNIQUE` function. 7209 // "AVERAGE" - Corresponds to the `AVERAGE` function. 7210 // "MAX" - Corresponds to the `MAX` function. 7211 // "MIN" - Corresponds to the `MIN` function. 7212 // "MEDIAN" - Corresponds to the `MEDIAN` function. 7213 // "PRODUCT" - Corresponds to the `PRODUCT` function. 7214 // "STDEV" - Corresponds to the `STDEV` function. 7215 // "STDEVP" - Corresponds to the `STDEVP` function. 7216 // "VAR" - Corresponds to the `VAR` function. 7217 // "VARP" - Corresponds to the `VARP` function. 7218 // "CUSTOM" - Indicates the formula should be used as-is. 7219 // Only valid if PivotValue.formula was set. 7220 SummarizeFunction string `json:"summarizeFunction,omitempty"` 7221 7222 // ForceSendFields is a list of field names (e.g. 7223 // "CalculatedDisplayType") to unconditionally include in API requests. 7224 // By default, fields with empty values are omitted from API requests. 7225 // However, any non-pointer, non-interface field appearing in 7226 // ForceSendFields will be sent to the server regardless of whether the 7227 // field is empty or not. This may be used to include empty fields in 7228 // Patch requests. 7229 ForceSendFields []string `json:"-"` 7230 7231 // NullFields is a list of field names (e.g. "CalculatedDisplayType") to 7232 // include in API requests with the JSON null value. By default, fields 7233 // with empty values are omitted from API requests. However, any field 7234 // with an empty value appearing in NullFields will be sent to the 7235 // server as null. It is an error if a field in this list has a 7236 // non-empty value. This may be used to include null fields in Patch 7237 // requests. 7238 NullFields []string `json:"-"` 7239} 7240 7241func (s *PivotValue) MarshalJSON() ([]byte, error) { 7242 type NoMethod PivotValue 7243 raw := NoMethod(*s) 7244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7245} 7246 7247// ProtectedRange: A protected range. 7248type ProtectedRange struct { 7249 // Description: The description of this protected range. 7250 Description string `json:"description,omitempty"` 7251 7252 // Editors: The users and groups with edit access to the protected 7253 // range. 7254 // This field is only visible to users with edit access to the 7255 // protected 7256 // range and the document. 7257 // Editors are not supported with warning_only protection. 7258 Editors *Editors `json:"editors,omitempty"` 7259 7260 // NamedRangeId: The named range this protected range is backed by, if 7261 // any. 7262 // 7263 // When writing, only one of range or named_range_id 7264 // may be set. 7265 NamedRangeId string `json:"namedRangeId,omitempty"` 7266 7267 // ProtectedRangeId: The ID of the protected range. 7268 // This field is read-only. 7269 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 7270 7271 // Range: The range that is being protected. 7272 // The range may be fully unbounded, in which case this is considered 7273 // a protected sheet. 7274 // 7275 // When writing, only one of range or named_range_id 7276 // may be set. 7277 Range *GridRange `json:"range,omitempty"` 7278 7279 // RequestingUserCanEdit: True if the user who requested this protected 7280 // range can edit the 7281 // protected area. 7282 // This field is read-only. 7283 RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"` 7284 7285 // UnprotectedRanges: The list of unprotected ranges within a protected 7286 // sheet. 7287 // Unprotected ranges are only supported on protected sheets. 7288 UnprotectedRanges []*GridRange `json:"unprotectedRanges,omitempty"` 7289 7290 // WarningOnly: True if this protected range will show a warning when 7291 // editing. 7292 // Warning-based protection means that every user can edit data in 7293 // the 7294 // protected range, except editing will prompt a warning asking the 7295 // user 7296 // to confirm the edit. 7297 // 7298 // When writing: if this field is true, then editors is 7299 // ignored. 7300 // Additionally, if this field is changed from true to false and 7301 // the 7302 // `editors` field is not set (nor included in the field mask), then 7303 // the editors will be set to all the editors in the document. 7304 WarningOnly bool `json:"warningOnly,omitempty"` 7305 7306 // ForceSendFields is a list of field names (e.g. "Description") to 7307 // unconditionally include in API requests. By default, fields with 7308 // empty values are omitted from API requests. However, any non-pointer, 7309 // non-interface field appearing in ForceSendFields will be sent to the 7310 // server regardless of whether the field is empty or not. This may be 7311 // used to include empty fields in Patch requests. 7312 ForceSendFields []string `json:"-"` 7313 7314 // NullFields is a list of field names (e.g. "Description") to include 7315 // in API requests with the JSON null value. By default, fields with 7316 // empty values are omitted from API requests. However, any field with 7317 // an empty value appearing in NullFields will be sent to the server as 7318 // null. It is an error if a field in this list has a non-empty value. 7319 // This may be used to include null fields in Patch requests. 7320 NullFields []string `json:"-"` 7321} 7322 7323func (s *ProtectedRange) MarshalJSON() ([]byte, error) { 7324 type NoMethod ProtectedRange 7325 raw := NoMethod(*s) 7326 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7327} 7328 7329// RandomizeRangeRequest: Randomizes the order of the rows in a range. 7330type RandomizeRangeRequest struct { 7331 // Range: The range to randomize. 7332 Range *GridRange `json:"range,omitempty"` 7333 7334 // ForceSendFields is a list of field names (e.g. "Range") to 7335 // unconditionally include in API requests. By default, fields with 7336 // empty values are omitted from API requests. However, any non-pointer, 7337 // non-interface field appearing in ForceSendFields will be sent to the 7338 // server regardless of whether the field is empty or not. This may be 7339 // used to include empty fields in Patch requests. 7340 ForceSendFields []string `json:"-"` 7341 7342 // NullFields is a list of field names (e.g. "Range") to include in API 7343 // requests with the JSON null value. By default, fields with empty 7344 // values are omitted from API requests. However, any field with an 7345 // empty value appearing in NullFields will be sent to the server as 7346 // null. It is an error if a field in this list has a non-empty value. 7347 // This may be used to include null fields in Patch requests. 7348 NullFields []string `json:"-"` 7349} 7350 7351func (s *RandomizeRangeRequest) MarshalJSON() ([]byte, error) { 7352 type NoMethod RandomizeRangeRequest 7353 raw := NoMethod(*s) 7354 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7355} 7356 7357// RepeatCellRequest: Updates all cells in the range to the values in 7358// the given Cell object. 7359// Only the fields listed in the fields field are updated; others 7360// are 7361// unchanged. 7362// 7363// If writing a cell with a formula, the formula's ranges will 7364// automatically 7365// increment for each field in the range. 7366// For example, if writing a cell with formula `=A1` into range 7367// B2:C4, 7368// B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, 7369// C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. 7370// 7371// To keep the formula's ranges static, use the `$` indicator. 7372// For example, use the formula `=$A$1` to prevent both the row and 7373// the 7374// column from incrementing. 7375type RepeatCellRequest struct { 7376 // Cell: The data to write. 7377 Cell *CellData `json:"cell,omitempty"` 7378 7379 // Fields: The fields that should be updated. At least one field must 7380 // be specified. 7381 // The root `cell` is implied and should not be specified. 7382 // A single "*" can be used as short-hand for listing every field. 7383 Fields string `json:"fields,omitempty"` 7384 7385 // Range: The range to repeat the cell in. 7386 Range *GridRange `json:"range,omitempty"` 7387 7388 // ForceSendFields is a list of field names (e.g. "Cell") to 7389 // unconditionally include in API requests. By default, fields with 7390 // empty values are omitted from API requests. However, any non-pointer, 7391 // non-interface field appearing in ForceSendFields will be sent to the 7392 // server regardless of whether the field is empty or not. This may be 7393 // used to include empty fields in Patch requests. 7394 ForceSendFields []string `json:"-"` 7395 7396 // NullFields is a list of field names (e.g. "Cell") to include in API 7397 // requests with the JSON null value. By default, fields with empty 7398 // values are omitted from API requests. However, any field with an 7399 // empty value appearing in NullFields will be sent to the server as 7400 // null. It is an error if a field in this list has a non-empty value. 7401 // This may be used to include null fields in Patch requests. 7402 NullFields []string `json:"-"` 7403} 7404 7405func (s *RepeatCellRequest) MarshalJSON() ([]byte, error) { 7406 type NoMethod RepeatCellRequest 7407 raw := NoMethod(*s) 7408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7409} 7410 7411// Request: A single kind of update to apply to a spreadsheet. 7412type Request struct { 7413 // AddBanding: Adds a new banded range 7414 AddBanding *AddBandingRequest `json:"addBanding,omitempty"` 7415 7416 // AddChart: Adds a chart. 7417 AddChart *AddChartRequest `json:"addChart,omitempty"` 7418 7419 // AddConditionalFormatRule: Adds a new conditional format rule. 7420 AddConditionalFormatRule *AddConditionalFormatRuleRequest `json:"addConditionalFormatRule,omitempty"` 7421 7422 // AddDimensionGroup: Creates a group over the specified range. 7423 AddDimensionGroup *AddDimensionGroupRequest `json:"addDimensionGroup,omitempty"` 7424 7425 // AddFilterView: Adds a filter view. 7426 AddFilterView *AddFilterViewRequest `json:"addFilterView,omitempty"` 7427 7428 // AddNamedRange: Adds a named range. 7429 AddNamedRange *AddNamedRangeRequest `json:"addNamedRange,omitempty"` 7430 7431 // AddProtectedRange: Adds a protected range. 7432 AddProtectedRange *AddProtectedRangeRequest `json:"addProtectedRange,omitempty"` 7433 7434 // AddSheet: Adds a sheet. 7435 AddSheet *AddSheetRequest `json:"addSheet,omitempty"` 7436 7437 // AppendCells: Appends cells after the last row with data in a sheet. 7438 AppendCells *AppendCellsRequest `json:"appendCells,omitempty"` 7439 7440 // AppendDimension: Appends dimensions to the end of a sheet. 7441 AppendDimension *AppendDimensionRequest `json:"appendDimension,omitempty"` 7442 7443 // AutoFill: Automatically fills in more data based on existing data. 7444 AutoFill *AutoFillRequest `json:"autoFill,omitempty"` 7445 7446 // AutoResizeDimensions: Automatically resizes one or more dimensions 7447 // based on the contents 7448 // of the cells in that dimension. 7449 AutoResizeDimensions *AutoResizeDimensionsRequest `json:"autoResizeDimensions,omitempty"` 7450 7451 // ClearBasicFilter: Clears the basic filter on a sheet. 7452 ClearBasicFilter *ClearBasicFilterRequest `json:"clearBasicFilter,omitempty"` 7453 7454 // CopyPaste: Copies data from one area and pastes it to another. 7455 CopyPaste *CopyPasteRequest `json:"copyPaste,omitempty"` 7456 7457 // CreateDeveloperMetadata: Creates new developer metadata 7458 CreateDeveloperMetadata *CreateDeveloperMetadataRequest `json:"createDeveloperMetadata,omitempty"` 7459 7460 // CutPaste: Cuts data from one area and pastes it to another. 7461 CutPaste *CutPasteRequest `json:"cutPaste,omitempty"` 7462 7463 // DeleteBanding: Removes a banded range 7464 DeleteBanding *DeleteBandingRequest `json:"deleteBanding,omitempty"` 7465 7466 // DeleteConditionalFormatRule: Deletes an existing conditional format 7467 // rule. 7468 DeleteConditionalFormatRule *DeleteConditionalFormatRuleRequest `json:"deleteConditionalFormatRule,omitempty"` 7469 7470 // DeleteDeveloperMetadata: Deletes developer metadata 7471 DeleteDeveloperMetadata *DeleteDeveloperMetadataRequest `json:"deleteDeveloperMetadata,omitempty"` 7472 7473 // DeleteDimension: Deletes rows or columns in a sheet. 7474 DeleteDimension *DeleteDimensionRequest `json:"deleteDimension,omitempty"` 7475 7476 // DeleteDimensionGroup: Deletes a group over the specified range. 7477 DeleteDimensionGroup *DeleteDimensionGroupRequest `json:"deleteDimensionGroup,omitempty"` 7478 7479 // DeleteDuplicates: Removes rows containing duplicate values in 7480 // specified columns of a cell 7481 // range. 7482 DeleteDuplicates *DeleteDuplicatesRequest `json:"deleteDuplicates,omitempty"` 7483 7484 // DeleteEmbeddedObject: Deletes an embedded object (e.g, chart, image) 7485 // in a sheet. 7486 DeleteEmbeddedObject *DeleteEmbeddedObjectRequest `json:"deleteEmbeddedObject,omitempty"` 7487 7488 // DeleteFilterView: Deletes a filter view from a sheet. 7489 DeleteFilterView *DeleteFilterViewRequest `json:"deleteFilterView,omitempty"` 7490 7491 // DeleteNamedRange: Deletes a named range. 7492 DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"` 7493 7494 // DeleteProtectedRange: Deletes a protected range. 7495 DeleteProtectedRange *DeleteProtectedRangeRequest `json:"deleteProtectedRange,omitempty"` 7496 7497 // DeleteRange: Deletes a range of cells from a sheet, shifting the 7498 // remaining cells. 7499 DeleteRange *DeleteRangeRequest `json:"deleteRange,omitempty"` 7500 7501 // DeleteSheet: Deletes a sheet. 7502 DeleteSheet *DeleteSheetRequest `json:"deleteSheet,omitempty"` 7503 7504 // DuplicateFilterView: Duplicates a filter view. 7505 DuplicateFilterView *DuplicateFilterViewRequest `json:"duplicateFilterView,omitempty"` 7506 7507 // DuplicateSheet: Duplicates a sheet. 7508 DuplicateSheet *DuplicateSheetRequest `json:"duplicateSheet,omitempty"` 7509 7510 // FindReplace: Finds and replaces occurrences of some text with other 7511 // text. 7512 FindReplace *FindReplaceRequest `json:"findReplace,omitempty"` 7513 7514 // InsertDimension: Inserts new rows or columns in a sheet. 7515 InsertDimension *InsertDimensionRequest `json:"insertDimension,omitempty"` 7516 7517 // InsertRange: Inserts new cells in a sheet, shifting the existing 7518 // cells. 7519 InsertRange *InsertRangeRequest `json:"insertRange,omitempty"` 7520 7521 // MergeCells: Merges cells together. 7522 MergeCells *MergeCellsRequest `json:"mergeCells,omitempty"` 7523 7524 // MoveDimension: Moves rows or columns to another location in a sheet. 7525 MoveDimension *MoveDimensionRequest `json:"moveDimension,omitempty"` 7526 7527 // PasteData: Pastes data (HTML or delimited) into a sheet. 7528 PasteData *PasteDataRequest `json:"pasteData,omitempty"` 7529 7530 // RandomizeRange: Randomizes the order of the rows in a range. 7531 RandomizeRange *RandomizeRangeRequest `json:"randomizeRange,omitempty"` 7532 7533 // RepeatCell: Repeats a single cell across a range. 7534 RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"` 7535 7536 // SetBasicFilter: Sets the basic filter on a sheet. 7537 SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"` 7538 7539 // SetDataValidation: Sets data validation for one or more cells. 7540 SetDataValidation *SetDataValidationRequest `json:"setDataValidation,omitempty"` 7541 7542 // SortRange: Sorts data in a range. 7543 SortRange *SortRangeRequest `json:"sortRange,omitempty"` 7544 7545 // TextToColumns: Converts a column of text into many columns of text. 7546 TextToColumns *TextToColumnsRequest `json:"textToColumns,omitempty"` 7547 7548 // TrimWhitespace: Trims cells of whitespace (such as spaces, tabs, or 7549 // new lines). 7550 TrimWhitespace *TrimWhitespaceRequest `json:"trimWhitespace,omitempty"` 7551 7552 // UnmergeCells: Unmerges merged cells. 7553 UnmergeCells *UnmergeCellsRequest `json:"unmergeCells,omitempty"` 7554 7555 // UpdateBanding: Updates a banded range 7556 UpdateBanding *UpdateBandingRequest `json:"updateBanding,omitempty"` 7557 7558 // UpdateBorders: Updates the borders in a range of cells. 7559 UpdateBorders *UpdateBordersRequest `json:"updateBorders,omitempty"` 7560 7561 // UpdateCells: Updates many cells at once. 7562 UpdateCells *UpdateCellsRequest `json:"updateCells,omitempty"` 7563 7564 // UpdateChartSpec: Updates a chart's specifications. 7565 UpdateChartSpec *UpdateChartSpecRequest `json:"updateChartSpec,omitempty"` 7566 7567 // UpdateConditionalFormatRule: Updates an existing conditional format 7568 // rule. 7569 UpdateConditionalFormatRule *UpdateConditionalFormatRuleRequest `json:"updateConditionalFormatRule,omitempty"` 7570 7571 // UpdateDeveloperMetadata: Updates an existing developer metadata entry 7572 UpdateDeveloperMetadata *UpdateDeveloperMetadataRequest `json:"updateDeveloperMetadata,omitempty"` 7573 7574 // UpdateDimensionGroup: Updates the state of the specified group. 7575 UpdateDimensionGroup *UpdateDimensionGroupRequest `json:"updateDimensionGroup,omitempty"` 7576 7577 // UpdateDimensionProperties: Updates dimensions' properties. 7578 UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"` 7579 7580 // UpdateEmbeddedObjectPosition: Updates an embedded object's (e.g. 7581 // chart, image) position. 7582 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionRequest `json:"updateEmbeddedObjectPosition,omitempty"` 7583 7584 // UpdateFilterView: Updates the properties of a filter view. 7585 UpdateFilterView *UpdateFilterViewRequest `json:"updateFilterView,omitempty"` 7586 7587 // UpdateNamedRange: Updates a named range. 7588 UpdateNamedRange *UpdateNamedRangeRequest `json:"updateNamedRange,omitempty"` 7589 7590 // UpdateProtectedRange: Updates a protected range. 7591 UpdateProtectedRange *UpdateProtectedRangeRequest `json:"updateProtectedRange,omitempty"` 7592 7593 // UpdateSheetProperties: Updates a sheet's properties. 7594 UpdateSheetProperties *UpdateSheetPropertiesRequest `json:"updateSheetProperties,omitempty"` 7595 7596 // UpdateSpreadsheetProperties: Updates the spreadsheet's properties. 7597 UpdateSpreadsheetProperties *UpdateSpreadsheetPropertiesRequest `json:"updateSpreadsheetProperties,omitempty"` 7598 7599 // ForceSendFields is a list of field names (e.g. "AddBanding") to 7600 // unconditionally include in API requests. By default, fields with 7601 // empty values are omitted from API requests. However, any non-pointer, 7602 // non-interface field appearing in ForceSendFields will be sent to the 7603 // server regardless of whether the field is empty or not. This may be 7604 // used to include empty fields in Patch requests. 7605 ForceSendFields []string `json:"-"` 7606 7607 // NullFields is a list of field names (e.g. "AddBanding") to include in 7608 // API requests with the JSON null value. By default, fields with empty 7609 // values are omitted from API requests. However, any field with an 7610 // empty value appearing in NullFields will be sent to the server as 7611 // null. It is an error if a field in this list has a non-empty value. 7612 // This may be used to include null fields in Patch requests. 7613 NullFields []string `json:"-"` 7614} 7615 7616func (s *Request) MarshalJSON() ([]byte, error) { 7617 type NoMethod Request 7618 raw := NoMethod(*s) 7619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7620} 7621 7622// Response: A single response from an update. 7623type Response struct { 7624 // AddBanding: A reply from adding a banded range. 7625 AddBanding *AddBandingResponse `json:"addBanding,omitempty"` 7626 7627 // AddChart: A reply from adding a chart. 7628 AddChart *AddChartResponse `json:"addChart,omitempty"` 7629 7630 // AddDimensionGroup: A reply from adding a dimension group. 7631 AddDimensionGroup *AddDimensionGroupResponse `json:"addDimensionGroup,omitempty"` 7632 7633 // AddFilterView: A reply from adding a filter view. 7634 AddFilterView *AddFilterViewResponse `json:"addFilterView,omitempty"` 7635 7636 // AddNamedRange: A reply from adding a named range. 7637 AddNamedRange *AddNamedRangeResponse `json:"addNamedRange,omitempty"` 7638 7639 // AddProtectedRange: A reply from adding a protected range. 7640 AddProtectedRange *AddProtectedRangeResponse `json:"addProtectedRange,omitempty"` 7641 7642 // AddSheet: A reply from adding a sheet. 7643 AddSheet *AddSheetResponse `json:"addSheet,omitempty"` 7644 7645 // CreateDeveloperMetadata: A reply from creating a developer metadata 7646 // entry. 7647 CreateDeveloperMetadata *CreateDeveloperMetadataResponse `json:"createDeveloperMetadata,omitempty"` 7648 7649 // DeleteConditionalFormatRule: A reply from deleting a conditional 7650 // format rule. 7651 DeleteConditionalFormatRule *DeleteConditionalFormatRuleResponse `json:"deleteConditionalFormatRule,omitempty"` 7652 7653 // DeleteDeveloperMetadata: A reply from deleting a developer metadata 7654 // entry. 7655 DeleteDeveloperMetadata *DeleteDeveloperMetadataResponse `json:"deleteDeveloperMetadata,omitempty"` 7656 7657 // DeleteDimensionGroup: A reply from deleting a dimension group. 7658 DeleteDimensionGroup *DeleteDimensionGroupResponse `json:"deleteDimensionGroup,omitempty"` 7659 7660 // DeleteDuplicates: A reply from removing rows containing duplicate 7661 // values. 7662 DeleteDuplicates *DeleteDuplicatesResponse `json:"deleteDuplicates,omitempty"` 7663 7664 // DuplicateFilterView: A reply from duplicating a filter view. 7665 DuplicateFilterView *DuplicateFilterViewResponse `json:"duplicateFilterView,omitempty"` 7666 7667 // DuplicateSheet: A reply from duplicating a sheet. 7668 DuplicateSheet *DuplicateSheetResponse `json:"duplicateSheet,omitempty"` 7669 7670 // FindReplace: A reply from doing a find/replace. 7671 FindReplace *FindReplaceResponse `json:"findReplace,omitempty"` 7672 7673 // TrimWhitespace: A reply from trimming whitespace. 7674 TrimWhitespace *TrimWhitespaceResponse `json:"trimWhitespace,omitempty"` 7675 7676 // UpdateConditionalFormatRule: A reply from updating a conditional 7677 // format rule. 7678 UpdateConditionalFormatRule *UpdateConditionalFormatRuleResponse `json:"updateConditionalFormatRule,omitempty"` 7679 7680 // UpdateDeveloperMetadata: A reply from updating a developer metadata 7681 // entry. 7682 UpdateDeveloperMetadata *UpdateDeveloperMetadataResponse `json:"updateDeveloperMetadata,omitempty"` 7683 7684 // UpdateEmbeddedObjectPosition: A reply from updating an embedded 7685 // object's position. 7686 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionResponse `json:"updateEmbeddedObjectPosition,omitempty"` 7687 7688 // ForceSendFields is a list of field names (e.g. "AddBanding") to 7689 // unconditionally include in API requests. By default, fields with 7690 // empty values are omitted from API requests. However, any non-pointer, 7691 // non-interface field appearing in ForceSendFields will be sent to the 7692 // server regardless of whether the field is empty or not. This may be 7693 // used to include empty fields in Patch requests. 7694 ForceSendFields []string `json:"-"` 7695 7696 // NullFields is a list of field names (e.g. "AddBanding") to include in 7697 // API requests with the JSON null value. By default, fields with empty 7698 // values are omitted from API requests. However, any field with an 7699 // empty value appearing in NullFields will be sent to the server as 7700 // null. It is an error if a field in this list has a non-empty value. 7701 // This may be used to include null fields in Patch requests. 7702 NullFields []string `json:"-"` 7703} 7704 7705func (s *Response) MarshalJSON() ([]byte, error) { 7706 type NoMethod Response 7707 raw := NoMethod(*s) 7708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7709} 7710 7711// RowData: Data about each cell in a row. 7712type RowData struct { 7713 // Values: The values in the row, one per column. 7714 Values []*CellData `json:"values,omitempty"` 7715 7716 // ForceSendFields is a list of field names (e.g. "Values") to 7717 // unconditionally include in API requests. By default, fields with 7718 // empty values are omitted from API requests. However, any non-pointer, 7719 // non-interface field appearing in ForceSendFields will be sent to the 7720 // server regardless of whether the field is empty or not. This may be 7721 // used to include empty fields in Patch requests. 7722 ForceSendFields []string `json:"-"` 7723 7724 // NullFields is a list of field names (e.g. "Values") to include in API 7725 // requests with the JSON null value. By default, fields with empty 7726 // values are omitted from API requests. However, any field with an 7727 // empty value appearing in NullFields will be sent to the server as 7728 // null. It is an error if a field in this list has a non-empty value. 7729 // This may be used to include null fields in Patch requests. 7730 NullFields []string `json:"-"` 7731} 7732 7733func (s *RowData) MarshalJSON() ([]byte, error) { 7734 type NoMethod RowData 7735 raw := NoMethod(*s) 7736 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7737} 7738 7739// SearchDeveloperMetadataRequest: A request to retrieve all developer 7740// metadata matching the set of specified 7741// criteria. 7742type SearchDeveloperMetadataRequest struct { 7743 // DataFilters: The data filters describing the criteria used to 7744 // determine which 7745 // DeveloperMetadata entries to return. DeveloperMetadata matching any 7746 // of the 7747 // specified filters will be included in the response. 7748 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 7749 7750 // ForceSendFields is a list of field names (e.g. "DataFilters") to 7751 // unconditionally include in API requests. By default, fields with 7752 // empty values are omitted from API requests. However, any non-pointer, 7753 // non-interface field appearing in ForceSendFields will be sent to the 7754 // server regardless of whether the field is empty or not. This may be 7755 // used to include empty fields in Patch requests. 7756 ForceSendFields []string `json:"-"` 7757 7758 // NullFields is a list of field names (e.g. "DataFilters") to include 7759 // in API requests with the JSON null value. By default, fields with 7760 // empty values are omitted from API requests. However, any field with 7761 // an empty value appearing in NullFields will be sent to the server as 7762 // null. It is an error if a field in this list has a non-empty value. 7763 // This may be used to include null fields in Patch requests. 7764 NullFields []string `json:"-"` 7765} 7766 7767func (s *SearchDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 7768 type NoMethod SearchDeveloperMetadataRequest 7769 raw := NoMethod(*s) 7770 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7771} 7772 7773// SearchDeveloperMetadataResponse: A reply to a developer metadata 7774// search request. 7775type SearchDeveloperMetadataResponse struct { 7776 // MatchedDeveloperMetadata: The metadata matching the criteria of the 7777 // search request. 7778 MatchedDeveloperMetadata []*MatchedDeveloperMetadata `json:"matchedDeveloperMetadata,omitempty"` 7779 7780 // ServerResponse contains the HTTP response code and headers from the 7781 // server. 7782 googleapi.ServerResponse `json:"-"` 7783 7784 // ForceSendFields is a list of field names (e.g. 7785 // "MatchedDeveloperMetadata") to unconditionally include in API 7786 // requests. By default, fields with empty values are omitted from API 7787 // requests. However, any non-pointer, non-interface field appearing in 7788 // ForceSendFields will be sent to the server regardless of whether the 7789 // field is empty or not. This may be used to include empty fields in 7790 // Patch requests. 7791 ForceSendFields []string `json:"-"` 7792 7793 // NullFields is a list of field names (e.g. "MatchedDeveloperMetadata") 7794 // to include in API requests with the JSON null value. By default, 7795 // fields with empty values are omitted from API requests. However, any 7796 // field with an empty value appearing in NullFields will be sent to the 7797 // server as null. It is an error if a field in this list has a 7798 // non-empty value. This may be used to include null fields in Patch 7799 // requests. 7800 NullFields []string `json:"-"` 7801} 7802 7803func (s *SearchDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 7804 type NoMethod SearchDeveloperMetadataResponse 7805 raw := NoMethod(*s) 7806 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7807} 7808 7809// SetBasicFilterRequest: Sets the basic filter associated with a sheet. 7810type SetBasicFilterRequest struct { 7811 // Filter: The filter to set. 7812 Filter *BasicFilter `json:"filter,omitempty"` 7813 7814 // ForceSendFields is a list of field names (e.g. "Filter") to 7815 // unconditionally include in API requests. By default, fields with 7816 // empty values are omitted from API requests. However, any non-pointer, 7817 // non-interface field appearing in ForceSendFields will be sent to the 7818 // server regardless of whether the field is empty or not. This may be 7819 // used to include empty fields in Patch requests. 7820 ForceSendFields []string `json:"-"` 7821 7822 // NullFields is a list of field names (e.g. "Filter") to include in API 7823 // requests with the JSON null value. By default, fields with empty 7824 // values are omitted from API requests. However, any field with an 7825 // empty value appearing in NullFields will be sent to the server as 7826 // null. It is an error if a field in this list has a non-empty value. 7827 // This may be used to include null fields in Patch requests. 7828 NullFields []string `json:"-"` 7829} 7830 7831func (s *SetBasicFilterRequest) MarshalJSON() ([]byte, error) { 7832 type NoMethod SetBasicFilterRequest 7833 raw := NoMethod(*s) 7834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7835} 7836 7837// SetDataValidationRequest: Sets a data validation rule to every cell 7838// in the range. 7839// To clear validation in a range, call this with no rule specified. 7840type SetDataValidationRequest struct { 7841 // Range: The range the data validation rule should apply to. 7842 Range *GridRange `json:"range,omitempty"` 7843 7844 // Rule: The data validation rule to set on each cell in the range, 7845 // or empty to clear the data validation in the range. 7846 Rule *DataValidationRule `json:"rule,omitempty"` 7847 7848 // ForceSendFields is a list of field names (e.g. "Range") to 7849 // unconditionally include in API requests. By default, fields with 7850 // empty values are omitted from API requests. However, any non-pointer, 7851 // non-interface field appearing in ForceSendFields will be sent to the 7852 // server regardless of whether the field is empty or not. This may be 7853 // used to include empty fields in Patch requests. 7854 ForceSendFields []string `json:"-"` 7855 7856 // NullFields is a list of field names (e.g. "Range") to include in API 7857 // requests with the JSON null value. By default, fields with empty 7858 // values are omitted from API requests. However, any field with an 7859 // empty value appearing in NullFields will be sent to the server as 7860 // null. It is an error if a field in this list has a non-empty value. 7861 // This may be used to include null fields in Patch requests. 7862 NullFields []string `json:"-"` 7863} 7864 7865func (s *SetDataValidationRequest) MarshalJSON() ([]byte, error) { 7866 type NoMethod SetDataValidationRequest 7867 raw := NoMethod(*s) 7868 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7869} 7870 7871// Sheet: A sheet in a spreadsheet. 7872type Sheet struct { 7873 // BandedRanges: The banded (alternating colors) ranges on this sheet. 7874 BandedRanges []*BandedRange `json:"bandedRanges,omitempty"` 7875 7876 // BasicFilter: The filter on this sheet, if any. 7877 BasicFilter *BasicFilter `json:"basicFilter,omitempty"` 7878 7879 // Charts: The specifications of every chart on this sheet. 7880 Charts []*EmbeddedChart `json:"charts,omitempty"` 7881 7882 // ColumnGroups: All column groups on this sheet, ordered by increasing 7883 // range start index, 7884 // then by group depth. 7885 ColumnGroups []*DimensionGroup `json:"columnGroups,omitempty"` 7886 7887 // ConditionalFormats: The conditional format rules in this sheet. 7888 ConditionalFormats []*ConditionalFormatRule `json:"conditionalFormats,omitempty"` 7889 7890 // Data: Data in the grid, if this is a grid sheet. 7891 // The number of GridData objects returned is dependent on the number 7892 // of 7893 // ranges requested on this sheet. For example, if this is 7894 // representing 7895 // `Sheet1`, and the spreadsheet was requested with 7896 // ranges 7897 // `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will 7898 // have a 7899 // startRow/startColumn of `0`, 7900 // while the second one will have `startRow 14` (zero-based row 15), 7901 // and `startColumn 3` (zero-based column D). 7902 Data []*GridData `json:"data,omitempty"` 7903 7904 // DeveloperMetadata: The developer metadata associated with a sheet. 7905 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 7906 7907 // FilterViews: The filter views in this sheet. 7908 FilterViews []*FilterView `json:"filterViews,omitempty"` 7909 7910 // Merges: The ranges that are merged together. 7911 Merges []*GridRange `json:"merges,omitempty"` 7912 7913 // Properties: The properties of the sheet. 7914 Properties *SheetProperties `json:"properties,omitempty"` 7915 7916 // ProtectedRanges: The protected ranges in this sheet. 7917 ProtectedRanges []*ProtectedRange `json:"protectedRanges,omitempty"` 7918 7919 // RowGroups: All row groups on this sheet, ordered by increasing range 7920 // start index, then 7921 // by group depth. 7922 RowGroups []*DimensionGroup `json:"rowGroups,omitempty"` 7923 7924 // ForceSendFields is a list of field names (e.g. "BandedRanges") to 7925 // unconditionally include in API requests. By default, fields with 7926 // empty values are omitted from API requests. However, any non-pointer, 7927 // non-interface field appearing in ForceSendFields will be sent to the 7928 // server regardless of whether the field is empty or not. This may be 7929 // used to include empty fields in Patch requests. 7930 ForceSendFields []string `json:"-"` 7931 7932 // NullFields is a list of field names (e.g. "BandedRanges") to include 7933 // in API requests with the JSON null value. By default, fields with 7934 // empty values are omitted from API requests. However, any field with 7935 // an empty value appearing in NullFields will be sent to the server as 7936 // null. It is an error if a field in this list has a non-empty value. 7937 // This may be used to include null fields in Patch requests. 7938 NullFields []string `json:"-"` 7939} 7940 7941func (s *Sheet) MarshalJSON() ([]byte, error) { 7942 type NoMethod Sheet 7943 raw := NoMethod(*s) 7944 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7945} 7946 7947// SheetProperties: Properties of a sheet. 7948type SheetProperties struct { 7949 // GridProperties: Additional properties of the sheet if this sheet is a 7950 // grid. 7951 // (If the sheet is an object sheet, containing a chart or image, 7952 // then 7953 // this field will be absent.) 7954 // When writing it is an error to set any grid properties on non-grid 7955 // sheets. 7956 GridProperties *GridProperties `json:"gridProperties,omitempty"` 7957 7958 // Hidden: True if the sheet is hidden in the UI, false if it's visible. 7959 Hidden bool `json:"hidden,omitempty"` 7960 7961 // Index: The index of the sheet within the spreadsheet. 7962 // When adding or updating sheet properties, if this field 7963 // is excluded then the sheet is added or moved to the end 7964 // of the sheet list. When updating sheet indices or inserting 7965 // sheets, movement is considered in "before the move" indexes. 7966 // For example, if there were 3 sheets (S1, S2, S3) in order to 7967 // move S1 ahead of S2 the index would have to be set to 2. A 7968 // sheet 7969 // index update request is ignored if the requested index is 7970 // identical to the sheets current index or if the requested new 7971 // index is equal to the current sheet index + 1. 7972 Index int64 `json:"index,omitempty"` 7973 7974 // RightToLeft: True if the sheet is an RTL sheet instead of an LTR 7975 // sheet. 7976 RightToLeft bool `json:"rightToLeft,omitempty"` 7977 7978 // SheetId: The ID of the sheet. Must be non-negative. 7979 // This field cannot be changed once set. 7980 SheetId int64 `json:"sheetId,omitempty"` 7981 7982 // SheetType: The type of sheet. Defaults to GRID. 7983 // This field cannot be changed once set. 7984 // 7985 // Possible values: 7986 // "SHEET_TYPE_UNSPECIFIED" - Default value, do not use. 7987 // "GRID" - The sheet is a grid. 7988 // "OBJECT" - The sheet has no grid and instead has an object like a 7989 // chart or image. 7990 SheetType string `json:"sheetType,omitempty"` 7991 7992 // TabColor: The color of the tab in the UI. 7993 TabColor *Color `json:"tabColor,omitempty"` 7994 7995 // Title: The name of the sheet. 7996 Title string `json:"title,omitempty"` 7997 7998 // ServerResponse contains the HTTP response code and headers from the 7999 // server. 8000 googleapi.ServerResponse `json:"-"` 8001 8002 // ForceSendFields is a list of field names (e.g. "GridProperties") to 8003 // unconditionally include in API requests. By default, fields with 8004 // empty values are omitted from API requests. However, any non-pointer, 8005 // non-interface field appearing in ForceSendFields will be sent to the 8006 // server regardless of whether the field is empty or not. This may be 8007 // used to include empty fields in Patch requests. 8008 ForceSendFields []string `json:"-"` 8009 8010 // NullFields is a list of field names (e.g. "GridProperties") to 8011 // include in API requests with the JSON null value. By default, fields 8012 // with empty values are omitted from API requests. However, any field 8013 // with an empty value appearing in NullFields will be sent to the 8014 // server as null. It is an error if a field in this list has a 8015 // non-empty value. This may be used to include null fields in Patch 8016 // requests. 8017 NullFields []string `json:"-"` 8018} 8019 8020func (s *SheetProperties) MarshalJSON() ([]byte, error) { 8021 type NoMethod SheetProperties 8022 raw := NoMethod(*s) 8023 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8024} 8025 8026// SortRangeRequest: Sorts data in rows based on a sort order per 8027// column. 8028type SortRangeRequest struct { 8029 // Range: The range to sort. 8030 Range *GridRange `json:"range,omitempty"` 8031 8032 // SortSpecs: The sort order per column. Later specifications are used 8033 // when values 8034 // are equal in the earlier specifications. 8035 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 8036 8037 // ForceSendFields is a list of field names (e.g. "Range") to 8038 // unconditionally include in API requests. By default, fields with 8039 // empty values are omitted from API requests. However, any non-pointer, 8040 // non-interface field appearing in ForceSendFields will be sent to the 8041 // server regardless of whether the field is empty or not. This may be 8042 // used to include empty fields in Patch requests. 8043 ForceSendFields []string `json:"-"` 8044 8045 // NullFields is a list of field names (e.g. "Range") to include in API 8046 // requests with the JSON null value. By default, fields with empty 8047 // values are omitted from API requests. However, any field with an 8048 // empty value appearing in NullFields will be sent to the server as 8049 // null. It is an error if a field in this list has a non-empty value. 8050 // This may be used to include null fields in Patch requests. 8051 NullFields []string `json:"-"` 8052} 8053 8054func (s *SortRangeRequest) MarshalJSON() ([]byte, error) { 8055 type NoMethod SortRangeRequest 8056 raw := NoMethod(*s) 8057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8058} 8059 8060// SortSpec: A sort order associated with a specific column or row. 8061type SortSpec struct { 8062 // DimensionIndex: The dimension the sort should be applied to. 8063 DimensionIndex int64 `json:"dimensionIndex,omitempty"` 8064 8065 // SortOrder: The order data should be sorted. 8066 // 8067 // Possible values: 8068 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 8069 // "ASCENDING" - Sort ascending. 8070 // "DESCENDING" - Sort descending. 8071 SortOrder string `json:"sortOrder,omitempty"` 8072 8073 // ForceSendFields is a list of field names (e.g. "DimensionIndex") to 8074 // unconditionally include in API requests. By default, fields with 8075 // empty values are omitted from API requests. However, any non-pointer, 8076 // non-interface field appearing in ForceSendFields will be sent to the 8077 // server regardless of whether the field is empty or not. This may be 8078 // used to include empty fields in Patch requests. 8079 ForceSendFields []string `json:"-"` 8080 8081 // NullFields is a list of field names (e.g. "DimensionIndex") to 8082 // include in API requests with the JSON null value. By default, fields 8083 // with empty values are omitted from API requests. However, any field 8084 // with an empty value appearing in NullFields will be sent to the 8085 // server as null. It is an error if a field in this list has a 8086 // non-empty value. This may be used to include null fields in Patch 8087 // requests. 8088 NullFields []string `json:"-"` 8089} 8090 8091func (s *SortSpec) MarshalJSON() ([]byte, error) { 8092 type NoMethod SortSpec 8093 raw := NoMethod(*s) 8094 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8095} 8096 8097// SourceAndDestination: A combination of a source range and how to 8098// extend that source. 8099type SourceAndDestination struct { 8100 // Dimension: The dimension that data should be filled into. 8101 // 8102 // Possible values: 8103 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 8104 // "ROWS" - Operates on the rows of a sheet. 8105 // "COLUMNS" - Operates on the columns of a sheet. 8106 Dimension string `json:"dimension,omitempty"` 8107 8108 // FillLength: The number of rows or columns that data should be filled 8109 // into. 8110 // Positive numbers expand beyond the last row or last column 8111 // of the source. Negative numbers expand before the first row 8112 // or first column of the source. 8113 FillLength int64 `json:"fillLength,omitempty"` 8114 8115 // Source: The location of the data to use as the source of the 8116 // autofill. 8117 Source *GridRange `json:"source,omitempty"` 8118 8119 // ForceSendFields is a list of field names (e.g. "Dimension") to 8120 // unconditionally include in API requests. By default, fields with 8121 // empty values are omitted from API requests. However, any non-pointer, 8122 // non-interface field appearing in ForceSendFields will be sent to the 8123 // server regardless of whether the field is empty or not. This may be 8124 // used to include empty fields in Patch requests. 8125 ForceSendFields []string `json:"-"` 8126 8127 // NullFields is a list of field names (e.g. "Dimension") to include in 8128 // API requests with the JSON null value. By default, fields with empty 8129 // values are omitted from API requests. However, any field with an 8130 // empty value appearing in NullFields will be sent to the server as 8131 // null. It is an error if a field in this list has a non-empty value. 8132 // This may be used to include null fields in Patch requests. 8133 NullFields []string `json:"-"` 8134} 8135 8136func (s *SourceAndDestination) MarshalJSON() ([]byte, error) { 8137 type NoMethod SourceAndDestination 8138 raw := NoMethod(*s) 8139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8140} 8141 8142// Spreadsheet: Resource that represents a spreadsheet. 8143type Spreadsheet struct { 8144 // DeveloperMetadata: The developer metadata associated with a 8145 // spreadsheet. 8146 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 8147 8148 // NamedRanges: The named ranges defined in a spreadsheet. 8149 NamedRanges []*NamedRange `json:"namedRanges,omitempty"` 8150 8151 // Properties: Overall properties of a spreadsheet. 8152 Properties *SpreadsheetProperties `json:"properties,omitempty"` 8153 8154 // Sheets: The sheets that are part of a spreadsheet. 8155 Sheets []*Sheet `json:"sheets,omitempty"` 8156 8157 // SpreadsheetId: The ID of the spreadsheet. 8158 // This field is read-only. 8159 SpreadsheetId string `json:"spreadsheetId,omitempty"` 8160 8161 // SpreadsheetUrl: The url of the spreadsheet. 8162 // This field is read-only. 8163 SpreadsheetUrl string `json:"spreadsheetUrl,omitempty"` 8164 8165 // ServerResponse contains the HTTP response code and headers from the 8166 // server. 8167 googleapi.ServerResponse `json:"-"` 8168 8169 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 8170 // to unconditionally include in API requests. By default, fields with 8171 // empty values are omitted from API requests. However, any non-pointer, 8172 // non-interface field appearing in ForceSendFields will be sent to the 8173 // server regardless of whether the field is empty or not. This may be 8174 // used to include empty fields in Patch requests. 8175 ForceSendFields []string `json:"-"` 8176 8177 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 8178 // include in API requests with the JSON null value. By default, fields 8179 // with empty values are omitted from API requests. However, any field 8180 // with an empty value appearing in NullFields will be sent to the 8181 // server as null. It is an error if a field in this list has a 8182 // non-empty value. This may be used to include null fields in Patch 8183 // requests. 8184 NullFields []string `json:"-"` 8185} 8186 8187func (s *Spreadsheet) MarshalJSON() ([]byte, error) { 8188 type NoMethod Spreadsheet 8189 raw := NoMethod(*s) 8190 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8191} 8192 8193// SpreadsheetProperties: Properties of a spreadsheet. 8194type SpreadsheetProperties struct { 8195 // AutoRecalc: The amount of time to wait before volatile functions are 8196 // recalculated. 8197 // 8198 // Possible values: 8199 // "RECALCULATION_INTERVAL_UNSPECIFIED" - Default value. This value 8200 // must not be used. 8201 // "ON_CHANGE" - Volatile functions are updated on every change. 8202 // "MINUTE" - Volatile functions are updated on every change and every 8203 // minute. 8204 // "HOUR" - Volatile functions are updated on every change and hourly. 8205 AutoRecalc string `json:"autoRecalc,omitempty"` 8206 8207 // DefaultFormat: The default format of all cells in the 8208 // spreadsheet. 8209 // CellData.effectiveFormat will not be set if 8210 // the cell's format is equal to this default format. This field is 8211 // read-only. 8212 DefaultFormat *CellFormat `json:"defaultFormat,omitempty"` 8213 8214 // IterativeCalculationSettings: Determines whether and how circular 8215 // references are resolved with iterative 8216 // calculation. Absence of this field means that circular references 8217 // will 8218 // result in calculation errors. 8219 IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"` 8220 8221 // Locale: The locale of the spreadsheet in one of the following 8222 // formats: 8223 // 8224 // * an ISO 639-1 language code such as `en` 8225 // 8226 // * an ISO 639-2 language code such as `fil`, if no 639-1 code 8227 // exists 8228 // 8229 // * a combination of the ISO language code and country code, such as 8230 // `en_US` 8231 // 8232 // Note: when updating this field, not all locales/languages are 8233 // supported. 8234 Locale string `json:"locale,omitempty"` 8235 8236 // TimeZone: The time zone of the spreadsheet, in CLDR format such 8237 // as 8238 // `America/New_York`. If the time zone isn't recognized, this may 8239 // be a custom time zone such as `GMT-07:00`. 8240 TimeZone string `json:"timeZone,omitempty"` 8241 8242 // Title: The title of the spreadsheet. 8243 Title string `json:"title,omitempty"` 8244 8245 // ForceSendFields is a list of field names (e.g. "AutoRecalc") to 8246 // unconditionally include in API requests. By default, fields with 8247 // empty values are omitted from API requests. However, any non-pointer, 8248 // non-interface field appearing in ForceSendFields will be sent to the 8249 // server regardless of whether the field is empty or not. This may be 8250 // used to include empty fields in Patch requests. 8251 ForceSendFields []string `json:"-"` 8252 8253 // NullFields is a list of field names (e.g. "AutoRecalc") to include in 8254 // API requests with the JSON null value. By default, fields with empty 8255 // values are omitted from API requests. However, any field with an 8256 // empty value appearing in NullFields will be sent to the server as 8257 // null. It is an error if a field in this list has a non-empty value. 8258 // This may be used to include null fields in Patch requests. 8259 NullFields []string `json:"-"` 8260} 8261 8262func (s *SpreadsheetProperties) MarshalJSON() ([]byte, error) { 8263 type NoMethod SpreadsheetProperties 8264 raw := NoMethod(*s) 8265 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8266} 8267 8268// TextFormat: The format of a run of text in a cell. 8269// Absent values indicate that the field isn't specified. 8270type TextFormat struct { 8271 // Bold: True if the text is bold. 8272 Bold bool `json:"bold,omitempty"` 8273 8274 // FontFamily: The font family. 8275 FontFamily string `json:"fontFamily,omitempty"` 8276 8277 // FontSize: The size of the font. 8278 FontSize int64 `json:"fontSize,omitempty"` 8279 8280 // ForegroundColor: The foreground color of the text. 8281 ForegroundColor *Color `json:"foregroundColor,omitempty"` 8282 8283 // Italic: True if the text is italicized. 8284 Italic bool `json:"italic,omitempty"` 8285 8286 // Strikethrough: True if the text has a strikethrough. 8287 Strikethrough bool `json:"strikethrough,omitempty"` 8288 8289 // Underline: True if the text is underlined. 8290 Underline bool `json:"underline,omitempty"` 8291 8292 // ForceSendFields is a list of field names (e.g. "Bold") to 8293 // unconditionally include in API requests. By default, fields with 8294 // empty values are omitted from API requests. However, any non-pointer, 8295 // non-interface field appearing in ForceSendFields will be sent to the 8296 // server regardless of whether the field is empty or not. This may be 8297 // used to include empty fields in Patch requests. 8298 ForceSendFields []string `json:"-"` 8299 8300 // NullFields is a list of field names (e.g. "Bold") to include in API 8301 // requests with the JSON null value. By default, fields with empty 8302 // values are omitted from API requests. However, any field with an 8303 // empty value appearing in NullFields will be sent to the server as 8304 // null. It is an error if a field in this list has a non-empty value. 8305 // This may be used to include null fields in Patch requests. 8306 NullFields []string `json:"-"` 8307} 8308 8309func (s *TextFormat) MarshalJSON() ([]byte, error) { 8310 type NoMethod TextFormat 8311 raw := NoMethod(*s) 8312 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8313} 8314 8315// TextFormatRun: A run of a text format. The format of this run 8316// continues until the start 8317// index of the next run. 8318// When updating, all fields must be set. 8319type TextFormatRun struct { 8320 // Format: The format of this run. Absent values inherit the cell's 8321 // format. 8322 Format *TextFormat `json:"format,omitempty"` 8323 8324 // StartIndex: The character index where this run starts. 8325 StartIndex int64 `json:"startIndex,omitempty"` 8326 8327 // ForceSendFields is a list of field names (e.g. "Format") to 8328 // unconditionally include in API requests. By default, fields with 8329 // empty values are omitted from API requests. However, any non-pointer, 8330 // non-interface field appearing in ForceSendFields will be sent to the 8331 // server regardless of whether the field is empty or not. This may be 8332 // used to include empty fields in Patch requests. 8333 ForceSendFields []string `json:"-"` 8334 8335 // NullFields is a list of field names (e.g. "Format") to include in API 8336 // requests with the JSON null value. By default, fields with empty 8337 // values are omitted from API requests. However, any field with an 8338 // empty value appearing in NullFields will be sent to the server as 8339 // null. It is an error if a field in this list has a non-empty value. 8340 // This may be used to include null fields in Patch requests. 8341 NullFields []string `json:"-"` 8342} 8343 8344func (s *TextFormatRun) MarshalJSON() ([]byte, error) { 8345 type NoMethod TextFormatRun 8346 raw := NoMethod(*s) 8347 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8348} 8349 8350// TextPosition: Position settings for text. 8351type TextPosition struct { 8352 // HorizontalAlignment: Horizontal alignment setting for the piece of 8353 // text. 8354 // 8355 // Possible values: 8356 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 8357 // specified. Do not use this. 8358 // "LEFT" - The text is explicitly aligned to the left of the cell. 8359 // "CENTER" - The text is explicitly aligned to the center of the 8360 // cell. 8361 // "RIGHT" - The text is explicitly aligned to the right of the cell. 8362 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 8363 8364 // ForceSendFields is a list of field names (e.g. "HorizontalAlignment") 8365 // to unconditionally include in API requests. By default, fields with 8366 // empty values are omitted from API requests. However, any non-pointer, 8367 // non-interface field appearing in ForceSendFields will be sent to the 8368 // server regardless of whether the field is empty or not. This may be 8369 // used to include empty fields in Patch requests. 8370 ForceSendFields []string `json:"-"` 8371 8372 // NullFields is a list of field names (e.g. "HorizontalAlignment") to 8373 // include in API requests with the JSON null value. By default, fields 8374 // with empty values are omitted from API requests. However, any field 8375 // with an empty value appearing in NullFields will be sent to the 8376 // server as null. It is an error if a field in this list has a 8377 // non-empty value. This may be used to include null fields in Patch 8378 // requests. 8379 NullFields []string `json:"-"` 8380} 8381 8382func (s *TextPosition) MarshalJSON() ([]byte, error) { 8383 type NoMethod TextPosition 8384 raw := NoMethod(*s) 8385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8386} 8387 8388// TextRotation: The rotation applied to text in a cell. 8389type TextRotation struct { 8390 // Angle: The angle between the standard orientation and the desired 8391 // orientation. 8392 // Measured in degrees. Valid values are between -90 and 90. 8393 // Positive 8394 // angles are angled upwards, negative are angled downwards. 8395 // 8396 // Note: For LTR text direction positive angles are in 8397 // the 8398 // counterclockwise direction, whereas for RTL they are in the 8399 // clockwise 8400 // direction 8401 Angle int64 `json:"angle,omitempty"` 8402 8403 // Vertical: If true, text reads top to bottom, but the orientation of 8404 // individual 8405 // characters is unchanged. 8406 // For example: 8407 // 8408 // | V | 8409 // | e | 8410 // | r | 8411 // | t | 8412 // | i | 8413 // | c | 8414 // | a | 8415 // | l | 8416 Vertical bool `json:"vertical,omitempty"` 8417 8418 // ForceSendFields is a list of field names (e.g. "Angle") to 8419 // unconditionally include in API requests. By default, fields with 8420 // empty values are omitted from API requests. However, any non-pointer, 8421 // non-interface field appearing in ForceSendFields will be sent to the 8422 // server regardless of whether the field is empty or not. This may be 8423 // used to include empty fields in Patch requests. 8424 ForceSendFields []string `json:"-"` 8425 8426 // NullFields is a list of field names (e.g. "Angle") to include in API 8427 // requests with the JSON null value. By default, fields with empty 8428 // values are omitted from API requests. However, any field with an 8429 // empty value appearing in NullFields will be sent to the server as 8430 // null. It is an error if a field in this list has a non-empty value. 8431 // This may be used to include null fields in Patch requests. 8432 NullFields []string `json:"-"` 8433} 8434 8435func (s *TextRotation) MarshalJSON() ([]byte, error) { 8436 type NoMethod TextRotation 8437 raw := NoMethod(*s) 8438 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8439} 8440 8441// TextToColumnsRequest: Splits a column of text into multiple 8442// columns, 8443// based on a delimiter in each cell. 8444type TextToColumnsRequest struct { 8445 // Delimiter: The delimiter to use. Used only if delimiterType 8446 // is 8447 // CUSTOM. 8448 Delimiter string `json:"delimiter,omitempty"` 8449 8450 // DelimiterType: The delimiter type to use. 8451 // 8452 // Possible values: 8453 // "DELIMITER_TYPE_UNSPECIFIED" - Default value. This value must not 8454 // be used. 8455 // "COMMA" - "," 8456 // "SEMICOLON" - ";" 8457 // "PERIOD" - "." 8458 // "SPACE" - " " 8459 // "CUSTOM" - A custom value as defined in delimiter. 8460 // "AUTODETECT" - Automatically detect columns. 8461 DelimiterType string `json:"delimiterType,omitempty"` 8462 8463 // Source: The source data range. This must span exactly one column. 8464 Source *GridRange `json:"source,omitempty"` 8465 8466 // ForceSendFields is a list of field names (e.g. "Delimiter") to 8467 // unconditionally include in API requests. By default, fields with 8468 // empty values are omitted from API requests. However, any non-pointer, 8469 // non-interface field appearing in ForceSendFields will be sent to the 8470 // server regardless of whether the field is empty or not. This may be 8471 // used to include empty fields in Patch requests. 8472 ForceSendFields []string `json:"-"` 8473 8474 // NullFields is a list of field names (e.g. "Delimiter") to include in 8475 // API requests with the JSON null value. By default, fields with empty 8476 // values are omitted from API requests. However, any field with an 8477 // empty value appearing in NullFields will be sent to the server as 8478 // null. It is an error if a field in this list has a non-empty value. 8479 // This may be used to include null fields in Patch requests. 8480 NullFields []string `json:"-"` 8481} 8482 8483func (s *TextToColumnsRequest) MarshalJSON() ([]byte, error) { 8484 type NoMethod TextToColumnsRequest 8485 raw := NoMethod(*s) 8486 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8487} 8488 8489// TreemapChartColorScale: A color scale for a treemap chart. 8490type TreemapChartColorScale struct { 8491 // MaxValueColor: The background color for cells with a color value 8492 // greater than or equal 8493 // to maxValue. Defaults to #109618 if not 8494 // specified. 8495 MaxValueColor *Color `json:"maxValueColor,omitempty"` 8496 8497 // MidValueColor: The background color for cells with a color value at 8498 // the midpoint between 8499 // minValue and 8500 // maxValue. Defaults to #efe6dc if not 8501 // specified. 8502 MidValueColor *Color `json:"midValueColor,omitempty"` 8503 8504 // MinValueColor: The background color for cells with a color value less 8505 // than or equal to 8506 // minValue. Defaults to #dc3912 if not 8507 // specified. 8508 MinValueColor *Color `json:"minValueColor,omitempty"` 8509 8510 // NoDataColor: The background color for cells that have no color data 8511 // associated with 8512 // them. Defaults to #000000 if not specified. 8513 NoDataColor *Color `json:"noDataColor,omitempty"` 8514 8515 // ForceSendFields is a list of field names (e.g. "MaxValueColor") to 8516 // unconditionally include in API requests. By default, fields with 8517 // empty values are omitted from API requests. However, any non-pointer, 8518 // non-interface field appearing in ForceSendFields will be sent to the 8519 // server regardless of whether the field is empty or not. This may be 8520 // used to include empty fields in Patch requests. 8521 ForceSendFields []string `json:"-"` 8522 8523 // NullFields is a list of field names (e.g. "MaxValueColor") to include 8524 // in API requests with the JSON null value. By default, fields with 8525 // empty values are omitted from API requests. However, any field with 8526 // an empty value appearing in NullFields will be sent to the server as 8527 // null. It is an error if a field in this list has a non-empty value. 8528 // This may be used to include null fields in Patch requests. 8529 NullFields []string `json:"-"` 8530} 8531 8532func (s *TreemapChartColorScale) MarshalJSON() ([]byte, error) { 8533 type NoMethod TreemapChartColorScale 8534 raw := NoMethod(*s) 8535 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8536} 8537 8538// TreemapChartSpec: A <a 8539// href="/chart/interactive/docs/gallery/treemap">Treemap chart</a>. 8540type TreemapChartSpec struct { 8541 // ColorData: The data that determines the background color of each 8542 // treemap data cell. 8543 // This field is optional. If not specified, size_data is used 8544 // to 8545 // determine background colors. If specified, the data is expected to 8546 // be 8547 // numeric. color_scale will determine how the values in this data map 8548 // to 8549 // data cell background colors. 8550 ColorData *ChartData `json:"colorData,omitempty"` 8551 8552 // ColorScale: The color scale for data cells in the treemap chart. Data 8553 // cells are 8554 // assigned colors based on their color values. These color values come 8555 // from 8556 // color_data, or from size_data if color_data is not specified. 8557 // Cells with color values less than or equal to min_value will 8558 // have minValueColor as their 8559 // background color. Cells with color values greater than or equal 8560 // to 8561 // max_value will have 8562 // maxValueColor as their background 8563 // color. Cells with color values between min_value and max_value 8564 // will 8565 // have background colors on a gradient between 8566 // minValueColor and 8567 // maxValueColor, the midpoint of 8568 // the gradient being midValueColor. 8569 // Cells with missing or non-numeric color values will have 8570 // noDataColor as their background 8571 // color. 8572 ColorScale *TreemapChartColorScale `json:"colorScale,omitempty"` 8573 8574 // HeaderColor: The background color for header cells. 8575 HeaderColor *Color `json:"headerColor,omitempty"` 8576 8577 // HideTooltips: True to hide tooltips. 8578 HideTooltips bool `json:"hideTooltips,omitempty"` 8579 8580 // HintedLevels: The number of additional data levels beyond the labeled 8581 // levels to be shown 8582 // on the treemap chart. These levels are not interactive and are 8583 // shown 8584 // without their labels. Defaults to 0 if not specified. 8585 HintedLevels int64 `json:"hintedLevels,omitempty"` 8586 8587 // Labels: The data that contains the treemap cell labels. 8588 Labels *ChartData `json:"labels,omitempty"` 8589 8590 // Levels: The number of data levels to show on the treemap chart. These 8591 // levels are 8592 // interactive and are shown with their labels. Defaults to 2 if 8593 // not 8594 // specified. 8595 Levels int64 `json:"levels,omitempty"` 8596 8597 // MaxValue: The maximum possible data value. Cells with values greater 8598 // than this will 8599 // have the same color as cells with this value. If not specified, 8600 // defaults 8601 // to the actual maximum value from color_data, or the maximum value 8602 // from 8603 // size_data if color_data is not specified. 8604 MaxValue float64 `json:"maxValue,omitempty"` 8605 8606 // MinValue: The minimum possible data value. Cells with values less 8607 // than this will 8608 // have the same color as cells with this value. If not specified, 8609 // defaults 8610 // to the actual minimum value from color_data, or the minimum value 8611 // from 8612 // size_data if color_data is not specified. 8613 MinValue float64 `json:"minValue,omitempty"` 8614 8615 // ParentLabels: The data the contains the treemap cells' parent labels. 8616 ParentLabels *ChartData `json:"parentLabels,omitempty"` 8617 8618 // SizeData: The data that determines the size of each treemap data 8619 // cell. This data is 8620 // expected to be numeric. The cells corresponding to non-numeric or 8621 // missing 8622 // data will not be rendered. If color_data is not specified, this 8623 // data 8624 // is used to determine data cell background colors as well. 8625 SizeData *ChartData `json:"sizeData,omitempty"` 8626 8627 // TextFormat: The text format for all labels on the chart. 8628 TextFormat *TextFormat `json:"textFormat,omitempty"` 8629 8630 // ForceSendFields is a list of field names (e.g. "ColorData") to 8631 // unconditionally include in API requests. By default, fields with 8632 // empty values are omitted from API requests. However, any non-pointer, 8633 // non-interface field appearing in ForceSendFields will be sent to the 8634 // server regardless of whether the field is empty or not. This may be 8635 // used to include empty fields in Patch requests. 8636 ForceSendFields []string `json:"-"` 8637 8638 // NullFields is a list of field names (e.g. "ColorData") to include in 8639 // API requests with the JSON null value. By default, fields with empty 8640 // values are omitted from API requests. However, any field with an 8641 // empty value appearing in NullFields will be sent to the server as 8642 // null. It is an error if a field in this list has a non-empty value. 8643 // This may be used to include null fields in Patch requests. 8644 NullFields []string `json:"-"` 8645} 8646 8647func (s *TreemapChartSpec) MarshalJSON() ([]byte, error) { 8648 type NoMethod TreemapChartSpec 8649 raw := NoMethod(*s) 8650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8651} 8652 8653func (s *TreemapChartSpec) UnmarshalJSON(data []byte) error { 8654 type NoMethod TreemapChartSpec 8655 var s1 struct { 8656 MaxValue gensupport.JSONFloat64 `json:"maxValue"` 8657 MinValue gensupport.JSONFloat64 `json:"minValue"` 8658 *NoMethod 8659 } 8660 s1.NoMethod = (*NoMethod)(s) 8661 if err := json.Unmarshal(data, &s1); err != nil { 8662 return err 8663 } 8664 s.MaxValue = float64(s1.MaxValue) 8665 s.MinValue = float64(s1.MinValue) 8666 return nil 8667} 8668 8669// TrimWhitespaceRequest: Trims the whitespace (such as spaces, tabs, or 8670// new lines) in every cell in 8671// the specified range. This request removes all whitespace from the 8672// start and 8673// end of each cell's text, and reduces any subsequence of remaining 8674// whitespace 8675// characters to a single space. If the resulting trimmed text starts 8676// with a '+' 8677// or '=' character, the text remains as a string value and isn't 8678// interpreted 8679// as a formula. 8680type TrimWhitespaceRequest struct { 8681 // Range: The range whose cells to trim. 8682 Range *GridRange `json:"range,omitempty"` 8683 8684 // ForceSendFields is a list of field names (e.g. "Range") to 8685 // unconditionally include in API requests. By default, fields with 8686 // empty values are omitted from API requests. However, any non-pointer, 8687 // non-interface field appearing in ForceSendFields will be sent to the 8688 // server regardless of whether the field is empty or not. This may be 8689 // used to include empty fields in Patch requests. 8690 ForceSendFields []string `json:"-"` 8691 8692 // NullFields is a list of field names (e.g. "Range") to include in API 8693 // requests with the JSON null value. By default, fields with empty 8694 // values are omitted from API requests. However, any field with an 8695 // empty value appearing in NullFields will be sent to the server as 8696 // null. It is an error if a field in this list has a non-empty value. 8697 // This may be used to include null fields in Patch requests. 8698 NullFields []string `json:"-"` 8699} 8700 8701func (s *TrimWhitespaceRequest) MarshalJSON() ([]byte, error) { 8702 type NoMethod TrimWhitespaceRequest 8703 raw := NoMethod(*s) 8704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8705} 8706 8707// TrimWhitespaceResponse: The result of trimming whitespace in cells. 8708type TrimWhitespaceResponse struct { 8709 // CellsChangedCount: The number of cells that were trimmed of 8710 // whitespace. 8711 CellsChangedCount int64 `json:"cellsChangedCount,omitempty"` 8712 8713 // ForceSendFields is a list of field names (e.g. "CellsChangedCount") 8714 // to unconditionally include in API requests. By default, fields with 8715 // empty values are omitted from API requests. However, any non-pointer, 8716 // non-interface field appearing in ForceSendFields will be sent to the 8717 // server regardless of whether the field is empty or not. This may be 8718 // used to include empty fields in Patch requests. 8719 ForceSendFields []string `json:"-"` 8720 8721 // NullFields is a list of field names (e.g. "CellsChangedCount") to 8722 // include in API requests with the JSON null value. By default, fields 8723 // with empty values are omitted from API requests. However, any field 8724 // with an empty value appearing in NullFields will be sent to the 8725 // server as null. It is an error if a field in this list has a 8726 // non-empty value. This may be used to include null fields in Patch 8727 // requests. 8728 NullFields []string `json:"-"` 8729} 8730 8731func (s *TrimWhitespaceResponse) MarshalJSON() ([]byte, error) { 8732 type NoMethod TrimWhitespaceResponse 8733 raw := NoMethod(*s) 8734 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8735} 8736 8737// UnmergeCellsRequest: Unmerges cells in the given range. 8738type UnmergeCellsRequest struct { 8739 // Range: The range within which all cells should be unmerged. 8740 // If the range spans multiple merges, all will be unmerged. 8741 // The range must not partially span any merge. 8742 Range *GridRange `json:"range,omitempty"` 8743 8744 // ForceSendFields is a list of field names (e.g. "Range") to 8745 // unconditionally include in API requests. By default, fields with 8746 // empty values are omitted from API requests. However, any non-pointer, 8747 // non-interface field appearing in ForceSendFields will be sent to the 8748 // server regardless of whether the field is empty or not. This may be 8749 // used to include empty fields in Patch requests. 8750 ForceSendFields []string `json:"-"` 8751 8752 // NullFields is a list of field names (e.g. "Range") to include in API 8753 // requests with the JSON null value. By default, fields with empty 8754 // values are omitted from API requests. However, any field with an 8755 // empty value appearing in NullFields will be sent to the server as 8756 // null. It is an error if a field in this list has a non-empty value. 8757 // This may be used to include null fields in Patch requests. 8758 NullFields []string `json:"-"` 8759} 8760 8761func (s *UnmergeCellsRequest) MarshalJSON() ([]byte, error) { 8762 type NoMethod UnmergeCellsRequest 8763 raw := NoMethod(*s) 8764 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8765} 8766 8767// UpdateBandingRequest: Updates properties of the supplied banded 8768// range. 8769type UpdateBandingRequest struct { 8770 // BandedRange: The banded range to update with the new properties. 8771 BandedRange *BandedRange `json:"bandedRange,omitempty"` 8772 8773 // Fields: The fields that should be updated. At least one field must 8774 // be specified. 8775 // The root `bandedRange` is implied and should not be specified. 8776 // A single "*" can be used as short-hand for listing every field. 8777 Fields string `json:"fields,omitempty"` 8778 8779 // ForceSendFields is a list of field names (e.g. "BandedRange") to 8780 // unconditionally include in API requests. By default, fields with 8781 // empty values are omitted from API requests. However, any non-pointer, 8782 // non-interface field appearing in ForceSendFields will be sent to the 8783 // server regardless of whether the field is empty or not. This may be 8784 // used to include empty fields in Patch requests. 8785 ForceSendFields []string `json:"-"` 8786 8787 // NullFields is a list of field names (e.g. "BandedRange") to include 8788 // in API requests with the JSON null value. By default, fields with 8789 // empty values are omitted from API requests. However, any field with 8790 // an empty value appearing in NullFields will be sent to the server as 8791 // null. It is an error if a field in this list has a non-empty value. 8792 // This may be used to include null fields in Patch requests. 8793 NullFields []string `json:"-"` 8794} 8795 8796func (s *UpdateBandingRequest) MarshalJSON() ([]byte, error) { 8797 type NoMethod UpdateBandingRequest 8798 raw := NoMethod(*s) 8799 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8800} 8801 8802// UpdateBordersRequest: Updates the borders of a range. 8803// If a field is not set in the request, that means the border remains 8804// as-is. 8805// For example, with two subsequent UpdateBordersRequest: 8806// 8807// 1. range: A1:A5 `{ top: RED, bottom: WHITE }` 8808// 2. range: A1:A5 `{ left: BLUE }` 8809// 8810// That would result in A1:A5 having a borders of 8811// `{ top: RED, bottom: WHITE, left: BLUE }`. 8812// If you want to clear a border, explicitly set the style to 8813// NONE. 8814type UpdateBordersRequest struct { 8815 // Bottom: The border to put at the bottom of the range. 8816 Bottom *Border `json:"bottom,omitempty"` 8817 8818 // InnerHorizontal: The horizontal border to put within the range. 8819 InnerHorizontal *Border `json:"innerHorizontal,omitempty"` 8820 8821 // InnerVertical: The vertical border to put within the range. 8822 InnerVertical *Border `json:"innerVertical,omitempty"` 8823 8824 // Left: The border to put at the left of the range. 8825 Left *Border `json:"left,omitempty"` 8826 8827 // Range: The range whose borders should be updated. 8828 Range *GridRange `json:"range,omitempty"` 8829 8830 // Right: The border to put at the right of the range. 8831 Right *Border `json:"right,omitempty"` 8832 8833 // Top: The border to put at the top of the range. 8834 Top *Border `json:"top,omitempty"` 8835 8836 // ForceSendFields is a list of field names (e.g. "Bottom") to 8837 // unconditionally include in API requests. By default, fields with 8838 // empty values are omitted from API requests. However, any non-pointer, 8839 // non-interface field appearing in ForceSendFields will be sent to the 8840 // server regardless of whether the field is empty or not. This may be 8841 // used to include empty fields in Patch requests. 8842 ForceSendFields []string `json:"-"` 8843 8844 // NullFields is a list of field names (e.g. "Bottom") to include in API 8845 // requests with the JSON null value. By default, fields with empty 8846 // values are omitted from API requests. However, any field with an 8847 // empty value appearing in NullFields will be sent to the server as 8848 // null. It is an error if a field in this list has a non-empty value. 8849 // This may be used to include null fields in Patch requests. 8850 NullFields []string `json:"-"` 8851} 8852 8853func (s *UpdateBordersRequest) MarshalJSON() ([]byte, error) { 8854 type NoMethod UpdateBordersRequest 8855 raw := NoMethod(*s) 8856 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8857} 8858 8859// UpdateCellsRequest: Updates all cells in a range with new data. 8860type UpdateCellsRequest struct { 8861 // Fields: The fields of CellData that should be updated. 8862 // At least one field must be specified. 8863 // The root is the CellData; 'row.values.' should not be specified. 8864 // A single "*" can be used as short-hand for listing every field. 8865 Fields string `json:"fields,omitempty"` 8866 8867 // Range: The range to write data to. 8868 // 8869 // If the data in rows does not cover the entire requested range, 8870 // the fields matching those set in fields will be cleared. 8871 Range *GridRange `json:"range,omitempty"` 8872 8873 // Rows: The data to write. 8874 Rows []*RowData `json:"rows,omitempty"` 8875 8876 // Start: The coordinate to start writing data at. 8877 // Any number of rows and columns (including a different number 8878 // of 8879 // columns per row) may be written. 8880 Start *GridCoordinate `json:"start,omitempty"` 8881 8882 // ForceSendFields is a list of field names (e.g. "Fields") to 8883 // unconditionally include in API requests. By default, fields with 8884 // empty values are omitted from API requests. However, any non-pointer, 8885 // non-interface field appearing in ForceSendFields will be sent to the 8886 // server regardless of whether the field is empty or not. This may be 8887 // used to include empty fields in Patch requests. 8888 ForceSendFields []string `json:"-"` 8889 8890 // NullFields is a list of field names (e.g. "Fields") to include in API 8891 // requests with the JSON null value. By default, fields with empty 8892 // values are omitted from API requests. However, any field with an 8893 // empty value appearing in NullFields will be sent to the server as 8894 // null. It is an error if a field in this list has a non-empty value. 8895 // This may be used to include null fields in Patch requests. 8896 NullFields []string `json:"-"` 8897} 8898 8899func (s *UpdateCellsRequest) MarshalJSON() ([]byte, error) { 8900 type NoMethod UpdateCellsRequest 8901 raw := NoMethod(*s) 8902 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8903} 8904 8905// UpdateChartSpecRequest: Updates a chart's specifications. 8906// (This does not move or resize a chart. To move or resize a chart, 8907// use 8908// UpdateEmbeddedObjectPositionRequest.) 8909type UpdateChartSpecRequest struct { 8910 // ChartId: The ID of the chart to update. 8911 ChartId int64 `json:"chartId,omitempty"` 8912 8913 // Spec: The specification to apply to the chart. 8914 Spec *ChartSpec `json:"spec,omitempty"` 8915 8916 // ForceSendFields is a list of field names (e.g. "ChartId") to 8917 // unconditionally include in API requests. By default, fields with 8918 // empty values are omitted from API requests. However, any non-pointer, 8919 // non-interface field appearing in ForceSendFields will be sent to the 8920 // server regardless of whether the field is empty or not. This may be 8921 // used to include empty fields in Patch requests. 8922 ForceSendFields []string `json:"-"` 8923 8924 // NullFields is a list of field names (e.g. "ChartId") to include in 8925 // API requests with the JSON null value. By default, fields with empty 8926 // values are omitted from API requests. However, any field with an 8927 // empty value appearing in NullFields will be sent to the server as 8928 // null. It is an error if a field in this list has a non-empty value. 8929 // This may be used to include null fields in Patch requests. 8930 NullFields []string `json:"-"` 8931} 8932 8933func (s *UpdateChartSpecRequest) MarshalJSON() ([]byte, error) { 8934 type NoMethod UpdateChartSpecRequest 8935 raw := NoMethod(*s) 8936 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8937} 8938 8939// UpdateConditionalFormatRuleRequest: Updates a conditional format rule 8940// at the given index, 8941// or moves a conditional format rule to another index. 8942type UpdateConditionalFormatRuleRequest struct { 8943 // Index: The zero-based index of the rule that should be replaced or 8944 // moved. 8945 Index int64 `json:"index,omitempty"` 8946 8947 // NewIndex: The zero-based new index the rule should end up at. 8948 NewIndex int64 `json:"newIndex,omitempty"` 8949 8950 // Rule: The rule that should replace the rule at the given index. 8951 Rule *ConditionalFormatRule `json:"rule,omitempty"` 8952 8953 // SheetId: The sheet of the rule to move. Required if new_index is 8954 // set, 8955 // unused otherwise. 8956 SheetId int64 `json:"sheetId,omitempty"` 8957 8958 // ForceSendFields is a list of field names (e.g. "Index") to 8959 // unconditionally include in API requests. By default, fields with 8960 // empty values are omitted from API requests. However, any non-pointer, 8961 // non-interface field appearing in ForceSendFields will be sent to the 8962 // server regardless of whether the field is empty or not. This may be 8963 // used to include empty fields in Patch requests. 8964 ForceSendFields []string `json:"-"` 8965 8966 // NullFields is a list of field names (e.g. "Index") to include in API 8967 // requests with the JSON null value. By default, fields with empty 8968 // values are omitted from API requests. However, any field with an 8969 // empty value appearing in NullFields will be sent to the server as 8970 // null. It is an error if a field in this list has a non-empty value. 8971 // This may be used to include null fields in Patch requests. 8972 NullFields []string `json:"-"` 8973} 8974 8975func (s *UpdateConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 8976 type NoMethod UpdateConditionalFormatRuleRequest 8977 raw := NoMethod(*s) 8978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8979} 8980 8981// UpdateConditionalFormatRuleResponse: The result of updating a 8982// conditional format rule. 8983type UpdateConditionalFormatRuleResponse struct { 8984 // NewIndex: The index of the new rule. 8985 NewIndex int64 `json:"newIndex,omitempty"` 8986 8987 // NewRule: The new rule that replaced the old rule (if replacing), 8988 // or the rule that was moved (if moved) 8989 NewRule *ConditionalFormatRule `json:"newRule,omitempty"` 8990 8991 // OldIndex: The old index of the rule. Not set if a rule was 8992 // replaced 8993 // (because it is the same as new_index). 8994 OldIndex int64 `json:"oldIndex,omitempty"` 8995 8996 // OldRule: The old (deleted) rule. Not set if a rule was moved 8997 // (because it is the same as new_rule). 8998 OldRule *ConditionalFormatRule `json:"oldRule,omitempty"` 8999 9000 // ForceSendFields is a list of field names (e.g. "NewIndex") to 9001 // unconditionally include in API requests. By default, fields with 9002 // empty values are omitted from API requests. However, any non-pointer, 9003 // non-interface field appearing in ForceSendFields will be sent to the 9004 // server regardless of whether the field is empty or not. This may be 9005 // used to include empty fields in Patch requests. 9006 ForceSendFields []string `json:"-"` 9007 9008 // NullFields is a list of field names (e.g. "NewIndex") to include in 9009 // API requests with the JSON null value. By default, fields with empty 9010 // values are omitted from API requests. However, any field with an 9011 // empty value appearing in NullFields will be sent to the server as 9012 // null. It is an error if a field in this list has a non-empty value. 9013 // This may be used to include null fields in Patch requests. 9014 NullFields []string `json:"-"` 9015} 9016 9017func (s *UpdateConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 9018 type NoMethod UpdateConditionalFormatRuleResponse 9019 raw := NoMethod(*s) 9020 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9021} 9022 9023// UpdateDeveloperMetadataRequest: A request to update properties of 9024// developer metadata. 9025// Updates the properties of the developer metadata selected by the 9026// filters to 9027// the values provided in the DeveloperMetadata resource. Callers 9028// must 9029// specify the properties they wish to update in the fields parameter, 9030// as well 9031// as specify at least one DataFilter matching the metadata they wish 9032// to 9033// update. 9034type UpdateDeveloperMetadataRequest struct { 9035 // DataFilters: The filters matching the developer metadata entries to 9036 // update. 9037 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 9038 9039 // DeveloperMetadata: The value that all metadata matched by the data 9040 // filters will be updated to. 9041 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 9042 9043 // Fields: The fields that should be updated. At least one field must 9044 // be specified. 9045 // The root `developerMetadata` is implied and should not be 9046 // specified. 9047 // A single "*" can be used as short-hand for listing every field. 9048 Fields string `json:"fields,omitempty"` 9049 9050 // ForceSendFields is a list of field names (e.g. "DataFilters") to 9051 // unconditionally include in API requests. By default, fields with 9052 // empty values are omitted from API requests. However, any non-pointer, 9053 // non-interface field appearing in ForceSendFields will be sent to the 9054 // server regardless of whether the field is empty or not. This may be 9055 // used to include empty fields in Patch requests. 9056 ForceSendFields []string `json:"-"` 9057 9058 // NullFields is a list of field names (e.g. "DataFilters") to include 9059 // in API requests with the JSON null value. By default, fields with 9060 // empty values are omitted from API requests. However, any field with 9061 // an empty value appearing in NullFields will be sent to the server as 9062 // null. It is an error if a field in this list has a non-empty value. 9063 // This may be used to include null fields in Patch requests. 9064 NullFields []string `json:"-"` 9065} 9066 9067func (s *UpdateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 9068 type NoMethod UpdateDeveloperMetadataRequest 9069 raw := NoMethod(*s) 9070 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9071} 9072 9073// UpdateDeveloperMetadataResponse: The response from updating developer 9074// metadata. 9075type UpdateDeveloperMetadataResponse struct { 9076 // DeveloperMetadata: The updated developer metadata. 9077 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 9078 9079 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 9080 // to unconditionally include in API requests. By default, fields with 9081 // empty values are omitted from API requests. However, any non-pointer, 9082 // non-interface field appearing in ForceSendFields will be sent to the 9083 // server regardless of whether the field is empty or not. This may be 9084 // used to include empty fields in Patch requests. 9085 ForceSendFields []string `json:"-"` 9086 9087 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 9088 // include in API requests with the JSON null value. By default, fields 9089 // with empty values are omitted from API requests. However, any field 9090 // with an empty value appearing in NullFields will be sent to the 9091 // server as null. It is an error if a field in this list has a 9092 // non-empty value. This may be used to include null fields in Patch 9093 // requests. 9094 NullFields []string `json:"-"` 9095} 9096 9097func (s *UpdateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 9098 type NoMethod UpdateDeveloperMetadataResponse 9099 raw := NoMethod(*s) 9100 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9101} 9102 9103// UpdateDimensionGroupRequest: Updates the state of the specified 9104// group. 9105type UpdateDimensionGroupRequest struct { 9106 // DimensionGroup: The group whose state should be updated. The range 9107 // and depth of the group 9108 // should specify a valid group on the sheet, and all other fields 9109 // updated. 9110 DimensionGroup *DimensionGroup `json:"dimensionGroup,omitempty"` 9111 9112 // Fields: The fields that should be updated. At least one field must 9113 // be specified. 9114 // The root `dimensionGroup` is implied and should not be specified. 9115 // A single "*" can be used as short-hand for listing every field. 9116 Fields string `json:"fields,omitempty"` 9117 9118 // ForceSendFields is a list of field names (e.g. "DimensionGroup") to 9119 // unconditionally include in API requests. By default, fields with 9120 // empty values are omitted from API requests. However, any non-pointer, 9121 // non-interface field appearing in ForceSendFields will be sent to the 9122 // server regardless of whether the field is empty or not. This may be 9123 // used to include empty fields in Patch requests. 9124 ForceSendFields []string `json:"-"` 9125 9126 // NullFields is a list of field names (e.g. "DimensionGroup") to 9127 // include in API requests with the JSON null value. By default, fields 9128 // with empty values are omitted from API requests. However, any field 9129 // with an empty value appearing in NullFields will be sent to the 9130 // server as null. It is an error if a field in this list has a 9131 // non-empty value. This may be used to include null fields in Patch 9132 // requests. 9133 NullFields []string `json:"-"` 9134} 9135 9136func (s *UpdateDimensionGroupRequest) MarshalJSON() ([]byte, error) { 9137 type NoMethod UpdateDimensionGroupRequest 9138 raw := NoMethod(*s) 9139 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9140} 9141 9142// UpdateDimensionPropertiesRequest: Updates properties of dimensions 9143// within the specified range. 9144type UpdateDimensionPropertiesRequest struct { 9145 // Fields: The fields that should be updated. At least one field must 9146 // be specified. 9147 // The root `properties` is implied and should not be specified. 9148 // A single "*" can be used as short-hand for listing every field. 9149 Fields string `json:"fields,omitempty"` 9150 9151 // Properties: Properties to update. 9152 Properties *DimensionProperties `json:"properties,omitempty"` 9153 9154 // Range: The rows or columns to update. 9155 Range *DimensionRange `json:"range,omitempty"` 9156 9157 // ForceSendFields is a list of field names (e.g. "Fields") to 9158 // unconditionally include in API requests. By default, fields with 9159 // empty values are omitted from API requests. However, any non-pointer, 9160 // non-interface field appearing in ForceSendFields will be sent to the 9161 // server regardless of whether the field is empty or not. This may be 9162 // used to include empty fields in Patch requests. 9163 ForceSendFields []string `json:"-"` 9164 9165 // NullFields is a list of field names (e.g. "Fields") to include in API 9166 // requests with the JSON null value. By default, fields with empty 9167 // values are omitted from API requests. However, any field with an 9168 // empty value appearing in NullFields will be sent to the server as 9169 // null. It is an error if a field in this list has a non-empty value. 9170 // This may be used to include null fields in Patch requests. 9171 NullFields []string `json:"-"` 9172} 9173 9174func (s *UpdateDimensionPropertiesRequest) MarshalJSON() ([]byte, error) { 9175 type NoMethod UpdateDimensionPropertiesRequest 9176 raw := NoMethod(*s) 9177 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9178} 9179 9180// UpdateEmbeddedObjectPositionRequest: Update an embedded object's 9181// position (such as a moving or resizing a 9182// chart or image). 9183type UpdateEmbeddedObjectPositionRequest struct { 9184 // Fields: The fields of OverlayPosition 9185 // that should be updated when setting a new position. Used only 9186 // if 9187 // newPosition.overlayPosition 9188 // is set, in which case at least one field must 9189 // be specified. The root `newPosition.overlayPosition` is implied 9190 // and 9191 // should not be specified. 9192 // A single "*" can be used as short-hand for listing every field. 9193 Fields string `json:"fields,omitempty"` 9194 9195 // NewPosition: An explicit position to move the embedded object to. 9196 // If newPosition.sheetId is set, 9197 // a new sheet with that ID will be created. 9198 // If newPosition.newSheet is set to true, 9199 // a new sheet will be created with an ID that will be chosen for you. 9200 NewPosition *EmbeddedObjectPosition `json:"newPosition,omitempty"` 9201 9202 // ObjectId: The ID of the object to moved. 9203 ObjectId int64 `json:"objectId,omitempty"` 9204 9205 // ForceSendFields is a list of field names (e.g. "Fields") to 9206 // unconditionally include in API requests. By default, fields with 9207 // empty values are omitted from API requests. However, any non-pointer, 9208 // non-interface field appearing in ForceSendFields will be sent to the 9209 // server regardless of whether the field is empty or not. This may be 9210 // used to include empty fields in Patch requests. 9211 ForceSendFields []string `json:"-"` 9212 9213 // NullFields is a list of field names (e.g. "Fields") to include in API 9214 // requests with the JSON null value. By default, fields with empty 9215 // values are omitted from API requests. However, any field with an 9216 // empty value appearing in NullFields will be sent to the server as 9217 // null. It is an error if a field in this list has a non-empty value. 9218 // This may be used to include null fields in Patch requests. 9219 NullFields []string `json:"-"` 9220} 9221 9222func (s *UpdateEmbeddedObjectPositionRequest) MarshalJSON() ([]byte, error) { 9223 type NoMethod UpdateEmbeddedObjectPositionRequest 9224 raw := NoMethod(*s) 9225 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9226} 9227 9228// UpdateEmbeddedObjectPositionResponse: The result of updating an 9229// embedded object's position. 9230type UpdateEmbeddedObjectPositionResponse struct { 9231 // Position: The new position of the embedded object. 9232 Position *EmbeddedObjectPosition `json:"position,omitempty"` 9233 9234 // ForceSendFields is a list of field names (e.g. "Position") to 9235 // unconditionally include in API requests. By default, fields with 9236 // empty values are omitted from API requests. However, any non-pointer, 9237 // non-interface field appearing in ForceSendFields will be sent to the 9238 // server regardless of whether the field is empty or not. This may be 9239 // used to include empty fields in Patch requests. 9240 ForceSendFields []string `json:"-"` 9241 9242 // NullFields is a list of field names (e.g. "Position") to include in 9243 // API requests with the JSON null value. By default, fields with empty 9244 // values are omitted from API requests. However, any field with an 9245 // empty value appearing in NullFields will be sent to the server as 9246 // null. It is an error if a field in this list has a non-empty value. 9247 // This may be used to include null fields in Patch requests. 9248 NullFields []string `json:"-"` 9249} 9250 9251func (s *UpdateEmbeddedObjectPositionResponse) MarshalJSON() ([]byte, error) { 9252 type NoMethod UpdateEmbeddedObjectPositionResponse 9253 raw := NoMethod(*s) 9254 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9255} 9256 9257// UpdateFilterViewRequest: Updates properties of the filter view. 9258type UpdateFilterViewRequest struct { 9259 // Fields: The fields that should be updated. At least one field must 9260 // be specified. 9261 // The root `filter` is implied and should not be specified. 9262 // A single "*" can be used as short-hand for listing every field. 9263 Fields string `json:"fields,omitempty"` 9264 9265 // Filter: The new properties of the filter view. 9266 Filter *FilterView `json:"filter,omitempty"` 9267 9268 // ForceSendFields is a list of field names (e.g. "Fields") to 9269 // unconditionally include in API requests. By default, fields with 9270 // empty values are omitted from API requests. However, any non-pointer, 9271 // non-interface field appearing in ForceSendFields will be sent to the 9272 // server regardless of whether the field is empty or not. This may be 9273 // used to include empty fields in Patch requests. 9274 ForceSendFields []string `json:"-"` 9275 9276 // NullFields is a list of field names (e.g. "Fields") to include in API 9277 // requests with the JSON null value. By default, fields with empty 9278 // values are omitted from API requests. However, any field with an 9279 // empty value appearing in NullFields will be sent to the server as 9280 // null. It is an error if a field in this list has a non-empty value. 9281 // This may be used to include null fields in Patch requests. 9282 NullFields []string `json:"-"` 9283} 9284 9285func (s *UpdateFilterViewRequest) MarshalJSON() ([]byte, error) { 9286 type NoMethod UpdateFilterViewRequest 9287 raw := NoMethod(*s) 9288 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9289} 9290 9291// UpdateNamedRangeRequest: Updates properties of the named range with 9292// the specified 9293// namedRangeId. 9294type UpdateNamedRangeRequest struct { 9295 // Fields: The fields that should be updated. At least one field must 9296 // be specified. 9297 // The root `namedRange` is implied and should not be specified. 9298 // A single "*" can be used as short-hand for listing every field. 9299 Fields string `json:"fields,omitempty"` 9300 9301 // NamedRange: The named range to update with the new properties. 9302 NamedRange *NamedRange `json:"namedRange,omitempty"` 9303 9304 // ForceSendFields is a list of field names (e.g. "Fields") to 9305 // unconditionally include in API requests. By default, fields with 9306 // empty values are omitted from API requests. However, any non-pointer, 9307 // non-interface field appearing in ForceSendFields will be sent to the 9308 // server regardless of whether the field is empty or not. This may be 9309 // used to include empty fields in Patch requests. 9310 ForceSendFields []string `json:"-"` 9311 9312 // NullFields is a list of field names (e.g. "Fields") to include in API 9313 // requests with the JSON null value. By default, fields with empty 9314 // values are omitted from API requests. However, any field with an 9315 // empty value appearing in NullFields will be sent to the server as 9316 // null. It is an error if a field in this list has a non-empty value. 9317 // This may be used to include null fields in Patch requests. 9318 NullFields []string `json:"-"` 9319} 9320 9321func (s *UpdateNamedRangeRequest) MarshalJSON() ([]byte, error) { 9322 type NoMethod UpdateNamedRangeRequest 9323 raw := NoMethod(*s) 9324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9325} 9326 9327// UpdateProtectedRangeRequest: Updates an existing protected range with 9328// the specified 9329// protectedRangeId. 9330type UpdateProtectedRangeRequest struct { 9331 // Fields: The fields that should be updated. At least one field must 9332 // be specified. 9333 // The root `protectedRange` is implied and should not be specified. 9334 // A single "*" can be used as short-hand for listing every field. 9335 Fields string `json:"fields,omitempty"` 9336 9337 // ProtectedRange: The protected range to update with the new 9338 // properties. 9339 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 9340 9341 // ForceSendFields is a list of field names (e.g. "Fields") to 9342 // unconditionally include in API requests. By default, fields with 9343 // empty values are omitted from API requests. However, any non-pointer, 9344 // non-interface field appearing in ForceSendFields will be sent to the 9345 // server regardless of whether the field is empty or not. This may be 9346 // used to include empty fields in Patch requests. 9347 ForceSendFields []string `json:"-"` 9348 9349 // NullFields is a list of field names (e.g. "Fields") to include in API 9350 // requests with the JSON null value. By default, fields with empty 9351 // values are omitted from API requests. However, any field with an 9352 // empty value appearing in NullFields will be sent to the server as 9353 // null. It is an error if a field in this list has a non-empty value. 9354 // This may be used to include null fields in Patch requests. 9355 NullFields []string `json:"-"` 9356} 9357 9358func (s *UpdateProtectedRangeRequest) MarshalJSON() ([]byte, error) { 9359 type NoMethod UpdateProtectedRangeRequest 9360 raw := NoMethod(*s) 9361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9362} 9363 9364// UpdateSheetPropertiesRequest: Updates properties of the sheet with 9365// the specified 9366// sheetId. 9367type UpdateSheetPropertiesRequest struct { 9368 // Fields: The fields that should be updated. At least one field must 9369 // be specified. 9370 // The root `properties` is implied and should not be specified. 9371 // A single "*" can be used as short-hand for listing every field. 9372 Fields string `json:"fields,omitempty"` 9373 9374 // Properties: The properties to update. 9375 Properties *SheetProperties `json:"properties,omitempty"` 9376 9377 // ForceSendFields is a list of field names (e.g. "Fields") to 9378 // unconditionally include in API requests. By default, fields with 9379 // empty values are omitted from API requests. However, any non-pointer, 9380 // non-interface field appearing in ForceSendFields will be sent to the 9381 // server regardless of whether the field is empty or not. This may be 9382 // used to include empty fields in Patch requests. 9383 ForceSendFields []string `json:"-"` 9384 9385 // NullFields is a list of field names (e.g. "Fields") to include in API 9386 // requests with the JSON null value. By default, fields with empty 9387 // values are omitted from API requests. However, any field with an 9388 // empty value appearing in NullFields will be sent to the server as 9389 // null. It is an error if a field in this list has a non-empty value. 9390 // This may be used to include null fields in Patch requests. 9391 NullFields []string `json:"-"` 9392} 9393 9394func (s *UpdateSheetPropertiesRequest) MarshalJSON() ([]byte, error) { 9395 type NoMethod UpdateSheetPropertiesRequest 9396 raw := NoMethod(*s) 9397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9398} 9399 9400// UpdateSpreadsheetPropertiesRequest: Updates properties of a 9401// spreadsheet. 9402type UpdateSpreadsheetPropertiesRequest struct { 9403 // Fields: The fields that should be updated. At least one field must 9404 // be specified. 9405 // The root 'properties' is implied and should not be specified. 9406 // A single "*" can be used as short-hand for listing every field. 9407 Fields string `json:"fields,omitempty"` 9408 9409 // Properties: The properties to update. 9410 Properties *SpreadsheetProperties `json:"properties,omitempty"` 9411 9412 // ForceSendFields is a list of field names (e.g. "Fields") to 9413 // unconditionally include in API requests. By default, fields with 9414 // empty values are omitted from API requests. However, any non-pointer, 9415 // non-interface field appearing in ForceSendFields will be sent to the 9416 // server regardless of whether the field is empty or not. This may be 9417 // used to include empty fields in Patch requests. 9418 ForceSendFields []string `json:"-"` 9419 9420 // NullFields is a list of field names (e.g. "Fields") to include in API 9421 // requests with the JSON null value. By default, fields with empty 9422 // values are omitted from API requests. However, any field with an 9423 // empty value appearing in NullFields will be sent to the server as 9424 // null. It is an error if a field in this list has a non-empty value. 9425 // This may be used to include null fields in Patch requests. 9426 NullFields []string `json:"-"` 9427} 9428 9429func (s *UpdateSpreadsheetPropertiesRequest) MarshalJSON() ([]byte, error) { 9430 type NoMethod UpdateSpreadsheetPropertiesRequest 9431 raw := NoMethod(*s) 9432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9433} 9434 9435// UpdateValuesByDataFilterResponse: The response when updating a range 9436// of values by a data filter in a 9437// spreadsheet. 9438type UpdateValuesByDataFilterResponse struct { 9439 // DataFilter: The data filter that selected the range that was updated. 9440 DataFilter *DataFilter `json:"dataFilter,omitempty"` 9441 9442 // UpdatedCells: The number of cells updated. 9443 UpdatedCells int64 `json:"updatedCells,omitempty"` 9444 9445 // UpdatedColumns: The number of columns where at least one cell in the 9446 // column was updated. 9447 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 9448 9449 // UpdatedData: The values of the cells in the range matched by the 9450 // dataFilter after all 9451 // updates were applied. This is only included if the 9452 // request's 9453 // `includeValuesInResponse` field was `true`. 9454 UpdatedData *ValueRange `json:"updatedData,omitempty"` 9455 9456 // UpdatedRange: The range (in A1 notation) that updates were applied 9457 // to. 9458 UpdatedRange string `json:"updatedRange,omitempty"` 9459 9460 // UpdatedRows: The number of rows where at least one cell in the row 9461 // was updated. 9462 UpdatedRows int64 `json:"updatedRows,omitempty"` 9463 9464 // ForceSendFields is a list of field names (e.g. "DataFilter") to 9465 // unconditionally include in API requests. By default, fields with 9466 // empty values are omitted from API requests. However, any non-pointer, 9467 // non-interface field appearing in ForceSendFields will be sent to the 9468 // server regardless of whether the field is empty or not. This may be 9469 // used to include empty fields in Patch requests. 9470 ForceSendFields []string `json:"-"` 9471 9472 // NullFields is a list of field names (e.g. "DataFilter") to include in 9473 // API requests with the JSON null value. By default, fields with empty 9474 // values are omitted from API requests. However, any field with an 9475 // empty value appearing in NullFields will be sent to the server as 9476 // null. It is an error if a field in this list has a non-empty value. 9477 // This may be used to include null fields in Patch requests. 9478 NullFields []string `json:"-"` 9479} 9480 9481func (s *UpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 9482 type NoMethod UpdateValuesByDataFilterResponse 9483 raw := NoMethod(*s) 9484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9485} 9486 9487// UpdateValuesResponse: The response when updating a range of values in 9488// a spreadsheet. 9489type UpdateValuesResponse struct { 9490 // SpreadsheetId: The spreadsheet the updates were applied to. 9491 SpreadsheetId string `json:"spreadsheetId,omitempty"` 9492 9493 // UpdatedCells: The number of cells updated. 9494 UpdatedCells int64 `json:"updatedCells,omitempty"` 9495 9496 // UpdatedColumns: The number of columns where at least one cell in the 9497 // column was updated. 9498 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 9499 9500 // UpdatedData: The values of the cells after updates were applied. 9501 // This is only included if the request's `includeValuesInResponse` 9502 // field 9503 // was `true`. 9504 UpdatedData *ValueRange `json:"updatedData,omitempty"` 9505 9506 // UpdatedRange: The range (in A1 notation) that updates were applied 9507 // to. 9508 UpdatedRange string `json:"updatedRange,omitempty"` 9509 9510 // UpdatedRows: The number of rows where at least one cell in the row 9511 // was updated. 9512 UpdatedRows int64 `json:"updatedRows,omitempty"` 9513 9514 // ServerResponse contains the HTTP response code and headers from the 9515 // server. 9516 googleapi.ServerResponse `json:"-"` 9517 9518 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 9519 // unconditionally include in API requests. By default, fields with 9520 // empty values are omitted from API requests. However, any non-pointer, 9521 // non-interface field appearing in ForceSendFields will be sent to the 9522 // server regardless of whether the field is empty or not. This may be 9523 // used to include empty fields in Patch requests. 9524 ForceSendFields []string `json:"-"` 9525 9526 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 9527 // in API requests with the JSON null value. By default, fields with 9528 // empty values are omitted from API requests. However, any field with 9529 // an empty value appearing in NullFields will be sent to the server as 9530 // null. It is an error if a field in this list has a non-empty value. 9531 // This may be used to include null fields in Patch requests. 9532 NullFields []string `json:"-"` 9533} 9534 9535func (s *UpdateValuesResponse) MarshalJSON() ([]byte, error) { 9536 type NoMethod UpdateValuesResponse 9537 raw := NoMethod(*s) 9538 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9539} 9540 9541// ValueRange: Data within a range of the spreadsheet. 9542type ValueRange struct { 9543 // MajorDimension: The major dimension of the values. 9544 // 9545 // For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 9546 // then requesting `range=A1:B2,majorDimension=ROWS` will 9547 // return 9548 // `[[1,2],[3,4]]`, 9549 // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 9550 // return 9551 // `[[1,3],[2,4]]`. 9552 // 9553 // For input, with `range=A1:B2,majorDimension=ROWS` then 9554 // `[[1,2],[3,4]]` 9555 // will set `A1=1,B1=2,A2=3,B2=4`. With 9556 // `range=A1:B2,majorDimension=COLUMNS` 9557 // then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. 9558 // 9559 // When writing, if this field is not set, it defaults to ROWS. 9560 // 9561 // Possible values: 9562 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 9563 // "ROWS" - Operates on the rows of a sheet. 9564 // "COLUMNS" - Operates on the columns of a sheet. 9565 MajorDimension string `json:"majorDimension,omitempty"` 9566 9567 // Range: The range the values cover, in A1 notation. 9568 // For output, this range indicates the entire requested range, 9569 // even though the values will exclude trailing rows and columns. 9570 // When appending values, this field represents the range to search for 9571 // a 9572 // table, after which values will be appended. 9573 Range string `json:"range,omitempty"` 9574 9575 // Values: The data that was read or to be written. This is an array of 9576 // arrays, 9577 // the outer array representing all the data and each inner 9578 // array 9579 // representing a major dimension. Each item in the inner 9580 // array 9581 // corresponds with one cell. 9582 // 9583 // For output, empty trailing rows and columns will not be 9584 // included. 9585 // 9586 // For input, supported value types are: bool, string, and double. 9587 // Null values will be skipped. 9588 // To set a cell to an empty value, set the string value to an empty 9589 // string. 9590 Values [][]interface{} `json:"values,omitempty"` 9591 9592 // ServerResponse contains the HTTP response code and headers from the 9593 // server. 9594 googleapi.ServerResponse `json:"-"` 9595 9596 // ForceSendFields is a list of field names (e.g. "MajorDimension") to 9597 // unconditionally include in API requests. By default, fields with 9598 // empty values are omitted from API requests. However, any non-pointer, 9599 // non-interface field appearing in ForceSendFields will be sent to the 9600 // server regardless of whether the field is empty or not. This may be 9601 // used to include empty fields in Patch requests. 9602 ForceSendFields []string `json:"-"` 9603 9604 // NullFields is a list of field names (e.g. "MajorDimension") to 9605 // include in API requests with the JSON null value. By default, fields 9606 // with empty values are omitted from API requests. However, any field 9607 // with an empty value appearing in NullFields will be sent to the 9608 // server as null. It is an error if a field in this list has a 9609 // non-empty value. This may be used to include null fields in Patch 9610 // requests. 9611 NullFields []string `json:"-"` 9612} 9613 9614func (s *ValueRange) MarshalJSON() ([]byte, error) { 9615 type NoMethod ValueRange 9616 raw := NoMethod(*s) 9617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9618} 9619 9620// WaterfallChartColumnStyle: Styles for a waterfall chart column. 9621type WaterfallChartColumnStyle struct { 9622 // Color: The color of the column. 9623 Color *Color `json:"color,omitempty"` 9624 9625 // Label: The label of the column's legend. 9626 Label string `json:"label,omitempty"` 9627 9628 // ForceSendFields is a list of field names (e.g. "Color") to 9629 // unconditionally include in API requests. By default, fields with 9630 // empty values are omitted from API requests. However, any non-pointer, 9631 // non-interface field appearing in ForceSendFields will be sent to the 9632 // server regardless of whether the field is empty or not. This may be 9633 // used to include empty fields in Patch requests. 9634 ForceSendFields []string `json:"-"` 9635 9636 // NullFields is a list of field names (e.g. "Color") to include in API 9637 // requests with the JSON null value. By default, fields with empty 9638 // values are omitted from API requests. However, any field with an 9639 // empty value appearing in NullFields will be sent to the server as 9640 // null. It is an error if a field in this list has a non-empty value. 9641 // This may be used to include null fields in Patch requests. 9642 NullFields []string `json:"-"` 9643} 9644 9645func (s *WaterfallChartColumnStyle) MarshalJSON() ([]byte, error) { 9646 type NoMethod WaterfallChartColumnStyle 9647 raw := NoMethod(*s) 9648 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9649} 9650 9651// WaterfallChartCustomSubtotal: A custom subtotal column for a 9652// waterfall chart series. 9653type WaterfallChartCustomSubtotal struct { 9654 // DataIsSubtotal: True if the data point at subtotal_index is the 9655 // subtotal. If false, 9656 // the subtotal will be computed and appear after the data point. 9657 DataIsSubtotal bool `json:"dataIsSubtotal,omitempty"` 9658 9659 // Label: A label for the subtotal column. 9660 Label string `json:"label,omitempty"` 9661 9662 // SubtotalIndex: The 0-based index of a data point within the series. 9663 // If 9664 // data_is_subtotal is true, the data point at this index is 9665 // the 9666 // subtotal. Otherwise, the subtotal appears after the data point 9667 // with 9668 // this index. A series can have multiple subtotals at arbitrary 9669 // indices, 9670 // but subtotals do not affect the indices of the data points. 9671 // For 9672 // example, if a series has three data points, their indices will 9673 // always 9674 // be 0, 1, and 2, regardless of how many subtotals exist on the series 9675 // or 9676 // what data points they are associated with. 9677 SubtotalIndex int64 `json:"subtotalIndex,omitempty"` 9678 9679 // ForceSendFields is a list of field names (e.g. "DataIsSubtotal") to 9680 // unconditionally include in API requests. By default, fields with 9681 // empty values are omitted from API requests. However, any non-pointer, 9682 // non-interface field appearing in ForceSendFields will be sent to the 9683 // server regardless of whether the field is empty or not. This may be 9684 // used to include empty fields in Patch requests. 9685 ForceSendFields []string `json:"-"` 9686 9687 // NullFields is a list of field names (e.g. "DataIsSubtotal") to 9688 // include in API requests with the JSON null value. By default, fields 9689 // with empty values are omitted from API requests. However, any field 9690 // with an empty value appearing in NullFields will be sent to the 9691 // server as null. It is an error if a field in this list has a 9692 // non-empty value. This may be used to include null fields in Patch 9693 // requests. 9694 NullFields []string `json:"-"` 9695} 9696 9697func (s *WaterfallChartCustomSubtotal) MarshalJSON() ([]byte, error) { 9698 type NoMethod WaterfallChartCustomSubtotal 9699 raw := NoMethod(*s) 9700 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9701} 9702 9703// WaterfallChartDomain: The domain of a waterfall chart. 9704type WaterfallChartDomain struct { 9705 // Data: The data of the WaterfallChartDomain. 9706 Data *ChartData `json:"data,omitempty"` 9707 9708 // Reversed: True to reverse the order of the domain values (horizontal 9709 // axis). 9710 Reversed bool `json:"reversed,omitempty"` 9711 9712 // ForceSendFields is a list of field names (e.g. "Data") to 9713 // unconditionally include in API requests. By default, fields with 9714 // empty values are omitted from API requests. However, any non-pointer, 9715 // non-interface field appearing in ForceSendFields will be sent to the 9716 // server regardless of whether the field is empty or not. This may be 9717 // used to include empty fields in Patch requests. 9718 ForceSendFields []string `json:"-"` 9719 9720 // NullFields is a list of field names (e.g. "Data") to include in API 9721 // requests with the JSON null value. By default, fields with empty 9722 // values are omitted from API requests. However, any field with an 9723 // empty value appearing in NullFields will be sent to the server as 9724 // null. It is an error if a field in this list has a non-empty value. 9725 // This may be used to include null fields in Patch requests. 9726 NullFields []string `json:"-"` 9727} 9728 9729func (s *WaterfallChartDomain) MarshalJSON() ([]byte, error) { 9730 type NoMethod WaterfallChartDomain 9731 raw := NoMethod(*s) 9732 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9733} 9734 9735// WaterfallChartSeries: A single series of data for a waterfall chart. 9736type WaterfallChartSeries struct { 9737 // CustomSubtotals: Custom subtotal columns appearing in this series. 9738 // The order in which 9739 // subtotals are defined is not significant. Only one subtotal may 9740 // be 9741 // defined for each data point. 9742 CustomSubtotals []*WaterfallChartCustomSubtotal `json:"customSubtotals,omitempty"` 9743 9744 // Data: The data being visualized in this series. 9745 Data *ChartData `json:"data,omitempty"` 9746 9747 // HideTrailingSubtotal: True to hide the subtotal column from the end 9748 // of the series. By default, 9749 // a subtotal column will appear at the end of each series. Setting 9750 // this 9751 // field to true will hide that subtotal column for this series. 9752 HideTrailingSubtotal bool `json:"hideTrailingSubtotal,omitempty"` 9753 9754 // NegativeColumnsStyle: Styles for all columns in this series with 9755 // negative values. 9756 NegativeColumnsStyle *WaterfallChartColumnStyle `json:"negativeColumnsStyle,omitempty"` 9757 9758 // PositiveColumnsStyle: Styles for all columns in this series with 9759 // positive values. 9760 PositiveColumnsStyle *WaterfallChartColumnStyle `json:"positiveColumnsStyle,omitempty"` 9761 9762 // SubtotalColumnsStyle: Styles for all subtotal columns in this series. 9763 SubtotalColumnsStyle *WaterfallChartColumnStyle `json:"subtotalColumnsStyle,omitempty"` 9764 9765 // ForceSendFields is a list of field names (e.g. "CustomSubtotals") to 9766 // unconditionally include in API requests. By default, fields with 9767 // empty values are omitted from API requests. However, any non-pointer, 9768 // non-interface field appearing in ForceSendFields will be sent to the 9769 // server regardless of whether the field is empty or not. This may be 9770 // used to include empty fields in Patch requests. 9771 ForceSendFields []string `json:"-"` 9772 9773 // NullFields is a list of field names (e.g. "CustomSubtotals") to 9774 // include in API requests with the JSON null value. By default, fields 9775 // with empty values are omitted from API requests. However, any field 9776 // with an empty value appearing in NullFields will be sent to the 9777 // server as null. It is an error if a field in this list has a 9778 // non-empty value. This may be used to include null fields in Patch 9779 // requests. 9780 NullFields []string `json:"-"` 9781} 9782 9783func (s *WaterfallChartSeries) MarshalJSON() ([]byte, error) { 9784 type NoMethod WaterfallChartSeries 9785 raw := NoMethod(*s) 9786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9787} 9788 9789// WaterfallChartSpec: A waterfall chart. 9790type WaterfallChartSpec struct { 9791 // ConnectorLineStyle: The line style for the connector lines. 9792 ConnectorLineStyle *LineStyle `json:"connectorLineStyle,omitempty"` 9793 9794 // Domain: The domain data (horizontal axis) for the waterfall chart. 9795 Domain *WaterfallChartDomain `json:"domain,omitempty"` 9796 9797 // FirstValueIsTotal: True to interpret the first value as a total. 9798 FirstValueIsTotal bool `json:"firstValueIsTotal,omitempty"` 9799 9800 // HideConnectorLines: True to hide connector lines between columns. 9801 HideConnectorLines bool `json:"hideConnectorLines,omitempty"` 9802 9803 // Series: The data this waterfall chart is visualizing. 9804 Series []*WaterfallChartSeries `json:"series,omitempty"` 9805 9806 // StackedType: The stacked type. 9807 // 9808 // Possible values: 9809 // "WATERFALL_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 9810 // "STACKED" - Values corresponding to the same domain (horizontal 9811 // axis) value will be 9812 // stacked vertically. 9813 // "SEQUENTIAL" - Series will spread out along the horizontal axis. 9814 StackedType string `json:"stackedType,omitempty"` 9815 9816 // ForceSendFields is a list of field names (e.g. "ConnectorLineStyle") 9817 // to unconditionally include in API requests. By default, fields with 9818 // empty values are omitted from API requests. However, any non-pointer, 9819 // non-interface field appearing in ForceSendFields will be sent to the 9820 // server regardless of whether the field is empty or not. This may be 9821 // used to include empty fields in Patch requests. 9822 ForceSendFields []string `json:"-"` 9823 9824 // NullFields is a list of field names (e.g. "ConnectorLineStyle") to 9825 // include in API requests with the JSON null value. By default, fields 9826 // with empty values are omitted from API requests. However, any field 9827 // with an empty value appearing in NullFields will be sent to the 9828 // server as null. It is an error if a field in this list has a 9829 // non-empty value. This may be used to include null fields in Patch 9830 // requests. 9831 NullFields []string `json:"-"` 9832} 9833 9834func (s *WaterfallChartSpec) MarshalJSON() ([]byte, error) { 9835 type NoMethod WaterfallChartSpec 9836 raw := NoMethod(*s) 9837 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9838} 9839 9840// method id "sheets.spreadsheets.batchUpdate": 9841 9842type SpreadsheetsBatchUpdateCall struct { 9843 s *Service 9844 spreadsheetId string 9845 batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest 9846 urlParams_ gensupport.URLParams 9847 ctx_ context.Context 9848 header_ http.Header 9849} 9850 9851// BatchUpdate: Applies one or more updates to the spreadsheet. 9852// 9853// Each request is validated before 9854// being applied. If any request is not valid then the entire request 9855// will 9856// fail and nothing will be applied. 9857// 9858// Some requests have replies to 9859// give you some information about how 9860// they are applied. The replies will mirror the requests. For 9861// example, 9862// if you applied 4 updates and the 3rd one had a reply, then 9863// the 9864// response will have 2 empty replies, the actual reply, and another 9865// empty 9866// reply, in that order. 9867// 9868// Due to the collaborative nature of spreadsheets, it is not guaranteed 9869// that 9870// the spreadsheet will reflect exactly your changes after this 9871// completes, 9872// however it is guaranteed that the updates in the request will 9873// be 9874// applied together atomically. Your changes may be altered with respect 9875// to 9876// collaborator changes. If there are no collaborators, the 9877// spreadsheet 9878// should reflect your changes. 9879func (r *SpreadsheetsService) BatchUpdate(spreadsheetId string, batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest) *SpreadsheetsBatchUpdateCall { 9880 c := &SpreadsheetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9881 c.spreadsheetId = spreadsheetId 9882 c.batchupdatespreadsheetrequest = batchupdatespreadsheetrequest 9883 return c 9884} 9885 9886// Fields allows partial responses to be retrieved. See 9887// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9888// for more information. 9889func (c *SpreadsheetsBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsBatchUpdateCall { 9890 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9891 return c 9892} 9893 9894// Context sets the context to be used in this call's Do method. Any 9895// pending HTTP request will be aborted if the provided context is 9896// canceled. 9897func (c *SpreadsheetsBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsBatchUpdateCall { 9898 c.ctx_ = ctx 9899 return c 9900} 9901 9902// Header returns an http.Header that can be modified by the caller to 9903// add HTTP headers to the request. 9904func (c *SpreadsheetsBatchUpdateCall) Header() http.Header { 9905 if c.header_ == nil { 9906 c.header_ = make(http.Header) 9907 } 9908 return c.header_ 9909} 9910 9911func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 9912 reqHeaders := make(http.Header) 9913 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 9914 for k, v := range c.header_ { 9915 reqHeaders[k] = v 9916 } 9917 reqHeaders.Set("User-Agent", c.s.userAgent()) 9918 var body io.Reader = nil 9919 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatespreadsheetrequest) 9920 if err != nil { 9921 return nil, err 9922 } 9923 reqHeaders.Set("Content-Type", "application/json") 9924 c.urlParams_.Set("alt", alt) 9925 c.urlParams_.Set("prettyPrint", "false") 9926 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate") 9927 urls += "?" + c.urlParams_.Encode() 9928 req, err := http.NewRequest("POST", urls, body) 9929 if err != nil { 9930 return nil, err 9931 } 9932 req.Header = reqHeaders 9933 googleapi.Expand(req.URL, map[string]string{ 9934 "spreadsheetId": c.spreadsheetId, 9935 }) 9936 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9937} 9938 9939// Do executes the "sheets.spreadsheets.batchUpdate" call. 9940// Exactly one of *BatchUpdateSpreadsheetResponse or error will be 9941// non-nil. Any non-2xx status code is an error. Response headers are in 9942// either *BatchUpdateSpreadsheetResponse.ServerResponse.Header or (if a 9943// response was returned at all) in error.(*googleapi.Error).Header. Use 9944// googleapi.IsNotModified to check whether the returned error was 9945// because http.StatusNotModified was returned. 9946func (c *SpreadsheetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateSpreadsheetResponse, error) { 9947 gensupport.SetOptions(c.urlParams_, opts...) 9948 res, err := c.doRequest("json") 9949 if res != nil && res.StatusCode == http.StatusNotModified { 9950 if res.Body != nil { 9951 res.Body.Close() 9952 } 9953 return nil, &googleapi.Error{ 9954 Code: res.StatusCode, 9955 Header: res.Header, 9956 } 9957 } 9958 if err != nil { 9959 return nil, err 9960 } 9961 defer googleapi.CloseBody(res) 9962 if err := googleapi.CheckResponse(res); err != nil { 9963 return nil, err 9964 } 9965 ret := &BatchUpdateSpreadsheetResponse{ 9966 ServerResponse: googleapi.ServerResponse{ 9967 Header: res.Header, 9968 HTTPStatusCode: res.StatusCode, 9969 }, 9970 } 9971 target := &ret 9972 if err := gensupport.DecodeResponse(target, res); err != nil { 9973 return nil, err 9974 } 9975 return ret, nil 9976 // { 9977 // "description": "Applies one or more updates to the spreadsheet.\n\nEach request is validated before\nbeing applied. If any request is not valid then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how\nthey are applied. The replies will mirror the requests. For example,\nif you applied 4 updates and the 3rd one had a reply, then the\nresponse will have 2 empty replies, the actual reply, and another empty\nreply, in that order.\n\nDue to the collaborative nature of spreadsheets, it is not guaranteed that\nthe spreadsheet will reflect exactly your changes after this completes,\nhowever it is guaranteed that the updates in the request will be\napplied together atomically. Your changes may be altered with respect to\ncollaborator changes. If there are no collaborators, the spreadsheet\nshould reflect your changes.", 9978 // "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 9979 // "httpMethod": "POST", 9980 // "id": "sheets.spreadsheets.batchUpdate", 9981 // "parameterOrder": [ 9982 // "spreadsheetId" 9983 // ], 9984 // "parameters": { 9985 // "spreadsheetId": { 9986 // "description": "The spreadsheet to apply the updates to.", 9987 // "location": "path", 9988 // "required": true, 9989 // "type": "string" 9990 // } 9991 // }, 9992 // "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 9993 // "request": { 9994 // "$ref": "BatchUpdateSpreadsheetRequest" 9995 // }, 9996 // "response": { 9997 // "$ref": "BatchUpdateSpreadsheetResponse" 9998 // }, 9999 // "scopes": [ 10000 // "https://www.googleapis.com/auth/drive", 10001 // "https://www.googleapis.com/auth/drive.file", 10002 // "https://www.googleapis.com/auth/spreadsheets" 10003 // ] 10004 // } 10005 10006} 10007 10008// method id "sheets.spreadsheets.create": 10009 10010type SpreadsheetsCreateCall struct { 10011 s *Service 10012 spreadsheet *Spreadsheet 10013 urlParams_ gensupport.URLParams 10014 ctx_ context.Context 10015 header_ http.Header 10016} 10017 10018// Create: Creates a spreadsheet, returning the newly created 10019// spreadsheet. 10020func (r *SpreadsheetsService) Create(spreadsheet *Spreadsheet) *SpreadsheetsCreateCall { 10021 c := &SpreadsheetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10022 c.spreadsheet = spreadsheet 10023 return c 10024} 10025 10026// Fields allows partial responses to be retrieved. See 10027// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10028// for more information. 10029func (c *SpreadsheetsCreateCall) Fields(s ...googleapi.Field) *SpreadsheetsCreateCall { 10030 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10031 return c 10032} 10033 10034// Context sets the context to be used in this call's Do method. Any 10035// pending HTTP request will be aborted if the provided context is 10036// canceled. 10037func (c *SpreadsheetsCreateCall) Context(ctx context.Context) *SpreadsheetsCreateCall { 10038 c.ctx_ = ctx 10039 return c 10040} 10041 10042// Header returns an http.Header that can be modified by the caller to 10043// add HTTP headers to the request. 10044func (c *SpreadsheetsCreateCall) Header() http.Header { 10045 if c.header_ == nil { 10046 c.header_ = make(http.Header) 10047 } 10048 return c.header_ 10049} 10050 10051func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) { 10052 reqHeaders := make(http.Header) 10053 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10054 for k, v := range c.header_ { 10055 reqHeaders[k] = v 10056 } 10057 reqHeaders.Set("User-Agent", c.s.userAgent()) 10058 var body io.Reader = nil 10059 body, err := googleapi.WithoutDataWrapper.JSONReader(c.spreadsheet) 10060 if err != nil { 10061 return nil, err 10062 } 10063 reqHeaders.Set("Content-Type", "application/json") 10064 c.urlParams_.Set("alt", alt) 10065 c.urlParams_.Set("prettyPrint", "false") 10066 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets") 10067 urls += "?" + c.urlParams_.Encode() 10068 req, err := http.NewRequest("POST", urls, body) 10069 if err != nil { 10070 return nil, err 10071 } 10072 req.Header = reqHeaders 10073 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10074} 10075 10076// Do executes the "sheets.spreadsheets.create" call. 10077// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10078// status code is an error. Response headers are in either 10079// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10080// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10081// to check whether the returned error was because 10082// http.StatusNotModified was returned. 10083func (c *SpreadsheetsCreateCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10084 gensupport.SetOptions(c.urlParams_, opts...) 10085 res, err := c.doRequest("json") 10086 if res != nil && res.StatusCode == http.StatusNotModified { 10087 if res.Body != nil { 10088 res.Body.Close() 10089 } 10090 return nil, &googleapi.Error{ 10091 Code: res.StatusCode, 10092 Header: res.Header, 10093 } 10094 } 10095 if err != nil { 10096 return nil, err 10097 } 10098 defer googleapi.CloseBody(res) 10099 if err := googleapi.CheckResponse(res); err != nil { 10100 return nil, err 10101 } 10102 ret := &Spreadsheet{ 10103 ServerResponse: googleapi.ServerResponse{ 10104 Header: res.Header, 10105 HTTPStatusCode: res.StatusCode, 10106 }, 10107 } 10108 target := &ret 10109 if err := gensupport.DecodeResponse(target, res); err != nil { 10110 return nil, err 10111 } 10112 return ret, nil 10113 // { 10114 // "description": "Creates a spreadsheet, returning the newly created spreadsheet.", 10115 // "flatPath": "v4/spreadsheets", 10116 // "httpMethod": "POST", 10117 // "id": "sheets.spreadsheets.create", 10118 // "parameterOrder": [], 10119 // "parameters": {}, 10120 // "path": "v4/spreadsheets", 10121 // "request": { 10122 // "$ref": "Spreadsheet" 10123 // }, 10124 // "response": { 10125 // "$ref": "Spreadsheet" 10126 // }, 10127 // "scopes": [ 10128 // "https://www.googleapis.com/auth/drive", 10129 // "https://www.googleapis.com/auth/drive.file", 10130 // "https://www.googleapis.com/auth/spreadsheets" 10131 // ] 10132 // } 10133 10134} 10135 10136// method id "sheets.spreadsheets.get": 10137 10138type SpreadsheetsGetCall struct { 10139 s *Service 10140 spreadsheetId string 10141 urlParams_ gensupport.URLParams 10142 ifNoneMatch_ string 10143 ctx_ context.Context 10144 header_ http.Header 10145} 10146 10147// Get: Returns the spreadsheet at the given ID. 10148// The caller must specify the spreadsheet ID. 10149// 10150// By default, data within grids will not be returned. 10151// You can include grid data one of two ways: 10152// 10153// * Specify a field mask listing your desired fields using the `fields` 10154// URL 10155// parameter in HTTP 10156// 10157// * Set the includeGridData 10158// URL parameter to true. If a field mask is set, the 10159// `includeGridData` 10160// parameter is ignored 10161// 10162// For large spreadsheets, it is recommended to retrieve only the 10163// specific 10164// fields of the spreadsheet that you want. 10165// 10166// To retrieve only subsets of the spreadsheet, use the 10167// ranges URL parameter. 10168// Multiple ranges can be specified. Limiting the range will 10169// return only the portions of the spreadsheet that intersect the 10170// requested 10171// ranges. Ranges are specified using A1 notation. 10172func (r *SpreadsheetsService) Get(spreadsheetId string) *SpreadsheetsGetCall { 10173 c := &SpreadsheetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10174 c.spreadsheetId = spreadsheetId 10175 return c 10176} 10177 10178// IncludeGridData sets the optional parameter "includeGridData": True 10179// if grid data should be returned. 10180// This parameter is ignored if a field mask was set in the request. 10181func (c *SpreadsheetsGetCall) IncludeGridData(includeGridData bool) *SpreadsheetsGetCall { 10182 c.urlParams_.Set("includeGridData", fmt.Sprint(includeGridData)) 10183 return c 10184} 10185 10186// Ranges sets the optional parameter "ranges": The ranges to retrieve 10187// from the spreadsheet. 10188func (c *SpreadsheetsGetCall) Ranges(ranges ...string) *SpreadsheetsGetCall { 10189 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 10190 return c 10191} 10192 10193// Fields allows partial responses to be retrieved. See 10194// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10195// for more information. 10196func (c *SpreadsheetsGetCall) Fields(s ...googleapi.Field) *SpreadsheetsGetCall { 10197 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10198 return c 10199} 10200 10201// IfNoneMatch sets the optional parameter which makes the operation 10202// fail if the object's ETag matches the given value. This is useful for 10203// getting updates only after the object has changed since the last 10204// request. Use googleapi.IsNotModified to check whether the response 10205// error from Do is the result of In-None-Match. 10206func (c *SpreadsheetsGetCall) IfNoneMatch(entityTag string) *SpreadsheetsGetCall { 10207 c.ifNoneMatch_ = entityTag 10208 return c 10209} 10210 10211// Context sets the context to be used in this call's Do method. Any 10212// pending HTTP request will be aborted if the provided context is 10213// canceled. 10214func (c *SpreadsheetsGetCall) Context(ctx context.Context) *SpreadsheetsGetCall { 10215 c.ctx_ = ctx 10216 return c 10217} 10218 10219// Header returns an http.Header that can be modified by the caller to 10220// add HTTP headers to the request. 10221func (c *SpreadsheetsGetCall) Header() http.Header { 10222 if c.header_ == nil { 10223 c.header_ = make(http.Header) 10224 } 10225 return c.header_ 10226} 10227 10228func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) { 10229 reqHeaders := make(http.Header) 10230 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10231 for k, v := range c.header_ { 10232 reqHeaders[k] = v 10233 } 10234 reqHeaders.Set("User-Agent", c.s.userAgent()) 10235 if c.ifNoneMatch_ != "" { 10236 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10237 } 10238 var body io.Reader = nil 10239 c.urlParams_.Set("alt", alt) 10240 c.urlParams_.Set("prettyPrint", "false") 10241 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}") 10242 urls += "?" + c.urlParams_.Encode() 10243 req, err := http.NewRequest("GET", urls, body) 10244 if err != nil { 10245 return nil, err 10246 } 10247 req.Header = reqHeaders 10248 googleapi.Expand(req.URL, map[string]string{ 10249 "spreadsheetId": c.spreadsheetId, 10250 }) 10251 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10252} 10253 10254// Do executes the "sheets.spreadsheets.get" call. 10255// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10256// status code is an error. Response headers are in either 10257// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10258// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10259// to check whether the returned error was because 10260// http.StatusNotModified was returned. 10261func (c *SpreadsheetsGetCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10262 gensupport.SetOptions(c.urlParams_, opts...) 10263 res, err := c.doRequest("json") 10264 if res != nil && res.StatusCode == http.StatusNotModified { 10265 if res.Body != nil { 10266 res.Body.Close() 10267 } 10268 return nil, &googleapi.Error{ 10269 Code: res.StatusCode, 10270 Header: res.Header, 10271 } 10272 } 10273 if err != nil { 10274 return nil, err 10275 } 10276 defer googleapi.CloseBody(res) 10277 if err := googleapi.CheckResponse(res); err != nil { 10278 return nil, err 10279 } 10280 ret := &Spreadsheet{ 10281 ServerResponse: googleapi.ServerResponse{ 10282 Header: res.Header, 10283 HTTPStatusCode: res.StatusCode, 10284 }, 10285 } 10286 target := &ret 10287 if err := gensupport.DecodeResponse(target, res); err != nil { 10288 return nil, err 10289 } 10290 return ret, nil 10291 // { 10292 // "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation.", 10293 // "flatPath": "v4/spreadsheets/{spreadsheetId}", 10294 // "httpMethod": "GET", 10295 // "id": "sheets.spreadsheets.get", 10296 // "parameterOrder": [ 10297 // "spreadsheetId" 10298 // ], 10299 // "parameters": { 10300 // "includeGridData": { 10301 // "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", 10302 // "location": "query", 10303 // "type": "boolean" 10304 // }, 10305 // "ranges": { 10306 // "description": "The ranges to retrieve from the spreadsheet.", 10307 // "location": "query", 10308 // "repeated": true, 10309 // "type": "string" 10310 // }, 10311 // "spreadsheetId": { 10312 // "description": "The spreadsheet to request.", 10313 // "location": "path", 10314 // "required": true, 10315 // "type": "string" 10316 // } 10317 // }, 10318 // "path": "v4/spreadsheets/{spreadsheetId}", 10319 // "response": { 10320 // "$ref": "Spreadsheet" 10321 // }, 10322 // "scopes": [ 10323 // "https://www.googleapis.com/auth/drive", 10324 // "https://www.googleapis.com/auth/drive.file", 10325 // "https://www.googleapis.com/auth/drive.readonly", 10326 // "https://www.googleapis.com/auth/spreadsheets", 10327 // "https://www.googleapis.com/auth/spreadsheets.readonly" 10328 // ] 10329 // } 10330 10331} 10332 10333// method id "sheets.spreadsheets.getByDataFilter": 10334 10335type SpreadsheetsGetByDataFilterCall struct { 10336 s *Service 10337 spreadsheetId string 10338 getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest 10339 urlParams_ gensupport.URLParams 10340 ctx_ context.Context 10341 header_ http.Header 10342} 10343 10344// GetByDataFilter: Returns the spreadsheet at the given ID. 10345// The caller must specify the spreadsheet ID. 10346// 10347// This method differs from GetSpreadsheet in that it allows 10348// selecting 10349// which subsets of spreadsheet data to return by specifying 10350// a 10351// dataFilters parameter. 10352// Multiple DataFilters can be specified. Specifying one or 10353// more data filters will return the portions of the spreadsheet 10354// that 10355// intersect ranges matched by any of the filters. 10356// 10357// By default, data within grids will not be returned. 10358// You can include grid data one of two ways: 10359// 10360// * Specify a field mask listing your desired fields using the `fields` 10361// URL 10362// parameter in HTTP 10363// 10364// * Set the includeGridData 10365// parameter to true. If a field mask is set, the 10366// `includeGridData` 10367// parameter is ignored 10368// 10369// For large spreadsheets, it is recommended to retrieve only the 10370// specific 10371// fields of the spreadsheet that you want. 10372func (r *SpreadsheetsService) GetByDataFilter(spreadsheetId string, getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest) *SpreadsheetsGetByDataFilterCall { 10373 c := &SpreadsheetsGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10374 c.spreadsheetId = spreadsheetId 10375 c.getspreadsheetbydatafilterrequest = getspreadsheetbydatafilterrequest 10376 return c 10377} 10378 10379// Fields allows partial responses to be retrieved. See 10380// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10381// for more information. 10382func (c *SpreadsheetsGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsGetByDataFilterCall { 10383 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10384 return c 10385} 10386 10387// Context sets the context to be used in this call's Do method. Any 10388// pending HTTP request will be aborted if the provided context is 10389// canceled. 10390func (c *SpreadsheetsGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsGetByDataFilterCall { 10391 c.ctx_ = ctx 10392 return c 10393} 10394 10395// Header returns an http.Header that can be modified by the caller to 10396// add HTTP headers to the request. 10397func (c *SpreadsheetsGetByDataFilterCall) Header() http.Header { 10398 if c.header_ == nil { 10399 c.header_ = make(http.Header) 10400 } 10401 return c.header_ 10402} 10403 10404func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 10405 reqHeaders := make(http.Header) 10406 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10407 for k, v := range c.header_ { 10408 reqHeaders[k] = v 10409 } 10410 reqHeaders.Set("User-Agent", c.s.userAgent()) 10411 var body io.Reader = nil 10412 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getspreadsheetbydatafilterrequest) 10413 if err != nil { 10414 return nil, err 10415 } 10416 reqHeaders.Set("Content-Type", "application/json") 10417 c.urlParams_.Set("alt", alt) 10418 c.urlParams_.Set("prettyPrint", "false") 10419 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter") 10420 urls += "?" + c.urlParams_.Encode() 10421 req, err := http.NewRequest("POST", urls, body) 10422 if err != nil { 10423 return nil, err 10424 } 10425 req.Header = reqHeaders 10426 googleapi.Expand(req.URL, map[string]string{ 10427 "spreadsheetId": c.spreadsheetId, 10428 }) 10429 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10430} 10431 10432// Do executes the "sheets.spreadsheets.getByDataFilter" call. 10433// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10434// status code is an error. Response headers are in either 10435// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10436// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10437// to check whether the returned error was because 10438// http.StatusNotModified was returned. 10439func (c *SpreadsheetsGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10440 gensupport.SetOptions(c.urlParams_, opts...) 10441 res, err := c.doRequest("json") 10442 if res != nil && res.StatusCode == http.StatusNotModified { 10443 if res.Body != nil { 10444 res.Body.Close() 10445 } 10446 return nil, &googleapi.Error{ 10447 Code: res.StatusCode, 10448 Header: res.Header, 10449 } 10450 } 10451 if err != nil { 10452 return nil, err 10453 } 10454 defer googleapi.CloseBody(res) 10455 if err := googleapi.CheckResponse(res); err != nil { 10456 return nil, err 10457 } 10458 ret := &Spreadsheet{ 10459 ServerResponse: googleapi.ServerResponse{ 10460 Header: res.Header, 10461 HTTPStatusCode: res.StatusCode, 10462 }, 10463 } 10464 target := &ret 10465 if err := gensupport.DecodeResponse(target, res); err != nil { 10466 return nil, err 10467 } 10468 return ret, nil 10469 // { 10470 // "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nThis method differs from GetSpreadsheet in that it allows selecting\nwhich subsets of spreadsheet data to return by specifying a\ndataFilters parameter.\nMultiple DataFilters can be specified. Specifying one or\nmore data filters will return the portions of the spreadsheet that\nintersect ranges matched by any of the filters.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nparameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.", 10471 // "flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 10472 // "httpMethod": "POST", 10473 // "id": "sheets.spreadsheets.getByDataFilter", 10474 // "parameterOrder": [ 10475 // "spreadsheetId" 10476 // ], 10477 // "parameters": { 10478 // "spreadsheetId": { 10479 // "description": "The spreadsheet to request.", 10480 // "location": "path", 10481 // "required": true, 10482 // "type": "string" 10483 // } 10484 // }, 10485 // "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 10486 // "request": { 10487 // "$ref": "GetSpreadsheetByDataFilterRequest" 10488 // }, 10489 // "response": { 10490 // "$ref": "Spreadsheet" 10491 // }, 10492 // "scopes": [ 10493 // "https://www.googleapis.com/auth/drive", 10494 // "https://www.googleapis.com/auth/drive.file", 10495 // "https://www.googleapis.com/auth/spreadsheets" 10496 // ] 10497 // } 10498 10499} 10500 10501// method id "sheets.spreadsheets.developerMetadata.get": 10502 10503type SpreadsheetsDeveloperMetadataGetCall struct { 10504 s *Service 10505 spreadsheetId string 10506 metadataId int64 10507 urlParams_ gensupport.URLParams 10508 ifNoneMatch_ string 10509 ctx_ context.Context 10510 header_ http.Header 10511} 10512 10513// Get: Returns the developer metadata with the specified ID. 10514// The caller must specify the spreadsheet ID and the developer 10515// metadata's 10516// unique metadataId. 10517func (r *SpreadsheetsDeveloperMetadataService) Get(spreadsheetId string, metadataId int64) *SpreadsheetsDeveloperMetadataGetCall { 10518 c := &SpreadsheetsDeveloperMetadataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10519 c.spreadsheetId = spreadsheetId 10520 c.metadataId = metadataId 10521 return c 10522} 10523 10524// Fields allows partial responses to be retrieved. See 10525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10526// for more information. 10527func (c *SpreadsheetsDeveloperMetadataGetCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataGetCall { 10528 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10529 return c 10530} 10531 10532// IfNoneMatch sets the optional parameter which makes the operation 10533// fail if the object's ETag matches the given value. This is useful for 10534// getting updates only after the object has changed since the last 10535// request. Use googleapi.IsNotModified to check whether the response 10536// error from Do is the result of In-None-Match. 10537func (c *SpreadsheetsDeveloperMetadataGetCall) IfNoneMatch(entityTag string) *SpreadsheetsDeveloperMetadataGetCall { 10538 c.ifNoneMatch_ = entityTag 10539 return c 10540} 10541 10542// Context sets the context to be used in this call's Do method. Any 10543// pending HTTP request will be aborted if the provided context is 10544// canceled. 10545func (c *SpreadsheetsDeveloperMetadataGetCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataGetCall { 10546 c.ctx_ = ctx 10547 return c 10548} 10549 10550// Header returns an http.Header that can be modified by the caller to 10551// add HTTP headers to the request. 10552func (c *SpreadsheetsDeveloperMetadataGetCall) Header() http.Header { 10553 if c.header_ == nil { 10554 c.header_ = make(http.Header) 10555 } 10556 return c.header_ 10557} 10558 10559func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Response, error) { 10560 reqHeaders := make(http.Header) 10561 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10562 for k, v := range c.header_ { 10563 reqHeaders[k] = v 10564 } 10565 reqHeaders.Set("User-Agent", c.s.userAgent()) 10566 if c.ifNoneMatch_ != "" { 10567 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10568 } 10569 var body io.Reader = nil 10570 c.urlParams_.Set("alt", alt) 10571 c.urlParams_.Set("prettyPrint", "false") 10572 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}") 10573 urls += "?" + c.urlParams_.Encode() 10574 req, err := http.NewRequest("GET", urls, body) 10575 if err != nil { 10576 return nil, err 10577 } 10578 req.Header = reqHeaders 10579 googleapi.Expand(req.URL, map[string]string{ 10580 "spreadsheetId": c.spreadsheetId, 10581 "metadataId": strconv.FormatInt(c.metadataId, 10), 10582 }) 10583 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10584} 10585 10586// Do executes the "sheets.spreadsheets.developerMetadata.get" call. 10587// Exactly one of *DeveloperMetadata or error will be non-nil. Any 10588// non-2xx status code is an error. Response headers are in either 10589// *DeveloperMetadata.ServerResponse.Header or (if a response was 10590// returned at all) in error.(*googleapi.Error).Header. Use 10591// googleapi.IsNotModified to check whether the returned error was 10592// because http.StatusNotModified was returned. 10593func (c *SpreadsheetsDeveloperMetadataGetCall) Do(opts ...googleapi.CallOption) (*DeveloperMetadata, error) { 10594 gensupport.SetOptions(c.urlParams_, opts...) 10595 res, err := c.doRequest("json") 10596 if res != nil && res.StatusCode == http.StatusNotModified { 10597 if res.Body != nil { 10598 res.Body.Close() 10599 } 10600 return nil, &googleapi.Error{ 10601 Code: res.StatusCode, 10602 Header: res.Header, 10603 } 10604 } 10605 if err != nil { 10606 return nil, err 10607 } 10608 defer googleapi.CloseBody(res) 10609 if err := googleapi.CheckResponse(res); err != nil { 10610 return nil, err 10611 } 10612 ret := &DeveloperMetadata{ 10613 ServerResponse: googleapi.ServerResponse{ 10614 Header: res.Header, 10615 HTTPStatusCode: res.StatusCode, 10616 }, 10617 } 10618 target := &ret 10619 if err := gensupport.DecodeResponse(target, res); err != nil { 10620 return nil, err 10621 } 10622 return ret, nil 10623 // { 10624 // "description": "Returns the developer metadata with the specified ID.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId.", 10625 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 10626 // "httpMethod": "GET", 10627 // "id": "sheets.spreadsheets.developerMetadata.get", 10628 // "parameterOrder": [ 10629 // "spreadsheetId", 10630 // "metadataId" 10631 // ], 10632 // "parameters": { 10633 // "metadataId": { 10634 // "description": "The ID of the developer metadata to retrieve.", 10635 // "format": "int32", 10636 // "location": "path", 10637 // "required": true, 10638 // "type": "integer" 10639 // }, 10640 // "spreadsheetId": { 10641 // "description": "The ID of the spreadsheet to retrieve metadata from.", 10642 // "location": "path", 10643 // "required": true, 10644 // "type": "string" 10645 // } 10646 // }, 10647 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 10648 // "response": { 10649 // "$ref": "DeveloperMetadata" 10650 // }, 10651 // "scopes": [ 10652 // "https://www.googleapis.com/auth/drive", 10653 // "https://www.googleapis.com/auth/drive.file", 10654 // "https://www.googleapis.com/auth/spreadsheets" 10655 // ] 10656 // } 10657 10658} 10659 10660// method id "sheets.spreadsheets.developerMetadata.search": 10661 10662type SpreadsheetsDeveloperMetadataSearchCall struct { 10663 s *Service 10664 spreadsheetId string 10665 searchdevelopermetadatarequest *SearchDeveloperMetadataRequest 10666 urlParams_ gensupport.URLParams 10667 ctx_ context.Context 10668 header_ http.Header 10669} 10670 10671// Search: Returns all developer metadata matching the specified 10672// DataFilter. 10673// If the provided DataFilter represents a DeveloperMetadataLookup 10674// object, 10675// this will return all DeveloperMetadata entries selected by it. If 10676// the 10677// DataFilter represents a location in a spreadsheet, this will return 10678// all 10679// developer metadata associated with locations intersecting that 10680// region. 10681func (r *SpreadsheetsDeveloperMetadataService) Search(spreadsheetId string, searchdevelopermetadatarequest *SearchDeveloperMetadataRequest) *SpreadsheetsDeveloperMetadataSearchCall { 10682 c := &SpreadsheetsDeveloperMetadataSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10683 c.spreadsheetId = spreadsheetId 10684 c.searchdevelopermetadatarequest = searchdevelopermetadatarequest 10685 return c 10686} 10687 10688// Fields allows partial responses to be retrieved. See 10689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10690// for more information. 10691func (c *SpreadsheetsDeveloperMetadataSearchCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataSearchCall { 10692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10693 return c 10694} 10695 10696// Context sets the context to be used in this call's Do method. Any 10697// pending HTTP request will be aborted if the provided context is 10698// canceled. 10699func (c *SpreadsheetsDeveloperMetadataSearchCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataSearchCall { 10700 c.ctx_ = ctx 10701 return c 10702} 10703 10704// Header returns an http.Header that can be modified by the caller to 10705// add HTTP headers to the request. 10706func (c *SpreadsheetsDeveloperMetadataSearchCall) Header() http.Header { 10707 if c.header_ == nil { 10708 c.header_ = make(http.Header) 10709 } 10710 return c.header_ 10711} 10712 10713func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.Response, error) { 10714 reqHeaders := make(http.Header) 10715 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10716 for k, v := range c.header_ { 10717 reqHeaders[k] = v 10718 } 10719 reqHeaders.Set("User-Agent", c.s.userAgent()) 10720 var body io.Reader = nil 10721 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchdevelopermetadatarequest) 10722 if err != nil { 10723 return nil, err 10724 } 10725 reqHeaders.Set("Content-Type", "application/json") 10726 c.urlParams_.Set("alt", alt) 10727 c.urlParams_.Set("prettyPrint", "false") 10728 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search") 10729 urls += "?" + c.urlParams_.Encode() 10730 req, err := http.NewRequest("POST", urls, body) 10731 if err != nil { 10732 return nil, err 10733 } 10734 req.Header = reqHeaders 10735 googleapi.Expand(req.URL, map[string]string{ 10736 "spreadsheetId": c.spreadsheetId, 10737 }) 10738 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10739} 10740 10741// Do executes the "sheets.spreadsheets.developerMetadata.search" call. 10742// Exactly one of *SearchDeveloperMetadataResponse or error will be 10743// non-nil. Any non-2xx status code is an error. Response headers are in 10744// either *SearchDeveloperMetadataResponse.ServerResponse.Header or (if 10745// a response was returned at all) in error.(*googleapi.Error).Header. 10746// Use googleapi.IsNotModified to check whether the returned error was 10747// because http.StatusNotModified was returned. 10748func (c *SpreadsheetsDeveloperMetadataSearchCall) Do(opts ...googleapi.CallOption) (*SearchDeveloperMetadataResponse, error) { 10749 gensupport.SetOptions(c.urlParams_, opts...) 10750 res, err := c.doRequest("json") 10751 if res != nil && res.StatusCode == http.StatusNotModified { 10752 if res.Body != nil { 10753 res.Body.Close() 10754 } 10755 return nil, &googleapi.Error{ 10756 Code: res.StatusCode, 10757 Header: res.Header, 10758 } 10759 } 10760 if err != nil { 10761 return nil, err 10762 } 10763 defer googleapi.CloseBody(res) 10764 if err := googleapi.CheckResponse(res); err != nil { 10765 return nil, err 10766 } 10767 ret := &SearchDeveloperMetadataResponse{ 10768 ServerResponse: googleapi.ServerResponse{ 10769 Header: res.Header, 10770 HTTPStatusCode: res.StatusCode, 10771 }, 10772 } 10773 target := &ret 10774 if err := gensupport.DecodeResponse(target, res); err != nil { 10775 return nil, err 10776 } 10777 return ret, nil 10778 // { 10779 // "description": "Returns all developer metadata matching the specified DataFilter.\nIf the provided DataFilter represents a DeveloperMetadataLookup object,\nthis will return all DeveloperMetadata entries selected by it. If the\nDataFilter represents a location in a spreadsheet, this will return all\ndeveloper metadata associated with locations intersecting that region.", 10780 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 10781 // "httpMethod": "POST", 10782 // "id": "sheets.spreadsheets.developerMetadata.search", 10783 // "parameterOrder": [ 10784 // "spreadsheetId" 10785 // ], 10786 // "parameters": { 10787 // "spreadsheetId": { 10788 // "description": "The ID of the spreadsheet to retrieve metadata from.", 10789 // "location": "path", 10790 // "required": true, 10791 // "type": "string" 10792 // } 10793 // }, 10794 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 10795 // "request": { 10796 // "$ref": "SearchDeveloperMetadataRequest" 10797 // }, 10798 // "response": { 10799 // "$ref": "SearchDeveloperMetadataResponse" 10800 // }, 10801 // "scopes": [ 10802 // "https://www.googleapis.com/auth/drive", 10803 // "https://www.googleapis.com/auth/drive.file", 10804 // "https://www.googleapis.com/auth/spreadsheets" 10805 // ] 10806 // } 10807 10808} 10809 10810// method id "sheets.spreadsheets.sheets.copyTo": 10811 10812type SpreadsheetsSheetsCopyToCall struct { 10813 s *Service 10814 spreadsheetId string 10815 sheetId int64 10816 copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest 10817 urlParams_ gensupport.URLParams 10818 ctx_ context.Context 10819 header_ http.Header 10820} 10821 10822// CopyTo: Copies a single sheet from a spreadsheet to another 10823// spreadsheet. 10824// Returns the properties of the newly created sheet. 10825func (r *SpreadsheetsSheetsService) CopyTo(spreadsheetId string, sheetId int64, copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest) *SpreadsheetsSheetsCopyToCall { 10826 c := &SpreadsheetsSheetsCopyToCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10827 c.spreadsheetId = spreadsheetId 10828 c.sheetId = sheetId 10829 c.copysheettoanotherspreadsheetrequest = copysheettoanotherspreadsheetrequest 10830 return c 10831} 10832 10833// Fields allows partial responses to be retrieved. See 10834// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10835// for more information. 10836func (c *SpreadsheetsSheetsCopyToCall) Fields(s ...googleapi.Field) *SpreadsheetsSheetsCopyToCall { 10837 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10838 return c 10839} 10840 10841// Context sets the context to be used in this call's Do method. Any 10842// pending HTTP request will be aborted if the provided context is 10843// canceled. 10844func (c *SpreadsheetsSheetsCopyToCall) Context(ctx context.Context) *SpreadsheetsSheetsCopyToCall { 10845 c.ctx_ = ctx 10846 return c 10847} 10848 10849// Header returns an http.Header that can be modified by the caller to 10850// add HTTP headers to the request. 10851func (c *SpreadsheetsSheetsCopyToCall) Header() http.Header { 10852 if c.header_ == nil { 10853 c.header_ = make(http.Header) 10854 } 10855 return c.header_ 10856} 10857 10858func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, error) { 10859 reqHeaders := make(http.Header) 10860 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 10861 for k, v := range c.header_ { 10862 reqHeaders[k] = v 10863 } 10864 reqHeaders.Set("User-Agent", c.s.userAgent()) 10865 var body io.Reader = nil 10866 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copysheettoanotherspreadsheetrequest) 10867 if err != nil { 10868 return nil, err 10869 } 10870 reqHeaders.Set("Content-Type", "application/json") 10871 c.urlParams_.Set("alt", alt) 10872 c.urlParams_.Set("prettyPrint", "false") 10873 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo") 10874 urls += "?" + c.urlParams_.Encode() 10875 req, err := http.NewRequest("POST", urls, body) 10876 if err != nil { 10877 return nil, err 10878 } 10879 req.Header = reqHeaders 10880 googleapi.Expand(req.URL, map[string]string{ 10881 "spreadsheetId": c.spreadsheetId, 10882 "sheetId": strconv.FormatInt(c.sheetId, 10), 10883 }) 10884 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10885} 10886 10887// Do executes the "sheets.spreadsheets.sheets.copyTo" call. 10888// Exactly one of *SheetProperties or error will be non-nil. Any non-2xx 10889// status code is an error. Response headers are in either 10890// *SheetProperties.ServerResponse.Header or (if a response was returned 10891// at all) in error.(*googleapi.Error).Header. Use 10892// googleapi.IsNotModified to check whether the returned error was 10893// because http.StatusNotModified was returned. 10894func (c *SpreadsheetsSheetsCopyToCall) Do(opts ...googleapi.CallOption) (*SheetProperties, error) { 10895 gensupport.SetOptions(c.urlParams_, opts...) 10896 res, err := c.doRequest("json") 10897 if res != nil && res.StatusCode == http.StatusNotModified { 10898 if res.Body != nil { 10899 res.Body.Close() 10900 } 10901 return nil, &googleapi.Error{ 10902 Code: res.StatusCode, 10903 Header: res.Header, 10904 } 10905 } 10906 if err != nil { 10907 return nil, err 10908 } 10909 defer googleapi.CloseBody(res) 10910 if err := googleapi.CheckResponse(res); err != nil { 10911 return nil, err 10912 } 10913 ret := &SheetProperties{ 10914 ServerResponse: googleapi.ServerResponse{ 10915 Header: res.Header, 10916 HTTPStatusCode: res.StatusCode, 10917 }, 10918 } 10919 target := &ret 10920 if err := gensupport.DecodeResponse(target, res); err != nil { 10921 return nil, err 10922 } 10923 return ret, nil 10924 // { 10925 // "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.", 10926 // "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 10927 // "httpMethod": "POST", 10928 // "id": "sheets.spreadsheets.sheets.copyTo", 10929 // "parameterOrder": [ 10930 // "spreadsheetId", 10931 // "sheetId" 10932 // ], 10933 // "parameters": { 10934 // "sheetId": { 10935 // "description": "The ID of the sheet to copy.", 10936 // "format": "int32", 10937 // "location": "path", 10938 // "required": true, 10939 // "type": "integer" 10940 // }, 10941 // "spreadsheetId": { 10942 // "description": "The ID of the spreadsheet containing the sheet to copy.", 10943 // "location": "path", 10944 // "required": true, 10945 // "type": "string" 10946 // } 10947 // }, 10948 // "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 10949 // "request": { 10950 // "$ref": "CopySheetToAnotherSpreadsheetRequest" 10951 // }, 10952 // "response": { 10953 // "$ref": "SheetProperties" 10954 // }, 10955 // "scopes": [ 10956 // "https://www.googleapis.com/auth/drive", 10957 // "https://www.googleapis.com/auth/drive.file", 10958 // "https://www.googleapis.com/auth/spreadsheets" 10959 // ] 10960 // } 10961 10962} 10963 10964// method id "sheets.spreadsheets.values.append": 10965 10966type SpreadsheetsValuesAppendCall struct { 10967 s *Service 10968 spreadsheetId string 10969 range_ string 10970 valuerange *ValueRange 10971 urlParams_ gensupport.URLParams 10972 ctx_ context.Context 10973 header_ http.Header 10974} 10975 10976// Append: Appends values to a spreadsheet. The input range is used to 10977// search for 10978// existing data and find a "table" within that range. Values will 10979// be 10980// appended to the next row of the table, starting with the first column 10981// of 10982// the table. See 10983// the 10984// [guide](/sheets/api/guides/values#appending_values) 10985// and 10986// [sample code](/sheets/api/samples/writing#append_values) 10987// for specific details of how tables are detected and data is 10988// appended. 10989// 10990// The caller must specify the spreadsheet ID, range, and 10991// a valueInputOption. The `valueInputOption` only 10992// controls how the input data will be added to the sheet (column-wise 10993// or 10994// row-wise), it does not influence what cell the data starts being 10995// written 10996// to. 10997func (r *SpreadsheetsValuesService) Append(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesAppendCall { 10998 c := &SpreadsheetsValuesAppendCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10999 c.spreadsheetId = spreadsheetId 11000 c.range_ = range_ 11001 c.valuerange = valuerange 11002 return c 11003} 11004 11005// IncludeValuesInResponse sets the optional parameter 11006// "includeValuesInResponse": Determines if the update response should 11007// include the values 11008// of the cells that were appended. By default, responses 11009// do not include the updated values. 11010func (c *SpreadsheetsValuesAppendCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesAppendCall { 11011 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 11012 return c 11013} 11014 11015// InsertDataOption sets the optional parameter "insertDataOption": How 11016// the input data should be inserted. 11017// 11018// Possible values: 11019// "OVERWRITE" 11020// "INSERT_ROWS" 11021func (c *SpreadsheetsValuesAppendCall) InsertDataOption(insertDataOption string) *SpreadsheetsValuesAppendCall { 11022 c.urlParams_.Set("insertDataOption", insertDataOption) 11023 return c 11024} 11025 11026// ResponseDateTimeRenderOption sets the optional parameter 11027// "responseDateTimeRenderOption": Determines how dates, times, and 11028// durations in the response should be 11029// rendered. This is ignored if response_value_render_option 11030// is 11031// FORMATTED_VALUE. 11032// The default dateTime render option is 11033// [DateTimeRenderOption.SERIAL_NUMBER]. 11034// 11035// Possible values: 11036// "SERIAL_NUMBER" 11037// "FORMATTED_STRING" 11038func (c *SpreadsheetsValuesAppendCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesAppendCall { 11039 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 11040 return c 11041} 11042 11043// ResponseValueRenderOption sets the optional parameter 11044// "responseValueRenderOption": Determines how values in the response 11045// should be rendered. 11046// The default render option is ValueRenderOption.FORMATTED_VALUE. 11047// 11048// Possible values: 11049// "FORMATTED_VALUE" 11050// "UNFORMATTED_VALUE" 11051// "FORMULA" 11052func (c *SpreadsheetsValuesAppendCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesAppendCall { 11053 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 11054 return c 11055} 11056 11057// ValueInputOption sets the optional parameter "valueInputOption": How 11058// the input data should be interpreted. 11059// 11060// Possible values: 11061// "INPUT_VALUE_OPTION_UNSPECIFIED" 11062// "RAW" 11063// "USER_ENTERED" 11064func (c *SpreadsheetsValuesAppendCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesAppendCall { 11065 c.urlParams_.Set("valueInputOption", valueInputOption) 11066 return c 11067} 11068 11069// Fields allows partial responses to be retrieved. See 11070// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11071// for more information. 11072func (c *SpreadsheetsValuesAppendCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesAppendCall { 11073 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11074 return c 11075} 11076 11077// Context sets the context to be used in this call's Do method. Any 11078// pending HTTP request will be aborted if the provided context is 11079// canceled. 11080func (c *SpreadsheetsValuesAppendCall) Context(ctx context.Context) *SpreadsheetsValuesAppendCall { 11081 c.ctx_ = ctx 11082 return c 11083} 11084 11085// Header returns an http.Header that can be modified by the caller to 11086// add HTTP headers to the request. 11087func (c *SpreadsheetsValuesAppendCall) Header() http.Header { 11088 if c.header_ == nil { 11089 c.header_ = make(http.Header) 11090 } 11091 return c.header_ 11092} 11093 11094func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, error) { 11095 reqHeaders := make(http.Header) 11096 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11097 for k, v := range c.header_ { 11098 reqHeaders[k] = v 11099 } 11100 reqHeaders.Set("User-Agent", c.s.userAgent()) 11101 var body io.Reader = nil 11102 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 11103 if err != nil { 11104 return nil, err 11105 } 11106 reqHeaders.Set("Content-Type", "application/json") 11107 c.urlParams_.Set("alt", alt) 11108 c.urlParams_.Set("prettyPrint", "false") 11109 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append") 11110 urls += "?" + c.urlParams_.Encode() 11111 req, err := http.NewRequest("POST", urls, body) 11112 if err != nil { 11113 return nil, err 11114 } 11115 req.Header = reqHeaders 11116 googleapi.Expand(req.URL, map[string]string{ 11117 "spreadsheetId": c.spreadsheetId, 11118 "range": c.range_, 11119 }) 11120 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11121} 11122 11123// Do executes the "sheets.spreadsheets.values.append" call. 11124// Exactly one of *AppendValuesResponse or error will be non-nil. Any 11125// non-2xx status code is an error. Response headers are in either 11126// *AppendValuesResponse.ServerResponse.Header or (if a response was 11127// returned at all) in error.(*googleapi.Error).Header. Use 11128// googleapi.IsNotModified to check whether the returned error was 11129// because http.StatusNotModified was returned. 11130func (c *SpreadsheetsValuesAppendCall) Do(opts ...googleapi.CallOption) (*AppendValuesResponse, error) { 11131 gensupport.SetOptions(c.urlParams_, opts...) 11132 res, err := c.doRequest("json") 11133 if res != nil && res.StatusCode == http.StatusNotModified { 11134 if res.Body != nil { 11135 res.Body.Close() 11136 } 11137 return nil, &googleapi.Error{ 11138 Code: res.StatusCode, 11139 Header: res.Header, 11140 } 11141 } 11142 if err != nil { 11143 return nil, err 11144 } 11145 defer googleapi.CloseBody(res) 11146 if err := googleapi.CheckResponse(res); err != nil { 11147 return nil, err 11148 } 11149 ret := &AppendValuesResponse{ 11150 ServerResponse: googleapi.ServerResponse{ 11151 Header: res.Header, 11152 HTTPStatusCode: res.StatusCode, 11153 }, 11154 } 11155 target := &ret 11156 if err := gensupport.DecodeResponse(target, res); err != nil { 11157 return nil, err 11158 } 11159 return ret, nil 11160 // { 11161 // "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.", 11162 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 11163 // "httpMethod": "POST", 11164 // "id": "sheets.spreadsheets.values.append", 11165 // "parameterOrder": [ 11166 // "spreadsheetId", 11167 // "range" 11168 // ], 11169 // "parameters": { 11170 // "includeValuesInResponse": { 11171 // "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.", 11172 // "location": "query", 11173 // "type": "boolean" 11174 // }, 11175 // "insertDataOption": { 11176 // "description": "How the input data should be inserted.", 11177 // "enum": [ 11178 // "OVERWRITE", 11179 // "INSERT_ROWS" 11180 // ], 11181 // "location": "query", 11182 // "type": "string" 11183 // }, 11184 // "range": { 11185 // "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.", 11186 // "location": "path", 11187 // "required": true, 11188 // "type": "string" 11189 // }, 11190 // "responseDateTimeRenderOption": { 11191 // "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", 11192 // "enum": [ 11193 // "SERIAL_NUMBER", 11194 // "FORMATTED_STRING" 11195 // ], 11196 // "location": "query", 11197 // "type": "string" 11198 // }, 11199 // "responseValueRenderOption": { 11200 // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 11201 // "enum": [ 11202 // "FORMATTED_VALUE", 11203 // "UNFORMATTED_VALUE", 11204 // "FORMULA" 11205 // ], 11206 // "location": "query", 11207 // "type": "string" 11208 // }, 11209 // "spreadsheetId": { 11210 // "description": "The ID of the spreadsheet to update.", 11211 // "location": "path", 11212 // "required": true, 11213 // "type": "string" 11214 // }, 11215 // "valueInputOption": { 11216 // "description": "How the input data should be interpreted.", 11217 // "enum": [ 11218 // "INPUT_VALUE_OPTION_UNSPECIFIED", 11219 // "RAW", 11220 // "USER_ENTERED" 11221 // ], 11222 // "location": "query", 11223 // "type": "string" 11224 // } 11225 // }, 11226 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 11227 // "request": { 11228 // "$ref": "ValueRange" 11229 // }, 11230 // "response": { 11231 // "$ref": "AppendValuesResponse" 11232 // }, 11233 // "scopes": [ 11234 // "https://www.googleapis.com/auth/drive", 11235 // "https://www.googleapis.com/auth/drive.file", 11236 // "https://www.googleapis.com/auth/spreadsheets" 11237 // ] 11238 // } 11239 11240} 11241 11242// method id "sheets.spreadsheets.values.batchClear": 11243 11244type SpreadsheetsValuesBatchClearCall struct { 11245 s *Service 11246 spreadsheetId string 11247 batchclearvaluesrequest *BatchClearValuesRequest 11248 urlParams_ gensupport.URLParams 11249 ctx_ context.Context 11250 header_ http.Header 11251} 11252 11253// BatchClear: Clears one or more ranges of values from a 11254// spreadsheet. 11255// The caller must specify the spreadsheet ID and one or more 11256// ranges. 11257// Only values are cleared -- all other properties of the cell (such 11258// as 11259// formatting, data validation, etc..) are kept. 11260func (r *SpreadsheetsValuesService) BatchClear(spreadsheetId string, batchclearvaluesrequest *BatchClearValuesRequest) *SpreadsheetsValuesBatchClearCall { 11261 c := &SpreadsheetsValuesBatchClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11262 c.spreadsheetId = spreadsheetId 11263 c.batchclearvaluesrequest = batchclearvaluesrequest 11264 return c 11265} 11266 11267// Fields allows partial responses to be retrieved. See 11268// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11269// for more information. 11270func (c *SpreadsheetsValuesBatchClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearCall { 11271 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11272 return c 11273} 11274 11275// Context sets the context to be used in this call's Do method. Any 11276// pending HTTP request will be aborted if the provided context is 11277// canceled. 11278func (c *SpreadsheetsValuesBatchClearCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearCall { 11279 c.ctx_ = ctx 11280 return c 11281} 11282 11283// Header returns an http.Header that can be modified by the caller to 11284// add HTTP headers to the request. 11285func (c *SpreadsheetsValuesBatchClearCall) Header() http.Header { 11286 if c.header_ == nil { 11287 c.header_ = make(http.Header) 11288 } 11289 return c.header_ 11290} 11291 11292func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response, error) { 11293 reqHeaders := make(http.Header) 11294 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11295 for k, v := range c.header_ { 11296 reqHeaders[k] = v 11297 } 11298 reqHeaders.Set("User-Agent", c.s.userAgent()) 11299 var body io.Reader = nil 11300 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesrequest) 11301 if err != nil { 11302 return nil, err 11303 } 11304 reqHeaders.Set("Content-Type", "application/json") 11305 c.urlParams_.Set("alt", alt) 11306 c.urlParams_.Set("prettyPrint", "false") 11307 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear") 11308 urls += "?" + c.urlParams_.Encode() 11309 req, err := http.NewRequest("POST", urls, body) 11310 if err != nil { 11311 return nil, err 11312 } 11313 req.Header = reqHeaders 11314 googleapi.Expand(req.URL, map[string]string{ 11315 "spreadsheetId": c.spreadsheetId, 11316 }) 11317 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11318} 11319 11320// Do executes the "sheets.spreadsheets.values.batchClear" call. 11321// Exactly one of *BatchClearValuesResponse or error will be non-nil. 11322// Any non-2xx status code is an error. Response headers are in either 11323// *BatchClearValuesResponse.ServerResponse.Header or (if a response was 11324// returned at all) in error.(*googleapi.Error).Header. Use 11325// googleapi.IsNotModified to check whether the returned error was 11326// because http.StatusNotModified was returned. 11327func (c *SpreadsheetsValuesBatchClearCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesResponse, error) { 11328 gensupport.SetOptions(c.urlParams_, opts...) 11329 res, err := c.doRequest("json") 11330 if res != nil && res.StatusCode == http.StatusNotModified { 11331 if res.Body != nil { 11332 res.Body.Close() 11333 } 11334 return nil, &googleapi.Error{ 11335 Code: res.StatusCode, 11336 Header: res.Header, 11337 } 11338 } 11339 if err != nil { 11340 return nil, err 11341 } 11342 defer googleapi.CloseBody(res) 11343 if err := googleapi.CheckResponse(res); err != nil { 11344 return nil, err 11345 } 11346 ret := &BatchClearValuesResponse{ 11347 ServerResponse: googleapi.ServerResponse{ 11348 Header: res.Header, 11349 HTTPStatusCode: res.StatusCode, 11350 }, 11351 } 11352 target := &ret 11353 if err := gensupport.DecodeResponse(target, res); err != nil { 11354 return nil, err 11355 } 11356 return ret, nil 11357 // { 11358 // "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", 11359 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 11360 // "httpMethod": "POST", 11361 // "id": "sheets.spreadsheets.values.batchClear", 11362 // "parameterOrder": [ 11363 // "spreadsheetId" 11364 // ], 11365 // "parameters": { 11366 // "spreadsheetId": { 11367 // "description": "The ID of the spreadsheet to update.", 11368 // "location": "path", 11369 // "required": true, 11370 // "type": "string" 11371 // } 11372 // }, 11373 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 11374 // "request": { 11375 // "$ref": "BatchClearValuesRequest" 11376 // }, 11377 // "response": { 11378 // "$ref": "BatchClearValuesResponse" 11379 // }, 11380 // "scopes": [ 11381 // "https://www.googleapis.com/auth/drive", 11382 // "https://www.googleapis.com/auth/drive.file", 11383 // "https://www.googleapis.com/auth/spreadsheets" 11384 // ] 11385 // } 11386 11387} 11388 11389// method id "sheets.spreadsheets.values.batchClearByDataFilter": 11390 11391type SpreadsheetsValuesBatchClearByDataFilterCall struct { 11392 s *Service 11393 spreadsheetId string 11394 batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest 11395 urlParams_ gensupport.URLParams 11396 ctx_ context.Context 11397 header_ http.Header 11398} 11399 11400// BatchClearByDataFilter: Clears one or more ranges of values from a 11401// spreadsheet. 11402// The caller must specify the spreadsheet ID and one or 11403// more 11404// DataFilters. Ranges matching any of the specified data 11405// filters will be cleared. Only values are cleared -- all other 11406// properties 11407// of the cell (such as formatting, data validation, etc..) are kept. 11408func (r *SpreadsheetsValuesService) BatchClearByDataFilter(spreadsheetId string, batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest) *SpreadsheetsValuesBatchClearByDataFilterCall { 11409 c := &SpreadsheetsValuesBatchClearByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11410 c.spreadsheetId = spreadsheetId 11411 c.batchclearvaluesbydatafilterrequest = batchclearvaluesbydatafilterrequest 11412 return c 11413} 11414 11415// Fields allows partial responses to be retrieved. See 11416// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11417// for more information. 11418func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearByDataFilterCall { 11419 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11420 return c 11421} 11422 11423// Context sets the context to be used in this call's Do method. Any 11424// pending HTTP request will be aborted if the provided context is 11425// canceled. 11426func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearByDataFilterCall { 11427 c.ctx_ = ctx 11428 return c 11429} 11430 11431// Header returns an http.Header that can be modified by the caller to 11432// add HTTP headers to the request. 11433func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Header() http.Header { 11434 if c.header_ == nil { 11435 c.header_ = make(http.Header) 11436 } 11437 return c.header_ 11438} 11439 11440func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*http.Response, error) { 11441 reqHeaders := make(http.Header) 11442 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11443 for k, v := range c.header_ { 11444 reqHeaders[k] = v 11445 } 11446 reqHeaders.Set("User-Agent", c.s.userAgent()) 11447 var body io.Reader = nil 11448 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesbydatafilterrequest) 11449 if err != nil { 11450 return nil, err 11451 } 11452 reqHeaders.Set("Content-Type", "application/json") 11453 c.urlParams_.Set("alt", alt) 11454 c.urlParams_.Set("prettyPrint", "false") 11455 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter") 11456 urls += "?" + c.urlParams_.Encode() 11457 req, err := http.NewRequest("POST", urls, body) 11458 if err != nil { 11459 return nil, err 11460 } 11461 req.Header = reqHeaders 11462 googleapi.Expand(req.URL, map[string]string{ 11463 "spreadsheetId": c.spreadsheetId, 11464 }) 11465 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11466} 11467 11468// Do executes the "sheets.spreadsheets.values.batchClearByDataFilter" call. 11469// Exactly one of *BatchClearValuesByDataFilterResponse or error will be 11470// non-nil. Any non-2xx status code is an error. Response headers are in 11471// either *BatchClearValuesByDataFilterResponse.ServerResponse.Header or 11472// (if a response was returned at all) in 11473// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11474// whether the returned error was because http.StatusNotModified was 11475// returned. 11476func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesByDataFilterResponse, error) { 11477 gensupport.SetOptions(c.urlParams_, opts...) 11478 res, err := c.doRequest("json") 11479 if res != nil && res.StatusCode == http.StatusNotModified { 11480 if res.Body != nil { 11481 res.Body.Close() 11482 } 11483 return nil, &googleapi.Error{ 11484 Code: res.StatusCode, 11485 Header: res.Header, 11486 } 11487 } 11488 if err != nil { 11489 return nil, err 11490 } 11491 defer googleapi.CloseBody(res) 11492 if err := googleapi.CheckResponse(res); err != nil { 11493 return nil, err 11494 } 11495 ret := &BatchClearValuesByDataFilterResponse{ 11496 ServerResponse: googleapi.ServerResponse{ 11497 Header: res.Header, 11498 HTTPStatusCode: res.StatusCode, 11499 }, 11500 } 11501 target := &ret 11502 if err := gensupport.DecodeResponse(target, res); err != nil { 11503 return nil, err 11504 } 11505 return ret, nil 11506 // { 11507 // "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more\nDataFilters. Ranges matching any of the specified data\nfilters will be cleared. Only values are cleared -- all other properties\nof the cell (such as formatting, data validation, etc..) are kept.", 11508 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 11509 // "httpMethod": "POST", 11510 // "id": "sheets.spreadsheets.values.batchClearByDataFilter", 11511 // "parameterOrder": [ 11512 // "spreadsheetId" 11513 // ], 11514 // "parameters": { 11515 // "spreadsheetId": { 11516 // "description": "The ID of the spreadsheet to update.", 11517 // "location": "path", 11518 // "required": true, 11519 // "type": "string" 11520 // } 11521 // }, 11522 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 11523 // "request": { 11524 // "$ref": "BatchClearValuesByDataFilterRequest" 11525 // }, 11526 // "response": { 11527 // "$ref": "BatchClearValuesByDataFilterResponse" 11528 // }, 11529 // "scopes": [ 11530 // "https://www.googleapis.com/auth/drive", 11531 // "https://www.googleapis.com/auth/drive.file", 11532 // "https://www.googleapis.com/auth/spreadsheets" 11533 // ] 11534 // } 11535 11536} 11537 11538// method id "sheets.spreadsheets.values.batchGet": 11539 11540type SpreadsheetsValuesBatchGetCall struct { 11541 s *Service 11542 spreadsheetId string 11543 urlParams_ gensupport.URLParams 11544 ifNoneMatch_ string 11545 ctx_ context.Context 11546 header_ http.Header 11547} 11548 11549// BatchGet: Returns one or more ranges of values from a 11550// spreadsheet. 11551// The caller must specify the spreadsheet ID and one or more ranges. 11552func (r *SpreadsheetsValuesService) BatchGet(spreadsheetId string) *SpreadsheetsValuesBatchGetCall { 11553 c := &SpreadsheetsValuesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11554 c.spreadsheetId = spreadsheetId 11555 return c 11556} 11557 11558// DateTimeRenderOption sets the optional parameter 11559// "dateTimeRenderOption": How dates, times, and durations should be 11560// represented in the output. 11561// This is ignored if value_render_option is 11562// FORMATTED_VALUE. 11563// The default dateTime render option is 11564// [DateTimeRenderOption.SERIAL_NUMBER]. 11565// 11566// Possible values: 11567// "SERIAL_NUMBER" 11568// "FORMATTED_STRING" 11569func (c *SpreadsheetsValuesBatchGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesBatchGetCall { 11570 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 11571 return c 11572} 11573 11574// MajorDimension sets the optional parameter "majorDimension": The 11575// major dimension that results should use. 11576// 11577// For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 11578// then requesting `range=A1:B2,majorDimension=ROWS` will 11579// return 11580// `[[1,2],[3,4]]`, 11581// whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 11582// return 11583// `[[1,3],[2,4]]`. 11584// 11585// Possible values: 11586// "DIMENSION_UNSPECIFIED" 11587// "ROWS" 11588// "COLUMNS" 11589func (c *SpreadsheetsValuesBatchGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesBatchGetCall { 11590 c.urlParams_.Set("majorDimension", majorDimension) 11591 return c 11592} 11593 11594// Ranges sets the optional parameter "ranges": The A1 notation of the 11595// values to retrieve. 11596func (c *SpreadsheetsValuesBatchGetCall) Ranges(ranges ...string) *SpreadsheetsValuesBatchGetCall { 11597 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 11598 return c 11599} 11600 11601// ValueRenderOption sets the optional parameter "valueRenderOption": 11602// How values should be represented in the output. 11603// The default render option is ValueRenderOption.FORMATTED_VALUE. 11604// 11605// Possible values: 11606// "FORMATTED_VALUE" 11607// "UNFORMATTED_VALUE" 11608// "FORMULA" 11609func (c *SpreadsheetsValuesBatchGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesBatchGetCall { 11610 c.urlParams_.Set("valueRenderOption", valueRenderOption) 11611 return c 11612} 11613 11614// Fields allows partial responses to be retrieved. See 11615// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11616// for more information. 11617func (c *SpreadsheetsValuesBatchGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetCall { 11618 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11619 return c 11620} 11621 11622// IfNoneMatch sets the optional parameter which makes the operation 11623// fail if the object's ETag matches the given value. This is useful for 11624// getting updates only after the object has changed since the last 11625// request. Use googleapi.IsNotModified to check whether the response 11626// error from Do is the result of In-None-Match. 11627func (c *SpreadsheetsValuesBatchGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesBatchGetCall { 11628 c.ifNoneMatch_ = entityTag 11629 return c 11630} 11631 11632// Context sets the context to be used in this call's Do method. Any 11633// pending HTTP request will be aborted if the provided context is 11634// canceled. 11635func (c *SpreadsheetsValuesBatchGetCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetCall { 11636 c.ctx_ = ctx 11637 return c 11638} 11639 11640// Header returns an http.Header that can be modified by the caller to 11641// add HTTP headers to the request. 11642func (c *SpreadsheetsValuesBatchGetCall) Header() http.Header { 11643 if c.header_ == nil { 11644 c.header_ = make(http.Header) 11645 } 11646 return c.header_ 11647} 11648 11649func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, error) { 11650 reqHeaders := make(http.Header) 11651 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11652 for k, v := range c.header_ { 11653 reqHeaders[k] = v 11654 } 11655 reqHeaders.Set("User-Agent", c.s.userAgent()) 11656 if c.ifNoneMatch_ != "" { 11657 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11658 } 11659 var body io.Reader = nil 11660 c.urlParams_.Set("alt", alt) 11661 c.urlParams_.Set("prettyPrint", "false") 11662 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet") 11663 urls += "?" + c.urlParams_.Encode() 11664 req, err := http.NewRequest("GET", urls, body) 11665 if err != nil { 11666 return nil, err 11667 } 11668 req.Header = reqHeaders 11669 googleapi.Expand(req.URL, map[string]string{ 11670 "spreadsheetId": c.spreadsheetId, 11671 }) 11672 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11673} 11674 11675// Do executes the "sheets.spreadsheets.values.batchGet" call. 11676// Exactly one of *BatchGetValuesResponse or error will be non-nil. Any 11677// non-2xx status code is an error. Response headers are in either 11678// *BatchGetValuesResponse.ServerResponse.Header or (if a response was 11679// returned at all) in error.(*googleapi.Error).Header. Use 11680// googleapi.IsNotModified to check whether the returned error was 11681// because http.StatusNotModified was returned. 11682func (c *SpreadsheetsValuesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesResponse, error) { 11683 gensupport.SetOptions(c.urlParams_, opts...) 11684 res, err := c.doRequest("json") 11685 if res != nil && res.StatusCode == http.StatusNotModified { 11686 if res.Body != nil { 11687 res.Body.Close() 11688 } 11689 return nil, &googleapi.Error{ 11690 Code: res.StatusCode, 11691 Header: res.Header, 11692 } 11693 } 11694 if err != nil { 11695 return nil, err 11696 } 11697 defer googleapi.CloseBody(res) 11698 if err := googleapi.CheckResponse(res); err != nil { 11699 return nil, err 11700 } 11701 ret := &BatchGetValuesResponse{ 11702 ServerResponse: googleapi.ServerResponse{ 11703 Header: res.Header, 11704 HTTPStatusCode: res.StatusCode, 11705 }, 11706 } 11707 target := &ret 11708 if err := gensupport.DecodeResponse(target, res); err != nil { 11709 return nil, err 11710 } 11711 return ret, nil 11712 // { 11713 // "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.", 11714 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 11715 // "httpMethod": "GET", 11716 // "id": "sheets.spreadsheets.values.batchGet", 11717 // "parameterOrder": [ 11718 // "spreadsheetId" 11719 // ], 11720 // "parameters": { 11721 // "dateTimeRenderOption": { 11722 // "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", 11723 // "enum": [ 11724 // "SERIAL_NUMBER", 11725 // "FORMATTED_STRING" 11726 // ], 11727 // "location": "query", 11728 // "type": "string" 11729 // }, 11730 // "majorDimension": { 11731 // "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", 11732 // "enum": [ 11733 // "DIMENSION_UNSPECIFIED", 11734 // "ROWS", 11735 // "COLUMNS" 11736 // ], 11737 // "location": "query", 11738 // "type": "string" 11739 // }, 11740 // "ranges": { 11741 // "description": "The A1 notation of the values to retrieve.", 11742 // "location": "query", 11743 // "repeated": true, 11744 // "type": "string" 11745 // }, 11746 // "spreadsheetId": { 11747 // "description": "The ID of the spreadsheet to retrieve data from.", 11748 // "location": "path", 11749 // "required": true, 11750 // "type": "string" 11751 // }, 11752 // "valueRenderOption": { 11753 // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 11754 // "enum": [ 11755 // "FORMATTED_VALUE", 11756 // "UNFORMATTED_VALUE", 11757 // "FORMULA" 11758 // ], 11759 // "location": "query", 11760 // "type": "string" 11761 // } 11762 // }, 11763 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 11764 // "response": { 11765 // "$ref": "BatchGetValuesResponse" 11766 // }, 11767 // "scopes": [ 11768 // "https://www.googleapis.com/auth/drive", 11769 // "https://www.googleapis.com/auth/drive.file", 11770 // "https://www.googleapis.com/auth/drive.readonly", 11771 // "https://www.googleapis.com/auth/spreadsheets", 11772 // "https://www.googleapis.com/auth/spreadsheets.readonly" 11773 // ] 11774 // } 11775 11776} 11777 11778// method id "sheets.spreadsheets.values.batchGetByDataFilter": 11779 11780type SpreadsheetsValuesBatchGetByDataFilterCall struct { 11781 s *Service 11782 spreadsheetId string 11783 batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest 11784 urlParams_ gensupport.URLParams 11785 ctx_ context.Context 11786 header_ http.Header 11787} 11788 11789// BatchGetByDataFilter: Returns one or more ranges of values that match 11790// the specified data filters. 11791// The caller must specify the spreadsheet ID and one or 11792// more 11793// DataFilters. Ranges that match any of the data filters in 11794// the request will be returned. 11795func (r *SpreadsheetsValuesService) BatchGetByDataFilter(spreadsheetId string, batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest) *SpreadsheetsValuesBatchGetByDataFilterCall { 11796 c := &SpreadsheetsValuesBatchGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11797 c.spreadsheetId = spreadsheetId 11798 c.batchgetvaluesbydatafilterrequest = batchgetvaluesbydatafilterrequest 11799 return c 11800} 11801 11802// Fields allows partial responses to be retrieved. See 11803// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11804// for more information. 11805func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetByDataFilterCall { 11806 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11807 return c 11808} 11809 11810// Context sets the context to be used in this call's Do method. Any 11811// pending HTTP request will be aborted if the provided context is 11812// canceled. 11813func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetByDataFilterCall { 11814 c.ctx_ = ctx 11815 return c 11816} 11817 11818// Header returns an http.Header that can be modified by the caller to 11819// add HTTP headers to the request. 11820func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Header() http.Header { 11821 if c.header_ == nil { 11822 c.header_ = make(http.Header) 11823 } 11824 return c.header_ 11825} 11826 11827func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 11828 reqHeaders := make(http.Header) 11829 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11830 for k, v := range c.header_ { 11831 reqHeaders[k] = v 11832 } 11833 reqHeaders.Set("User-Agent", c.s.userAgent()) 11834 var body io.Reader = nil 11835 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetvaluesbydatafilterrequest) 11836 if err != nil { 11837 return nil, err 11838 } 11839 reqHeaders.Set("Content-Type", "application/json") 11840 c.urlParams_.Set("alt", alt) 11841 c.urlParams_.Set("prettyPrint", "false") 11842 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter") 11843 urls += "?" + c.urlParams_.Encode() 11844 req, err := http.NewRequest("POST", urls, body) 11845 if err != nil { 11846 return nil, err 11847 } 11848 req.Header = reqHeaders 11849 googleapi.Expand(req.URL, map[string]string{ 11850 "spreadsheetId": c.spreadsheetId, 11851 }) 11852 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11853} 11854 11855// Do executes the "sheets.spreadsheets.values.batchGetByDataFilter" call. 11856// Exactly one of *BatchGetValuesByDataFilterResponse or error will be 11857// non-nil. Any non-2xx status code is an error. Response headers are in 11858// either *BatchGetValuesByDataFilterResponse.ServerResponse.Header or 11859// (if a response was returned at all) in 11860// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11861// whether the returned error was because http.StatusNotModified was 11862// returned. 11863func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesByDataFilterResponse, error) { 11864 gensupport.SetOptions(c.urlParams_, opts...) 11865 res, err := c.doRequest("json") 11866 if res != nil && res.StatusCode == http.StatusNotModified { 11867 if res.Body != nil { 11868 res.Body.Close() 11869 } 11870 return nil, &googleapi.Error{ 11871 Code: res.StatusCode, 11872 Header: res.Header, 11873 } 11874 } 11875 if err != nil { 11876 return nil, err 11877 } 11878 defer googleapi.CloseBody(res) 11879 if err := googleapi.CheckResponse(res); err != nil { 11880 return nil, err 11881 } 11882 ret := &BatchGetValuesByDataFilterResponse{ 11883 ServerResponse: googleapi.ServerResponse{ 11884 Header: res.Header, 11885 HTTPStatusCode: res.StatusCode, 11886 }, 11887 } 11888 target := &ret 11889 if err := gensupport.DecodeResponse(target, res); err != nil { 11890 return nil, err 11891 } 11892 return ret, nil 11893 // { 11894 // "description": "Returns one or more ranges of values that match the specified data filters.\nThe caller must specify the spreadsheet ID and one or more\nDataFilters. Ranges that match any of the data filters in\nthe request will be returned.", 11895 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 11896 // "httpMethod": "POST", 11897 // "id": "sheets.spreadsheets.values.batchGetByDataFilter", 11898 // "parameterOrder": [ 11899 // "spreadsheetId" 11900 // ], 11901 // "parameters": { 11902 // "spreadsheetId": { 11903 // "description": "The ID of the spreadsheet to retrieve data from.", 11904 // "location": "path", 11905 // "required": true, 11906 // "type": "string" 11907 // } 11908 // }, 11909 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 11910 // "request": { 11911 // "$ref": "BatchGetValuesByDataFilterRequest" 11912 // }, 11913 // "response": { 11914 // "$ref": "BatchGetValuesByDataFilterResponse" 11915 // }, 11916 // "scopes": [ 11917 // "https://www.googleapis.com/auth/drive", 11918 // "https://www.googleapis.com/auth/drive.file", 11919 // "https://www.googleapis.com/auth/spreadsheets" 11920 // ] 11921 // } 11922 11923} 11924 11925// method id "sheets.spreadsheets.values.batchUpdate": 11926 11927type SpreadsheetsValuesBatchUpdateCall struct { 11928 s *Service 11929 spreadsheetId string 11930 batchupdatevaluesrequest *BatchUpdateValuesRequest 11931 urlParams_ gensupport.URLParams 11932 ctx_ context.Context 11933 header_ http.Header 11934} 11935 11936// BatchUpdate: Sets values in one or more ranges of a spreadsheet. 11937// The caller must specify the spreadsheet ID, 11938// a valueInputOption, and one or more 11939// ValueRanges. 11940func (r *SpreadsheetsValuesService) BatchUpdate(spreadsheetId string, batchupdatevaluesrequest *BatchUpdateValuesRequest) *SpreadsheetsValuesBatchUpdateCall { 11941 c := &SpreadsheetsValuesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11942 c.spreadsheetId = spreadsheetId 11943 c.batchupdatevaluesrequest = batchupdatevaluesrequest 11944 return c 11945} 11946 11947// Fields allows partial responses to be retrieved. See 11948// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11949// for more information. 11950func (c *SpreadsheetsValuesBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateCall { 11951 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11952 return c 11953} 11954 11955// Context sets the context to be used in this call's Do method. Any 11956// pending HTTP request will be aborted if the provided context is 11957// canceled. 11958func (c *SpreadsheetsValuesBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateCall { 11959 c.ctx_ = ctx 11960 return c 11961} 11962 11963// Header returns an http.Header that can be modified by the caller to 11964// add HTTP headers to the request. 11965func (c *SpreadsheetsValuesBatchUpdateCall) Header() http.Header { 11966 if c.header_ == nil { 11967 c.header_ = make(http.Header) 11968 } 11969 return c.header_ 11970} 11971 11972func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 11973 reqHeaders := make(http.Header) 11974 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 11975 for k, v := range c.header_ { 11976 reqHeaders[k] = v 11977 } 11978 reqHeaders.Set("User-Agent", c.s.userAgent()) 11979 var body io.Reader = nil 11980 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesrequest) 11981 if err != nil { 11982 return nil, err 11983 } 11984 reqHeaders.Set("Content-Type", "application/json") 11985 c.urlParams_.Set("alt", alt) 11986 c.urlParams_.Set("prettyPrint", "false") 11987 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate") 11988 urls += "?" + c.urlParams_.Encode() 11989 req, err := http.NewRequest("POST", urls, body) 11990 if err != nil { 11991 return nil, err 11992 } 11993 req.Header = reqHeaders 11994 googleapi.Expand(req.URL, map[string]string{ 11995 "spreadsheetId": c.spreadsheetId, 11996 }) 11997 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11998} 11999 12000// Do executes the "sheets.spreadsheets.values.batchUpdate" call. 12001// Exactly one of *BatchUpdateValuesResponse or error will be non-nil. 12002// Any non-2xx status code is an error. Response headers are in either 12003// *BatchUpdateValuesResponse.ServerResponse.Header or (if a response 12004// was returned at all) in error.(*googleapi.Error).Header. Use 12005// googleapi.IsNotModified to check whether the returned error was 12006// because http.StatusNotModified was returned. 12007func (c *SpreadsheetsValuesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesResponse, error) { 12008 gensupport.SetOptions(c.urlParams_, opts...) 12009 res, err := c.doRequest("json") 12010 if res != nil && res.StatusCode == http.StatusNotModified { 12011 if res.Body != nil { 12012 res.Body.Close() 12013 } 12014 return nil, &googleapi.Error{ 12015 Code: res.StatusCode, 12016 Header: res.Header, 12017 } 12018 } 12019 if err != nil { 12020 return nil, err 12021 } 12022 defer googleapi.CloseBody(res) 12023 if err := googleapi.CheckResponse(res); err != nil { 12024 return nil, err 12025 } 12026 ret := &BatchUpdateValuesResponse{ 12027 ServerResponse: googleapi.ServerResponse{ 12028 Header: res.Header, 12029 HTTPStatusCode: res.StatusCode, 12030 }, 12031 } 12032 target := &ret 12033 if err := gensupport.DecodeResponse(target, res); err != nil { 12034 return nil, err 12035 } 12036 return ret, nil 12037 // { 12038 // "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.", 12039 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 12040 // "httpMethod": "POST", 12041 // "id": "sheets.spreadsheets.values.batchUpdate", 12042 // "parameterOrder": [ 12043 // "spreadsheetId" 12044 // ], 12045 // "parameters": { 12046 // "spreadsheetId": { 12047 // "description": "The ID of the spreadsheet to update.", 12048 // "location": "path", 12049 // "required": true, 12050 // "type": "string" 12051 // } 12052 // }, 12053 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 12054 // "request": { 12055 // "$ref": "BatchUpdateValuesRequest" 12056 // }, 12057 // "response": { 12058 // "$ref": "BatchUpdateValuesResponse" 12059 // }, 12060 // "scopes": [ 12061 // "https://www.googleapis.com/auth/drive", 12062 // "https://www.googleapis.com/auth/drive.file", 12063 // "https://www.googleapis.com/auth/spreadsheets" 12064 // ] 12065 // } 12066 12067} 12068 12069// method id "sheets.spreadsheets.values.batchUpdateByDataFilter": 12070 12071type SpreadsheetsValuesBatchUpdateByDataFilterCall struct { 12072 s *Service 12073 spreadsheetId string 12074 batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest 12075 urlParams_ gensupport.URLParams 12076 ctx_ context.Context 12077 header_ http.Header 12078} 12079 12080// BatchUpdateByDataFilter: Sets values in one or more ranges of a 12081// spreadsheet. 12082// The caller must specify the spreadsheet ID, 12083// a valueInputOption, and one or more 12084// DataFilterValueRanges. 12085func (r *SpreadsheetsValuesService) BatchUpdateByDataFilter(spreadsheetId string, batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 12086 c := &SpreadsheetsValuesBatchUpdateByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12087 c.spreadsheetId = spreadsheetId 12088 c.batchupdatevaluesbydatafilterrequest = batchupdatevaluesbydatafilterrequest 12089 return c 12090} 12091 12092// Fields allows partial responses to be retrieved. See 12093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12094// for more information. 12095func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 12096 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12097 return c 12098} 12099 12100// Context sets the context to be used in this call's Do method. Any 12101// pending HTTP request will be aborted if the provided context is 12102// canceled. 12103func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 12104 c.ctx_ = ctx 12105 return c 12106} 12107 12108// Header returns an http.Header that can be modified by the caller to 12109// add HTTP headers to the request. 12110func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Header() http.Header { 12111 if c.header_ == nil { 12112 c.header_ = make(http.Header) 12113 } 12114 return c.header_ 12115} 12116 12117func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (*http.Response, error) { 12118 reqHeaders := make(http.Header) 12119 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12120 for k, v := range c.header_ { 12121 reqHeaders[k] = v 12122 } 12123 reqHeaders.Set("User-Agent", c.s.userAgent()) 12124 var body io.Reader = nil 12125 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesbydatafilterrequest) 12126 if err != nil { 12127 return nil, err 12128 } 12129 reqHeaders.Set("Content-Type", "application/json") 12130 c.urlParams_.Set("alt", alt) 12131 c.urlParams_.Set("prettyPrint", "false") 12132 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter") 12133 urls += "?" + c.urlParams_.Encode() 12134 req, err := http.NewRequest("POST", urls, body) 12135 if err != nil { 12136 return nil, err 12137 } 12138 req.Header = reqHeaders 12139 googleapi.Expand(req.URL, map[string]string{ 12140 "spreadsheetId": c.spreadsheetId, 12141 }) 12142 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12143} 12144 12145// Do executes the "sheets.spreadsheets.values.batchUpdateByDataFilter" call. 12146// Exactly one of *BatchUpdateValuesByDataFilterResponse or error will 12147// be non-nil. Any non-2xx status code is an error. Response headers are 12148// in either 12149// *BatchUpdateValuesByDataFilterResponse.ServerResponse.Header or (if a 12150// response was returned at all) in error.(*googleapi.Error).Header. Use 12151// googleapi.IsNotModified to check whether the returned error was 12152// because http.StatusNotModified was returned. 12153func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesByDataFilterResponse, error) { 12154 gensupport.SetOptions(c.urlParams_, opts...) 12155 res, err := c.doRequest("json") 12156 if res != nil && res.StatusCode == http.StatusNotModified { 12157 if res.Body != nil { 12158 res.Body.Close() 12159 } 12160 return nil, &googleapi.Error{ 12161 Code: res.StatusCode, 12162 Header: res.Header, 12163 } 12164 } 12165 if err != nil { 12166 return nil, err 12167 } 12168 defer googleapi.CloseBody(res) 12169 if err := googleapi.CheckResponse(res); err != nil { 12170 return nil, err 12171 } 12172 ret := &BatchUpdateValuesByDataFilterResponse{ 12173 ServerResponse: googleapi.ServerResponse{ 12174 Header: res.Header, 12175 HTTPStatusCode: res.StatusCode, 12176 }, 12177 } 12178 target := &ret 12179 if err := gensupport.DecodeResponse(target, res); err != nil { 12180 return nil, err 12181 } 12182 return ret, nil 12183 // { 12184 // "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nDataFilterValueRanges.", 12185 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 12186 // "httpMethod": "POST", 12187 // "id": "sheets.spreadsheets.values.batchUpdateByDataFilter", 12188 // "parameterOrder": [ 12189 // "spreadsheetId" 12190 // ], 12191 // "parameters": { 12192 // "spreadsheetId": { 12193 // "description": "The ID of the spreadsheet to update.", 12194 // "location": "path", 12195 // "required": true, 12196 // "type": "string" 12197 // } 12198 // }, 12199 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 12200 // "request": { 12201 // "$ref": "BatchUpdateValuesByDataFilterRequest" 12202 // }, 12203 // "response": { 12204 // "$ref": "BatchUpdateValuesByDataFilterResponse" 12205 // }, 12206 // "scopes": [ 12207 // "https://www.googleapis.com/auth/drive", 12208 // "https://www.googleapis.com/auth/drive.file", 12209 // "https://www.googleapis.com/auth/spreadsheets" 12210 // ] 12211 // } 12212 12213} 12214 12215// method id "sheets.spreadsheets.values.clear": 12216 12217type SpreadsheetsValuesClearCall struct { 12218 s *Service 12219 spreadsheetId string 12220 range_ string 12221 clearvaluesrequest *ClearValuesRequest 12222 urlParams_ gensupport.URLParams 12223 ctx_ context.Context 12224 header_ http.Header 12225} 12226 12227// Clear: Clears values from a spreadsheet. 12228// The caller must specify the spreadsheet ID and range. 12229// Only values are cleared -- all other properties of the cell (such 12230// as 12231// formatting, data validation, etc..) are kept. 12232func (r *SpreadsheetsValuesService) Clear(spreadsheetId string, range_ string, clearvaluesrequest *ClearValuesRequest) *SpreadsheetsValuesClearCall { 12233 c := &SpreadsheetsValuesClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12234 c.spreadsheetId = spreadsheetId 12235 c.range_ = range_ 12236 c.clearvaluesrequest = clearvaluesrequest 12237 return c 12238} 12239 12240// Fields allows partial responses to be retrieved. See 12241// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12242// for more information. 12243func (c *SpreadsheetsValuesClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesClearCall { 12244 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12245 return c 12246} 12247 12248// Context sets the context to be used in this call's Do method. Any 12249// pending HTTP request will be aborted if the provided context is 12250// canceled. 12251func (c *SpreadsheetsValuesClearCall) Context(ctx context.Context) *SpreadsheetsValuesClearCall { 12252 c.ctx_ = ctx 12253 return c 12254} 12255 12256// Header returns an http.Header that can be modified by the caller to 12257// add HTTP headers to the request. 12258func (c *SpreadsheetsValuesClearCall) Header() http.Header { 12259 if c.header_ == nil { 12260 c.header_ = make(http.Header) 12261 } 12262 return c.header_ 12263} 12264 12265func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, error) { 12266 reqHeaders := make(http.Header) 12267 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12268 for k, v := range c.header_ { 12269 reqHeaders[k] = v 12270 } 12271 reqHeaders.Set("User-Agent", c.s.userAgent()) 12272 var body io.Reader = nil 12273 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearvaluesrequest) 12274 if err != nil { 12275 return nil, err 12276 } 12277 reqHeaders.Set("Content-Type", "application/json") 12278 c.urlParams_.Set("alt", alt) 12279 c.urlParams_.Set("prettyPrint", "false") 12280 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear") 12281 urls += "?" + c.urlParams_.Encode() 12282 req, err := http.NewRequest("POST", urls, body) 12283 if err != nil { 12284 return nil, err 12285 } 12286 req.Header = reqHeaders 12287 googleapi.Expand(req.URL, map[string]string{ 12288 "spreadsheetId": c.spreadsheetId, 12289 "range": c.range_, 12290 }) 12291 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12292} 12293 12294// Do executes the "sheets.spreadsheets.values.clear" call. 12295// Exactly one of *ClearValuesResponse or error will be non-nil. Any 12296// non-2xx status code is an error. Response headers are in either 12297// *ClearValuesResponse.ServerResponse.Header or (if a response was 12298// returned at all) in error.(*googleapi.Error).Header. Use 12299// googleapi.IsNotModified to check whether the returned error was 12300// because http.StatusNotModified was returned. 12301func (c *SpreadsheetsValuesClearCall) Do(opts ...googleapi.CallOption) (*ClearValuesResponse, error) { 12302 gensupport.SetOptions(c.urlParams_, opts...) 12303 res, err := c.doRequest("json") 12304 if res != nil && res.StatusCode == http.StatusNotModified { 12305 if res.Body != nil { 12306 res.Body.Close() 12307 } 12308 return nil, &googleapi.Error{ 12309 Code: res.StatusCode, 12310 Header: res.Header, 12311 } 12312 } 12313 if err != nil { 12314 return nil, err 12315 } 12316 defer googleapi.CloseBody(res) 12317 if err := googleapi.CheckResponse(res); err != nil { 12318 return nil, err 12319 } 12320 ret := &ClearValuesResponse{ 12321 ServerResponse: googleapi.ServerResponse{ 12322 Header: res.Header, 12323 HTTPStatusCode: res.StatusCode, 12324 }, 12325 } 12326 target := &ret 12327 if err := gensupport.DecodeResponse(target, res); err != nil { 12328 return nil, err 12329 } 12330 return ret, nil 12331 // { 12332 // "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.", 12333 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 12334 // "httpMethod": "POST", 12335 // "id": "sheets.spreadsheets.values.clear", 12336 // "parameterOrder": [ 12337 // "spreadsheetId", 12338 // "range" 12339 // ], 12340 // "parameters": { 12341 // "range": { 12342 // "description": "The A1 notation of the values to clear.", 12343 // "location": "path", 12344 // "required": true, 12345 // "type": "string" 12346 // }, 12347 // "spreadsheetId": { 12348 // "description": "The ID of the spreadsheet to update.", 12349 // "location": "path", 12350 // "required": true, 12351 // "type": "string" 12352 // } 12353 // }, 12354 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 12355 // "request": { 12356 // "$ref": "ClearValuesRequest" 12357 // }, 12358 // "response": { 12359 // "$ref": "ClearValuesResponse" 12360 // }, 12361 // "scopes": [ 12362 // "https://www.googleapis.com/auth/drive", 12363 // "https://www.googleapis.com/auth/drive.file", 12364 // "https://www.googleapis.com/auth/spreadsheets" 12365 // ] 12366 // } 12367 12368} 12369 12370// method id "sheets.spreadsheets.values.get": 12371 12372type SpreadsheetsValuesGetCall struct { 12373 s *Service 12374 spreadsheetId string 12375 range_ string 12376 urlParams_ gensupport.URLParams 12377 ifNoneMatch_ string 12378 ctx_ context.Context 12379 header_ http.Header 12380} 12381 12382// Get: Returns a range of values from a spreadsheet. 12383// The caller must specify the spreadsheet ID and a range. 12384func (r *SpreadsheetsValuesService) Get(spreadsheetId string, range_ string) *SpreadsheetsValuesGetCall { 12385 c := &SpreadsheetsValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12386 c.spreadsheetId = spreadsheetId 12387 c.range_ = range_ 12388 return c 12389} 12390 12391// DateTimeRenderOption sets the optional parameter 12392// "dateTimeRenderOption": How dates, times, and durations should be 12393// represented in the output. 12394// This is ignored if value_render_option is 12395// FORMATTED_VALUE. 12396// The default dateTime render option is 12397// [DateTimeRenderOption.SERIAL_NUMBER]. 12398// 12399// Possible values: 12400// "SERIAL_NUMBER" 12401// "FORMATTED_STRING" 12402func (c *SpreadsheetsValuesGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesGetCall { 12403 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 12404 return c 12405} 12406 12407// MajorDimension sets the optional parameter "majorDimension": The 12408// major dimension that results should use. 12409// 12410// For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 12411// then requesting `range=A1:B2,majorDimension=ROWS` will 12412// return 12413// `[[1,2],[3,4]]`, 12414// whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 12415// return 12416// `[[1,3],[2,4]]`. 12417// 12418// Possible values: 12419// "DIMENSION_UNSPECIFIED" 12420// "ROWS" 12421// "COLUMNS" 12422func (c *SpreadsheetsValuesGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesGetCall { 12423 c.urlParams_.Set("majorDimension", majorDimension) 12424 return c 12425} 12426 12427// ValueRenderOption sets the optional parameter "valueRenderOption": 12428// How values should be represented in the output. 12429// The default render option is ValueRenderOption.FORMATTED_VALUE. 12430// 12431// Possible values: 12432// "FORMATTED_VALUE" 12433// "UNFORMATTED_VALUE" 12434// "FORMULA" 12435func (c *SpreadsheetsValuesGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesGetCall { 12436 c.urlParams_.Set("valueRenderOption", valueRenderOption) 12437 return c 12438} 12439 12440// Fields allows partial responses to be retrieved. See 12441// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12442// for more information. 12443func (c *SpreadsheetsValuesGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesGetCall { 12444 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12445 return c 12446} 12447 12448// IfNoneMatch sets the optional parameter which makes the operation 12449// fail if the object's ETag matches the given value. This is useful for 12450// getting updates only after the object has changed since the last 12451// request. Use googleapi.IsNotModified to check whether the response 12452// error from Do is the result of In-None-Match. 12453func (c *SpreadsheetsValuesGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesGetCall { 12454 c.ifNoneMatch_ = entityTag 12455 return c 12456} 12457 12458// Context sets the context to be used in this call's Do method. Any 12459// pending HTTP request will be aborted if the provided context is 12460// canceled. 12461func (c *SpreadsheetsValuesGetCall) Context(ctx context.Context) *SpreadsheetsValuesGetCall { 12462 c.ctx_ = ctx 12463 return c 12464} 12465 12466// Header returns an http.Header that can be modified by the caller to 12467// add HTTP headers to the request. 12468func (c *SpreadsheetsValuesGetCall) Header() http.Header { 12469 if c.header_ == nil { 12470 c.header_ = make(http.Header) 12471 } 12472 return c.header_ 12473} 12474 12475func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error) { 12476 reqHeaders := make(http.Header) 12477 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12478 for k, v := range c.header_ { 12479 reqHeaders[k] = v 12480 } 12481 reqHeaders.Set("User-Agent", c.s.userAgent()) 12482 if c.ifNoneMatch_ != "" { 12483 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12484 } 12485 var body io.Reader = nil 12486 c.urlParams_.Set("alt", alt) 12487 c.urlParams_.Set("prettyPrint", "false") 12488 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 12489 urls += "?" + c.urlParams_.Encode() 12490 req, err := http.NewRequest("GET", urls, body) 12491 if err != nil { 12492 return nil, err 12493 } 12494 req.Header = reqHeaders 12495 googleapi.Expand(req.URL, map[string]string{ 12496 "spreadsheetId": c.spreadsheetId, 12497 "range": c.range_, 12498 }) 12499 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12500} 12501 12502// Do executes the "sheets.spreadsheets.values.get" call. 12503// Exactly one of *ValueRange or error will be non-nil. Any non-2xx 12504// status code is an error. Response headers are in either 12505// *ValueRange.ServerResponse.Header or (if a response was returned at 12506// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12507// to check whether the returned error was because 12508// http.StatusNotModified was returned. 12509func (c *SpreadsheetsValuesGetCall) Do(opts ...googleapi.CallOption) (*ValueRange, error) { 12510 gensupport.SetOptions(c.urlParams_, opts...) 12511 res, err := c.doRequest("json") 12512 if res != nil && res.StatusCode == http.StatusNotModified { 12513 if res.Body != nil { 12514 res.Body.Close() 12515 } 12516 return nil, &googleapi.Error{ 12517 Code: res.StatusCode, 12518 Header: res.Header, 12519 } 12520 } 12521 if err != nil { 12522 return nil, err 12523 } 12524 defer googleapi.CloseBody(res) 12525 if err := googleapi.CheckResponse(res); err != nil { 12526 return nil, err 12527 } 12528 ret := &ValueRange{ 12529 ServerResponse: googleapi.ServerResponse{ 12530 Header: res.Header, 12531 HTTPStatusCode: res.StatusCode, 12532 }, 12533 } 12534 target := &ret 12535 if err := gensupport.DecodeResponse(target, res); err != nil { 12536 return nil, err 12537 } 12538 return ret, nil 12539 // { 12540 // "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", 12541 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12542 // "httpMethod": "GET", 12543 // "id": "sheets.spreadsheets.values.get", 12544 // "parameterOrder": [ 12545 // "spreadsheetId", 12546 // "range" 12547 // ], 12548 // "parameters": { 12549 // "dateTimeRenderOption": { 12550 // "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].", 12551 // "enum": [ 12552 // "SERIAL_NUMBER", 12553 // "FORMATTED_STRING" 12554 // ], 12555 // "location": "query", 12556 // "type": "string" 12557 // }, 12558 // "majorDimension": { 12559 // "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.", 12560 // "enum": [ 12561 // "DIMENSION_UNSPECIFIED", 12562 // "ROWS", 12563 // "COLUMNS" 12564 // ], 12565 // "location": "query", 12566 // "type": "string" 12567 // }, 12568 // "range": { 12569 // "description": "The A1 notation of the values to retrieve.", 12570 // "location": "path", 12571 // "required": true, 12572 // "type": "string" 12573 // }, 12574 // "spreadsheetId": { 12575 // "description": "The ID of the spreadsheet to retrieve data from.", 12576 // "location": "path", 12577 // "required": true, 12578 // "type": "string" 12579 // }, 12580 // "valueRenderOption": { 12581 // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 12582 // "enum": [ 12583 // "FORMATTED_VALUE", 12584 // "UNFORMATTED_VALUE", 12585 // "FORMULA" 12586 // ], 12587 // "location": "query", 12588 // "type": "string" 12589 // } 12590 // }, 12591 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12592 // "response": { 12593 // "$ref": "ValueRange" 12594 // }, 12595 // "scopes": [ 12596 // "https://www.googleapis.com/auth/drive", 12597 // "https://www.googleapis.com/auth/drive.file", 12598 // "https://www.googleapis.com/auth/drive.readonly", 12599 // "https://www.googleapis.com/auth/spreadsheets", 12600 // "https://www.googleapis.com/auth/spreadsheets.readonly" 12601 // ] 12602 // } 12603 12604} 12605 12606// method id "sheets.spreadsheets.values.update": 12607 12608type SpreadsheetsValuesUpdateCall struct { 12609 s *Service 12610 spreadsheetId string 12611 range_ string 12612 valuerange *ValueRange 12613 urlParams_ gensupport.URLParams 12614 ctx_ context.Context 12615 header_ http.Header 12616} 12617 12618// Update: Sets values in a range of a spreadsheet. 12619// The caller must specify the spreadsheet ID, range, and 12620// a valueInputOption. 12621func (r *SpreadsheetsValuesService) Update(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesUpdateCall { 12622 c := &SpreadsheetsValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12623 c.spreadsheetId = spreadsheetId 12624 c.range_ = range_ 12625 c.valuerange = valuerange 12626 return c 12627} 12628 12629// IncludeValuesInResponse sets the optional parameter 12630// "includeValuesInResponse": Determines if the update response should 12631// include the values 12632// of the cells that were updated. By default, responses 12633// do not include the updated values. 12634// If the range to write was larger than than the range actually 12635// written, 12636// the response will include all values in the requested range 12637// (excluding 12638// trailing empty rows and columns). 12639func (c *SpreadsheetsValuesUpdateCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesUpdateCall { 12640 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 12641 return c 12642} 12643 12644// ResponseDateTimeRenderOption sets the optional parameter 12645// "responseDateTimeRenderOption": Determines how dates, times, and 12646// durations in the response should be 12647// rendered. This is ignored if response_value_render_option 12648// is 12649// FORMATTED_VALUE. 12650// The default dateTime render option 12651// is 12652// DateTimeRenderOption.SERIAL_NUMBER. 12653// 12654// Possible values: 12655// "SERIAL_NUMBER" 12656// "FORMATTED_STRING" 12657func (c *SpreadsheetsValuesUpdateCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesUpdateCall { 12658 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 12659 return c 12660} 12661 12662// ResponseValueRenderOption sets the optional parameter 12663// "responseValueRenderOption": Determines how values in the response 12664// should be rendered. 12665// The default render option is ValueRenderOption.FORMATTED_VALUE. 12666// 12667// Possible values: 12668// "FORMATTED_VALUE" 12669// "UNFORMATTED_VALUE" 12670// "FORMULA" 12671func (c *SpreadsheetsValuesUpdateCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesUpdateCall { 12672 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 12673 return c 12674} 12675 12676// ValueInputOption sets the optional parameter "valueInputOption": How 12677// the input data should be interpreted. 12678// 12679// Possible values: 12680// "INPUT_VALUE_OPTION_UNSPECIFIED" 12681// "RAW" 12682// "USER_ENTERED" 12683func (c *SpreadsheetsValuesUpdateCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesUpdateCall { 12684 c.urlParams_.Set("valueInputOption", valueInputOption) 12685 return c 12686} 12687 12688// Fields allows partial responses to be retrieved. See 12689// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12690// for more information. 12691func (c *SpreadsheetsValuesUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesUpdateCall { 12692 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12693 return c 12694} 12695 12696// Context sets the context to be used in this call's Do method. Any 12697// pending HTTP request will be aborted if the provided context is 12698// canceled. 12699func (c *SpreadsheetsValuesUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesUpdateCall { 12700 c.ctx_ = ctx 12701 return c 12702} 12703 12704// Header returns an http.Header that can be modified by the caller to 12705// add HTTP headers to the request. 12706func (c *SpreadsheetsValuesUpdateCall) Header() http.Header { 12707 if c.header_ == nil { 12708 c.header_ = make(http.Header) 12709 } 12710 return c.header_ 12711} 12712 12713func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, error) { 12714 reqHeaders := make(http.Header) 12715 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 12716 for k, v := range c.header_ { 12717 reqHeaders[k] = v 12718 } 12719 reqHeaders.Set("User-Agent", c.s.userAgent()) 12720 var body io.Reader = nil 12721 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 12722 if err != nil { 12723 return nil, err 12724 } 12725 reqHeaders.Set("Content-Type", "application/json") 12726 c.urlParams_.Set("alt", alt) 12727 c.urlParams_.Set("prettyPrint", "false") 12728 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 12729 urls += "?" + c.urlParams_.Encode() 12730 req, err := http.NewRequest("PUT", urls, body) 12731 if err != nil { 12732 return nil, err 12733 } 12734 req.Header = reqHeaders 12735 googleapi.Expand(req.URL, map[string]string{ 12736 "spreadsheetId": c.spreadsheetId, 12737 "range": c.range_, 12738 }) 12739 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12740} 12741 12742// Do executes the "sheets.spreadsheets.values.update" call. 12743// Exactly one of *UpdateValuesResponse or error will be non-nil. Any 12744// non-2xx status code is an error. Response headers are in either 12745// *UpdateValuesResponse.ServerResponse.Header or (if a response was 12746// returned at all) in error.(*googleapi.Error).Header. Use 12747// googleapi.IsNotModified to check whether the returned error was 12748// because http.StatusNotModified was returned. 12749func (c *SpreadsheetsValuesUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateValuesResponse, error) { 12750 gensupport.SetOptions(c.urlParams_, opts...) 12751 res, err := c.doRequest("json") 12752 if res != nil && res.StatusCode == http.StatusNotModified { 12753 if res.Body != nil { 12754 res.Body.Close() 12755 } 12756 return nil, &googleapi.Error{ 12757 Code: res.StatusCode, 12758 Header: res.Header, 12759 } 12760 } 12761 if err != nil { 12762 return nil, err 12763 } 12764 defer googleapi.CloseBody(res) 12765 if err := googleapi.CheckResponse(res); err != nil { 12766 return nil, err 12767 } 12768 ret := &UpdateValuesResponse{ 12769 ServerResponse: googleapi.ServerResponse{ 12770 Header: res.Header, 12771 HTTPStatusCode: res.StatusCode, 12772 }, 12773 } 12774 target := &ret 12775 if err := gensupport.DecodeResponse(target, res); err != nil { 12776 return nil, err 12777 } 12778 return ret, nil 12779 // { 12780 // "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", 12781 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12782 // "httpMethod": "PUT", 12783 // "id": "sheets.spreadsheets.values.update", 12784 // "parameterOrder": [ 12785 // "spreadsheetId", 12786 // "range" 12787 // ], 12788 // "parameters": { 12789 // "includeValuesInResponse": { 12790 // "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).", 12791 // "location": "query", 12792 // "type": "boolean" 12793 // }, 12794 // "range": { 12795 // "description": "The A1 notation of the values to update.", 12796 // "location": "path", 12797 // "required": true, 12798 // "type": "string" 12799 // }, 12800 // "responseDateTimeRenderOption": { 12801 // "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is\nDateTimeRenderOption.SERIAL_NUMBER.", 12802 // "enum": [ 12803 // "SERIAL_NUMBER", 12804 // "FORMATTED_STRING" 12805 // ], 12806 // "location": "query", 12807 // "type": "string" 12808 // }, 12809 // "responseValueRenderOption": { 12810 // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 12811 // "enum": [ 12812 // "FORMATTED_VALUE", 12813 // "UNFORMATTED_VALUE", 12814 // "FORMULA" 12815 // ], 12816 // "location": "query", 12817 // "type": "string" 12818 // }, 12819 // "spreadsheetId": { 12820 // "description": "The ID of the spreadsheet to update.", 12821 // "location": "path", 12822 // "required": true, 12823 // "type": "string" 12824 // }, 12825 // "valueInputOption": { 12826 // "description": "How the input data should be interpreted.", 12827 // "enum": [ 12828 // "INPUT_VALUE_OPTION_UNSPECIFIED", 12829 // "RAW", 12830 // "USER_ENTERED" 12831 // ], 12832 // "location": "query", 12833 // "type": "string" 12834 // } 12835 // }, 12836 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12837 // "request": { 12838 // "$ref": "ValueRange" 12839 // }, 12840 // "response": { 12841 // "$ref": "UpdateValuesResponse" 12842 // }, 12843 // "scopes": [ 12844 // "https://www.googleapis.com/auth/drive", 12845 // "https://www.googleapis.com/auth/drive.file", 12846 // "https://www.googleapis.com/auth/spreadsheets" 12847 // ] 12848 // } 12849 12850} 12851