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 gensupport "google.golang.org/api/gensupport" 57 googleapi "google.golang.org/api/googleapi" 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 // ForceSendFields is a list of field names (e.g. "Format") to 1029 // unconditionally include in API requests. By default, fields with 1030 // empty values are omitted from API requests. However, any non-pointer, 1031 // non-interface field appearing in ForceSendFields will be sent to the 1032 // server regardless of whether the field is empty or not. This may be 1033 // used to include empty fields in Patch requests. 1034 ForceSendFields []string `json:"-"` 1035 1036 // NullFields is a list of field names (e.g. "Format") to include in API 1037 // requests with the JSON null value. By default, fields with empty 1038 // values are omitted from API requests. However, any field with an 1039 // empty value appearing in NullFields will be sent to the server as 1040 // null. It is an error if a field in this list has a non-empty value. 1041 // This may be used to include null fields in Patch requests. 1042 NullFields []string `json:"-"` 1043} 1044 1045func (s *BasicChartAxis) MarshalJSON() ([]byte, error) { 1046 type NoMethod BasicChartAxis 1047 raw := NoMethod(*s) 1048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1049} 1050 1051// BasicChartDomain: The domain of a chart. 1052// For example, if charting stock prices over time, this would be the 1053// date. 1054type BasicChartDomain struct { 1055 // Domain: The data of the domain. For example, if charting stock prices 1056 // over time, 1057 // this is the data representing the dates. 1058 Domain *ChartData `json:"domain,omitempty"` 1059 1060 // Reversed: True to reverse the order of the domain values (horizontal 1061 // axis). 1062 Reversed bool `json:"reversed,omitempty"` 1063 1064 // ForceSendFields is a list of field names (e.g. "Domain") to 1065 // unconditionally include in API requests. By default, fields with 1066 // empty values are omitted from API requests. However, any non-pointer, 1067 // non-interface field appearing in ForceSendFields will be sent to the 1068 // server regardless of whether the field is empty or not. This may be 1069 // used to include empty fields in Patch requests. 1070 ForceSendFields []string `json:"-"` 1071 1072 // NullFields is a list of field names (e.g. "Domain") to include in API 1073 // requests with the JSON null value. By default, fields with empty 1074 // values are omitted from API requests. However, any field with an 1075 // empty value appearing in NullFields will be sent to the server as 1076 // null. It is an error if a field in this list has a non-empty value. 1077 // This may be used to include null fields in Patch requests. 1078 NullFields []string `json:"-"` 1079} 1080 1081func (s *BasicChartDomain) MarshalJSON() ([]byte, error) { 1082 type NoMethod BasicChartDomain 1083 raw := NoMethod(*s) 1084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1085} 1086 1087// BasicChartSeries: A single series of data in a chart. 1088// For example, if charting stock prices over time, multiple series may 1089// exist, 1090// one for the "Open Price", "High Price", "Low Price" and "Close 1091// Price". 1092type BasicChartSeries struct { 1093 // Color: The color for elements (i.e. bars, lines, points) associated 1094 // with this 1095 // series. If empty, a default color is used. 1096 Color *Color `json:"color,omitempty"` 1097 1098 // LineStyle: The line style of this series. Valid only if the 1099 // chartType is AREA, 1100 // LINE, or SCATTER. 1101 // COMBO charts are also supported if the 1102 // series chart type is 1103 // AREA or LINE. 1104 LineStyle *LineStyle `json:"lineStyle,omitempty"` 1105 1106 // Series: The data being visualized in this chart series. 1107 Series *ChartData `json:"series,omitempty"` 1108 1109 // TargetAxis: The minor axis that will specify the range of values for 1110 // this series. 1111 // For example, if charting stocks over time, the "Volume" series 1112 // may want to be pinned to the right with the prices pinned to the 1113 // left, 1114 // because the scale of trading volume is different than the scale 1115 // of 1116 // prices. 1117 // It is an error to specify an axis that isn't a valid minor axis 1118 // for the chart's type. 1119 // 1120 // Possible values: 1121 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1122 // use. 1123 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. 1124 // For most charts, this is the standard major axis. 1125 // For bar charts, this is a minor axis. 1126 // "LEFT_AXIS" - The axis rendered at the left of a chart. 1127 // For most charts, this is a minor axis. 1128 // For bar charts, this is the standard major axis. 1129 // "RIGHT_AXIS" - The axis rendered at the right of a chart. 1130 // For most charts, this is a minor axis. 1131 // For bar charts, this is an unusual major axis. 1132 TargetAxis string `json:"targetAxis,omitempty"` 1133 1134 // Type: The type of this series. Valid only if the 1135 // chartType is 1136 // COMBO. 1137 // Different types will change the way the series is visualized. 1138 // Only LINE, AREA, 1139 // and COLUMN are supported. 1140 // 1141 // Possible values: 1142 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1143 // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar 1144 // chart</a>. 1145 // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line 1146 // chart</a>. 1147 // "AREA" - An <a 1148 // href="/chart/interactive/docs/gallery/areachart">area chart</a>. 1149 // "COLUMN" - A <a 1150 // href="/chart/interactive/docs/gallery/columnchart">column chart</a>. 1151 // "SCATTER" - A <a 1152 // href="/chart/interactive/docs/gallery/scatterchart">scatter 1153 // chart</a>. 1154 // "COMBO" - A <a 1155 // href="/chart/interactive/docs/gallery/combochart">combo chart</a>. 1156 // "STEPPED_AREA" - A <a 1157 // href="/chart/interactive/docs/gallery/steppedareachart">stepped 1158 // area 1159 // chart</a>. 1160 Type string `json:"type,omitempty"` 1161 1162 // ForceSendFields is a list of field names (e.g. "Color") to 1163 // unconditionally include in API requests. By default, fields with 1164 // empty values are omitted from API requests. However, any non-pointer, 1165 // non-interface field appearing in ForceSendFields will be sent to the 1166 // server regardless of whether the field is empty or not. This may be 1167 // used to include empty fields in Patch requests. 1168 ForceSendFields []string `json:"-"` 1169 1170 // NullFields is a list of field names (e.g. "Color") to include in API 1171 // requests with the JSON null value. By default, fields with empty 1172 // values are omitted from API requests. However, any field with an 1173 // empty value appearing in NullFields will be sent to the server as 1174 // null. It is an error if a field in this list has a non-empty value. 1175 // This may be used to include null fields in Patch requests. 1176 NullFields []string `json:"-"` 1177} 1178 1179func (s *BasicChartSeries) MarshalJSON() ([]byte, error) { 1180 type NoMethod BasicChartSeries 1181 raw := NoMethod(*s) 1182 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1183} 1184 1185// BasicChartSpec: The specification for a basic chart. See 1186// BasicChartType for the list 1187// of charts this supports. 1188type BasicChartSpec struct { 1189 // Axis: The axis on the chart. 1190 Axis []*BasicChartAxis `json:"axis,omitempty"` 1191 1192 // ChartType: The type of the chart. 1193 // 1194 // Possible values: 1195 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1196 // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar 1197 // chart</a>. 1198 // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line 1199 // chart</a>. 1200 // "AREA" - An <a 1201 // href="/chart/interactive/docs/gallery/areachart">area chart</a>. 1202 // "COLUMN" - A <a 1203 // href="/chart/interactive/docs/gallery/columnchart">column chart</a>. 1204 // "SCATTER" - A <a 1205 // href="/chart/interactive/docs/gallery/scatterchart">scatter 1206 // chart</a>. 1207 // "COMBO" - A <a 1208 // href="/chart/interactive/docs/gallery/combochart">combo chart</a>. 1209 // "STEPPED_AREA" - A <a 1210 // href="/chart/interactive/docs/gallery/steppedareachart">stepped 1211 // area 1212 // chart</a>. 1213 ChartType string `json:"chartType,omitempty"` 1214 1215 // CompareMode: The behavior of tooltips and data highlighting when 1216 // hovering on data and 1217 // chart area. 1218 // 1219 // Possible values: 1220 // "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" - Default value, do not use. 1221 // "DATUM" - Only the focused data element is highlighted and shown in 1222 // the tooltip. 1223 // "CATEGORY" - All data elements with the same category (e.g., domain 1224 // value) are 1225 // highlighted and shown in the tooltip. 1226 CompareMode string `json:"compareMode,omitempty"` 1227 1228 // Domains: The domain of data this is charting. 1229 // Only a single domain is supported. 1230 Domains []*BasicChartDomain `json:"domains,omitempty"` 1231 1232 // HeaderCount: The number of rows or columns in the data that are 1233 // "headers". 1234 // If not set, Google Sheets will guess how many rows are headers 1235 // based 1236 // on the data. 1237 // 1238 // (Note that BasicChartAxis.title may override the axis title 1239 // inferred from the header values.) 1240 HeaderCount int64 `json:"headerCount,omitempty"` 1241 1242 // InterpolateNulls: If some values in a series are missing, gaps may 1243 // appear in the chart (e.g, 1244 // segments of lines in a line chart will be missing). To eliminate 1245 // these 1246 // gaps set this to true. 1247 // Applies to Line, Area, and Combo charts. 1248 InterpolateNulls bool `json:"interpolateNulls,omitempty"` 1249 1250 // LegendPosition: The position of the chart legend. 1251 // 1252 // Possible values: 1253 // "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 1254 // use. 1255 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 1256 // chart. 1257 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 1258 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 1259 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 1260 // "NO_LEGEND" - No legend is rendered. 1261 LegendPosition string `json:"legendPosition,omitempty"` 1262 1263 // LineSmoothing: Gets whether all lines should be rendered smooth or 1264 // straight by default. 1265 // Applies to Line charts. 1266 LineSmoothing bool `json:"lineSmoothing,omitempty"` 1267 1268 // Series: The data this chart is visualizing. 1269 Series []*BasicChartSeries `json:"series,omitempty"` 1270 1271 // StackedType: The stacked type for charts that support vertical 1272 // stacking. 1273 // Applies to Area, Bar, Column, Combo, and Stepped Area charts. 1274 // 1275 // Possible values: 1276 // "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 1277 // "NOT_STACKED" - Series are not stacked. 1278 // "STACKED" - Series values are stacked, each value is rendered 1279 // vertically beginning 1280 // from the top of the value below it. 1281 // "PERCENT_STACKED" - Vertical stacks are stretched to reach the top 1282 // of the chart, with 1283 // values laid out as percentages of each other. 1284 StackedType string `json:"stackedType,omitempty"` 1285 1286 // ThreeDimensional: True to make the chart 3D. 1287 // Applies to Bar and Column charts. 1288 ThreeDimensional bool `json:"threeDimensional,omitempty"` 1289 1290 // ForceSendFields is a list of field names (e.g. "Axis") to 1291 // unconditionally include in API requests. By default, fields with 1292 // empty values are omitted from API requests. However, any non-pointer, 1293 // non-interface field appearing in ForceSendFields will be sent to the 1294 // server regardless of whether the field is empty or not. This may be 1295 // used to include empty fields in Patch requests. 1296 ForceSendFields []string `json:"-"` 1297 1298 // NullFields is a list of field names (e.g. "Axis") to include in API 1299 // requests with the JSON null value. By default, fields with empty 1300 // values are omitted from API requests. However, any field with an 1301 // empty value appearing in NullFields will be sent to the server as 1302 // null. It is an error if a field in this list has a non-empty value. 1303 // This may be used to include null fields in Patch requests. 1304 NullFields []string `json:"-"` 1305} 1306 1307func (s *BasicChartSpec) MarshalJSON() ([]byte, error) { 1308 type NoMethod BasicChartSpec 1309 raw := NoMethod(*s) 1310 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1311} 1312 1313// BasicFilter: The default filter associated with a sheet. 1314type BasicFilter struct { 1315 // Criteria: The criteria for showing/hiding values per column. 1316 // The map's key is the column index, and the value is the criteria 1317 // for 1318 // that column. 1319 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 1320 1321 // Range: The range the filter covers. 1322 Range *GridRange `json:"range,omitempty"` 1323 1324 // SortSpecs: The sort order per column. Later specifications are used 1325 // when values 1326 // are equal in the earlier specifications. 1327 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 1328 1329 // ForceSendFields is a list of field names (e.g. "Criteria") to 1330 // unconditionally include in API requests. By default, fields with 1331 // empty values are omitted from API requests. However, any non-pointer, 1332 // non-interface field appearing in ForceSendFields will be sent to the 1333 // server regardless of whether the field is empty or not. This may be 1334 // used to include empty fields in Patch requests. 1335 ForceSendFields []string `json:"-"` 1336 1337 // NullFields is a list of field names (e.g. "Criteria") to include in 1338 // API requests with the JSON null value. By default, fields with empty 1339 // values are omitted from API requests. However, any field with an 1340 // empty value appearing in NullFields will be sent to the server as 1341 // null. It is an error if a field in this list has a non-empty value. 1342 // This may be used to include null fields in Patch requests. 1343 NullFields []string `json:"-"` 1344} 1345 1346func (s *BasicFilter) MarshalJSON() ([]byte, error) { 1347 type NoMethod BasicFilter 1348 raw := NoMethod(*s) 1349 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1350} 1351 1352// BatchClearValuesByDataFilterRequest: The request for clearing more 1353// than one range selected by a 1354// DataFilter in a spreadsheet. 1355type BatchClearValuesByDataFilterRequest struct { 1356 // DataFilters: The DataFilters used to determine which ranges to clear. 1357 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1358 1359 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1360 // unconditionally include in API requests. By default, fields with 1361 // empty values are omitted from API requests. However, any non-pointer, 1362 // non-interface field appearing in ForceSendFields will be sent to the 1363 // server regardless of whether the field is empty or not. This may be 1364 // used to include empty fields in Patch requests. 1365 ForceSendFields []string `json:"-"` 1366 1367 // NullFields is a list of field names (e.g. "DataFilters") to include 1368 // in API requests with the JSON null value. By default, fields with 1369 // empty values are omitted from API requests. However, any field with 1370 // an empty value appearing in NullFields will be sent to the server as 1371 // null. It is an error if a field in this list has a non-empty value. 1372 // This may be used to include null fields in Patch requests. 1373 NullFields []string `json:"-"` 1374} 1375 1376func (s *BatchClearValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1377 type NoMethod BatchClearValuesByDataFilterRequest 1378 raw := NoMethod(*s) 1379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1380} 1381 1382// BatchClearValuesByDataFilterResponse: The response when clearing a 1383// range of values selected with 1384// DataFilters in a spreadsheet. 1385type BatchClearValuesByDataFilterResponse struct { 1386 // ClearedRanges: The ranges that were cleared, in A1 notation. 1387 // (If the requests were for an unbounded range or a ranger larger 1388 // than the bounds of the sheet, this will be the actual ranges 1389 // that were cleared, bounded to the sheet's limits.) 1390 ClearedRanges []string `json:"clearedRanges,omitempty"` 1391 1392 // SpreadsheetId: The spreadsheet the updates were applied to. 1393 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1394 1395 // ServerResponse contains the HTTP response code and headers from the 1396 // server. 1397 googleapi.ServerResponse `json:"-"` 1398 1399 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1400 // unconditionally include in API requests. By default, fields with 1401 // empty values are omitted from API requests. However, any non-pointer, 1402 // non-interface field appearing in ForceSendFields will be sent to the 1403 // server regardless of whether the field is empty or not. This may be 1404 // used to include empty fields in Patch requests. 1405 ForceSendFields []string `json:"-"` 1406 1407 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1408 // in API requests with the JSON null value. By default, fields with 1409 // empty values are omitted from API requests. However, any field with 1410 // an empty value appearing in NullFields will be sent to the server as 1411 // null. It is an error if a field in this list has a non-empty value. 1412 // This may be used to include null fields in Patch requests. 1413 NullFields []string `json:"-"` 1414} 1415 1416func (s *BatchClearValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1417 type NoMethod BatchClearValuesByDataFilterResponse 1418 raw := NoMethod(*s) 1419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1420} 1421 1422// BatchClearValuesRequest: The request for clearing more than one range 1423// of values in a spreadsheet. 1424type BatchClearValuesRequest struct { 1425 // Ranges: The ranges to clear, in A1 notation. 1426 Ranges []string `json:"ranges,omitempty"` 1427 1428 // ForceSendFields is a list of field names (e.g. "Ranges") to 1429 // unconditionally include in API requests. By default, fields with 1430 // empty values are omitted from API requests. However, any non-pointer, 1431 // non-interface field appearing in ForceSendFields will be sent to the 1432 // server regardless of whether the field is empty or not. This may be 1433 // used to include empty fields in Patch requests. 1434 ForceSendFields []string `json:"-"` 1435 1436 // NullFields is a list of field names (e.g. "Ranges") to include in API 1437 // requests with the JSON null value. By default, fields with empty 1438 // values are omitted from API requests. However, any field with an 1439 // empty value appearing in NullFields will be sent to the server as 1440 // null. It is an error if a field in this list has a non-empty value. 1441 // This may be used to include null fields in Patch requests. 1442 NullFields []string `json:"-"` 1443} 1444 1445func (s *BatchClearValuesRequest) MarshalJSON() ([]byte, error) { 1446 type NoMethod BatchClearValuesRequest 1447 raw := NoMethod(*s) 1448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1449} 1450 1451// BatchClearValuesResponse: The response when clearing a range of 1452// values in a spreadsheet. 1453type BatchClearValuesResponse struct { 1454 // ClearedRanges: The ranges that were cleared, in A1 notation. 1455 // (If the requests were for an unbounded range or a ranger larger 1456 // than the bounds of the sheet, this will be the actual ranges 1457 // that were cleared, bounded to the sheet's limits.) 1458 ClearedRanges []string `json:"clearedRanges,omitempty"` 1459 1460 // SpreadsheetId: The spreadsheet the updates were applied to. 1461 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1462 1463 // ServerResponse contains the HTTP response code and headers from the 1464 // server. 1465 googleapi.ServerResponse `json:"-"` 1466 1467 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1468 // unconditionally include in API requests. By default, fields with 1469 // empty values are omitted from API requests. However, any non-pointer, 1470 // non-interface field appearing in ForceSendFields will be sent to the 1471 // server regardless of whether the field is empty or not. This may be 1472 // used to include empty fields in Patch requests. 1473 ForceSendFields []string `json:"-"` 1474 1475 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1476 // in API requests with the JSON null value. By default, fields with 1477 // empty values are omitted from API requests. However, any field with 1478 // an empty value appearing in NullFields will be sent to the server as 1479 // null. It is an error if a field in this list has a non-empty value. 1480 // This may be used to include null fields in Patch requests. 1481 NullFields []string `json:"-"` 1482} 1483 1484func (s *BatchClearValuesResponse) MarshalJSON() ([]byte, error) { 1485 type NoMethod BatchClearValuesResponse 1486 raw := NoMethod(*s) 1487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1488} 1489 1490// BatchGetValuesByDataFilterRequest: The request for retrieving a range 1491// of values in a spreadsheet selected by a 1492// set of DataFilters. 1493type BatchGetValuesByDataFilterRequest struct { 1494 // DataFilters: The data filters used to match the ranges of values to 1495 // retrieve. Ranges 1496 // that match any of the specified data filters will be included in 1497 // the 1498 // response. 1499 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1500 1501 // DateTimeRenderOption: How dates, times, and durations should be 1502 // represented in the output. 1503 // This is ignored if value_render_option is 1504 // FORMATTED_VALUE. 1505 // The default dateTime render option is 1506 // [DateTimeRenderOption.SERIAL_NUMBER]. 1507 // 1508 // Possible values: 1509 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1510 // fields to be output 1511 // as doubles in "serial number" format, as popularized by Lotus 1512 // 1-2-3. 1513 // The whole number portion of the value (left of the decimal) 1514 // counts 1515 // the days since December 30th 1899. The fractional portion (right 1516 // of 1517 // the decimal) counts the time as a fraction of the day. For 1518 // example, 1519 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1520 // after 1521 // December 30st 1899, and .5 because noon is half a day. February 1522 // 1st 1523 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1524 // as 1525 // not a leap year. 1526 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1527 // fields to be output 1528 // as strings in their given number format (which is dependent 1529 // on the spreadsheet locale). 1530 DateTimeRenderOption string `json:"dateTimeRenderOption,omitempty"` 1531 1532 // MajorDimension: The major dimension that results should use. 1533 // 1534 // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 1535 // then a request that selects that range and sets `majorDimension=ROWS` 1536 // will 1537 // return `[[1,2],[3,4]]`, 1538 // whereas a request that sets `majorDimension=COLUMNS` will 1539 // return 1540 // `[[1,3],[2,4]]`. 1541 // 1542 // Possible values: 1543 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 1544 // "ROWS" - Operates on the rows of a sheet. 1545 // "COLUMNS" - Operates on the columns of a sheet. 1546 MajorDimension string `json:"majorDimension,omitempty"` 1547 1548 // ValueRenderOption: How values should be represented in the 1549 // output. 1550 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1551 // 1552 // Possible values: 1553 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1554 // reply according to the 1555 // cell's formatting. Formatting is based on the spreadsheet's 1556 // locale, 1557 // not the requesting user's locale. 1558 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1559 // currency, 1560 // then `A2` would return "$1.23". 1561 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1562 // in the reply. 1563 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1564 // currency, 1565 // then `A2` would return the number `1.23`. 1566 // "FORMULA" - Values will not be calculated. The reply will include 1567 // the formulas. 1568 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1569 // currency, 1570 // then A2 would return "=A1". 1571 ValueRenderOption string `json:"valueRenderOption,omitempty"` 1572 1573 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1574 // unconditionally include in API requests. By default, fields with 1575 // empty values are omitted from API requests. However, any non-pointer, 1576 // non-interface field appearing in ForceSendFields will be sent to the 1577 // server regardless of whether the field is empty or not. This may be 1578 // used to include empty fields in Patch requests. 1579 ForceSendFields []string `json:"-"` 1580 1581 // NullFields is a list of field names (e.g. "DataFilters") to include 1582 // in API requests with the JSON null value. By default, fields with 1583 // empty values are omitted from API requests. However, any field with 1584 // an empty value appearing in NullFields will be sent to the server as 1585 // null. It is an error if a field in this list has a non-empty value. 1586 // This may be used to include null fields in Patch requests. 1587 NullFields []string `json:"-"` 1588} 1589 1590func (s *BatchGetValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1591 type NoMethod BatchGetValuesByDataFilterRequest 1592 raw := NoMethod(*s) 1593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1594} 1595 1596// BatchGetValuesByDataFilterResponse: The response when retrieving more 1597// than one range of values in a spreadsheet 1598// selected by DataFilters. 1599type BatchGetValuesByDataFilterResponse struct { 1600 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1601 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1602 1603 // ValueRanges: The requested values with the list of data filters that 1604 // matched them. 1605 ValueRanges []*MatchedValueRange `json:"valueRanges,omitempty"` 1606 1607 // ServerResponse contains the HTTP response code and headers from the 1608 // server. 1609 googleapi.ServerResponse `json:"-"` 1610 1611 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1612 // unconditionally include in API requests. By default, fields with 1613 // empty values are omitted from API requests. However, any non-pointer, 1614 // non-interface field appearing in ForceSendFields will be sent to the 1615 // server regardless of whether the field is empty or not. This may be 1616 // used to include empty fields in Patch requests. 1617 ForceSendFields []string `json:"-"` 1618 1619 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1620 // in API requests with the JSON null value. By default, fields with 1621 // empty values are omitted from API requests. However, any field with 1622 // an empty value appearing in NullFields will be sent to the server as 1623 // null. It is an error if a field in this list has a non-empty value. 1624 // This may be used to include null fields in Patch requests. 1625 NullFields []string `json:"-"` 1626} 1627 1628func (s *BatchGetValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1629 type NoMethod BatchGetValuesByDataFilterResponse 1630 raw := NoMethod(*s) 1631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1632} 1633 1634// BatchGetValuesResponse: The response when retrieving more than one 1635// range of values in a spreadsheet. 1636type BatchGetValuesResponse struct { 1637 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1638 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1639 1640 // ValueRanges: The requested values. The order of the ValueRanges is 1641 // the same as the 1642 // order of the requested ranges. 1643 ValueRanges []*ValueRange `json:"valueRanges,omitempty"` 1644 1645 // ServerResponse contains the HTTP response code and headers from the 1646 // server. 1647 googleapi.ServerResponse `json:"-"` 1648 1649 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1650 // unconditionally include in API requests. By default, fields with 1651 // empty values are omitted from API requests. However, any non-pointer, 1652 // non-interface field appearing in ForceSendFields will be sent to the 1653 // server regardless of whether the field is empty or not. This may be 1654 // used to include empty fields in Patch requests. 1655 ForceSendFields []string `json:"-"` 1656 1657 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1658 // in API requests with the JSON null value. By default, fields with 1659 // empty values are omitted from API requests. However, any field with 1660 // an empty value appearing in NullFields will be sent to the server as 1661 // null. It is an error if a field in this list has a non-empty value. 1662 // This may be used to include null fields in Patch requests. 1663 NullFields []string `json:"-"` 1664} 1665 1666func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) { 1667 type NoMethod BatchGetValuesResponse 1668 raw := NoMethod(*s) 1669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1670} 1671 1672// BatchUpdateSpreadsheetRequest: The request for updating any aspect of 1673// a spreadsheet. 1674type BatchUpdateSpreadsheetRequest struct { 1675 // IncludeSpreadsheetInResponse: Determines if the update response 1676 // should include the spreadsheet 1677 // resource. 1678 IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"` 1679 1680 // Requests: A list of updates to apply to the spreadsheet. 1681 // Requests will be applied in the order they are specified. 1682 // If any request is not valid, no requests will be applied. 1683 Requests []*Request `json:"requests,omitempty"` 1684 1685 // ResponseIncludeGridData: True if grid data should be returned. 1686 // Meaningful only if 1687 // if include_spreadsheet_in_response is 'true'. 1688 // This parameter is ignored if a field mask was set in the request. 1689 ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"` 1690 1691 // ResponseRanges: Limits the ranges included in the response 1692 // spreadsheet. 1693 // Meaningful only if include_spreadsheet_response is 'true'. 1694 ResponseRanges []string `json:"responseRanges,omitempty"` 1695 1696 // ForceSendFields is a list of field names (e.g. 1697 // "IncludeSpreadsheetInResponse") to unconditionally include in API 1698 // requests. By default, fields with empty values are omitted from API 1699 // requests. However, any non-pointer, non-interface field appearing in 1700 // ForceSendFields will be sent to the server regardless of whether the 1701 // field is empty or not. This may be used to include empty fields in 1702 // Patch requests. 1703 ForceSendFields []string `json:"-"` 1704 1705 // NullFields is a list of field names (e.g. 1706 // "IncludeSpreadsheetInResponse") to include in API requests with the 1707 // JSON null value. By default, fields with empty values are omitted 1708 // from API requests. However, any field with an empty value appearing 1709 // in NullFields will be sent to the server as null. It is an error if a 1710 // field in this list has a non-empty value. This may be used to include 1711 // null fields in Patch requests. 1712 NullFields []string `json:"-"` 1713} 1714 1715func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) { 1716 type NoMethod BatchUpdateSpreadsheetRequest 1717 raw := NoMethod(*s) 1718 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1719} 1720 1721// BatchUpdateSpreadsheetResponse: The reply for batch updating a 1722// spreadsheet. 1723type BatchUpdateSpreadsheetResponse struct { 1724 // Replies: The reply of the updates. This maps 1:1 with the updates, 1725 // although 1726 // replies to some requests may be empty. 1727 Replies []*Response `json:"replies,omitempty"` 1728 1729 // SpreadsheetId: The spreadsheet the updates were applied to. 1730 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1731 1732 // UpdatedSpreadsheet: The spreadsheet after updates were applied. This 1733 // is only set 1734 // if 1735 // [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is 1736 // `true`. 1737 UpdatedSpreadsheet *Spreadsheet `json:"updatedSpreadsheet,omitempty"` 1738 1739 // ServerResponse contains the HTTP response code and headers from the 1740 // server. 1741 googleapi.ServerResponse `json:"-"` 1742 1743 // ForceSendFields is a list of field names (e.g. "Replies") to 1744 // unconditionally include in API requests. By default, fields with 1745 // empty values are omitted from API requests. However, any non-pointer, 1746 // non-interface field appearing in ForceSendFields will be sent to the 1747 // server regardless of whether the field is empty or not. This may be 1748 // used to include empty fields in Patch requests. 1749 ForceSendFields []string `json:"-"` 1750 1751 // NullFields is a list of field names (e.g. "Replies") to include in 1752 // API requests with the JSON null value. By default, fields with empty 1753 // values are omitted from API requests. However, any field with an 1754 // empty value appearing in NullFields will be sent to the server as 1755 // null. It is an error if a field in this list has a non-empty value. 1756 // This may be used to include null fields in Patch requests. 1757 NullFields []string `json:"-"` 1758} 1759 1760func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) { 1761 type NoMethod BatchUpdateSpreadsheetResponse 1762 raw := NoMethod(*s) 1763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1764} 1765 1766// BatchUpdateValuesByDataFilterRequest: The request for updating more 1767// than one range of values in a spreadsheet. 1768type BatchUpdateValuesByDataFilterRequest struct { 1769 // Data: The new values to apply to the spreadsheet. If more than one 1770 // range is 1771 // matched by the specified DataFilter the specified values will 1772 // be 1773 // applied to all of those ranges. 1774 Data []*DataFilterValueRange `json:"data,omitempty"` 1775 1776 // IncludeValuesInResponse: Determines if the update response should 1777 // include the values 1778 // of the cells that were updated. By default, responses 1779 // do not include the updated values. The `updatedData` field 1780 // within 1781 // each of the BatchUpdateValuesResponse.responses will contain 1782 // the updated values. If the range to write was larger than than the 1783 // range 1784 // actually written, the response will include all values in the 1785 // requested 1786 // range (excluding trailing empty rows and columns). 1787 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 1788 1789 // ResponseDateTimeRenderOption: Determines how dates, times, and 1790 // durations in the response should be 1791 // rendered. This is ignored if response_value_render_option 1792 // is 1793 // FORMATTED_VALUE. 1794 // The default dateTime render option 1795 // is 1796 // DateTimeRenderOption.SERIAL_NUMBER. 1797 // 1798 // Possible values: 1799 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1800 // fields to be output 1801 // as doubles in "serial number" format, as popularized by Lotus 1802 // 1-2-3. 1803 // The whole number portion of the value (left of the decimal) 1804 // counts 1805 // the days since December 30th 1899. The fractional portion (right 1806 // of 1807 // the decimal) counts the time as a fraction of the day. For 1808 // example, 1809 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1810 // after 1811 // December 30st 1899, and .5 because noon is half a day. February 1812 // 1st 1813 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1814 // as 1815 // not a leap year. 1816 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1817 // fields to be output 1818 // as strings in their given number format (which is dependent 1819 // on the spreadsheet locale). 1820 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 1821 1822 // ResponseValueRenderOption: Determines how values in the response 1823 // should be rendered. 1824 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1825 // 1826 // Possible values: 1827 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1828 // reply according to the 1829 // cell's formatting. Formatting is based on the spreadsheet's 1830 // locale, 1831 // not the requesting user's locale. 1832 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1833 // currency, 1834 // then `A2` would return "$1.23". 1835 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1836 // in the reply. 1837 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1838 // currency, 1839 // then `A2` would return the number `1.23`. 1840 // "FORMULA" - Values will not be calculated. The reply will include 1841 // the formulas. 1842 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1843 // currency, 1844 // then A2 would return "=A1". 1845 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 1846 1847 // ValueInputOption: How the input data should be interpreted. 1848 // 1849 // Possible values: 1850 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 1851 // must not be used. 1852 // "RAW" - The values the user has entered will not be parsed and will 1853 // be stored 1854 // as-is. 1855 // "USER_ENTERED" - The values will be parsed as if the user typed 1856 // them into the UI. 1857 // Numbers will stay as numbers, but strings may be converted to 1858 // numbers, 1859 // dates, etc. following the same rules that are applied when 1860 // entering 1861 // text into a cell via the Google Sheets UI. 1862 ValueInputOption string `json:"valueInputOption,omitempty"` 1863 1864 // ForceSendFields is a list of field names (e.g. "Data") to 1865 // unconditionally include in API requests. By default, fields with 1866 // empty values are omitted from API requests. However, any non-pointer, 1867 // non-interface field appearing in ForceSendFields will be sent to the 1868 // server regardless of whether the field is empty or not. This may be 1869 // used to include empty fields in Patch requests. 1870 ForceSendFields []string `json:"-"` 1871 1872 // NullFields is a list of field names (e.g. "Data") to include in API 1873 // requests with the JSON null value. By default, fields with empty 1874 // values are omitted from API requests. However, any field with an 1875 // empty value appearing in NullFields will be sent to the server as 1876 // null. It is an error if a field in this list has a non-empty value. 1877 // This may be used to include null fields in Patch requests. 1878 NullFields []string `json:"-"` 1879} 1880 1881func (s *BatchUpdateValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1882 type NoMethod BatchUpdateValuesByDataFilterRequest 1883 raw := NoMethod(*s) 1884 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1885} 1886 1887// BatchUpdateValuesByDataFilterResponse: The response when updating a 1888// range of values in a spreadsheet. 1889type BatchUpdateValuesByDataFilterResponse struct { 1890 // Responses: The response for each range updated. 1891 Responses []*UpdateValuesByDataFilterResponse `json:"responses,omitempty"` 1892 1893 // SpreadsheetId: The spreadsheet the updates were applied to. 1894 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1895 1896 // TotalUpdatedCells: The total number of cells updated. 1897 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 1898 1899 // TotalUpdatedColumns: The total number of columns where at least one 1900 // cell in the column was 1901 // updated. 1902 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 1903 1904 // TotalUpdatedRows: The total number of rows where at least one cell in 1905 // the row was updated. 1906 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 1907 1908 // TotalUpdatedSheets: The total number of sheets where at least one 1909 // cell in the sheet was 1910 // updated. 1911 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 1912 1913 // ServerResponse contains the HTTP response code and headers from the 1914 // server. 1915 googleapi.ServerResponse `json:"-"` 1916 1917 // ForceSendFields is a list of field names (e.g. "Responses") to 1918 // unconditionally include in API requests. By default, fields with 1919 // empty values are omitted from API requests. However, any non-pointer, 1920 // non-interface field appearing in ForceSendFields will be sent to the 1921 // server regardless of whether the field is empty or not. This may be 1922 // used to include empty fields in Patch requests. 1923 ForceSendFields []string `json:"-"` 1924 1925 // NullFields is a list of field names (e.g. "Responses") to include in 1926 // API requests with the JSON null value. By default, fields with empty 1927 // values are omitted from API requests. However, any field with an 1928 // empty value appearing in NullFields will be sent to the server as 1929 // null. It is an error if a field in this list has a non-empty value. 1930 // This may be used to include null fields in Patch requests. 1931 NullFields []string `json:"-"` 1932} 1933 1934func (s *BatchUpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1935 type NoMethod BatchUpdateValuesByDataFilterResponse 1936 raw := NoMethod(*s) 1937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1938} 1939 1940// BatchUpdateValuesRequest: The request for updating more than one 1941// range of values in a spreadsheet. 1942type BatchUpdateValuesRequest struct { 1943 // Data: The new values to apply to the spreadsheet. 1944 Data []*ValueRange `json:"data,omitempty"` 1945 1946 // IncludeValuesInResponse: Determines if the update response should 1947 // include the values 1948 // of the cells that were updated. By default, responses 1949 // do not include the updated values. The `updatedData` field 1950 // within 1951 // each of the BatchUpdateValuesResponse.responses will contain 1952 // the updated values. If the range to write was larger than than the 1953 // range 1954 // actually written, the response will include all values in the 1955 // requested 1956 // range (excluding trailing empty rows and columns). 1957 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 1958 1959 // ResponseDateTimeRenderOption: Determines how dates, times, and 1960 // durations in the response should be 1961 // rendered. This is ignored if response_value_render_option 1962 // is 1963 // FORMATTED_VALUE. 1964 // The default dateTime render option 1965 // is 1966 // DateTimeRenderOption.SERIAL_NUMBER. 1967 // 1968 // Possible values: 1969 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1970 // fields to be output 1971 // as doubles in "serial number" format, as popularized by Lotus 1972 // 1-2-3. 1973 // The whole number portion of the value (left of the decimal) 1974 // counts 1975 // the days since December 30th 1899. The fractional portion (right 1976 // of 1977 // the decimal) counts the time as a fraction of the day. For 1978 // example, 1979 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1980 // after 1981 // December 30st 1899, and .5 because noon is half a day. February 1982 // 1st 1983 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1984 // as 1985 // not a leap year. 1986 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1987 // fields to be output 1988 // as strings in their given number format (which is dependent 1989 // on the spreadsheet locale). 1990 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 1991 1992 // ResponseValueRenderOption: Determines how values in the response 1993 // should be rendered. 1994 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1995 // 1996 // Possible values: 1997 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1998 // reply according to the 1999 // cell's formatting. Formatting is based on the spreadsheet's 2000 // locale, 2001 // not the requesting user's locale. 2002 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2003 // currency, 2004 // then `A2` would return "$1.23". 2005 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 2006 // in the reply. 2007 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2008 // currency, 2009 // then `A2` would return the number `1.23`. 2010 // "FORMULA" - Values will not be calculated. The reply will include 2011 // the formulas. 2012 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2013 // currency, 2014 // then A2 would return "=A1". 2015 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 2016 2017 // ValueInputOption: How the input data should be interpreted. 2018 // 2019 // Possible values: 2020 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 2021 // must not be used. 2022 // "RAW" - The values the user has entered will not be parsed and will 2023 // be stored 2024 // as-is. 2025 // "USER_ENTERED" - The values will be parsed as if the user typed 2026 // them into the UI. 2027 // Numbers will stay as numbers, but strings may be converted to 2028 // numbers, 2029 // dates, etc. following the same rules that are applied when 2030 // entering 2031 // text into a cell via the Google Sheets UI. 2032 ValueInputOption string `json:"valueInputOption,omitempty"` 2033 2034 // ForceSendFields is a list of field names (e.g. "Data") to 2035 // unconditionally include in API requests. By default, fields with 2036 // empty values are omitted from API requests. However, any non-pointer, 2037 // non-interface field appearing in ForceSendFields will be sent to the 2038 // server regardless of whether the field is empty or not. This may be 2039 // used to include empty fields in Patch requests. 2040 ForceSendFields []string `json:"-"` 2041 2042 // NullFields is a list of field names (e.g. "Data") to include in API 2043 // requests with the JSON null value. By default, fields with empty 2044 // values are omitted from API requests. However, any field with an 2045 // empty value appearing in NullFields will be sent to the server as 2046 // null. It is an error if a field in this list has a non-empty value. 2047 // This may be used to include null fields in Patch requests. 2048 NullFields []string `json:"-"` 2049} 2050 2051func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) { 2052 type NoMethod BatchUpdateValuesRequest 2053 raw := NoMethod(*s) 2054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2055} 2056 2057// BatchUpdateValuesResponse: The response when updating a range of 2058// values in a spreadsheet. 2059type BatchUpdateValuesResponse struct { 2060 // Responses: One UpdateValuesResponse per requested range, in the same 2061 // order as 2062 // the requests appeared. 2063 Responses []*UpdateValuesResponse `json:"responses,omitempty"` 2064 2065 // SpreadsheetId: The spreadsheet the updates were applied to. 2066 SpreadsheetId string `json:"spreadsheetId,omitempty"` 2067 2068 // TotalUpdatedCells: The total number of cells updated. 2069 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 2070 2071 // TotalUpdatedColumns: The total number of columns where at least one 2072 // cell in the column was 2073 // updated. 2074 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 2075 2076 // TotalUpdatedRows: The total number of rows where at least one cell in 2077 // the row was updated. 2078 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 2079 2080 // TotalUpdatedSheets: The total number of sheets where at least one 2081 // cell in the sheet was 2082 // updated. 2083 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 2084 2085 // ServerResponse contains the HTTP response code and headers from the 2086 // server. 2087 googleapi.ServerResponse `json:"-"` 2088 2089 // ForceSendFields is a list of field names (e.g. "Responses") to 2090 // unconditionally include in API requests. By default, fields with 2091 // empty values are omitted from API requests. However, any non-pointer, 2092 // non-interface field appearing in ForceSendFields will be sent to the 2093 // server regardless of whether the field is empty or not. This may be 2094 // used to include empty fields in Patch requests. 2095 ForceSendFields []string `json:"-"` 2096 2097 // NullFields is a list of field names (e.g. "Responses") to include in 2098 // API requests with the JSON null value. By default, fields with empty 2099 // values are omitted from API requests. However, any field with an 2100 // empty value appearing in NullFields will be sent to the server as 2101 // null. It is an error if a field in this list has a non-empty value. 2102 // This may be used to include null fields in Patch requests. 2103 NullFields []string `json:"-"` 2104} 2105 2106func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) { 2107 type NoMethod BatchUpdateValuesResponse 2108 raw := NoMethod(*s) 2109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2110} 2111 2112// BooleanCondition: A condition that can evaluate to true or 2113// false. 2114// BooleanConditions are used by conditional formatting, 2115// data validation, and the criteria in filters. 2116type BooleanCondition struct { 2117 // Type: The type of condition. 2118 // 2119 // Possible values: 2120 // "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use. 2121 // "NUMBER_GREATER" - The cell's value must be greater than the 2122 // condition's value. 2123 // Supported by data validation, conditional formatting and 2124 // filters. 2125 // Requires a single ConditionValue. 2126 // "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or 2127 // equal to the condition's value. 2128 // Supported by data validation, conditional formatting and 2129 // filters. 2130 // Requires a single ConditionValue. 2131 // "NUMBER_LESS" - The cell's value must be less than the condition's 2132 // value. 2133 // Supported by data validation, conditional formatting and 2134 // filters. 2135 // Requires a single ConditionValue. 2136 // "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal 2137 // to the condition's value. 2138 // Supported by data validation, conditional formatting and 2139 // filters. 2140 // Requires a single ConditionValue. 2141 // "NUMBER_EQ" - The cell's value must be equal to the condition's 2142 // value. 2143 // Supported by data validation, conditional formatting and 2144 // filters. 2145 // Requires a single ConditionValue. 2146 // "NUMBER_NOT_EQ" - The cell's value must be not equal to the 2147 // condition's value. 2148 // Supported by data validation, conditional formatting and 2149 // filters. 2150 // Requires a single ConditionValue. 2151 // "NUMBER_BETWEEN" - The cell's value must be between the two 2152 // condition values. 2153 // Supported by data validation, conditional formatting and 2154 // filters. 2155 // Requires exactly two ConditionValues. 2156 // "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two 2157 // condition values. 2158 // Supported by data validation, conditional formatting and 2159 // filters. 2160 // Requires exactly two ConditionValues. 2161 // "TEXT_CONTAINS" - The cell's value must contain the condition's 2162 // value. 2163 // Supported by data validation, conditional formatting and 2164 // filters. 2165 // Requires a single ConditionValue. 2166 // "TEXT_NOT_CONTAINS" - The cell's value must not contain the 2167 // condition's value. 2168 // Supported by data validation, conditional formatting and 2169 // filters. 2170 // Requires a single ConditionValue. 2171 // "TEXT_STARTS_WITH" - The cell's value must start with the 2172 // condition's value. 2173 // Supported by conditional formatting and filters. 2174 // Requires a single ConditionValue. 2175 // "TEXT_ENDS_WITH" - The cell's value must end with the condition's 2176 // value. 2177 // Supported by conditional formatting and filters. 2178 // Requires a single ConditionValue. 2179 // "TEXT_EQ" - The cell's value must be exactly the condition's 2180 // value. 2181 // Supported by data validation, conditional formatting and 2182 // filters. 2183 // Requires a single ConditionValue. 2184 // "TEXT_IS_EMAIL" - The cell's value must be a valid email 2185 // address. 2186 // Supported by data validation. 2187 // Requires no ConditionValues. 2188 // "TEXT_IS_URL" - The cell's value must be a valid URL. 2189 // Supported by data validation. 2190 // Requires no ConditionValues. 2191 // "DATE_EQ" - The cell's value must be the same date as the 2192 // condition's value. 2193 // Supported by data validation, conditional formatting and 2194 // filters. 2195 // Requires a single ConditionValue. 2196 // "DATE_BEFORE" - The cell's value must be before the date of the 2197 // condition's value. 2198 // Supported by data validation, conditional formatting and 2199 // filters. 2200 // Requires a single ConditionValue 2201 // that may be a relative date. 2202 // "DATE_AFTER" - The cell's value must be after the date of the 2203 // condition's value. 2204 // Supported by data validation, conditional formatting and 2205 // filters. 2206 // Requires a single ConditionValue 2207 // that may be a relative date. 2208 // "DATE_ON_OR_BEFORE" - The cell's value must be on or before the 2209 // date of the condition's value. 2210 // Supported by data validation. 2211 // Requires a single ConditionValue 2212 // that may be a relative date. 2213 // "DATE_ON_OR_AFTER" - The cell's value must be on or after the date 2214 // of the condition's value. 2215 // Supported by data validation. 2216 // Requires a single ConditionValue 2217 // that may be a relative date. 2218 // "DATE_BETWEEN" - The cell's value must be between the dates of the 2219 // two condition values. 2220 // Supported by data validation. 2221 // Requires exactly two ConditionValues. 2222 // "DATE_NOT_BETWEEN" - The cell's value must be outside the dates of 2223 // the two condition values. 2224 // Supported by data validation. 2225 // Requires exactly two ConditionValues. 2226 // "DATE_IS_VALID" - The cell's value must be a date. 2227 // Supported by data validation. 2228 // Requires no ConditionValues. 2229 // "ONE_OF_RANGE" - The cell's value must be listed in the grid in 2230 // condition value's range. 2231 // Supported by data validation. 2232 // Requires a single ConditionValue, 2233 // and the value must be a valid range in A1 notation. 2234 // "ONE_OF_LIST" - The cell's value must be in the list of condition 2235 // values. 2236 // Supported by data validation. 2237 // Supports any number of condition values, 2238 // one per item in the list. 2239 // Formulas are not supported in the values. 2240 // "BLANK" - The cell's value must be empty. 2241 // Supported by conditional formatting and filters. 2242 // Requires no ConditionValues. 2243 // "NOT_BLANK" - The cell's value must not be empty. 2244 // Supported by conditional formatting and filters. 2245 // Requires no ConditionValues. 2246 // "CUSTOM_FORMULA" - The condition's formula must evaluate to 2247 // true. 2248 // Supported by data validation, conditional formatting and 2249 // filters. 2250 // Requires a single ConditionValue. 2251 // "BOOLEAN" - The cell's value must be TRUE/FALSE or in the list of 2252 // condition values. 2253 // Supported by data validation. 2254 // Renders as a cell checkbox. 2255 // Supports zero, one or two ConditionValues. No 2256 // values indicates the cell must be TRUE or FALSE, where TRUE renders 2257 // as 2258 // checked and FALSE renders as unchecked. One value indicates the 2259 // cell 2260 // will render as checked when it contains that value and unchecked when 2261 // it 2262 // is blank. Two values indicate that the cell will render as checked 2263 // when 2264 // it contains the first value and unchecked when it contains the 2265 // second 2266 // value. For example, ["Yes","No"] indicates that the cell will render 2267 // a 2268 // checked box when it has the value "Yes" and an unchecked box when it 2269 // has 2270 // the value "No". 2271 Type string `json:"type,omitempty"` 2272 2273 // Values: The values of the condition. The number of supported values 2274 // depends 2275 // on the condition type. Some support zero values, 2276 // others one or two values, 2277 // and ConditionType.ONE_OF_LIST supports an arbitrary number of values. 2278 Values []*ConditionValue `json:"values,omitempty"` 2279 2280 // ForceSendFields is a list of field names (e.g. "Type") to 2281 // unconditionally include in API requests. By default, fields with 2282 // empty values are omitted from API requests. However, any non-pointer, 2283 // non-interface field appearing in ForceSendFields will be sent to the 2284 // server regardless of whether the field is empty or not. This may be 2285 // used to include empty fields in Patch requests. 2286 ForceSendFields []string `json:"-"` 2287 2288 // NullFields is a list of field names (e.g. "Type") to include in API 2289 // requests with the JSON null value. By default, fields with empty 2290 // values are omitted from API requests. However, any field with an 2291 // empty value appearing in NullFields will be sent to the server as 2292 // null. It is an error if a field in this list has a non-empty value. 2293 // This may be used to include null fields in Patch requests. 2294 NullFields []string `json:"-"` 2295} 2296 2297func (s *BooleanCondition) MarshalJSON() ([]byte, error) { 2298 type NoMethod BooleanCondition 2299 raw := NoMethod(*s) 2300 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2301} 2302 2303// BooleanRule: A rule that may or may not match, depending on the 2304// condition. 2305type BooleanRule struct { 2306 // Condition: The condition of the rule. If the condition evaluates to 2307 // true, 2308 // the format is applied. 2309 Condition *BooleanCondition `json:"condition,omitempty"` 2310 2311 // Format: The format to apply. 2312 // Conditional formatting can only apply a subset of formatting: 2313 // bold, italic, 2314 // strikethrough, 2315 // foreground color & 2316 // background color. 2317 Format *CellFormat `json:"format,omitempty"` 2318 2319 // ForceSendFields is a list of field names (e.g. "Condition") to 2320 // unconditionally include in API requests. By default, fields with 2321 // empty values are omitted from API requests. However, any non-pointer, 2322 // non-interface field appearing in ForceSendFields will be sent to the 2323 // server regardless of whether the field is empty or not. This may be 2324 // used to include empty fields in Patch requests. 2325 ForceSendFields []string `json:"-"` 2326 2327 // NullFields is a list of field names (e.g. "Condition") to include in 2328 // API requests with the JSON null value. By default, fields with empty 2329 // values are omitted from API requests. However, any field with an 2330 // empty value appearing in NullFields will be sent to the server as 2331 // null. It is an error if a field in this list has a non-empty value. 2332 // This may be used to include null fields in Patch requests. 2333 NullFields []string `json:"-"` 2334} 2335 2336func (s *BooleanRule) MarshalJSON() ([]byte, error) { 2337 type NoMethod BooleanRule 2338 raw := NoMethod(*s) 2339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2340} 2341 2342// Border: A border along a cell. 2343type Border struct { 2344 // Color: The color of the border. 2345 Color *Color `json:"color,omitempty"` 2346 2347 // Style: The style of the border. 2348 // 2349 // Possible values: 2350 // "STYLE_UNSPECIFIED" - The style is not specified. Do not use this. 2351 // "DOTTED" - The border is dotted. 2352 // "DASHED" - The border is dashed. 2353 // "SOLID" - The border is a thin solid line. 2354 // "SOLID_MEDIUM" - The border is a medium solid line. 2355 // "SOLID_THICK" - The border is a thick solid line. 2356 // "NONE" - No border. 2357 // Used only when updating a border in order to erase it. 2358 // "DOUBLE" - The border is two solid lines. 2359 Style string `json:"style,omitempty"` 2360 2361 // Width: The width of the border, in pixels. 2362 // Deprecated; the width is determined by the "style" field. 2363 Width int64 `json:"width,omitempty"` 2364 2365 // ForceSendFields is a list of field names (e.g. "Color") to 2366 // unconditionally include in API requests. By default, fields with 2367 // empty values are omitted from API requests. However, any non-pointer, 2368 // non-interface field appearing in ForceSendFields will be sent to the 2369 // server regardless of whether the field is empty or not. This may be 2370 // used to include empty fields in Patch requests. 2371 ForceSendFields []string `json:"-"` 2372 2373 // NullFields is a list of field names (e.g. "Color") to include in API 2374 // requests with the JSON null value. By default, fields with empty 2375 // values are omitted from API requests. However, any field with an 2376 // empty value appearing in NullFields will be sent to the server as 2377 // null. It is an error if a field in this list has a non-empty value. 2378 // This may be used to include null fields in Patch requests. 2379 NullFields []string `json:"-"` 2380} 2381 2382func (s *Border) MarshalJSON() ([]byte, error) { 2383 type NoMethod Border 2384 raw := NoMethod(*s) 2385 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2386} 2387 2388// Borders: The borders of the cell. 2389type Borders struct { 2390 // Bottom: The bottom border of the cell. 2391 Bottom *Border `json:"bottom,omitempty"` 2392 2393 // Left: The left border of the cell. 2394 Left *Border `json:"left,omitempty"` 2395 2396 // Right: The right border of the cell. 2397 Right *Border `json:"right,omitempty"` 2398 2399 // Top: The top border of the cell. 2400 Top *Border `json:"top,omitempty"` 2401 2402 // ForceSendFields is a list of field names (e.g. "Bottom") to 2403 // unconditionally include in API requests. By default, fields with 2404 // empty values are omitted from API requests. However, any non-pointer, 2405 // non-interface field appearing in ForceSendFields will be sent to the 2406 // server regardless of whether the field is empty or not. This may be 2407 // used to include empty fields in Patch requests. 2408 ForceSendFields []string `json:"-"` 2409 2410 // NullFields is a list of field names (e.g. "Bottom") to include in API 2411 // requests with the JSON null value. By default, fields with empty 2412 // values are omitted from API requests. However, any field with an 2413 // empty value appearing in NullFields will be sent to the server as 2414 // null. It is an error if a field in this list has a non-empty value. 2415 // This may be used to include null fields in Patch requests. 2416 NullFields []string `json:"-"` 2417} 2418 2419func (s *Borders) MarshalJSON() ([]byte, error) { 2420 type NoMethod Borders 2421 raw := NoMethod(*s) 2422 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2423} 2424 2425// BubbleChartSpec: A <a 2426// href="/chart/interactive/docs/gallery/bubblechart">bubble chart</a>. 2427type BubbleChartSpec struct { 2428 // BubbleBorderColor: The bubble border color. 2429 BubbleBorderColor *Color `json:"bubbleBorderColor,omitempty"` 2430 2431 // BubbleLabels: The data containing the bubble labels. These do not 2432 // need to be unique. 2433 BubbleLabels *ChartData `json:"bubbleLabels,omitempty"` 2434 2435 // BubbleMaxRadiusSize: The max radius size of the bubbles, in 2436 // pixels. 2437 // If specified, the field must be a positive value. 2438 BubbleMaxRadiusSize int64 `json:"bubbleMaxRadiusSize,omitempty"` 2439 2440 // BubbleMinRadiusSize: The minimum radius size of the bubbles, in 2441 // pixels. 2442 // If specific, the field must be a positive value. 2443 BubbleMinRadiusSize int64 `json:"bubbleMinRadiusSize,omitempty"` 2444 2445 // BubbleOpacity: The opacity of the bubbles between 0 and 1.0. 2446 // 0 is fully transparent and 1 is fully opaque. 2447 BubbleOpacity float64 `json:"bubbleOpacity,omitempty"` 2448 2449 // BubbleSizes: The data contianing the bubble sizes. Bubble sizes are 2450 // used to draw 2451 // the bubbles at different sizes relative to each other. 2452 // If specified, group_ids must also be specified. This field 2453 // is 2454 // optional. 2455 BubbleSizes *ChartData `json:"bubbleSizes,omitempty"` 2456 2457 // BubbleTextStyle: The format of the text inside the bubbles. 2458 // Underline and Strikethrough are not supported. 2459 BubbleTextStyle *TextFormat `json:"bubbleTextStyle,omitempty"` 2460 2461 // Domain: The data containing the bubble x-values. These values locate 2462 // the bubbles 2463 // in the chart horizontally. 2464 Domain *ChartData `json:"domain,omitempty"` 2465 2466 // GroupIds: The data containing the bubble group IDs. All bubbles with 2467 // the same group 2468 // ID are drawn in the same color. If bubble_sizes is specified 2469 // then 2470 // this field must also be specified but may contain blank values. 2471 // This field is optional. 2472 GroupIds *ChartData `json:"groupIds,omitempty"` 2473 2474 // LegendPosition: Where the legend of the chart should be drawn. 2475 // 2476 // Possible values: 2477 // "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 2478 // use. 2479 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 2480 // chart. 2481 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 2482 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 2483 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 2484 // "NO_LEGEND" - No legend is rendered. 2485 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 2486 LegendPosition string `json:"legendPosition,omitempty"` 2487 2488 // Series: The data contianing the bubble y-values. These values locate 2489 // the bubbles 2490 // in the chart vertically. 2491 Series *ChartData `json:"series,omitempty"` 2492 2493 // ForceSendFields is a list of field names (e.g. "BubbleBorderColor") 2494 // to unconditionally include in API requests. By default, fields with 2495 // empty values are omitted from API requests. However, any non-pointer, 2496 // non-interface field appearing in ForceSendFields will be sent to the 2497 // server regardless of whether the field is empty or not. This may be 2498 // used to include empty fields in Patch requests. 2499 ForceSendFields []string `json:"-"` 2500 2501 // NullFields is a list of field names (e.g. "BubbleBorderColor") to 2502 // include in API requests with the JSON null value. By default, fields 2503 // with empty values are omitted from API requests. However, any field 2504 // with an empty value appearing in NullFields will be sent to the 2505 // server as null. It is an error if a field in this list has a 2506 // non-empty value. This may be used to include null fields in Patch 2507 // requests. 2508 NullFields []string `json:"-"` 2509} 2510 2511func (s *BubbleChartSpec) MarshalJSON() ([]byte, error) { 2512 type NoMethod BubbleChartSpec 2513 raw := NoMethod(*s) 2514 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2515} 2516 2517func (s *BubbleChartSpec) UnmarshalJSON(data []byte) error { 2518 type NoMethod BubbleChartSpec 2519 var s1 struct { 2520 BubbleOpacity gensupport.JSONFloat64 `json:"bubbleOpacity"` 2521 *NoMethod 2522 } 2523 s1.NoMethod = (*NoMethod)(s) 2524 if err := json.Unmarshal(data, &s1); err != nil { 2525 return err 2526 } 2527 s.BubbleOpacity = float64(s1.BubbleOpacity) 2528 return nil 2529} 2530 2531// CandlestickChartSpec: A <a 2532// href="/chart/interactive/docs/gallery/candlestickchart">candlestick 2533// ch 2534// art</a>. 2535type CandlestickChartSpec struct { 2536 // Data: The Candlestick chart data. 2537 // Only one CandlestickData is supported. 2538 Data []*CandlestickData `json:"data,omitempty"` 2539 2540 // Domain: The domain data (horizontal axis) for the candlestick chart. 2541 // String data 2542 // will be treated as discrete labels, other data will be treated 2543 // as 2544 // continuous values. 2545 Domain *CandlestickDomain `json:"domain,omitempty"` 2546 2547 // ForceSendFields is a list of field names (e.g. "Data") to 2548 // unconditionally include in API requests. By default, fields with 2549 // empty values are omitted from API requests. However, any non-pointer, 2550 // non-interface field appearing in ForceSendFields will be sent to the 2551 // server regardless of whether the field is empty or not. This may be 2552 // used to include empty fields in Patch requests. 2553 ForceSendFields []string `json:"-"` 2554 2555 // NullFields is a list of field names (e.g. "Data") to include in API 2556 // requests with the JSON null value. By default, fields with empty 2557 // values are omitted from API requests. However, any field with an 2558 // empty value appearing in NullFields will be sent to the server as 2559 // null. It is an error if a field in this list has a non-empty value. 2560 // This may be used to include null fields in Patch requests. 2561 NullFields []string `json:"-"` 2562} 2563 2564func (s *CandlestickChartSpec) MarshalJSON() ([]byte, error) { 2565 type NoMethod CandlestickChartSpec 2566 raw := NoMethod(*s) 2567 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2568} 2569 2570// CandlestickData: The Candlestick chart data, each containing the low, 2571// open, close, and high 2572// values for a series. 2573type CandlestickData struct { 2574 // CloseSeries: The range data (vertical axis) for the close/final value 2575 // for each candle. 2576 // This is the top of the candle body. If greater than the open value 2577 // the 2578 // candle will be filled. Otherwise the candle will be hollow. 2579 CloseSeries *CandlestickSeries `json:"closeSeries,omitempty"` 2580 2581 // HighSeries: The range data (vertical axis) for the high/maximum value 2582 // for each 2583 // candle. This is the top of the candle's center line. 2584 HighSeries *CandlestickSeries `json:"highSeries,omitempty"` 2585 2586 // LowSeries: The range data (vertical axis) for the low/minimum value 2587 // for each candle. 2588 // This is the bottom of the candle's center line. 2589 LowSeries *CandlestickSeries `json:"lowSeries,omitempty"` 2590 2591 // OpenSeries: The range data (vertical axis) for the open/initial value 2592 // for each 2593 // candle. This is the bottom of the candle body. If less than the 2594 // close 2595 // value the candle will be filled. Otherwise the candle will be 2596 // hollow. 2597 OpenSeries *CandlestickSeries `json:"openSeries,omitempty"` 2598 2599 // ForceSendFields is a list of field names (e.g. "CloseSeries") to 2600 // unconditionally include in API requests. By default, fields with 2601 // empty values are omitted from API requests. However, any non-pointer, 2602 // non-interface field appearing in ForceSendFields will be sent to the 2603 // server regardless of whether the field is empty or not. This may be 2604 // used to include empty fields in Patch requests. 2605 ForceSendFields []string `json:"-"` 2606 2607 // NullFields is a list of field names (e.g. "CloseSeries") to include 2608 // in API requests with the JSON null value. By default, fields with 2609 // empty values are omitted from API requests. However, any field with 2610 // an empty value appearing in NullFields will be sent to the server as 2611 // null. It is an error if a field in this list has a non-empty value. 2612 // This may be used to include null fields in Patch requests. 2613 NullFields []string `json:"-"` 2614} 2615 2616func (s *CandlestickData) MarshalJSON() ([]byte, error) { 2617 type NoMethod CandlestickData 2618 raw := NoMethod(*s) 2619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2620} 2621 2622// CandlestickDomain: The domain of a CandlestickChart. 2623type CandlestickDomain struct { 2624 // Data: The data of the CandlestickDomain. 2625 Data *ChartData `json:"data,omitempty"` 2626 2627 // Reversed: True to reverse the order of the domain values (horizontal 2628 // axis). 2629 Reversed bool `json:"reversed,omitempty"` 2630 2631 // ForceSendFields is a list of field names (e.g. "Data") to 2632 // unconditionally include in API requests. By default, fields with 2633 // empty values are omitted from API requests. However, any non-pointer, 2634 // non-interface field appearing in ForceSendFields will be sent to the 2635 // server regardless of whether the field is empty or not. This may be 2636 // used to include empty fields in Patch requests. 2637 ForceSendFields []string `json:"-"` 2638 2639 // NullFields is a list of field names (e.g. "Data") to include in API 2640 // requests with the JSON null value. By default, fields with empty 2641 // values are omitted from API requests. However, any field with an 2642 // empty value appearing in NullFields will be sent to the server as 2643 // null. It is an error if a field in this list has a non-empty value. 2644 // This may be used to include null fields in Patch requests. 2645 NullFields []string `json:"-"` 2646} 2647 2648func (s *CandlestickDomain) MarshalJSON() ([]byte, error) { 2649 type NoMethod CandlestickDomain 2650 raw := NoMethod(*s) 2651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2652} 2653 2654// CandlestickSeries: The series of a CandlestickData. 2655type CandlestickSeries struct { 2656 // Data: The data of the CandlestickSeries. 2657 Data *ChartData `json:"data,omitempty"` 2658 2659 // ForceSendFields is a list of field names (e.g. "Data") to 2660 // unconditionally include in API requests. By default, fields with 2661 // empty values are omitted from API requests. However, any non-pointer, 2662 // non-interface field appearing in ForceSendFields will be sent to the 2663 // server regardless of whether the field is empty or not. This may be 2664 // used to include empty fields in Patch requests. 2665 ForceSendFields []string `json:"-"` 2666 2667 // NullFields is a list of field names (e.g. "Data") to include in API 2668 // requests with the JSON null value. By default, fields with empty 2669 // values are omitted from API requests. However, any field with an 2670 // empty value appearing in NullFields will be sent to the server as 2671 // null. It is an error if a field in this list has a non-empty value. 2672 // This may be used to include null fields in Patch requests. 2673 NullFields []string `json:"-"` 2674} 2675 2676func (s *CandlestickSeries) MarshalJSON() ([]byte, error) { 2677 type NoMethod CandlestickSeries 2678 raw := NoMethod(*s) 2679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2680} 2681 2682// CellData: Data about a specific cell. 2683type CellData struct { 2684 // DataValidation: A data validation rule on the cell, if any. 2685 // 2686 // When writing, the new data validation rule will overwrite any prior 2687 // rule. 2688 DataValidation *DataValidationRule `json:"dataValidation,omitempty"` 2689 2690 // EffectiveFormat: The effective format being used by the cell. 2691 // This includes the results of applying any conditional formatting 2692 // and, 2693 // if the cell contains a formula, the computed number format. 2694 // If the effective format is the default format, effective format 2695 // will 2696 // not be written. 2697 // This field is read-only. 2698 EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"` 2699 2700 // EffectiveValue: The effective value of the cell. For cells with 2701 // formulas, this is 2702 // the calculated value. For cells with literals, this is 2703 // the same as the user_entered_value. 2704 // This field is read-only. 2705 EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"` 2706 2707 // FormattedValue: The formatted value of the cell. 2708 // This is the value as it's shown to the user. 2709 // This field is read-only. 2710 FormattedValue string `json:"formattedValue,omitempty"` 2711 2712 // Hyperlink: A hyperlink this cell points to, if any. 2713 // This field is read-only. (To set it, use a `=HYPERLINK` formula 2714 // in the userEnteredValue.formulaValue 2715 // field.) 2716 Hyperlink string `json:"hyperlink,omitempty"` 2717 2718 // Note: Any note on the cell. 2719 Note string `json:"note,omitempty"` 2720 2721 // PivotTable: A pivot table anchored at this cell. The size of pivot 2722 // table itself 2723 // is computed dynamically based on its data, grouping, filters, 2724 // values, 2725 // etc. Only the top-left cell of the pivot table contains the pivot 2726 // table 2727 // definition. The other cells will contain the calculated values of 2728 // the 2729 // results of the pivot in their effective_value fields. 2730 PivotTable *PivotTable `json:"pivotTable,omitempty"` 2731 2732 // TextFormatRuns: Runs of rich text applied to subsections of the cell. 2733 // Runs are only valid 2734 // on user entered strings, not formulas, bools, or numbers. 2735 // Runs start at specific indexes in the text and continue until the 2736 // next 2737 // run. Properties of a run will continue unless explicitly changed 2738 // in a subsequent run (and properties of the first run will 2739 // continue 2740 // the properties of the cell unless explicitly changed). 2741 // 2742 // When writing, the new runs will overwrite any prior runs. When 2743 // writing a 2744 // new user_entered_value, previous runs are erased. 2745 TextFormatRuns []*TextFormatRun `json:"textFormatRuns,omitempty"` 2746 2747 // UserEnteredFormat: The format the user entered for the cell. 2748 // 2749 // When writing, the new format will be merged with the existing format. 2750 UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"` 2751 2752 // UserEnteredValue: The value the user entered in the cell. e.g, 2753 // `1234`, `'Hello'`, or `=NOW()` 2754 // Note: Dates, Times and DateTimes are represented as doubles in 2755 // serial number format. 2756 UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"` 2757 2758 // ForceSendFields is a list of field names (e.g. "DataValidation") to 2759 // unconditionally include in API requests. By default, fields with 2760 // empty values are omitted from API requests. However, any non-pointer, 2761 // non-interface field appearing in ForceSendFields will be sent to the 2762 // server regardless of whether the field is empty or not. This may be 2763 // used to include empty fields in Patch requests. 2764 ForceSendFields []string `json:"-"` 2765 2766 // NullFields is a list of field names (e.g. "DataValidation") to 2767 // include in API requests with the JSON null value. By default, fields 2768 // with empty values are omitted from API requests. However, any field 2769 // with an empty value appearing in NullFields will be sent to the 2770 // server as null. It is an error if a field in this list has a 2771 // non-empty value. This may be used to include null fields in Patch 2772 // requests. 2773 NullFields []string `json:"-"` 2774} 2775 2776func (s *CellData) MarshalJSON() ([]byte, error) { 2777 type NoMethod CellData 2778 raw := NoMethod(*s) 2779 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2780} 2781 2782// CellFormat: The format of a cell. 2783type CellFormat struct { 2784 // BackgroundColor: The background color of the cell. 2785 BackgroundColor *Color `json:"backgroundColor,omitempty"` 2786 2787 // Borders: The borders of the cell. 2788 Borders *Borders `json:"borders,omitempty"` 2789 2790 // HorizontalAlignment: The horizontal alignment of the value in the 2791 // cell. 2792 // 2793 // Possible values: 2794 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 2795 // specified. Do not use this. 2796 // "LEFT" - The text is explicitly aligned to the left of the cell. 2797 // "CENTER" - The text is explicitly aligned to the center of the 2798 // cell. 2799 // "RIGHT" - The text is explicitly aligned to the right of the cell. 2800 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 2801 2802 // HyperlinkDisplayType: How a hyperlink, if it exists, should be 2803 // displayed in the cell. 2804 // 2805 // Possible values: 2806 // "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" - The default value: the 2807 // hyperlink is rendered. Do not use this. 2808 // "LINKED" - A hyperlink should be explicitly rendered. 2809 // "PLAIN_TEXT" - A hyperlink should not be rendered. 2810 HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"` 2811 2812 // NumberFormat: A format describing how number values should be 2813 // represented to the user. 2814 NumberFormat *NumberFormat `json:"numberFormat,omitempty"` 2815 2816 // Padding: The padding of the cell. 2817 Padding *Padding `json:"padding,omitempty"` 2818 2819 // TextDirection: The direction of the text in the cell. 2820 // 2821 // Possible values: 2822 // "TEXT_DIRECTION_UNSPECIFIED" - The text direction is not specified. 2823 // Do not use this. 2824 // "LEFT_TO_RIGHT" - The text direction of left-to-right was set by 2825 // the user. 2826 // "RIGHT_TO_LEFT" - The text direction of right-to-left was set by 2827 // the user. 2828 TextDirection string `json:"textDirection,omitempty"` 2829 2830 // TextFormat: The format of the text in the cell (unless overridden by 2831 // a format run). 2832 TextFormat *TextFormat `json:"textFormat,omitempty"` 2833 2834 // TextRotation: The rotation applied to text in a cell 2835 TextRotation *TextRotation `json:"textRotation,omitempty"` 2836 2837 // VerticalAlignment: The vertical alignment of the value in the cell. 2838 // 2839 // Possible values: 2840 // "VERTICAL_ALIGN_UNSPECIFIED" - The vertical alignment is not 2841 // specified. Do not use this. 2842 // "TOP" - The text is explicitly aligned to the top of the cell. 2843 // "MIDDLE" - The text is explicitly aligned to the middle of the 2844 // cell. 2845 // "BOTTOM" - The text is explicitly aligned to the bottom of the 2846 // cell. 2847 VerticalAlignment string `json:"verticalAlignment,omitempty"` 2848 2849 // WrapStrategy: The wrap strategy for the value in the cell. 2850 // 2851 // Possible values: 2852 // "WRAP_STRATEGY_UNSPECIFIED" - The default value, do not use. 2853 // "OVERFLOW_CELL" - Lines that are longer than the cell width will be 2854 // written in the next 2855 // cell over, so long as that cell is empty. If the next cell over 2856 // is 2857 // non-empty, this behaves the same as CLIP. The text will never wrap 2858 // to the next line unless the user manually inserts a new 2859 // line. 2860 // Example: 2861 // 2862 // | First sentence. | 2863 // | Manual newline that is very long. <- Text continues into next 2864 // cell 2865 // | Next newline. | 2866 // "LEGACY_WRAP" - This wrap strategy represents the old Google Sheets 2867 // wrap strategy where 2868 // words that are longer than a line are clipped rather than broken. 2869 // This 2870 // strategy is not supported on all platforms and is being phased 2871 // out. 2872 // Example: 2873 // 2874 // | Cell has a | 2875 // | loooooooooo| <- Word is clipped. 2876 // | word. | 2877 // "CLIP" - Lines that are longer than the cell width will be 2878 // clipped. 2879 // The text will never wrap to the next line unless the user 2880 // manually 2881 // inserts a new line. 2882 // Example: 2883 // 2884 // | First sentence. | 2885 // | Manual newline t| <- Text is clipped 2886 // | Next newline. | 2887 // "WRAP" - Words that are longer than a line are wrapped at the 2888 // character level 2889 // rather than clipped. 2890 // Example: 2891 // 2892 // | Cell has a | 2893 // | loooooooooo| <- Word is broken. 2894 // | ong word. | 2895 WrapStrategy string `json:"wrapStrategy,omitempty"` 2896 2897 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 2898 // unconditionally include in API requests. By default, fields with 2899 // empty values are omitted from API requests. However, any non-pointer, 2900 // non-interface field appearing in ForceSendFields will be sent to the 2901 // server regardless of whether the field is empty or not. This may be 2902 // used to include empty fields in Patch requests. 2903 ForceSendFields []string `json:"-"` 2904 2905 // NullFields is a list of field names (e.g. "BackgroundColor") to 2906 // include in API requests with the JSON null value. By default, fields 2907 // with empty values are omitted from API requests. However, any field 2908 // with an empty value appearing in NullFields will be sent to the 2909 // server as null. It is an error if a field in this list has a 2910 // non-empty value. This may be used to include null fields in Patch 2911 // requests. 2912 NullFields []string `json:"-"` 2913} 2914 2915func (s *CellFormat) MarshalJSON() ([]byte, error) { 2916 type NoMethod CellFormat 2917 raw := NoMethod(*s) 2918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2919} 2920 2921// ChartData: The data included in a domain or series. 2922type ChartData struct { 2923 // SourceRange: The source ranges of the data. 2924 SourceRange *ChartSourceRange `json:"sourceRange,omitempty"` 2925 2926 // ForceSendFields is a list of field names (e.g. "SourceRange") to 2927 // unconditionally include in API requests. By default, fields with 2928 // empty values are omitted from API requests. However, any non-pointer, 2929 // non-interface field appearing in ForceSendFields will be sent to the 2930 // server regardless of whether the field is empty or not. This may be 2931 // used to include empty fields in Patch requests. 2932 ForceSendFields []string `json:"-"` 2933 2934 // NullFields is a list of field names (e.g. "SourceRange") to include 2935 // in API requests with the JSON null value. By default, fields with 2936 // empty values are omitted from API requests. However, any field with 2937 // an empty value appearing in NullFields will be sent to the server as 2938 // null. It is an error if a field in this list has a non-empty value. 2939 // This may be used to include null fields in Patch requests. 2940 NullFields []string `json:"-"` 2941} 2942 2943func (s *ChartData) MarshalJSON() ([]byte, error) { 2944 type NoMethod ChartData 2945 raw := NoMethod(*s) 2946 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2947} 2948 2949// ChartSourceRange: Source ranges for a chart. 2950type ChartSourceRange struct { 2951 // Sources: The ranges of data for a series or domain. 2952 // Exactly one dimension must have a length of 1, 2953 // and all sources in the list must have the same dimension 2954 // with length 1. 2955 // The domain (if it exists) & all series must have the same number 2956 // of source ranges. If using more than one source range, then the 2957 // source 2958 // range at a given offset must be in order and contiguous across the 2959 // domain 2960 // and series. 2961 // 2962 // For example, these are valid configurations: 2963 // 2964 // domain sources: A1:A5 2965 // series1 sources: B1:B5 2966 // series2 sources: D6:D10 2967 // 2968 // domain sources: A1:A5, C10:C12 2969 // series1 sources: B1:B5, D10:D12 2970 // series2 sources: C1:C5, E10:E12 2971 Sources []*GridRange `json:"sources,omitempty"` 2972 2973 // ForceSendFields is a list of field names (e.g. "Sources") to 2974 // unconditionally include in API requests. By default, fields with 2975 // empty values are omitted from API requests. However, any non-pointer, 2976 // non-interface field appearing in ForceSendFields will be sent to the 2977 // server regardless of whether the field is empty or not. This may be 2978 // used to include empty fields in Patch requests. 2979 ForceSendFields []string `json:"-"` 2980 2981 // NullFields is a list of field names (e.g. "Sources") to include in 2982 // API requests with the JSON null value. By default, fields with empty 2983 // values are omitted from API requests. However, any field with an 2984 // empty value appearing in NullFields will be sent to the server as 2985 // null. It is an error if a field in this list has a non-empty value. 2986 // This may be used to include null fields in Patch requests. 2987 NullFields []string `json:"-"` 2988} 2989 2990func (s *ChartSourceRange) MarshalJSON() ([]byte, error) { 2991 type NoMethod ChartSourceRange 2992 raw := NoMethod(*s) 2993 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2994} 2995 2996// ChartSpec: The specifications of a chart. 2997type ChartSpec struct { 2998 // AltText: The alternative text that describes the chart. This is 2999 // often used 3000 // for accessibility. 3001 AltText string `json:"altText,omitempty"` 3002 3003 // BackgroundColor: The background color of the entire chart. 3004 // Not applicable to Org charts. 3005 BackgroundColor *Color `json:"backgroundColor,omitempty"` 3006 3007 // BasicChart: A basic chart specification, can be one of many kinds of 3008 // charts. 3009 // See BasicChartType for the list of all 3010 // charts this supports. 3011 BasicChart *BasicChartSpec `json:"basicChart,omitempty"` 3012 3013 // BubbleChart: A bubble chart specification. 3014 BubbleChart *BubbleChartSpec `json:"bubbleChart,omitempty"` 3015 3016 // CandlestickChart: A candlestick chart specification. 3017 CandlestickChart *CandlestickChartSpec `json:"candlestickChart,omitempty"` 3018 3019 // FontName: The name of the font to use by default for all chart text 3020 // (e.g. title, 3021 // axis labels, legend). If a font is specified for a specific part of 3022 // the 3023 // chart it will override this font name. 3024 FontName string `json:"fontName,omitempty"` 3025 3026 // HiddenDimensionStrategy: Determines how the charts will use hidden 3027 // rows or columns. 3028 // 3029 // Possible values: 3030 // "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" - Default value, do 3031 // not use. 3032 // "SKIP_HIDDEN_ROWS_AND_COLUMNS" - Charts will skip hidden rows and 3033 // columns. 3034 // "SKIP_HIDDEN_ROWS" - Charts will skip hidden rows only. 3035 // "SKIP_HIDDEN_COLUMNS" - Charts will skip hidden columns only. 3036 // "SHOW_ALL" - Charts will not skip any hidden rows or columns. 3037 HiddenDimensionStrategy string `json:"hiddenDimensionStrategy,omitempty"` 3038 3039 // HistogramChart: A histogram chart specification. 3040 HistogramChart *HistogramChartSpec `json:"histogramChart,omitempty"` 3041 3042 // Maximized: True to make a chart fill the entire space in which it's 3043 // rendered with 3044 // minimum padding. False to use the default padding. 3045 // (Not applicable to Geo and Org charts.) 3046 Maximized bool `json:"maximized,omitempty"` 3047 3048 // OrgChart: An org chart specification. 3049 OrgChart *OrgChartSpec `json:"orgChart,omitempty"` 3050 3051 // PieChart: A pie chart specification. 3052 PieChart *PieChartSpec `json:"pieChart,omitempty"` 3053 3054 // Subtitle: The subtitle of the chart. 3055 Subtitle string `json:"subtitle,omitempty"` 3056 3057 // SubtitleTextFormat: The subtitle text format. 3058 // Strikethrough and underline are not supported. 3059 SubtitleTextFormat *TextFormat `json:"subtitleTextFormat,omitempty"` 3060 3061 // SubtitleTextPosition: The subtitle text position. 3062 // This field is optional. 3063 SubtitleTextPosition *TextPosition `json:"subtitleTextPosition,omitempty"` 3064 3065 // Title: The title of the chart. 3066 Title string `json:"title,omitempty"` 3067 3068 // TitleTextFormat: The title text format. 3069 // Strikethrough and underline are not supported. 3070 TitleTextFormat *TextFormat `json:"titleTextFormat,omitempty"` 3071 3072 // TitleTextPosition: The title text position. 3073 // This field is optional. 3074 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 3075 3076 // TreemapChart: A treemap chart specification. 3077 TreemapChart *TreemapChartSpec `json:"treemapChart,omitempty"` 3078 3079 // WaterfallChart: A waterfall chart specification. 3080 WaterfallChart *WaterfallChartSpec `json:"waterfallChart,omitempty"` 3081 3082 // ForceSendFields is a list of field names (e.g. "AltText") to 3083 // unconditionally include in API requests. By default, fields with 3084 // empty values are omitted from API requests. However, any non-pointer, 3085 // non-interface field appearing in ForceSendFields will be sent to the 3086 // server regardless of whether the field is empty or not. This may be 3087 // used to include empty fields in Patch requests. 3088 ForceSendFields []string `json:"-"` 3089 3090 // NullFields is a list of field names (e.g. "AltText") to include in 3091 // API requests with the JSON null value. By default, fields with empty 3092 // values are omitted from API requests. However, any field with an 3093 // empty value appearing in NullFields will be sent to the server as 3094 // null. It is an error if a field in this list has a non-empty value. 3095 // This may be used to include null fields in Patch requests. 3096 NullFields []string `json:"-"` 3097} 3098 3099func (s *ChartSpec) MarshalJSON() ([]byte, error) { 3100 type NoMethod ChartSpec 3101 raw := NoMethod(*s) 3102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3103} 3104 3105// ClearBasicFilterRequest: Clears the basic filter, if any exists on 3106// the sheet. 3107type ClearBasicFilterRequest struct { 3108 // SheetId: The sheet ID on which the basic filter should be cleared. 3109 SheetId int64 `json:"sheetId,omitempty"` 3110 3111 // ForceSendFields is a list of field names (e.g. "SheetId") to 3112 // unconditionally include in API requests. By default, fields with 3113 // empty values are omitted from API requests. However, any non-pointer, 3114 // non-interface field appearing in ForceSendFields will be sent to the 3115 // server regardless of whether the field is empty or not. This may be 3116 // used to include empty fields in Patch requests. 3117 ForceSendFields []string `json:"-"` 3118 3119 // NullFields is a list of field names (e.g. "SheetId") to include in 3120 // API requests with the JSON null value. By default, fields with empty 3121 // values are omitted from API requests. However, any field with an 3122 // empty value appearing in NullFields will be sent to the server as 3123 // null. It is an error if a field in this list has a non-empty value. 3124 // This may be used to include null fields in Patch requests. 3125 NullFields []string `json:"-"` 3126} 3127 3128func (s *ClearBasicFilterRequest) MarshalJSON() ([]byte, error) { 3129 type NoMethod ClearBasicFilterRequest 3130 raw := NoMethod(*s) 3131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3132} 3133 3134// ClearValuesRequest: The request for clearing a range of values in a 3135// spreadsheet. 3136type ClearValuesRequest struct { 3137} 3138 3139// ClearValuesResponse: The response when clearing a range of values in 3140// a spreadsheet. 3141type ClearValuesResponse struct { 3142 // ClearedRange: The range (in A1 notation) that was cleared. 3143 // (If the request was for an unbounded range or a ranger larger 3144 // than the bounds of the sheet, this will be the actual range 3145 // that was cleared, bounded to the sheet's limits.) 3146 ClearedRange string `json:"clearedRange,omitempty"` 3147 3148 // SpreadsheetId: The spreadsheet the updates were applied to. 3149 SpreadsheetId string `json:"spreadsheetId,omitempty"` 3150 3151 // ServerResponse contains the HTTP response code and headers from the 3152 // server. 3153 googleapi.ServerResponse `json:"-"` 3154 3155 // ForceSendFields is a list of field names (e.g. "ClearedRange") to 3156 // unconditionally include in API requests. By default, fields with 3157 // empty values are omitted from API requests. However, any non-pointer, 3158 // non-interface field appearing in ForceSendFields will be sent to the 3159 // server regardless of whether the field is empty or not. This may be 3160 // used to include empty fields in Patch requests. 3161 ForceSendFields []string `json:"-"` 3162 3163 // NullFields is a list of field names (e.g. "ClearedRange") to include 3164 // in API requests with the JSON null value. By default, fields with 3165 // empty values are omitted from API requests. However, any field with 3166 // an empty value appearing in NullFields will be sent to the server as 3167 // null. It is an error if a field in this list has a non-empty value. 3168 // This may be used to include null fields in Patch requests. 3169 NullFields []string `json:"-"` 3170} 3171 3172func (s *ClearValuesResponse) MarshalJSON() ([]byte, error) { 3173 type NoMethod ClearValuesResponse 3174 raw := NoMethod(*s) 3175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3176} 3177 3178// Color: Represents a color in the RGBA color space. This 3179// representation is designed 3180// for simplicity of conversion to/from color representations in 3181// various 3182// languages over compactness; for example, the fields of this 3183// representation 3184// can be trivially provided to the constructor of "java.awt.Color" in 3185// Java; it 3186// can also be trivially provided to UIColor's 3187// "+colorWithRed:green:blue:alpha" 3188// method in iOS; and, with just a little work, it can be easily 3189// formatted into 3190// a CSS "rgba()" string in JavaScript, as well. 3191// 3192// Note: this proto does not carry information about the absolute color 3193// space 3194// that should be used to interpret the RGB value (e.g. sRGB, Adobe 3195// RGB, 3196// DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the 3197// sRGB color 3198// space. 3199// 3200// Example (Java): 3201// 3202// import com.google.type.Color; 3203// 3204// // ... 3205// public static java.awt.Color fromProto(Color protocolor) { 3206// float alpha = protocolor.hasAlpha() 3207// ? protocolor.getAlpha().getValue() 3208// : 1.0; 3209// 3210// return new java.awt.Color( 3211// protocolor.getRed(), 3212// protocolor.getGreen(), 3213// protocolor.getBlue(), 3214// alpha); 3215// } 3216// 3217// public static Color toProto(java.awt.Color color) { 3218// float red = (float) color.getRed(); 3219// float green = (float) color.getGreen(); 3220// float blue = (float) color.getBlue(); 3221// float denominator = 255.0; 3222// Color.Builder resultBuilder = 3223// Color 3224// .newBuilder() 3225// .setRed(red / denominator) 3226// .setGreen(green / denominator) 3227// .setBlue(blue / denominator); 3228// int alpha = color.getAlpha(); 3229// if (alpha != 255) { 3230// result.setAlpha( 3231// FloatValue 3232// .newBuilder() 3233// .setValue(((float) alpha) / denominator) 3234// .build()); 3235// } 3236// return resultBuilder.build(); 3237// } 3238// // ... 3239// 3240// Example (iOS / Obj-C): 3241// 3242// // ... 3243// static UIColor* fromProto(Color* protocolor) { 3244// float red = [protocolor red]; 3245// float green = [protocolor green]; 3246// float blue = [protocolor blue]; 3247// FloatValue* alpha_wrapper = [protocolor alpha]; 3248// float alpha = 1.0; 3249// if (alpha_wrapper != nil) { 3250// alpha = [alpha_wrapper value]; 3251// } 3252// return [UIColor colorWithRed:red green:green blue:blue 3253// alpha:alpha]; 3254// } 3255// 3256// static Color* toProto(UIColor* color) { 3257// CGFloat red, green, blue, alpha; 3258// if (![color getRed:&red green:&green blue:&blue 3259// alpha:&alpha]) { 3260// return nil; 3261// } 3262// Color* result = [[Color alloc] init]; 3263// [result setRed:red]; 3264// [result setGreen:green]; 3265// [result setBlue:blue]; 3266// if (alpha <= 0.9999) { 3267// [result setAlpha:floatWrapperWithValue(alpha)]; 3268// } 3269// [result autorelease]; 3270// return result; 3271// } 3272// // ... 3273// 3274// Example (JavaScript): 3275// 3276// // ... 3277// 3278// var protoToCssColor = function(rgb_color) { 3279// var redFrac = rgb_color.red || 0.0; 3280// var greenFrac = rgb_color.green || 0.0; 3281// var blueFrac = rgb_color.blue || 0.0; 3282// var red = Math.floor(redFrac * 255); 3283// var green = Math.floor(greenFrac * 255); 3284// var blue = Math.floor(blueFrac * 255); 3285// 3286// if (!('alpha' in rgb_color)) { 3287// return rgbToCssColor_(red, green, blue); 3288// } 3289// 3290// var alphaFrac = rgb_color.alpha.value || 0.0; 3291// var rgbParams = [red, green, blue].join(','); 3292// return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); 3293// }; 3294// 3295// var rgbToCssColor_ = function(red, green, blue) { 3296// var rgbNumber = new Number((red << 16) | (green << 8) | blue); 3297// var hexString = rgbNumber.toString(16); 3298// var missingZeros = 6 - hexString.length; 3299// var resultBuilder = ['#']; 3300// for (var i = 0; i < missingZeros; i++) { 3301// resultBuilder.push('0'); 3302// } 3303// resultBuilder.push(hexString); 3304// return resultBuilder.join(''); 3305// }; 3306// 3307// // ... 3308type Color struct { 3309 // Alpha: The fraction of this color that should be applied to the 3310 // pixel. That is, 3311 // the final pixel color is defined by the equation: 3312 // 3313 // pixel color = alpha * (this color) + (1.0 - alpha) * (background 3314 // color) 3315 // 3316 // This means that a value of 1.0 corresponds to a solid color, 3317 // whereas 3318 // a value of 0.0 corresponds to a completely transparent color. 3319 // This 3320 // uses a wrapper message rather than a simple float scalar so that it 3321 // is 3322 // possible to distinguish between a default value and the value being 3323 // unset. 3324 // If omitted, this color object is to be rendered as a solid color 3325 // (as if the alpha value had been explicitly given with a value of 3326 // 1.0). 3327 Alpha float64 `json:"alpha,omitempty"` 3328 3329 // Blue: The amount of blue in the color as a value in the interval [0, 3330 // 1]. 3331 Blue float64 `json:"blue,omitempty"` 3332 3333 // Green: The amount of green in the color as a value in the interval 3334 // [0, 1]. 3335 Green float64 `json:"green,omitempty"` 3336 3337 // Red: The amount of red in the color as a value in the interval [0, 3338 // 1]. 3339 Red float64 `json:"red,omitempty"` 3340 3341 // ForceSendFields is a list of field names (e.g. "Alpha") to 3342 // unconditionally include in API requests. By default, fields with 3343 // empty values are omitted from API requests. However, any non-pointer, 3344 // non-interface field appearing in ForceSendFields will be sent to the 3345 // server regardless of whether the field is empty or not. This may be 3346 // used to include empty fields in Patch requests. 3347 ForceSendFields []string `json:"-"` 3348 3349 // NullFields is a list of field names (e.g. "Alpha") to include in API 3350 // requests with the JSON null value. By default, fields with empty 3351 // values are omitted from API requests. However, any field with an 3352 // empty value appearing in NullFields will be sent to the server as 3353 // null. It is an error if a field in this list has a non-empty value. 3354 // This may be used to include null fields in Patch requests. 3355 NullFields []string `json:"-"` 3356} 3357 3358func (s *Color) MarshalJSON() ([]byte, error) { 3359 type NoMethod Color 3360 raw := NoMethod(*s) 3361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3362} 3363 3364func (s *Color) UnmarshalJSON(data []byte) error { 3365 type NoMethod Color 3366 var s1 struct { 3367 Alpha gensupport.JSONFloat64 `json:"alpha"` 3368 Blue gensupport.JSONFloat64 `json:"blue"` 3369 Green gensupport.JSONFloat64 `json:"green"` 3370 Red gensupport.JSONFloat64 `json:"red"` 3371 *NoMethod 3372 } 3373 s1.NoMethod = (*NoMethod)(s) 3374 if err := json.Unmarshal(data, &s1); err != nil { 3375 return err 3376 } 3377 s.Alpha = float64(s1.Alpha) 3378 s.Blue = float64(s1.Blue) 3379 s.Green = float64(s1.Green) 3380 s.Red = float64(s1.Red) 3381 return nil 3382} 3383 3384// ConditionValue: The value of the condition. 3385type ConditionValue struct { 3386 // RelativeDate: A relative date (based on the current date). 3387 // Valid only if the type is 3388 // DATE_BEFORE, 3389 // DATE_AFTER, 3390 // DATE_ON_OR_BEFORE or 3391 // DATE_ON_OR_AFTER. 3392 // 3393 // Relative dates are not supported in data validation. 3394 // They are supported only in conditional formatting and 3395 // conditional filters. 3396 // 3397 // Possible values: 3398 // "RELATIVE_DATE_UNSPECIFIED" - Default value, do not use. 3399 // "PAST_YEAR" - The value is one year before today. 3400 // "PAST_MONTH" - The value is one month before today. 3401 // "PAST_WEEK" - The value is one week before today. 3402 // "YESTERDAY" - The value is yesterday. 3403 // "TODAY" - The value is today. 3404 // "TOMORROW" - The value is tomorrow. 3405 RelativeDate string `json:"relativeDate,omitempty"` 3406 3407 // UserEnteredValue: A value the condition is based on. 3408 // The value is parsed as if the user typed into a cell. 3409 // Formulas are supported (and must begin with an `=` or a '+'). 3410 UserEnteredValue string `json:"userEnteredValue,omitempty"` 3411 3412 // ForceSendFields is a list of field names (e.g. "RelativeDate") to 3413 // unconditionally include in API requests. By default, fields with 3414 // empty values are omitted from API requests. However, any non-pointer, 3415 // non-interface field appearing in ForceSendFields will be sent to the 3416 // server regardless of whether the field is empty or not. This may be 3417 // used to include empty fields in Patch requests. 3418 ForceSendFields []string `json:"-"` 3419 3420 // NullFields is a list of field names (e.g. "RelativeDate") to include 3421 // in API requests with the JSON null value. By default, fields with 3422 // empty values are omitted from API requests. However, any field with 3423 // an empty value appearing in NullFields will be sent to the server as 3424 // null. It is an error if a field in this list has a non-empty value. 3425 // This may be used to include null fields in Patch requests. 3426 NullFields []string `json:"-"` 3427} 3428 3429func (s *ConditionValue) MarshalJSON() ([]byte, error) { 3430 type NoMethod ConditionValue 3431 raw := NoMethod(*s) 3432 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3433} 3434 3435// ConditionalFormatRule: A rule describing a conditional format. 3436type ConditionalFormatRule struct { 3437 // BooleanRule: The formatting is either "on" or "off" according to the 3438 // rule. 3439 BooleanRule *BooleanRule `json:"booleanRule,omitempty"` 3440 3441 // GradientRule: The formatting will vary based on the gradients in the 3442 // rule. 3443 GradientRule *GradientRule `json:"gradientRule,omitempty"` 3444 3445 // Ranges: The ranges that are formatted if the condition is true. 3446 // All the ranges must be on the same grid. 3447 Ranges []*GridRange `json:"ranges,omitempty"` 3448 3449 // ForceSendFields is a list of field names (e.g. "BooleanRule") to 3450 // unconditionally include in API requests. By default, fields with 3451 // empty values are omitted from API requests. However, any non-pointer, 3452 // non-interface field appearing in ForceSendFields will be sent to the 3453 // server regardless of whether the field is empty or not. This may be 3454 // used to include empty fields in Patch requests. 3455 ForceSendFields []string `json:"-"` 3456 3457 // NullFields is a list of field names (e.g. "BooleanRule") to include 3458 // in API requests with the JSON null value. By default, fields with 3459 // empty values are omitted from API requests. However, any field with 3460 // an empty value appearing in NullFields will be sent to the server as 3461 // null. It is an error if a field in this list has a non-empty value. 3462 // This may be used to include null fields in Patch requests. 3463 NullFields []string `json:"-"` 3464} 3465 3466func (s *ConditionalFormatRule) MarshalJSON() ([]byte, error) { 3467 type NoMethod ConditionalFormatRule 3468 raw := NoMethod(*s) 3469 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3470} 3471 3472// CopyPasteRequest: Copies data from the source to the destination. 3473type CopyPasteRequest struct { 3474 // Destination: The location to paste to. If the range covers a span 3475 // that's 3476 // a multiple of the source's height or width, then the 3477 // data will be repeated to fill in the destination range. 3478 // If the range is smaller than the source range, the entire 3479 // source data will still be copied (beyond the end of the destination 3480 // range). 3481 Destination *GridRange `json:"destination,omitempty"` 3482 3483 // PasteOrientation: How that data should be oriented when pasting. 3484 // 3485 // Possible values: 3486 // "NORMAL" - Paste normally. 3487 // "TRANSPOSE" - Paste transposed, where all rows become columns and 3488 // vice versa. 3489 PasteOrientation string `json:"pasteOrientation,omitempty"` 3490 3491 // PasteType: What kind of data to paste. 3492 // 3493 // Possible values: 3494 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3495 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3496 // or merges. 3497 // "PASTE_FORMAT" - Paste the format and data validation only. 3498 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 3499 // "PASTE_FORMULA" - Paste the formulas only. 3500 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3501 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3502 // rules only. 3503 PasteType string `json:"pasteType,omitempty"` 3504 3505 // Source: The source range to copy. 3506 Source *GridRange `json:"source,omitempty"` 3507 3508 // ForceSendFields is a list of field names (e.g. "Destination") to 3509 // unconditionally include in API requests. By default, fields with 3510 // empty values are omitted from API requests. However, any non-pointer, 3511 // non-interface field appearing in ForceSendFields will be sent to the 3512 // server regardless of whether the field is empty or not. This may be 3513 // used to include empty fields in Patch requests. 3514 ForceSendFields []string `json:"-"` 3515 3516 // NullFields is a list of field names (e.g. "Destination") to include 3517 // in API requests with the JSON null value. By default, fields with 3518 // empty values are omitted from API requests. However, any field with 3519 // an empty value appearing in NullFields will be sent to the server as 3520 // null. It is an error if a field in this list has a non-empty value. 3521 // This may be used to include null fields in Patch requests. 3522 NullFields []string `json:"-"` 3523} 3524 3525func (s *CopyPasteRequest) MarshalJSON() ([]byte, error) { 3526 type NoMethod CopyPasteRequest 3527 raw := NoMethod(*s) 3528 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3529} 3530 3531// CopySheetToAnotherSpreadsheetRequest: The request to copy a sheet 3532// across spreadsheets. 3533type CopySheetToAnotherSpreadsheetRequest struct { 3534 // DestinationSpreadsheetId: The ID of the spreadsheet to copy the sheet 3535 // to. 3536 DestinationSpreadsheetId string `json:"destinationSpreadsheetId,omitempty"` 3537 3538 // ForceSendFields is a list of field names (e.g. 3539 // "DestinationSpreadsheetId") to unconditionally include in API 3540 // requests. By default, fields with empty values are omitted from API 3541 // requests. However, any non-pointer, non-interface field appearing in 3542 // ForceSendFields will be sent to the server regardless of whether the 3543 // field is empty or not. This may be used to include empty fields in 3544 // Patch requests. 3545 ForceSendFields []string `json:"-"` 3546 3547 // NullFields is a list of field names (e.g. "DestinationSpreadsheetId") 3548 // to include in API requests with the JSON null value. By default, 3549 // fields with empty values are omitted from API requests. However, any 3550 // field with an empty value appearing in NullFields will be sent to the 3551 // server as null. It is an error if a field in this list has a 3552 // non-empty value. This may be used to include null fields in Patch 3553 // requests. 3554 NullFields []string `json:"-"` 3555} 3556 3557func (s *CopySheetToAnotherSpreadsheetRequest) MarshalJSON() ([]byte, error) { 3558 type NoMethod CopySheetToAnotherSpreadsheetRequest 3559 raw := NoMethod(*s) 3560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3561} 3562 3563// CreateDeveloperMetadataRequest: A request to create developer 3564// metadata. 3565type CreateDeveloperMetadataRequest struct { 3566 // DeveloperMetadata: The developer metadata to create. 3567 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3568 3569 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3570 // to unconditionally include in API requests. By default, fields with 3571 // empty values are omitted from API requests. However, any non-pointer, 3572 // non-interface field appearing in ForceSendFields will be sent to the 3573 // server regardless of whether the field is empty or not. This may be 3574 // used to include empty fields in Patch requests. 3575 ForceSendFields []string `json:"-"` 3576 3577 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3578 // include in API requests with the JSON null value. By default, fields 3579 // with empty values are omitted from API requests. However, any field 3580 // with an empty value appearing in NullFields will be sent to the 3581 // server as null. It is an error if a field in this list has a 3582 // non-empty value. This may be used to include null fields in Patch 3583 // requests. 3584 NullFields []string `json:"-"` 3585} 3586 3587func (s *CreateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 3588 type NoMethod CreateDeveloperMetadataRequest 3589 raw := NoMethod(*s) 3590 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3591} 3592 3593// CreateDeveloperMetadataResponse: The response from creating developer 3594// metadata. 3595type CreateDeveloperMetadataResponse struct { 3596 // DeveloperMetadata: The developer metadata that was created. 3597 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3598 3599 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3600 // to unconditionally include in API requests. By default, fields with 3601 // empty values are omitted from API requests. However, any non-pointer, 3602 // non-interface field appearing in ForceSendFields will be sent to the 3603 // server regardless of whether the field is empty or not. This may be 3604 // used to include empty fields in Patch requests. 3605 ForceSendFields []string `json:"-"` 3606 3607 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3608 // include in API requests with the JSON null value. By default, fields 3609 // with empty values are omitted from API requests. However, any field 3610 // with an empty value appearing in NullFields will be sent to the 3611 // server as null. It is an error if a field in this list has a 3612 // non-empty value. This may be used to include null fields in Patch 3613 // requests. 3614 NullFields []string `json:"-"` 3615} 3616 3617func (s *CreateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 3618 type NoMethod CreateDeveloperMetadataResponse 3619 raw := NoMethod(*s) 3620 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3621} 3622 3623// CutPasteRequest: Moves data from the source to the destination. 3624type CutPasteRequest struct { 3625 // Destination: The top-left coordinate where the data should be pasted. 3626 Destination *GridCoordinate `json:"destination,omitempty"` 3627 3628 // PasteType: What kind of data to paste. All the source data will be 3629 // cut, regardless 3630 // of what is pasted. 3631 // 3632 // Possible values: 3633 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3634 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3635 // or merges. 3636 // "PASTE_FORMAT" - Paste the format and data validation only. 3637 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 3638 // "PASTE_FORMULA" - Paste the formulas only. 3639 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3640 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3641 // rules only. 3642 PasteType string `json:"pasteType,omitempty"` 3643 3644 // Source: The source data to cut. 3645 Source *GridRange `json:"source,omitempty"` 3646 3647 // ForceSendFields is a list of field names (e.g. "Destination") to 3648 // unconditionally include in API requests. By default, fields with 3649 // empty values are omitted from API requests. However, any non-pointer, 3650 // non-interface field appearing in ForceSendFields will be sent to the 3651 // server regardless of whether the field is empty or not. This may be 3652 // used to include empty fields in Patch requests. 3653 ForceSendFields []string `json:"-"` 3654 3655 // NullFields is a list of field names (e.g. "Destination") to include 3656 // in API requests with the JSON null value. By default, fields with 3657 // empty values are omitted from API requests. However, any field with 3658 // an empty value appearing in NullFields will be sent to the server as 3659 // null. It is an error if a field in this list has a non-empty value. 3660 // This may be used to include null fields in Patch requests. 3661 NullFields []string `json:"-"` 3662} 3663 3664func (s *CutPasteRequest) MarshalJSON() ([]byte, error) { 3665 type NoMethod CutPasteRequest 3666 raw := NoMethod(*s) 3667 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3668} 3669 3670// DataFilter: Filter that describes what data should be selected or 3671// returned from a 3672// request. 3673type DataFilter struct { 3674 // A1Range: Selects data that matches the specified A1 range. 3675 A1Range string `json:"a1Range,omitempty"` 3676 3677 // DeveloperMetadataLookup: Selects data associated with the developer 3678 // metadata matching the criteria 3679 // described by this DeveloperMetadataLookup. 3680 DeveloperMetadataLookup *DeveloperMetadataLookup `json:"developerMetadataLookup,omitempty"` 3681 3682 // GridRange: Selects data that matches the range described by the 3683 // GridRange. 3684 GridRange *GridRange `json:"gridRange,omitempty"` 3685 3686 // ForceSendFields is a list of field names (e.g. "A1Range") to 3687 // unconditionally include in API requests. By default, fields with 3688 // empty values are omitted from API requests. However, any non-pointer, 3689 // non-interface field appearing in ForceSendFields will be sent to the 3690 // server regardless of whether the field is empty or not. This may be 3691 // used to include empty fields in Patch requests. 3692 ForceSendFields []string `json:"-"` 3693 3694 // NullFields is a list of field names (e.g. "A1Range") to include in 3695 // API requests with the JSON null value. By default, fields with empty 3696 // values are omitted from API requests. However, any field with an 3697 // empty value appearing in NullFields will be sent to the server as 3698 // null. It is an error if a field in this list has a non-empty value. 3699 // This may be used to include null fields in Patch requests. 3700 NullFields []string `json:"-"` 3701} 3702 3703func (s *DataFilter) MarshalJSON() ([]byte, error) { 3704 type NoMethod DataFilter 3705 raw := NoMethod(*s) 3706 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3707} 3708 3709// DataFilterValueRange: A range of values whose location is specified 3710// by a DataFilter. 3711type DataFilterValueRange struct { 3712 // DataFilter: The data filter describing the location of the values in 3713 // the spreadsheet. 3714 DataFilter *DataFilter `json:"dataFilter,omitempty"` 3715 3716 // MajorDimension: The major dimension of the values. 3717 // 3718 // Possible values: 3719 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 3720 // "ROWS" - Operates on the rows of a sheet. 3721 // "COLUMNS" - Operates on the columns of a sheet. 3722 MajorDimension string `json:"majorDimension,omitempty"` 3723 3724 // Values: The data to be written. If the provided values exceed any of 3725 // the ranges 3726 // matched by the data filter then the request will fail. If the 3727 // provided 3728 // values are less than the matched ranges only the specified values 3729 // will be 3730 // written, existing values in the matched ranges will remain 3731 // unaffected. 3732 Values [][]interface{} `json:"values,omitempty"` 3733 3734 // ForceSendFields is a list of field names (e.g. "DataFilter") to 3735 // unconditionally include in API requests. By default, fields with 3736 // empty values are omitted from API requests. However, any non-pointer, 3737 // non-interface field appearing in ForceSendFields will be sent to the 3738 // server regardless of whether the field is empty or not. This may be 3739 // used to include empty fields in Patch requests. 3740 ForceSendFields []string `json:"-"` 3741 3742 // NullFields is a list of field names (e.g. "DataFilter") to include in 3743 // API requests with the JSON null value. By default, fields with empty 3744 // values are omitted from API requests. However, any field with an 3745 // empty value appearing in NullFields will be sent to the server as 3746 // null. It is an error if a field in this list has a non-empty value. 3747 // This may be used to include null fields in Patch requests. 3748 NullFields []string `json:"-"` 3749} 3750 3751func (s *DataFilterValueRange) MarshalJSON() ([]byte, error) { 3752 type NoMethod DataFilterValueRange 3753 raw := NoMethod(*s) 3754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3755} 3756 3757// DataValidationRule: A data validation rule. 3758type DataValidationRule struct { 3759 // Condition: The condition that data in the cell must match. 3760 Condition *BooleanCondition `json:"condition,omitempty"` 3761 3762 // InputMessage: A message to show the user when adding data to the 3763 // cell. 3764 InputMessage string `json:"inputMessage,omitempty"` 3765 3766 // ShowCustomUi: True if the UI should be customized based on the kind 3767 // of condition. 3768 // If true, "List" conditions will show a dropdown. 3769 ShowCustomUi bool `json:"showCustomUi,omitempty"` 3770 3771 // Strict: True if invalid data should be rejected. 3772 Strict bool `json:"strict,omitempty"` 3773 3774 // ForceSendFields is a list of field names (e.g. "Condition") to 3775 // unconditionally include in API requests. By default, fields with 3776 // empty values are omitted from API requests. However, any non-pointer, 3777 // non-interface field appearing in ForceSendFields will be sent to the 3778 // server regardless of whether the field is empty or not. This may be 3779 // used to include empty fields in Patch requests. 3780 ForceSendFields []string `json:"-"` 3781 3782 // NullFields is a list of field names (e.g. "Condition") to include in 3783 // API requests with the JSON null value. By default, fields with empty 3784 // values are omitted from API requests. However, any field with an 3785 // empty value appearing in NullFields will be sent to the server as 3786 // null. It is an error if a field in this list has a non-empty value. 3787 // This may be used to include null fields in Patch requests. 3788 NullFields []string `json:"-"` 3789} 3790 3791func (s *DataValidationRule) MarshalJSON() ([]byte, error) { 3792 type NoMethod DataValidationRule 3793 raw := NoMethod(*s) 3794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3795} 3796 3797// DateTimeRule: Allows you to organize the date-time values in a source 3798// data column into 3799// buckets based on selected parts of their date or time values. For 3800// example, 3801// consider a pivot table showing sales transactions by date: 3802// 3803// +----------+--------------+ 3804// | Date | SUM of Sales | 3805// +----------+--------------+ 3806// | 1/1/2017 | $621.14 | 3807// | 2/3/2017 | $708.84 | 3808// | 5/8/2017 | $326.84 | 3809// ... 3810// +----------+--------------+ 3811// Applying a date-time group rule with a DateTimeRuleType of 3812// YEAR_MONTH 3813// results in the following pivot table. 3814// 3815// +--------------+--------------+ 3816// | Grouped Date | SUM of Sales | 3817// +--------------+--------------+ 3818// | 2017-Jan | $53,731.78 | 3819// | 2017-Feb | $83,475.32 | 3820// | 2017-Mar | $94,385.05 | 3821// ... 3822// +--------------+--------------+ 3823type DateTimeRule struct { 3824 // Type: The type of date-time grouping to apply. 3825 // 3826 // Possible values: 3827 // "DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not use. 3828 // "SECOND" - Group dates by second, from 0 to 59. 3829 // "MINUTE" - Group dates by minute, from 0 to 59. 3830 // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23. 3831 // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour 3832 // system, for example 19:45. 3833 // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour 3834 // system, for example 7:45 3835 // PM. The AM/PM designation is translated based on the 3836 // spreadsheet 3837 // locale. 3838 // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The 3839 // days of the week will 3840 // be translated based on the spreadsheet locale. 3841 // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note 3842 // that dates after Feb. 29 3843 // fall in different buckets in leap years than in non-leap years. 3844 // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31. 3845 // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The 3846 // month is 3847 // translated based on the spreadsheet locale. 3848 // "MONTH" - Group dates by month, for example Nov. The month is 3849 // translated based 3850 // on the spreadsheet locale. 3851 // "QUARTER" - Group dates by quarter, for example Q1 (which 3852 // represents Jan-Mar). 3853 // "YEAR" - Group dates by year, for example 2008. 3854 // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov. 3855 // The month is 3856 // translated based on the spreadsheet locale. 3857 // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008 3858 // Q4. 3859 // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example 3860 // 2008-11-22. 3861 Type string `json:"type,omitempty"` 3862 3863 // ForceSendFields is a list of field names (e.g. "Type") to 3864 // unconditionally include in API requests. By default, fields with 3865 // empty values are omitted from API requests. However, any non-pointer, 3866 // non-interface field appearing in ForceSendFields will be sent to the 3867 // server regardless of whether the field is empty or not. This may be 3868 // used to include empty fields in Patch requests. 3869 ForceSendFields []string `json:"-"` 3870 3871 // NullFields is a list of field names (e.g. "Type") to include in API 3872 // requests with the JSON null value. By default, fields with empty 3873 // values are omitted from API requests. However, any field with an 3874 // empty value appearing in NullFields will be sent to the server as 3875 // null. It is an error if a field in this list has a non-empty value. 3876 // This may be used to include null fields in Patch requests. 3877 NullFields []string `json:"-"` 3878} 3879 3880func (s *DateTimeRule) MarshalJSON() ([]byte, error) { 3881 type NoMethod DateTimeRule 3882 raw := NoMethod(*s) 3883 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3884} 3885 3886// DeleteBandingRequest: Removes the banded range with the given ID from 3887// the spreadsheet. 3888type DeleteBandingRequest struct { 3889 // BandedRangeId: The ID of the banded range to delete. 3890 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 3891 3892 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 3893 // unconditionally include in API requests. By default, fields with 3894 // empty values are omitted from API requests. However, any non-pointer, 3895 // non-interface field appearing in ForceSendFields will be sent to the 3896 // server regardless of whether the field is empty or not. This may be 3897 // used to include empty fields in Patch requests. 3898 ForceSendFields []string `json:"-"` 3899 3900 // NullFields is a list of field names (e.g. "BandedRangeId") to include 3901 // in API requests with the JSON null value. By default, fields with 3902 // empty values are omitted from API requests. However, any field with 3903 // an empty value appearing in NullFields will be sent to the server as 3904 // null. It is an error if a field in this list has a non-empty value. 3905 // This may be used to include null fields in Patch requests. 3906 NullFields []string `json:"-"` 3907} 3908 3909func (s *DeleteBandingRequest) MarshalJSON() ([]byte, error) { 3910 type NoMethod DeleteBandingRequest 3911 raw := NoMethod(*s) 3912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3913} 3914 3915// DeleteConditionalFormatRuleRequest: Deletes a conditional format rule 3916// at the given index. 3917// All subsequent rules' indexes are decremented. 3918type DeleteConditionalFormatRuleRequest struct { 3919 // Index: The zero-based index of the rule to be deleted. 3920 Index int64 `json:"index,omitempty"` 3921 3922 // SheetId: The sheet the rule is being deleted from. 3923 SheetId int64 `json:"sheetId,omitempty"` 3924 3925 // ForceSendFields is a list of field names (e.g. "Index") to 3926 // unconditionally include in API requests. By default, fields with 3927 // empty values are omitted from API requests. However, any non-pointer, 3928 // non-interface field appearing in ForceSendFields will be sent to the 3929 // server regardless of whether the field is empty or not. This may be 3930 // used to include empty fields in Patch requests. 3931 ForceSendFields []string `json:"-"` 3932 3933 // NullFields is a list of field names (e.g. "Index") to include in API 3934 // requests with the JSON null value. By default, fields with empty 3935 // values are omitted from API requests. However, any field with an 3936 // empty value appearing in NullFields will be sent to the server as 3937 // null. It is an error if a field in this list has a non-empty value. 3938 // This may be used to include null fields in Patch requests. 3939 NullFields []string `json:"-"` 3940} 3941 3942func (s *DeleteConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 3943 type NoMethod DeleteConditionalFormatRuleRequest 3944 raw := NoMethod(*s) 3945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3946} 3947 3948// DeleteConditionalFormatRuleResponse: The result of deleting a 3949// conditional format rule. 3950type DeleteConditionalFormatRuleResponse struct { 3951 // Rule: The rule that was deleted. 3952 Rule *ConditionalFormatRule `json:"rule,omitempty"` 3953 3954 // ForceSendFields is a list of field names (e.g. "Rule") to 3955 // unconditionally include in API requests. By default, fields with 3956 // empty values are omitted from API requests. However, any non-pointer, 3957 // non-interface field appearing in ForceSendFields will be sent to the 3958 // server regardless of whether the field is empty or not. This may be 3959 // used to include empty fields in Patch requests. 3960 ForceSendFields []string `json:"-"` 3961 3962 // NullFields is a list of field names (e.g. "Rule") to include in API 3963 // requests with the JSON null value. By default, fields with empty 3964 // values are omitted from API requests. However, any field with an 3965 // empty value appearing in NullFields will be sent to the server as 3966 // null. It is an error if a field in this list has a non-empty value. 3967 // This may be used to include null fields in Patch requests. 3968 NullFields []string `json:"-"` 3969} 3970 3971func (s *DeleteConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 3972 type NoMethod DeleteConditionalFormatRuleResponse 3973 raw := NoMethod(*s) 3974 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3975} 3976 3977// DeleteDeveloperMetadataRequest: A request to delete developer 3978// metadata. 3979type DeleteDeveloperMetadataRequest struct { 3980 // DataFilter: The data filter describing the criteria used to select 3981 // which developer 3982 // metadata entry to delete. 3983 DataFilter *DataFilter `json:"dataFilter,omitempty"` 3984 3985 // ForceSendFields is a list of field names (e.g. "DataFilter") to 3986 // unconditionally include in API requests. By default, fields with 3987 // empty values are omitted from API requests. However, any non-pointer, 3988 // non-interface field appearing in ForceSendFields will be sent to the 3989 // server regardless of whether the field is empty or not. This may be 3990 // used to include empty fields in Patch requests. 3991 ForceSendFields []string `json:"-"` 3992 3993 // NullFields is a list of field names (e.g. "DataFilter") to include in 3994 // API requests with the JSON null value. By default, fields with empty 3995 // values are omitted from API requests. However, any field with an 3996 // empty value appearing in NullFields will be sent to the server as 3997 // null. It is an error if a field in this list has a non-empty value. 3998 // This may be used to include null fields in Patch requests. 3999 NullFields []string `json:"-"` 4000} 4001 4002func (s *DeleteDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 4003 type NoMethod DeleteDeveloperMetadataRequest 4004 raw := NoMethod(*s) 4005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4006} 4007 4008// DeleteDeveloperMetadataResponse: The response from deleting developer 4009// metadata. 4010type DeleteDeveloperMetadataResponse struct { 4011 // DeletedDeveloperMetadata: The metadata that was deleted. 4012 DeletedDeveloperMetadata []*DeveloperMetadata `json:"deletedDeveloperMetadata,omitempty"` 4013 4014 // ForceSendFields is a list of field names (e.g. 4015 // "DeletedDeveloperMetadata") to unconditionally include in API 4016 // requests. By default, fields with empty values are omitted from API 4017 // requests. However, any non-pointer, non-interface field appearing in 4018 // ForceSendFields will be sent to the server regardless of whether the 4019 // field is empty or not. This may be used to include empty fields in 4020 // Patch requests. 4021 ForceSendFields []string `json:"-"` 4022 4023 // NullFields is a list of field names (e.g. "DeletedDeveloperMetadata") 4024 // to include in API requests with the JSON null value. By default, 4025 // fields with empty values are omitted from API requests. However, any 4026 // field with an empty value appearing in NullFields will be sent to the 4027 // server as null. It is an error if a field in this list has a 4028 // non-empty value. This may be used to include null fields in Patch 4029 // requests. 4030 NullFields []string `json:"-"` 4031} 4032 4033func (s *DeleteDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 4034 type NoMethod DeleteDeveloperMetadataResponse 4035 raw := NoMethod(*s) 4036 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4037} 4038 4039// DeleteDimensionGroupRequest: Deletes a group over the specified range 4040// by decrementing the depth of the 4041// dimensions in the range. 4042// 4043// For example, assume the sheet has a depth-1 group over B:E and a 4044// depth-2 4045// group over C:D. Deleting a group over D:E leaves the sheet with 4046// a 4047// depth-1 group over B:D and a depth-2 group over C:C. 4048type DeleteDimensionGroupRequest struct { 4049 // Range: The range of the group to be deleted. 4050 Range *DimensionRange `json:"range,omitempty"` 4051 4052 // ForceSendFields is a list of field names (e.g. "Range") to 4053 // unconditionally include in API requests. By default, fields with 4054 // empty values are omitted from API requests. However, any non-pointer, 4055 // non-interface field appearing in ForceSendFields will be sent to the 4056 // server regardless of whether the field is empty or not. This may be 4057 // used to include empty fields in Patch requests. 4058 ForceSendFields []string `json:"-"` 4059 4060 // NullFields is a list of field names (e.g. "Range") to include in API 4061 // requests with the JSON null value. By default, fields with empty 4062 // values are omitted from API requests. However, any field with an 4063 // empty value appearing in NullFields will be sent to the server as 4064 // null. It is an error if a field in this list has a non-empty value. 4065 // This may be used to include null fields in Patch requests. 4066 NullFields []string `json:"-"` 4067} 4068 4069func (s *DeleteDimensionGroupRequest) MarshalJSON() ([]byte, error) { 4070 type NoMethod DeleteDimensionGroupRequest 4071 raw := NoMethod(*s) 4072 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4073} 4074 4075// DeleteDimensionGroupResponse: The result of deleting a group. 4076type DeleteDimensionGroupResponse struct { 4077 // DimensionGroups: All groups of a dimension after deleting a group 4078 // from that dimension. 4079 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 4080 4081 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 4082 // unconditionally include in API requests. By default, fields with 4083 // empty values are omitted from API requests. However, any non-pointer, 4084 // non-interface field appearing in ForceSendFields will be sent to the 4085 // server regardless of whether the field is empty or not. This may be 4086 // used to include empty fields in Patch requests. 4087 ForceSendFields []string `json:"-"` 4088 4089 // NullFields is a list of field names (e.g. "DimensionGroups") to 4090 // include in API requests with the JSON null value. By default, fields 4091 // with empty values are omitted from API requests. However, any field 4092 // with an empty value appearing in NullFields will be sent to the 4093 // server as null. It is an error if a field in this list has a 4094 // non-empty value. This may be used to include null fields in Patch 4095 // requests. 4096 NullFields []string `json:"-"` 4097} 4098 4099func (s *DeleteDimensionGroupResponse) MarshalJSON() ([]byte, error) { 4100 type NoMethod DeleteDimensionGroupResponse 4101 raw := NoMethod(*s) 4102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4103} 4104 4105// DeleteDimensionRequest: Deletes the dimensions from the sheet. 4106type DeleteDimensionRequest struct { 4107 // Range: The dimensions to delete from the sheet. 4108 Range *DimensionRange `json:"range,omitempty"` 4109 4110 // ForceSendFields is a list of field names (e.g. "Range") to 4111 // unconditionally include in API requests. By default, fields with 4112 // empty values are omitted from API requests. However, any non-pointer, 4113 // non-interface field appearing in ForceSendFields will be sent to the 4114 // server regardless of whether the field is empty or not. This may be 4115 // used to include empty fields in Patch requests. 4116 ForceSendFields []string `json:"-"` 4117 4118 // NullFields is a list of field names (e.g. "Range") to include in API 4119 // requests with the JSON null value. By default, fields with empty 4120 // values are omitted from API requests. However, any field with an 4121 // empty value appearing in NullFields will be sent to the server as 4122 // null. It is an error if a field in this list has a non-empty value. 4123 // This may be used to include null fields in Patch requests. 4124 NullFields []string `json:"-"` 4125} 4126 4127func (s *DeleteDimensionRequest) MarshalJSON() ([]byte, error) { 4128 type NoMethod DeleteDimensionRequest 4129 raw := NoMethod(*s) 4130 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4131} 4132 4133// DeleteEmbeddedObjectRequest: Deletes the embedded object with the 4134// given ID. 4135type DeleteEmbeddedObjectRequest struct { 4136 // ObjectId: The ID of the embedded object to delete. 4137 ObjectId int64 `json:"objectId,omitempty"` 4138 4139 // ForceSendFields is a list of field names (e.g. "ObjectId") to 4140 // unconditionally include in API requests. By default, fields with 4141 // empty values are omitted from API requests. However, any non-pointer, 4142 // non-interface field appearing in ForceSendFields will be sent to the 4143 // server regardless of whether the field is empty or not. This may be 4144 // used to include empty fields in Patch requests. 4145 ForceSendFields []string `json:"-"` 4146 4147 // NullFields is a list of field names (e.g. "ObjectId") to include in 4148 // API requests with the JSON null value. By default, fields with empty 4149 // values are omitted from API requests. However, any field with an 4150 // empty value appearing in NullFields will be sent to the server as 4151 // null. It is an error if a field in this list has a non-empty value. 4152 // This may be used to include null fields in Patch requests. 4153 NullFields []string `json:"-"` 4154} 4155 4156func (s *DeleteEmbeddedObjectRequest) MarshalJSON() ([]byte, error) { 4157 type NoMethod DeleteEmbeddedObjectRequest 4158 raw := NoMethod(*s) 4159 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4160} 4161 4162// DeleteFilterViewRequest: Deletes a particular filter view. 4163type DeleteFilterViewRequest struct { 4164 // FilterId: The ID of the filter to delete. 4165 FilterId int64 `json:"filterId,omitempty"` 4166 4167 // ForceSendFields is a list of field names (e.g. "FilterId") to 4168 // unconditionally include in API requests. By default, fields with 4169 // empty values are omitted from API requests. However, any non-pointer, 4170 // non-interface field appearing in ForceSendFields will be sent to the 4171 // server regardless of whether the field is empty or not. This may be 4172 // used to include empty fields in Patch requests. 4173 ForceSendFields []string `json:"-"` 4174 4175 // NullFields is a list of field names (e.g. "FilterId") to include in 4176 // API requests with the JSON null value. By default, fields with empty 4177 // values are omitted from API requests. However, any field with an 4178 // empty value appearing in NullFields will be sent to the server as 4179 // null. It is an error if a field in this list has a non-empty value. 4180 // This may be used to include null fields in Patch requests. 4181 NullFields []string `json:"-"` 4182} 4183 4184func (s *DeleteFilterViewRequest) MarshalJSON() ([]byte, error) { 4185 type NoMethod DeleteFilterViewRequest 4186 raw := NoMethod(*s) 4187 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4188} 4189 4190// DeleteNamedRangeRequest: Removes the named range with the given ID 4191// from the spreadsheet. 4192type DeleteNamedRangeRequest struct { 4193 // NamedRangeId: The ID of the named range to delete. 4194 NamedRangeId string `json:"namedRangeId,omitempty"` 4195 4196 // ForceSendFields is a list of field names (e.g. "NamedRangeId") to 4197 // unconditionally include in API requests. By default, fields with 4198 // empty values are omitted from API requests. However, any non-pointer, 4199 // non-interface field appearing in ForceSendFields will be sent to the 4200 // server regardless of whether the field is empty or not. This may be 4201 // used to include empty fields in Patch requests. 4202 ForceSendFields []string `json:"-"` 4203 4204 // NullFields is a list of field names (e.g. "NamedRangeId") to include 4205 // in API requests with the JSON null value. By default, fields with 4206 // empty values are omitted from API requests. However, any field with 4207 // an empty value appearing in NullFields will be sent to the server as 4208 // null. It is an error if a field in this list has a non-empty value. 4209 // This may be used to include null fields in Patch requests. 4210 NullFields []string `json:"-"` 4211} 4212 4213func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) { 4214 type NoMethod DeleteNamedRangeRequest 4215 raw := NoMethod(*s) 4216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4217} 4218 4219// DeleteProtectedRangeRequest: Deletes the protected range with the 4220// given ID. 4221type DeleteProtectedRangeRequest struct { 4222 // ProtectedRangeId: The ID of the protected range to delete. 4223 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 4224 4225 // ForceSendFields is a list of field names (e.g. "ProtectedRangeId") to 4226 // unconditionally include in API requests. By default, fields with 4227 // empty values are omitted from API requests. However, any non-pointer, 4228 // non-interface field appearing in ForceSendFields will be sent to the 4229 // server regardless of whether the field is empty or not. This may be 4230 // used to include empty fields in Patch requests. 4231 ForceSendFields []string `json:"-"` 4232 4233 // NullFields is a list of field names (e.g. "ProtectedRangeId") to 4234 // include in API requests with the JSON null value. By default, fields 4235 // with empty values are omitted from API requests. However, any field 4236 // with an empty value appearing in NullFields will be sent to the 4237 // server as null. It is an error if a field in this list has a 4238 // non-empty value. This may be used to include null fields in Patch 4239 // requests. 4240 NullFields []string `json:"-"` 4241} 4242 4243func (s *DeleteProtectedRangeRequest) MarshalJSON() ([]byte, error) { 4244 type NoMethod DeleteProtectedRangeRequest 4245 raw := NoMethod(*s) 4246 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4247} 4248 4249// DeleteRangeRequest: Deletes a range of cells, shifting other cells 4250// into the deleted area. 4251type DeleteRangeRequest struct { 4252 // Range: The range of cells to delete. 4253 Range *GridRange `json:"range,omitempty"` 4254 4255 // ShiftDimension: The dimension from which deleted cells will be 4256 // replaced with. 4257 // If ROWS, existing cells will be shifted upward to 4258 // replace the deleted cells. If COLUMNS, existing cells 4259 // will be shifted left to replace the deleted cells. 4260 // 4261 // Possible values: 4262 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 4263 // "ROWS" - Operates on the rows of a sheet. 4264 // "COLUMNS" - Operates on the columns of a sheet. 4265 ShiftDimension string `json:"shiftDimension,omitempty"` 4266 4267 // ForceSendFields is a list of field names (e.g. "Range") to 4268 // unconditionally include in API requests. By default, fields with 4269 // empty values are omitted from API requests. However, any non-pointer, 4270 // non-interface field appearing in ForceSendFields will be sent to the 4271 // server regardless of whether the field is empty or not. This may be 4272 // used to include empty fields in Patch requests. 4273 ForceSendFields []string `json:"-"` 4274 4275 // NullFields is a list of field names (e.g. "Range") to include in API 4276 // requests with the JSON null value. By default, fields with empty 4277 // values are omitted from API requests. However, any field with an 4278 // empty value appearing in NullFields will be sent to the server as 4279 // null. It is an error if a field in this list has a non-empty value. 4280 // This may be used to include null fields in Patch requests. 4281 NullFields []string `json:"-"` 4282} 4283 4284func (s *DeleteRangeRequest) MarshalJSON() ([]byte, error) { 4285 type NoMethod DeleteRangeRequest 4286 raw := NoMethod(*s) 4287 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4288} 4289 4290// DeleteSheetRequest: Deletes the requested sheet. 4291type DeleteSheetRequest struct { 4292 // SheetId: The ID of the sheet to delete. 4293 SheetId int64 `json:"sheetId,omitempty"` 4294 4295 // ForceSendFields is a list of field names (e.g. "SheetId") 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. "SheetId") 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 *DeleteSheetRequest) MarshalJSON() ([]byte, error) { 4313 type NoMethod DeleteSheetRequest 4314 raw := NoMethod(*s) 4315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4316} 4317 4318// DeveloperMetadata: Developer metadata associated with a location or 4319// object in a spreadsheet. 4320// Developer metadata may be used to associate arbitrary data with 4321// various 4322// parts of a spreadsheet and will remain associated at those locations 4323// as they 4324// move around and the spreadsheet is edited. For example, if 4325// developer 4326// metadata is associated with row 5 and another row is then 4327// subsequently 4328// inserted above row 5, that original metadata will still be associated 4329// with 4330// the row it was first associated with (what is now row 6). If the 4331// associated 4332// object is deleted its metadata is deleted too. 4333type DeveloperMetadata struct { 4334 // Location: The location where the metadata is associated. 4335 Location *DeveloperMetadataLocation `json:"location,omitempty"` 4336 4337 // MetadataId: The spreadsheet-scoped unique ID that identifies the 4338 // metadata. IDs may be 4339 // specified when metadata is created, otherwise one will be 4340 // randomly 4341 // generated and assigned. Must be positive. 4342 MetadataId int64 `json:"metadataId,omitempty"` 4343 4344 // MetadataKey: The metadata key. There may be multiple metadata in a 4345 // spreadsheet with the 4346 // same key. Developer metadata must always have a key specified. 4347 MetadataKey string `json:"metadataKey,omitempty"` 4348 4349 // MetadataValue: Data associated with the metadata's key. 4350 MetadataValue string `json:"metadataValue,omitempty"` 4351 4352 // Visibility: The metadata visibility. Developer metadata must always 4353 // have a visibility 4354 // specified. 4355 // 4356 // Possible values: 4357 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 4358 // "DOCUMENT" - Document-visible metadata is accessible from any 4359 // developer project with 4360 // access to the document. 4361 // "PROJECT" - Project-visible metadata is only visible to and 4362 // accessible by the developer 4363 // project that created the metadata. 4364 Visibility string `json:"visibility,omitempty"` 4365 4366 // ServerResponse contains the HTTP response code and headers from the 4367 // server. 4368 googleapi.ServerResponse `json:"-"` 4369 4370 // ForceSendFields is a list of field names (e.g. "Location") to 4371 // unconditionally include in API requests. By default, fields with 4372 // empty values are omitted from API requests. However, any non-pointer, 4373 // non-interface field appearing in ForceSendFields will be sent to the 4374 // server regardless of whether the field is empty or not. This may be 4375 // used to include empty fields in Patch requests. 4376 ForceSendFields []string `json:"-"` 4377 4378 // NullFields is a list of field names (e.g. "Location") to include in 4379 // API requests with the JSON null value. By default, fields with empty 4380 // values are omitted from API requests. However, any field with an 4381 // empty value appearing in NullFields will be sent to the server as 4382 // null. It is an error if a field in this list has a non-empty value. 4383 // This may be used to include null fields in Patch requests. 4384 NullFields []string `json:"-"` 4385} 4386 4387func (s *DeveloperMetadata) MarshalJSON() ([]byte, error) { 4388 type NoMethod DeveloperMetadata 4389 raw := NoMethod(*s) 4390 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4391} 4392 4393// DeveloperMetadataLocation: A location where metadata may be 4394// associated in a spreadsheet. 4395type DeveloperMetadataLocation struct { 4396 // DimensionRange: Represents the row or column when metadata is 4397 // associated with 4398 // a dimension. The specified DimensionRange must represent a single 4399 // row 4400 // or column; it cannot be unbounded or span multiple rows or columns. 4401 DimensionRange *DimensionRange `json:"dimensionRange,omitempty"` 4402 4403 // LocationType: The type of location this object represents. This 4404 // field is read-only. 4405 // 4406 // Possible values: 4407 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 4408 // "ROW" - Developer metadata associated on an entire row dimension. 4409 // "COLUMN" - Developer metadata associated on an entire column 4410 // dimension. 4411 // "SHEET" - Developer metadata associated on an entire sheet. 4412 // "SPREADSHEET" - Developer metadata associated on the entire 4413 // spreadsheet. 4414 LocationType string `json:"locationType,omitempty"` 4415 4416 // SheetId: The ID of the sheet when metadata is associated with an 4417 // entire sheet. 4418 SheetId int64 `json:"sheetId,omitempty"` 4419 4420 // Spreadsheet: True when metadata is associated with an entire 4421 // spreadsheet. 4422 Spreadsheet bool `json:"spreadsheet,omitempty"` 4423 4424 // ForceSendFields is a list of field names (e.g. "DimensionRange") to 4425 // unconditionally include in API requests. By default, fields with 4426 // empty values are omitted from API requests. However, any non-pointer, 4427 // non-interface field appearing in ForceSendFields will be sent to the 4428 // server regardless of whether the field is empty or not. This may be 4429 // used to include empty fields in Patch requests. 4430 ForceSendFields []string `json:"-"` 4431 4432 // NullFields is a list of field names (e.g. "DimensionRange") to 4433 // include in API requests with the JSON null value. By default, fields 4434 // with empty values are omitted from API requests. However, any field 4435 // with an empty value appearing in NullFields will be sent to the 4436 // server as null. It is an error if a field in this list has a 4437 // non-empty value. This may be used to include null fields in Patch 4438 // requests. 4439 NullFields []string `json:"-"` 4440} 4441 4442func (s *DeveloperMetadataLocation) MarshalJSON() ([]byte, error) { 4443 type NoMethod DeveloperMetadataLocation 4444 raw := NoMethod(*s) 4445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4446} 4447 4448// DeveloperMetadataLookup: Selects DeveloperMetadata that matches all 4449// of the specified fields. For 4450// example, if only a metadata ID is specified this considers 4451// the 4452// DeveloperMetadata with that particular unique ID. If a metadata key 4453// is 4454// specified, this considers all developer metadata with that key. If 4455// a 4456// key, visibility, and location type are all specified, this considers 4457// all 4458// developer metadata with that key and visibility that are associated 4459// with a 4460// location of that type. In general, this 4461// selects all DeveloperMetadata that matches the intersection of all 4462// the 4463// specified fields; any field or combination of fields may be 4464// specified. 4465type DeveloperMetadataLookup struct { 4466 // LocationMatchingStrategy: Determines how this lookup matches the 4467 // location. If this field is 4468 // specified as EXACT, only developer metadata associated on the 4469 // exact 4470 // location specified is matched. If this field is specified to 4471 // INTERSECTING, 4472 // developer metadata associated on intersecting locations is 4473 // also 4474 // matched. If left unspecified, this field assumes a default value 4475 // of 4476 // INTERSECTING. 4477 // If this field is specified, a metadataLocation 4478 // must also be specified. 4479 // 4480 // Possible values: 4481 // "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" - 4482 // Default value. This value must not be used. 4483 // "EXACT_LOCATION" - Indicates that a specified location should be 4484 // matched exactly. For 4485 // example, if row three were specified as a location this matching 4486 // strategy 4487 // would only match developer metadata also associated on row three. 4488 // Metadata 4489 // associated on other locations would not be considered. 4490 // "INTERSECTING_LOCATION" - Indicates that a specified location 4491 // should match that exact location as 4492 // well as any intersecting locations. For example, if row three 4493 // were 4494 // specified as a location this matching strategy would match 4495 // developer 4496 // metadata associated on row three as well as metadata associated 4497 // on 4498 // locations that intersect row three. If, for instance, there was 4499 // developer 4500 // metadata associated on column B, this matching strategy would also 4501 // match 4502 // that location because column B intersects row three. 4503 LocationMatchingStrategy string `json:"locationMatchingStrategy,omitempty"` 4504 4505 // LocationType: Limits the selected developer metadata to those entries 4506 // which are 4507 // associated with locations of the specified type. For example, when 4508 // this 4509 // field is specified as ROW this lookup 4510 // only considers developer metadata associated on rows. If the field 4511 // is left 4512 // unspecified, all location types are considered. This field cannot 4513 // be 4514 // specified as SPREADSHEET when 4515 // the locationMatchingStrategy 4516 // is specified as INTERSECTING or when the 4517 // metadataLocation is specified as a 4518 // non-spreadsheet location: spreadsheet metadata cannot intersect any 4519 // other 4520 // developer metadata location. This field also must be left 4521 // unspecified when 4522 // the locationMatchingStrategy 4523 // is specified as EXACT. 4524 // 4525 // Possible values: 4526 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 4527 // "ROW" - Developer metadata associated on an entire row dimension. 4528 // "COLUMN" - Developer metadata associated on an entire column 4529 // dimension. 4530 // "SHEET" - Developer metadata associated on an entire sheet. 4531 // "SPREADSHEET" - Developer metadata associated on the entire 4532 // spreadsheet. 4533 LocationType string `json:"locationType,omitempty"` 4534 4535 // MetadataId: Limits the selected developer metadata to that which has 4536 // a matching 4537 // DeveloperMetadata.metadata_id. 4538 MetadataId int64 `json:"metadataId,omitempty"` 4539 4540 // MetadataKey: Limits the selected developer metadata to that which has 4541 // a matching 4542 // DeveloperMetadata.metadata_key. 4543 MetadataKey string `json:"metadataKey,omitempty"` 4544 4545 // MetadataLocation: Limits the selected developer metadata to those 4546 // entries associated with 4547 // the specified location. This field either matches exact locations or 4548 // all 4549 // intersecting locations according the 4550 // specified 4551 // locationMatchingStrategy. 4552 MetadataLocation *DeveloperMetadataLocation `json:"metadataLocation,omitempty"` 4553 4554 // MetadataValue: Limits the selected developer metadata to that which 4555 // has a matching 4556 // DeveloperMetadata.metadata_value. 4557 MetadataValue string `json:"metadataValue,omitempty"` 4558 4559 // Visibility: Limits the selected developer metadata to that which has 4560 // a matching 4561 // DeveloperMetadata.visibility. If left unspecified, all 4562 // developer 4563 // metadata visibile to the requesting project is considered. 4564 // 4565 // Possible values: 4566 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 4567 // "DOCUMENT" - Document-visible metadata is accessible from any 4568 // developer project with 4569 // access to the document. 4570 // "PROJECT" - Project-visible metadata is only visible to and 4571 // accessible by the developer 4572 // project that created the metadata. 4573 Visibility string `json:"visibility,omitempty"` 4574 4575 // ForceSendFields is a list of field names (e.g. 4576 // "LocationMatchingStrategy") to unconditionally include in API 4577 // requests. By default, fields with empty values are omitted from API 4578 // requests. However, any non-pointer, non-interface field appearing in 4579 // ForceSendFields will be sent to the server regardless of whether the 4580 // field is empty or not. This may be used to include empty fields in 4581 // Patch requests. 4582 ForceSendFields []string `json:"-"` 4583 4584 // NullFields is a list of field names (e.g. "LocationMatchingStrategy") 4585 // to include in API requests with the JSON null value. By default, 4586 // fields with empty values are omitted from API requests. However, any 4587 // field with an empty value appearing in NullFields will be sent to the 4588 // server as null. It is an error if a field in this list has a 4589 // non-empty value. This may be used to include null fields in Patch 4590 // requests. 4591 NullFields []string `json:"-"` 4592} 4593 4594func (s *DeveloperMetadataLookup) MarshalJSON() ([]byte, error) { 4595 type NoMethod DeveloperMetadataLookup 4596 raw := NoMethod(*s) 4597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4598} 4599 4600// DimensionGroup: A group over an interval of rows or columns on a 4601// sheet, which can contain or 4602// be contained within other groups. A group can be collapsed or 4603// expanded as a 4604// unit on the sheet. 4605type DimensionGroup struct { 4606 // Collapsed: This field is true if this group is collapsed. A collapsed 4607 // group remains 4608 // collapsed if an overlapping group at a shallower depth is 4609 // expanded. 4610 // 4611 // A true value does not imply that all dimensions within the group 4612 // are 4613 // hidden, since a dimension's visibility can change independently from 4614 // this 4615 // group property. However, when this property is updated, all 4616 // dimensions 4617 // within it are set to hidden if this field is true, or set to visible 4618 // if 4619 // this field is false. 4620 Collapsed bool `json:"collapsed,omitempty"` 4621 4622 // Depth: The depth of the group, representing how many groups have a 4623 // range that 4624 // wholly contains the range of this group. 4625 Depth int64 `json:"depth,omitempty"` 4626 4627 // Range: The range over which this group exists. 4628 Range *DimensionRange `json:"range,omitempty"` 4629 4630 // ForceSendFields is a list of field names (e.g. "Collapsed") to 4631 // unconditionally include in API requests. By default, fields with 4632 // empty values are omitted from API requests. However, any non-pointer, 4633 // non-interface field appearing in ForceSendFields will be sent to the 4634 // server regardless of whether the field is empty or not. This may be 4635 // used to include empty fields in Patch requests. 4636 ForceSendFields []string `json:"-"` 4637 4638 // NullFields is a list of field names (e.g. "Collapsed") to include in 4639 // API requests with the JSON null value. By default, fields with empty 4640 // values are omitted from API requests. However, any field with an 4641 // empty value appearing in NullFields will be sent to the server as 4642 // null. It is an error if a field in this list has a non-empty value. 4643 // This may be used to include null fields in Patch requests. 4644 NullFields []string `json:"-"` 4645} 4646 4647func (s *DimensionGroup) MarshalJSON() ([]byte, error) { 4648 type NoMethod DimensionGroup 4649 raw := NoMethod(*s) 4650 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4651} 4652 4653// DimensionProperties: Properties about a dimension. 4654type DimensionProperties struct { 4655 // DeveloperMetadata: The developer metadata associated with a single 4656 // row or column. 4657 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 4658 4659 // HiddenByFilter: True if this dimension is being filtered. 4660 // This field is read-only. 4661 HiddenByFilter bool `json:"hiddenByFilter,omitempty"` 4662 4663 // HiddenByUser: True if this dimension is explicitly hidden. 4664 HiddenByUser bool `json:"hiddenByUser,omitempty"` 4665 4666 // PixelSize: The height (if a row) or width (if a column) of the 4667 // dimension in pixels. 4668 PixelSize int64 `json:"pixelSize,omitempty"` 4669 4670 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 4671 // to unconditionally include in API requests. By default, fields with 4672 // empty values are omitted from API requests. However, any non-pointer, 4673 // non-interface field appearing in ForceSendFields will be sent to the 4674 // server regardless of whether the field is empty or not. This may be 4675 // used to include empty fields in Patch requests. 4676 ForceSendFields []string `json:"-"` 4677 4678 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 4679 // include in API requests with the JSON null value. By default, fields 4680 // with empty values are omitted from API requests. However, any field 4681 // with an empty value appearing in NullFields will be sent to the 4682 // server as null. It is an error if a field in this list has a 4683 // non-empty value. This may be used to include null fields in Patch 4684 // requests. 4685 NullFields []string `json:"-"` 4686} 4687 4688func (s *DimensionProperties) MarshalJSON() ([]byte, error) { 4689 type NoMethod DimensionProperties 4690 raw := NoMethod(*s) 4691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4692} 4693 4694// DimensionRange: A range along a single dimension on a sheet. 4695// All indexes are zero-based. 4696// Indexes are half open: the start index is inclusive 4697// and the end index is exclusive. 4698// Missing indexes indicate the range is unbounded on that side. 4699type DimensionRange struct { 4700 // Dimension: The dimension of the span. 4701 // 4702 // Possible values: 4703 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 4704 // "ROWS" - Operates on the rows of a sheet. 4705 // "COLUMNS" - Operates on the columns of a sheet. 4706 Dimension string `json:"dimension,omitempty"` 4707 4708 // EndIndex: The end (exclusive) of the span, or not set if unbounded. 4709 EndIndex int64 `json:"endIndex,omitempty"` 4710 4711 // SheetId: The sheet this span is on. 4712 SheetId int64 `json:"sheetId,omitempty"` 4713 4714 // StartIndex: The start (inclusive) of the span, or not set if 4715 // unbounded. 4716 StartIndex int64 `json:"startIndex,omitempty"` 4717 4718 // ForceSendFields is a list of field names (e.g. "Dimension") to 4719 // unconditionally include in API requests. By default, fields with 4720 // empty values are omitted from API requests. However, any non-pointer, 4721 // non-interface field appearing in ForceSendFields will be sent to the 4722 // server regardless of whether the field is empty or not. This may be 4723 // used to include empty fields in Patch requests. 4724 ForceSendFields []string `json:"-"` 4725 4726 // NullFields is a list of field names (e.g. "Dimension") to include in 4727 // API requests with the JSON null value. By default, fields with empty 4728 // values are omitted from API requests. However, any field with an 4729 // empty value appearing in NullFields will be sent to the server as 4730 // null. It is an error if a field in this list has a non-empty value. 4731 // This may be used to include null fields in Patch requests. 4732 NullFields []string `json:"-"` 4733} 4734 4735func (s *DimensionRange) MarshalJSON() ([]byte, error) { 4736 type NoMethod DimensionRange 4737 raw := NoMethod(*s) 4738 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4739} 4740 4741// DuplicateFilterViewRequest: Duplicates a particular filter view. 4742type DuplicateFilterViewRequest struct { 4743 // FilterId: The ID of the filter being duplicated. 4744 FilterId int64 `json:"filterId,omitempty"` 4745 4746 // ForceSendFields is a list of field names (e.g. "FilterId") to 4747 // unconditionally include in API requests. By default, fields with 4748 // empty values are omitted from API requests. However, any non-pointer, 4749 // non-interface field appearing in ForceSendFields will be sent to the 4750 // server regardless of whether the field is empty or not. This may be 4751 // used to include empty fields in Patch requests. 4752 ForceSendFields []string `json:"-"` 4753 4754 // NullFields is a list of field names (e.g. "FilterId") to include in 4755 // API requests with the JSON null value. By default, fields with empty 4756 // values are omitted from API requests. However, any field with an 4757 // empty value appearing in NullFields will be sent to the server as 4758 // null. It is an error if a field in this list has a non-empty value. 4759 // This may be used to include null fields in Patch requests. 4760 NullFields []string `json:"-"` 4761} 4762 4763func (s *DuplicateFilterViewRequest) MarshalJSON() ([]byte, error) { 4764 type NoMethod DuplicateFilterViewRequest 4765 raw := NoMethod(*s) 4766 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4767} 4768 4769// DuplicateFilterViewResponse: The result of a filter view being 4770// duplicated. 4771type DuplicateFilterViewResponse struct { 4772 // Filter: The newly created filter. 4773 Filter *FilterView `json:"filter,omitempty"` 4774 4775 // ForceSendFields is a list of field names (e.g. "Filter") to 4776 // unconditionally include in API requests. By default, fields with 4777 // empty values are omitted from API requests. However, any non-pointer, 4778 // non-interface field appearing in ForceSendFields will be sent to the 4779 // server regardless of whether the field is empty or not. This may be 4780 // used to include empty fields in Patch requests. 4781 ForceSendFields []string `json:"-"` 4782 4783 // NullFields is a list of field names (e.g. "Filter") to include in API 4784 // requests with the JSON null value. By default, fields with empty 4785 // values are omitted from API requests. However, any field with an 4786 // empty value appearing in NullFields will be sent to the server as 4787 // null. It is an error if a field in this list has a non-empty value. 4788 // This may be used to include null fields in Patch requests. 4789 NullFields []string `json:"-"` 4790} 4791 4792func (s *DuplicateFilterViewResponse) MarshalJSON() ([]byte, error) { 4793 type NoMethod DuplicateFilterViewResponse 4794 raw := NoMethod(*s) 4795 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4796} 4797 4798// DuplicateSheetRequest: Duplicates the contents of a sheet. 4799type DuplicateSheetRequest struct { 4800 // InsertSheetIndex: The zero-based index where the new sheet should be 4801 // inserted. 4802 // The index of all sheets after this are incremented. 4803 InsertSheetIndex int64 `json:"insertSheetIndex,omitempty"` 4804 4805 // NewSheetId: If set, the ID of the new sheet. If not set, an ID is 4806 // chosen. 4807 // If set, the ID must not conflict with any existing sheet ID. 4808 // If set, it must be non-negative. 4809 NewSheetId int64 `json:"newSheetId,omitempty"` 4810 4811 // NewSheetName: The name of the new sheet. If empty, a new name is 4812 // chosen for you. 4813 NewSheetName string `json:"newSheetName,omitempty"` 4814 4815 // SourceSheetId: The sheet to duplicate. 4816 SourceSheetId int64 `json:"sourceSheetId,omitempty"` 4817 4818 // ForceSendFields is a list of field names (e.g. "InsertSheetIndex") to 4819 // unconditionally include in API requests. By default, fields with 4820 // empty values are omitted from API requests. However, any non-pointer, 4821 // non-interface field appearing in ForceSendFields will be sent to the 4822 // server regardless of whether the field is empty or not. This may be 4823 // used to include empty fields in Patch requests. 4824 ForceSendFields []string `json:"-"` 4825 4826 // NullFields is a list of field names (e.g. "InsertSheetIndex") to 4827 // include in API requests with the JSON null value. By default, fields 4828 // with empty values are omitted from API requests. However, any field 4829 // with an empty value appearing in NullFields will be sent to the 4830 // server as null. It is an error if a field in this list has a 4831 // non-empty value. This may be used to include null fields in Patch 4832 // requests. 4833 NullFields []string `json:"-"` 4834} 4835 4836func (s *DuplicateSheetRequest) MarshalJSON() ([]byte, error) { 4837 type NoMethod DuplicateSheetRequest 4838 raw := NoMethod(*s) 4839 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4840} 4841 4842// DuplicateSheetResponse: The result of duplicating a sheet. 4843type DuplicateSheetResponse struct { 4844 // Properties: The properties of the duplicate sheet. 4845 Properties *SheetProperties `json:"properties,omitempty"` 4846 4847 // ForceSendFields is a list of field names (e.g. "Properties") to 4848 // unconditionally include in API requests. By default, fields with 4849 // empty values are omitted from API requests. However, any non-pointer, 4850 // non-interface field appearing in ForceSendFields will be sent to the 4851 // server regardless of whether the field is empty or not. This may be 4852 // used to include empty fields in Patch requests. 4853 ForceSendFields []string `json:"-"` 4854 4855 // NullFields is a list of field names (e.g. "Properties") to include in 4856 // API requests with the JSON null value. By default, fields with empty 4857 // values are omitted from API requests. However, any field with an 4858 // empty value appearing in NullFields will be sent to the server as 4859 // null. It is an error if a field in this list has a non-empty value. 4860 // This may be used to include null fields in Patch requests. 4861 NullFields []string `json:"-"` 4862} 4863 4864func (s *DuplicateSheetResponse) MarshalJSON() ([]byte, error) { 4865 type NoMethod DuplicateSheetResponse 4866 raw := NoMethod(*s) 4867 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4868} 4869 4870// Editors: The editors of a protected range. 4871type Editors struct { 4872 // DomainUsersCanEdit: True if anyone in the document's domain has edit 4873 // access to the protected 4874 // range. Domain protection is only supported on documents within a 4875 // domain. 4876 DomainUsersCanEdit bool `json:"domainUsersCanEdit,omitempty"` 4877 4878 // Groups: The email addresses of groups with edit access to the 4879 // protected range. 4880 Groups []string `json:"groups,omitempty"` 4881 4882 // Users: The email addresses of users with edit access to the protected 4883 // range. 4884 Users []string `json:"users,omitempty"` 4885 4886 // ForceSendFields is a list of field names (e.g. "DomainUsersCanEdit") 4887 // to unconditionally include in API requests. By default, fields with 4888 // empty values are omitted from API requests. However, any non-pointer, 4889 // non-interface field appearing in ForceSendFields will be sent to the 4890 // server regardless of whether the field is empty or not. This may be 4891 // used to include empty fields in Patch requests. 4892 ForceSendFields []string `json:"-"` 4893 4894 // NullFields is a list of field names (e.g. "DomainUsersCanEdit") to 4895 // include in API requests with the JSON null value. By default, fields 4896 // with empty values are omitted from API requests. However, any field 4897 // with an empty value appearing in NullFields will be sent to the 4898 // server as null. It is an error if a field in this list has a 4899 // non-empty value. This may be used to include null fields in Patch 4900 // requests. 4901 NullFields []string `json:"-"` 4902} 4903 4904func (s *Editors) MarshalJSON() ([]byte, error) { 4905 type NoMethod Editors 4906 raw := NoMethod(*s) 4907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4908} 4909 4910// EmbeddedChart: A chart embedded in a sheet. 4911type EmbeddedChart struct { 4912 // ChartId: The ID of the chart. 4913 ChartId int64 `json:"chartId,omitempty"` 4914 4915 // Position: The position of the chart. 4916 Position *EmbeddedObjectPosition `json:"position,omitempty"` 4917 4918 // Spec: The specification of the chart. 4919 Spec *ChartSpec `json:"spec,omitempty"` 4920 4921 // ForceSendFields is a list of field names (e.g. "ChartId") to 4922 // unconditionally include in API requests. By default, fields with 4923 // empty values are omitted from API requests. However, any non-pointer, 4924 // non-interface field appearing in ForceSendFields will be sent to the 4925 // server regardless of whether the field is empty or not. This may be 4926 // used to include empty fields in Patch requests. 4927 ForceSendFields []string `json:"-"` 4928 4929 // NullFields is a list of field names (e.g. "ChartId") to include in 4930 // API requests with the JSON null value. By default, fields with empty 4931 // values are omitted from API requests. However, any field with an 4932 // empty value appearing in NullFields will be sent to the server as 4933 // null. It is an error if a field in this list has a non-empty value. 4934 // This may be used to include null fields in Patch requests. 4935 NullFields []string `json:"-"` 4936} 4937 4938func (s *EmbeddedChart) MarshalJSON() ([]byte, error) { 4939 type NoMethod EmbeddedChart 4940 raw := NoMethod(*s) 4941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4942} 4943 4944// EmbeddedObjectPosition: The position of an embedded object such as a 4945// chart. 4946type EmbeddedObjectPosition struct { 4947 // NewSheet: If true, the embedded object is put on a new sheet whose 4948 // ID 4949 // is chosen for you. Used only when writing. 4950 NewSheet bool `json:"newSheet,omitempty"` 4951 4952 // OverlayPosition: The position at which the object is overlaid on top 4953 // of a grid. 4954 OverlayPosition *OverlayPosition `json:"overlayPosition,omitempty"` 4955 4956 // SheetId: The sheet this is on. Set only if the embedded object 4957 // is on its own sheet. Must be non-negative. 4958 SheetId int64 `json:"sheetId,omitempty"` 4959 4960 // ForceSendFields is a list of field names (e.g. "NewSheet") to 4961 // unconditionally include in API requests. By default, fields with 4962 // empty values are omitted from API requests. However, any non-pointer, 4963 // non-interface field appearing in ForceSendFields will be sent to the 4964 // server regardless of whether the field is empty or not. This may be 4965 // used to include empty fields in Patch requests. 4966 ForceSendFields []string `json:"-"` 4967 4968 // NullFields is a list of field names (e.g. "NewSheet") to include in 4969 // API requests with the JSON null value. By default, fields with empty 4970 // values are omitted from API requests. However, any field with an 4971 // empty value appearing in NullFields will be sent to the server as 4972 // null. It is an error if a field in this list has a non-empty value. 4973 // This may be used to include null fields in Patch requests. 4974 NullFields []string `json:"-"` 4975} 4976 4977func (s *EmbeddedObjectPosition) MarshalJSON() ([]byte, error) { 4978 type NoMethod EmbeddedObjectPosition 4979 raw := NoMethod(*s) 4980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4981} 4982 4983// ErrorValue: An error in a cell. 4984type ErrorValue struct { 4985 // Message: A message with more information about the error 4986 // (in the spreadsheet's locale). 4987 Message string `json:"message,omitempty"` 4988 4989 // Type: The type of error. 4990 // 4991 // Possible values: 4992 // "ERROR_TYPE_UNSPECIFIED" - The default error type, do not use this. 4993 // "ERROR" - Corresponds to the `#ERROR!` error. 4994 // "NULL_VALUE" - Corresponds to the `#NULL!` error. 4995 // "DIVIDE_BY_ZERO" - Corresponds to the `#DIV/0` error. 4996 // "VALUE" - Corresponds to the `#VALUE!` error. 4997 // "REF" - Corresponds to the `#REF!` error. 4998 // "NAME" - Corresponds to the `#NAME?` error. 4999 // "NUM" - Corresponds to the `#NUM`! error. 5000 // "N_A" - Corresponds to the `#N/A` error. 5001 // "LOADING" - Corresponds to the `Loading...` state. 5002 Type string `json:"type,omitempty"` 5003 5004 // ForceSendFields is a list of field names (e.g. "Message") to 5005 // unconditionally include in API requests. By default, fields with 5006 // empty values are omitted from API requests. However, any non-pointer, 5007 // non-interface field appearing in ForceSendFields will be sent to the 5008 // server regardless of whether the field is empty or not. This may be 5009 // used to include empty fields in Patch requests. 5010 ForceSendFields []string `json:"-"` 5011 5012 // NullFields is a list of field names (e.g. "Message") to include in 5013 // API requests with the JSON null value. By default, fields with empty 5014 // values are omitted from API requests. However, any field with an 5015 // empty value appearing in NullFields will be sent to the server as 5016 // null. It is an error if a field in this list has a non-empty value. 5017 // This may be used to include null fields in Patch requests. 5018 NullFields []string `json:"-"` 5019} 5020 5021func (s *ErrorValue) MarshalJSON() ([]byte, error) { 5022 type NoMethod ErrorValue 5023 raw := NoMethod(*s) 5024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5025} 5026 5027// ExtendedValue: The kinds of value that a cell in a spreadsheet can 5028// have. 5029type ExtendedValue struct { 5030 // BoolValue: Represents a boolean value. 5031 BoolValue bool `json:"boolValue,omitempty"` 5032 5033 // ErrorValue: Represents an error. 5034 // This field is read-only. 5035 ErrorValue *ErrorValue `json:"errorValue,omitempty"` 5036 5037 // FormulaValue: Represents a formula. 5038 FormulaValue string `json:"formulaValue,omitempty"` 5039 5040 // NumberValue: Represents a double value. 5041 // Note: Dates, Times and DateTimes are represented as doubles 5042 // in 5043 // "serial number" format. 5044 NumberValue float64 `json:"numberValue,omitempty"` 5045 5046 // StringValue: Represents a string value. 5047 // Leading single quotes are not included. For example, if the user 5048 // typed 5049 // `'123` into the UI, this would be represented as a `stringValue` 5050 // of 5051 // "123". 5052 StringValue string `json:"stringValue,omitempty"` 5053 5054 // ForceSendFields is a list of field names (e.g. "BoolValue") to 5055 // unconditionally include in API requests. By default, fields with 5056 // empty values are omitted from API requests. However, any non-pointer, 5057 // non-interface field appearing in ForceSendFields will be sent to the 5058 // server regardless of whether the field is empty or not. This may be 5059 // used to include empty fields in Patch requests. 5060 ForceSendFields []string `json:"-"` 5061 5062 // NullFields is a list of field names (e.g. "BoolValue") to include in 5063 // API requests with the JSON null value. By default, fields with empty 5064 // values are omitted from API requests. However, any field with an 5065 // empty value appearing in NullFields will be sent to the server as 5066 // null. It is an error if a field in this list has a non-empty value. 5067 // This may be used to include null fields in Patch requests. 5068 NullFields []string `json:"-"` 5069} 5070 5071func (s *ExtendedValue) MarshalJSON() ([]byte, error) { 5072 type NoMethod ExtendedValue 5073 raw := NoMethod(*s) 5074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5075} 5076 5077func (s *ExtendedValue) UnmarshalJSON(data []byte) error { 5078 type NoMethod ExtendedValue 5079 var s1 struct { 5080 NumberValue gensupport.JSONFloat64 `json:"numberValue"` 5081 *NoMethod 5082 } 5083 s1.NoMethod = (*NoMethod)(s) 5084 if err := json.Unmarshal(data, &s1); err != nil { 5085 return err 5086 } 5087 s.NumberValue = float64(s1.NumberValue) 5088 return nil 5089} 5090 5091// FilterCriteria: Criteria for showing/hiding rows in a filter or 5092// filter view. 5093type FilterCriteria struct { 5094 // Condition: A condition that must be true for values to be 5095 // shown. 5096 // (This does not override hiddenValues -- if a value is listed there, 5097 // it will still be hidden.) 5098 Condition *BooleanCondition `json:"condition,omitempty"` 5099 5100 // HiddenValues: Values that should be hidden. 5101 HiddenValues []string `json:"hiddenValues,omitempty"` 5102 5103 // ForceSendFields is a list of field names (e.g. "Condition") to 5104 // unconditionally include in API requests. By default, fields with 5105 // empty values are omitted from API requests. However, any non-pointer, 5106 // non-interface field appearing in ForceSendFields will be sent to the 5107 // server regardless of whether the field is empty or not. This may be 5108 // used to include empty fields in Patch requests. 5109 ForceSendFields []string `json:"-"` 5110 5111 // NullFields is a list of field names (e.g. "Condition") to include in 5112 // API requests with the JSON null value. By default, fields with empty 5113 // values are omitted from API requests. However, any field with an 5114 // empty value appearing in NullFields will be sent to the server as 5115 // null. It is an error if a field in this list has a non-empty value. 5116 // This may be used to include null fields in Patch requests. 5117 NullFields []string `json:"-"` 5118} 5119 5120func (s *FilterCriteria) MarshalJSON() ([]byte, error) { 5121 type NoMethod FilterCriteria 5122 raw := NoMethod(*s) 5123 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5124} 5125 5126// FilterView: A filter view. 5127type FilterView struct { 5128 // Criteria: The criteria for showing/hiding values per column. 5129 // The map's key is the column index, and the value is the criteria 5130 // for 5131 // that column. 5132 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 5133 5134 // FilterViewId: The ID of the filter view. 5135 FilterViewId int64 `json:"filterViewId,omitempty"` 5136 5137 // NamedRangeId: The named range this filter view is backed by, if 5138 // any. 5139 // 5140 // When writing, only one of range or named_range_id 5141 // may be set. 5142 NamedRangeId string `json:"namedRangeId,omitempty"` 5143 5144 // Range: The range this filter view covers. 5145 // 5146 // When writing, only one of range or named_range_id 5147 // may be set. 5148 Range *GridRange `json:"range,omitempty"` 5149 5150 // SortSpecs: The sort order per column. Later specifications are used 5151 // when values 5152 // are equal in the earlier specifications. 5153 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 5154 5155 // Title: The name of the filter view. 5156 Title string `json:"title,omitempty"` 5157 5158 // ForceSendFields is a list of field names (e.g. "Criteria") to 5159 // unconditionally include in API requests. By default, fields with 5160 // empty values are omitted from API requests. However, any non-pointer, 5161 // non-interface field appearing in ForceSendFields will be sent to the 5162 // server regardless of whether the field is empty or not. This may be 5163 // used to include empty fields in Patch requests. 5164 ForceSendFields []string `json:"-"` 5165 5166 // NullFields is a list of field names (e.g. "Criteria") to include in 5167 // API requests with the JSON null value. By default, fields with empty 5168 // values are omitted from API requests. However, any field with an 5169 // empty value appearing in NullFields will be sent to the server as 5170 // null. It is an error if a field in this list has a non-empty value. 5171 // This may be used to include null fields in Patch requests. 5172 NullFields []string `json:"-"` 5173} 5174 5175func (s *FilterView) MarshalJSON() ([]byte, error) { 5176 type NoMethod FilterView 5177 raw := NoMethod(*s) 5178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5179} 5180 5181// FindReplaceRequest: Finds and replaces data in cells over a range, 5182// sheet, or all sheets. 5183type FindReplaceRequest struct { 5184 // AllSheets: True to find/replace over all sheets. 5185 AllSheets bool `json:"allSheets,omitempty"` 5186 5187 // Find: The value to search. 5188 Find string `json:"find,omitempty"` 5189 5190 // IncludeFormulas: True if the search should include cells with 5191 // formulas. 5192 // False to skip cells with formulas. 5193 IncludeFormulas bool `json:"includeFormulas,omitempty"` 5194 5195 // MatchCase: True if the search is case sensitive. 5196 MatchCase bool `json:"matchCase,omitempty"` 5197 5198 // MatchEntireCell: True if the find value should match the entire cell. 5199 MatchEntireCell bool `json:"matchEntireCell,omitempty"` 5200 5201 // Range: The range to find/replace over. 5202 Range *GridRange `json:"range,omitempty"` 5203 5204 // Replacement: The value to use as the replacement. 5205 Replacement string `json:"replacement,omitempty"` 5206 5207 // SearchByRegex: True if the find value is a regex. 5208 // The regular expression and replacement should follow Java regex 5209 // rules 5210 // at 5211 // https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. 5212 // The replacement string is allowed to refer to capturing groups. 5213 // For example, if one cell has the contents "Google Sheets" and 5214 // another 5215 // has "Google Docs", then searching for "o.* (.*)" with a 5216 // replacement of 5217 // "$1 Rocks" would change the contents of the cells to 5218 // "GSheets Rocks" and "GDocs Rocks" respectively. 5219 SearchByRegex bool `json:"searchByRegex,omitempty"` 5220 5221 // SheetId: The sheet to find/replace over. 5222 SheetId int64 `json:"sheetId,omitempty"` 5223 5224 // ForceSendFields is a list of field names (e.g. "AllSheets") to 5225 // unconditionally include in API requests. By default, fields with 5226 // empty values are omitted from API requests. However, any non-pointer, 5227 // non-interface field appearing in ForceSendFields will be sent to the 5228 // server regardless of whether the field is empty or not. This may be 5229 // used to include empty fields in Patch requests. 5230 ForceSendFields []string `json:"-"` 5231 5232 // NullFields is a list of field names (e.g. "AllSheets") to include in 5233 // API requests with the JSON null value. By default, fields with empty 5234 // values are omitted from API requests. However, any field with an 5235 // empty value appearing in NullFields will be sent to the server as 5236 // null. It is an error if a field in this list has a non-empty value. 5237 // This may be used to include null fields in Patch requests. 5238 NullFields []string `json:"-"` 5239} 5240 5241func (s *FindReplaceRequest) MarshalJSON() ([]byte, error) { 5242 type NoMethod FindReplaceRequest 5243 raw := NoMethod(*s) 5244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5245} 5246 5247// FindReplaceResponse: The result of the find/replace. 5248type FindReplaceResponse struct { 5249 // FormulasChanged: The number of formula cells changed. 5250 FormulasChanged int64 `json:"formulasChanged,omitempty"` 5251 5252 // OccurrencesChanged: The number of occurrences (possibly multiple 5253 // within a cell) changed. 5254 // For example, if replacing "e" with "o" in "Google Sheets", this 5255 // would 5256 // be "3" because "Google Sheets" -> "Googlo Shoots". 5257 OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"` 5258 5259 // RowsChanged: The number of rows changed. 5260 RowsChanged int64 `json:"rowsChanged,omitempty"` 5261 5262 // SheetsChanged: The number of sheets changed. 5263 SheetsChanged int64 `json:"sheetsChanged,omitempty"` 5264 5265 // ValuesChanged: The number of non-formula cells changed. 5266 ValuesChanged int64 `json:"valuesChanged,omitempty"` 5267 5268 // ForceSendFields is a list of field names (e.g. "FormulasChanged") to 5269 // unconditionally include in API requests. By default, fields with 5270 // empty values are omitted from API requests. However, any non-pointer, 5271 // non-interface field appearing in ForceSendFields will be sent to the 5272 // server regardless of whether the field is empty or not. This may be 5273 // used to include empty fields in Patch requests. 5274 ForceSendFields []string `json:"-"` 5275 5276 // NullFields is a list of field names (e.g. "FormulasChanged") to 5277 // include in API requests with the JSON null value. By default, fields 5278 // with empty values are omitted from API requests. However, any field 5279 // with an empty value appearing in NullFields will be sent to the 5280 // server as null. It is an error if a field in this list has a 5281 // non-empty value. This may be used to include null fields in Patch 5282 // requests. 5283 NullFields []string `json:"-"` 5284} 5285 5286func (s *FindReplaceResponse) MarshalJSON() ([]byte, error) { 5287 type NoMethod FindReplaceResponse 5288 raw := NoMethod(*s) 5289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5290} 5291 5292// GetSpreadsheetByDataFilterRequest: The request for retrieving a 5293// Spreadsheet. 5294type GetSpreadsheetByDataFilterRequest struct { 5295 // DataFilters: The DataFilters used to select which ranges to retrieve 5296 // from 5297 // the spreadsheet. 5298 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 5299 5300 // IncludeGridData: True if grid data should be returned. 5301 // This parameter is ignored if a field mask was set in the request. 5302 IncludeGridData bool `json:"includeGridData,omitempty"` 5303 5304 // ForceSendFields is a list of field names (e.g. "DataFilters") to 5305 // unconditionally include in API requests. By default, fields with 5306 // empty values are omitted from API requests. However, any non-pointer, 5307 // non-interface field appearing in ForceSendFields will be sent to the 5308 // server regardless of whether the field is empty or not. This may be 5309 // used to include empty fields in Patch requests. 5310 ForceSendFields []string `json:"-"` 5311 5312 // NullFields is a list of field names (e.g. "DataFilters") to include 5313 // in API requests with the JSON null value. By default, fields with 5314 // empty values are omitted from API requests. However, any field with 5315 // an empty value appearing in NullFields will be sent to the server as 5316 // null. It is an error if a field in this list has a non-empty value. 5317 // This may be used to include null fields in Patch requests. 5318 NullFields []string `json:"-"` 5319} 5320 5321func (s *GetSpreadsheetByDataFilterRequest) MarshalJSON() ([]byte, error) { 5322 type NoMethod GetSpreadsheetByDataFilterRequest 5323 raw := NoMethod(*s) 5324 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5325} 5326 5327// GradientRule: A rule that applies a gradient color scale format, 5328// based on 5329// the interpolation points listed. The format of a cell will vary 5330// based on its contents as compared to the values of the 5331// interpolation 5332// points. 5333type GradientRule struct { 5334 // Maxpoint: The final interpolation point. 5335 Maxpoint *InterpolationPoint `json:"maxpoint,omitempty"` 5336 5337 // Midpoint: An optional midway interpolation point. 5338 Midpoint *InterpolationPoint `json:"midpoint,omitempty"` 5339 5340 // Minpoint: The starting interpolation point. 5341 Minpoint *InterpolationPoint `json:"minpoint,omitempty"` 5342 5343 // ForceSendFields is a list of field names (e.g. "Maxpoint") to 5344 // unconditionally include in API requests. By default, fields with 5345 // empty values are omitted from API requests. However, any non-pointer, 5346 // non-interface field appearing in ForceSendFields will be sent to the 5347 // server regardless of whether the field is empty or not. This may be 5348 // used to include empty fields in Patch requests. 5349 ForceSendFields []string `json:"-"` 5350 5351 // NullFields is a list of field names (e.g. "Maxpoint") to include in 5352 // API requests with the JSON null value. By default, fields with empty 5353 // values are omitted from API requests. However, any field with an 5354 // empty value appearing in NullFields will be sent to the server as 5355 // null. It is an error if a field in this list has a non-empty value. 5356 // This may be used to include null fields in Patch requests. 5357 NullFields []string `json:"-"` 5358} 5359 5360func (s *GradientRule) MarshalJSON() ([]byte, error) { 5361 type NoMethod GradientRule 5362 raw := NoMethod(*s) 5363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5364} 5365 5366// GridCoordinate: A coordinate in a sheet. 5367// All indexes are zero-based. 5368type GridCoordinate struct { 5369 // ColumnIndex: The column index of the coordinate. 5370 ColumnIndex int64 `json:"columnIndex,omitempty"` 5371 5372 // RowIndex: The row index of the coordinate. 5373 RowIndex int64 `json:"rowIndex,omitempty"` 5374 5375 // SheetId: The sheet this coordinate is on. 5376 SheetId int64 `json:"sheetId,omitempty"` 5377 5378 // ForceSendFields is a list of field names (e.g. "ColumnIndex") to 5379 // unconditionally include in API requests. By default, fields with 5380 // empty values are omitted from API requests. However, any non-pointer, 5381 // non-interface field appearing in ForceSendFields will be sent to the 5382 // server regardless of whether the field is empty or not. This may be 5383 // used to include empty fields in Patch requests. 5384 ForceSendFields []string `json:"-"` 5385 5386 // NullFields is a list of field names (e.g. "ColumnIndex") to include 5387 // in API requests with the JSON null value. By default, fields with 5388 // empty values are omitted from API requests. However, any field with 5389 // an empty value appearing in NullFields will be sent to the server as 5390 // null. It is an error if a field in this list has a non-empty value. 5391 // This may be used to include null fields in Patch requests. 5392 NullFields []string `json:"-"` 5393} 5394 5395func (s *GridCoordinate) MarshalJSON() ([]byte, error) { 5396 type NoMethod GridCoordinate 5397 raw := NoMethod(*s) 5398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5399} 5400 5401// GridData: Data in the grid, as well as metadata about the dimensions. 5402type GridData struct { 5403 // ColumnMetadata: Metadata about the requested columns in the grid, 5404 // starting with the column 5405 // in start_column. 5406 ColumnMetadata []*DimensionProperties `json:"columnMetadata,omitempty"` 5407 5408 // RowData: The data in the grid, one entry per row, 5409 // starting with the row in startRow. 5410 // The values in RowData will correspond to columns starting 5411 // at start_column. 5412 RowData []*RowData `json:"rowData,omitempty"` 5413 5414 // RowMetadata: Metadata about the requested rows in the grid, starting 5415 // with the row 5416 // in start_row. 5417 RowMetadata []*DimensionProperties `json:"rowMetadata,omitempty"` 5418 5419 // StartColumn: The first column this GridData refers to, zero-based. 5420 StartColumn int64 `json:"startColumn,omitempty"` 5421 5422 // StartRow: The first row this GridData refers to, zero-based. 5423 StartRow int64 `json:"startRow,omitempty"` 5424 5425 // ForceSendFields is a list of field names (e.g. "ColumnMetadata") to 5426 // unconditionally include in API requests. By default, fields with 5427 // empty values are omitted from API requests. However, any non-pointer, 5428 // non-interface field appearing in ForceSendFields will be sent to the 5429 // server regardless of whether the field is empty or not. This may be 5430 // used to include empty fields in Patch requests. 5431 ForceSendFields []string `json:"-"` 5432 5433 // NullFields is a list of field names (e.g. "ColumnMetadata") to 5434 // include in API requests with the JSON null value. By default, fields 5435 // with empty values are omitted from API requests. However, any field 5436 // with an empty value appearing in NullFields will be sent to the 5437 // server as null. It is an error if a field in this list has a 5438 // non-empty value. This may be used to include null fields in Patch 5439 // requests. 5440 NullFields []string `json:"-"` 5441} 5442 5443func (s *GridData) MarshalJSON() ([]byte, error) { 5444 type NoMethod GridData 5445 raw := NoMethod(*s) 5446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5447} 5448 5449// GridProperties: Properties of a grid. 5450type GridProperties struct { 5451 // ColumnCount: The number of columns in the grid. 5452 ColumnCount int64 `json:"columnCount,omitempty"` 5453 5454 // ColumnGroupControlAfter: True if the column grouping control toggle 5455 // is shown after the group. 5456 ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"` 5457 5458 // FrozenColumnCount: The number of columns that are frozen in the grid. 5459 FrozenColumnCount int64 `json:"frozenColumnCount,omitempty"` 5460 5461 // FrozenRowCount: The number of rows that are frozen in the grid. 5462 FrozenRowCount int64 `json:"frozenRowCount,omitempty"` 5463 5464 // HideGridlines: True if the grid isn't showing gridlines in the UI. 5465 HideGridlines bool `json:"hideGridlines,omitempty"` 5466 5467 // RowCount: The number of rows in the grid. 5468 RowCount int64 `json:"rowCount,omitempty"` 5469 5470 // RowGroupControlAfter: True if the row grouping control toggle is 5471 // shown after the group. 5472 RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"` 5473 5474 // ForceSendFields is a list of field names (e.g. "ColumnCount") to 5475 // unconditionally include in API requests. By default, fields with 5476 // empty values are omitted from API requests. However, any non-pointer, 5477 // non-interface field appearing in ForceSendFields will be sent to the 5478 // server regardless of whether the field is empty or not. This may be 5479 // used to include empty fields in Patch requests. 5480 ForceSendFields []string `json:"-"` 5481 5482 // NullFields is a list of field names (e.g. "ColumnCount") to include 5483 // in API requests with the JSON null value. By default, fields with 5484 // empty values are omitted from API requests. However, any field with 5485 // an empty value appearing in NullFields will be sent to the server as 5486 // null. It is an error if a field in this list has a non-empty value. 5487 // This may be used to include null fields in Patch requests. 5488 NullFields []string `json:"-"` 5489} 5490 5491func (s *GridProperties) MarshalJSON() ([]byte, error) { 5492 type NoMethod GridProperties 5493 raw := NoMethod(*s) 5494 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5495} 5496 5497// GridRange: A range on a sheet. 5498// All indexes are zero-based. 5499// Indexes are half open, e.g the start index is inclusive 5500// and the end index is exclusive -- [start_index, end_index). 5501// Missing indexes indicate the range is unbounded on that side. 5502// 5503// For example, if "Sheet1" is sheet ID 0, then: 5504// 5505// `Sheet1!A1:A1 == sheet_id: 0, 5506// start_row_index: 0, end_row_index: 1, 5507// start_column_index: 0, end_column_index: 1` 5508// 5509// `Sheet1!A3:B4 == sheet_id: 0, 5510// start_row_index: 2, end_row_index: 4, 5511// start_column_index: 0, end_column_index: 2` 5512// 5513// `Sheet1!A:B == sheet_id: 0, 5514// start_column_index: 0, end_column_index: 2` 5515// 5516// `Sheet1!A5:B == sheet_id: 0, 5517// start_row_index: 4, 5518// start_column_index: 0, end_column_index: 2` 5519// 5520// `Sheet1 == sheet_id:0` 5521// 5522// The start index must always be less than or equal to the end 5523// index. 5524// If the start index equals the end index, then the range is 5525// empty. 5526// Empty ranges are typically not meaningful and are usually rendered in 5527// the 5528// UI as `#REF!`. 5529type GridRange struct { 5530 // EndColumnIndex: The end column (exclusive) of the range, or not set 5531 // if unbounded. 5532 EndColumnIndex int64 `json:"endColumnIndex,omitempty"` 5533 5534 // EndRowIndex: The end row (exclusive) of the range, or not set if 5535 // unbounded. 5536 EndRowIndex int64 `json:"endRowIndex,omitempty"` 5537 5538 // SheetId: The sheet this range is on. 5539 SheetId int64 `json:"sheetId,omitempty"` 5540 5541 // StartColumnIndex: The start column (inclusive) of the range, or not 5542 // set if unbounded. 5543 StartColumnIndex int64 `json:"startColumnIndex,omitempty"` 5544 5545 // StartRowIndex: The start row (inclusive) of the range, or not set if 5546 // unbounded. 5547 StartRowIndex int64 `json:"startRowIndex,omitempty"` 5548 5549 // ForceSendFields is a list of field names (e.g. "EndColumnIndex") to 5550 // unconditionally include in API requests. By default, fields with 5551 // empty values are omitted from API requests. However, any non-pointer, 5552 // non-interface field appearing in ForceSendFields will be sent to the 5553 // server regardless of whether the field is empty or not. This may be 5554 // used to include empty fields in Patch requests. 5555 ForceSendFields []string `json:"-"` 5556 5557 // NullFields is a list of field names (e.g. "EndColumnIndex") to 5558 // include in API requests with the JSON null value. By default, fields 5559 // with empty values are omitted from API requests. However, any field 5560 // with an empty value appearing in NullFields will be sent to the 5561 // server as null. It is an error if a field in this list has a 5562 // non-empty value. This may be used to include null fields in Patch 5563 // requests. 5564 NullFields []string `json:"-"` 5565} 5566 5567func (s *GridRange) MarshalJSON() ([]byte, error) { 5568 type NoMethod GridRange 5569 raw := NoMethod(*s) 5570 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5571} 5572 5573// HistogramChartSpec: A <a 5574// href="/chart/interactive/docs/gallery/histogram">histogram 5575// chart</a>. 5576// A histogram chart groups data items into bins, displaying each bin as 5577// a 5578// column of stacked items. Histograms are used to display the 5579// distribution 5580// of a dataset. Each column of items represents a range into which 5581// those 5582// items fall. The number of bins can be chosen automatically or 5583// specified 5584// explicitly. 5585type HistogramChartSpec struct { 5586 // BucketSize: By default the bucket size (the range of values stacked 5587 // in a single 5588 // column) is chosen automatically, but it may be overridden here. 5589 // E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 5590 // 3.0, etc. 5591 // Cannot be negative. 5592 // This field is optional. 5593 BucketSize float64 `json:"bucketSize,omitempty"` 5594 5595 // LegendPosition: The position of the chart legend. 5596 // 5597 // Possible values: 5598 // "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do 5599 // not use. 5600 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 5601 // chart. 5602 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 5603 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 5604 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 5605 // "NO_LEGEND" - No legend is rendered. 5606 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 5607 LegendPosition string `json:"legendPosition,omitempty"` 5608 5609 // OutlierPercentile: The outlier percentile is used to ensure that 5610 // outliers do not adversely 5611 // affect the calculation of bucket sizes. For example, setting an 5612 // outlier 5613 // percentile of 0.05 indicates that the top and bottom 5% of values 5614 // when 5615 // calculating buckets. The values are still included in the chart, 5616 // they will 5617 // be added to the first or last buckets instead of their own 5618 // buckets. 5619 // Must be between 0.0 and 0.5. 5620 OutlierPercentile float64 `json:"outlierPercentile,omitempty"` 5621 5622 // Series: The series for a histogram may be either a single series of 5623 // values to be 5624 // bucketed or multiple series, each of the same length, containing the 5625 // name 5626 // of the series followed by the values to be bucketed for that series. 5627 Series []*HistogramSeries `json:"series,omitempty"` 5628 5629 // ShowItemDividers: Whether horizontal divider lines should be 5630 // displayed between items in each 5631 // column. 5632 ShowItemDividers bool `json:"showItemDividers,omitempty"` 5633 5634 // ForceSendFields is a list of field names (e.g. "BucketSize") to 5635 // unconditionally include in API requests. By default, fields with 5636 // empty values are omitted from API requests. However, any non-pointer, 5637 // non-interface field appearing in ForceSendFields will be sent to the 5638 // server regardless of whether the field is empty or not. This may be 5639 // used to include empty fields in Patch requests. 5640 ForceSendFields []string `json:"-"` 5641 5642 // NullFields is a list of field names (e.g. "BucketSize") to include in 5643 // API requests with the JSON null value. By default, fields with empty 5644 // values are omitted from API requests. However, any field with an 5645 // empty value appearing in NullFields will be sent to the server as 5646 // null. It is an error if a field in this list has a non-empty value. 5647 // This may be used to include null fields in Patch requests. 5648 NullFields []string `json:"-"` 5649} 5650 5651func (s *HistogramChartSpec) MarshalJSON() ([]byte, error) { 5652 type NoMethod HistogramChartSpec 5653 raw := NoMethod(*s) 5654 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5655} 5656 5657func (s *HistogramChartSpec) UnmarshalJSON(data []byte) error { 5658 type NoMethod HistogramChartSpec 5659 var s1 struct { 5660 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 5661 OutlierPercentile gensupport.JSONFloat64 `json:"outlierPercentile"` 5662 *NoMethod 5663 } 5664 s1.NoMethod = (*NoMethod)(s) 5665 if err := json.Unmarshal(data, &s1); err != nil { 5666 return err 5667 } 5668 s.BucketSize = float64(s1.BucketSize) 5669 s.OutlierPercentile = float64(s1.OutlierPercentile) 5670 return nil 5671} 5672 5673// HistogramRule: Allows you to organize the numeric values in a source 5674// data column into 5675// buckets of a constant size. All values from HistogramRule.start 5676// to 5677// HistogramRule.end are placed into groups of 5678// size 5679// HistogramRule.interval. In addition, all values 5680// below 5681// HistogramRule.start are placed in one group, and all values 5682// above 5683// HistogramRule.end are placed in another. Only 5684// HistogramRule.interval is required, though if HistogramRule.start 5685// and HistogramRule.end are both provided, HistogramRule.start must 5686// be less than HistogramRule.end. For example, a pivot table 5687// showing 5688// average purchase amount by age that has 50+ rows: 5689// 5690// +-----+-------------------+ 5691// | Age | AVERAGE of Amount | 5692// +-----+-------------------+ 5693// | 16 | $27.13 | 5694// | 17 | $5.24 | 5695// | 18 | $20.15 | 5696// ... 5697// +-----+-------------------+ 5698// could be turned into a pivot table that looks like the one below 5699// by 5700// applying a histogram group rule with a HistogramRule.start of 25, 5701// an HistogramRule.interval of 20, and an HistogramRule.end 5702// of 65. 5703// 5704// +-------------+-------------------+ 5705// | Grouped Age | AVERAGE of Amount | 5706// +-------------+-------------------+ 5707// | < 25 | $19.34 | 5708// | 25-45 | $31.43 | 5709// | 45-65 | $35.87 | 5710// | > 65 | $27.55 | 5711// +-------------+-------------------+ 5712// | Grand Total | $29.12 | 5713// +-------------+-------------------+ 5714type HistogramRule struct { 5715 // End: The maximum value at which items are placed into buckets 5716 // of constant size. Values above end are lumped into a single 5717 // bucket. 5718 // This field is optional. 5719 End float64 `json:"end,omitempty"` 5720 5721 // Interval: The size of the buckets that are created. Must be positive. 5722 Interval float64 `json:"interval,omitempty"` 5723 5724 // Start: The minimum value at which items are placed into buckets 5725 // of constant size. Values below start are lumped into a single 5726 // bucket. 5727 // This field is optional. 5728 Start float64 `json:"start,omitempty"` 5729 5730 // ForceSendFields is a list of field names (e.g. "End") to 5731 // unconditionally include in API requests. By default, fields with 5732 // empty values are omitted from API requests. However, any non-pointer, 5733 // non-interface field appearing in ForceSendFields will be sent to the 5734 // server regardless of whether the field is empty or not. This may be 5735 // used to include empty fields in Patch requests. 5736 ForceSendFields []string `json:"-"` 5737 5738 // NullFields is a list of field names (e.g. "End") to include in API 5739 // requests with the JSON null value. By default, fields with empty 5740 // values are omitted from API requests. However, any field with an 5741 // empty value appearing in NullFields will be sent to the server as 5742 // null. It is an error if a field in this list has a non-empty value. 5743 // This may be used to include null fields in Patch requests. 5744 NullFields []string `json:"-"` 5745} 5746 5747func (s *HistogramRule) MarshalJSON() ([]byte, error) { 5748 type NoMethod HistogramRule 5749 raw := NoMethod(*s) 5750 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5751} 5752 5753func (s *HistogramRule) UnmarshalJSON(data []byte) error { 5754 type NoMethod HistogramRule 5755 var s1 struct { 5756 End gensupport.JSONFloat64 `json:"end"` 5757 Interval gensupport.JSONFloat64 `json:"interval"` 5758 Start gensupport.JSONFloat64 `json:"start"` 5759 *NoMethod 5760 } 5761 s1.NoMethod = (*NoMethod)(s) 5762 if err := json.Unmarshal(data, &s1); err != nil { 5763 return err 5764 } 5765 s.End = float64(s1.End) 5766 s.Interval = float64(s1.Interval) 5767 s.Start = float64(s1.Start) 5768 return nil 5769} 5770 5771// HistogramSeries: A histogram series containing the series color and 5772// data. 5773type HistogramSeries struct { 5774 // BarColor: The color of the column representing this series in each 5775 // bucket. 5776 // This field is optional. 5777 BarColor *Color `json:"barColor,omitempty"` 5778 5779 // Data: The data for this histogram series. 5780 Data *ChartData `json:"data,omitempty"` 5781 5782 // ForceSendFields is a list of field names (e.g. "BarColor") to 5783 // unconditionally include in API requests. By default, fields with 5784 // empty values are omitted from API requests. However, any non-pointer, 5785 // non-interface field appearing in ForceSendFields will be sent to the 5786 // server regardless of whether the field is empty or not. This may be 5787 // used to include empty fields in Patch requests. 5788 ForceSendFields []string `json:"-"` 5789 5790 // NullFields is a list of field names (e.g. "BarColor") to include in 5791 // API requests with the JSON null value. By default, fields with empty 5792 // values are omitted from API requests. However, any field with an 5793 // empty value appearing in NullFields will be sent to the server as 5794 // null. It is an error if a field in this list has a non-empty value. 5795 // This may be used to include null fields in Patch requests. 5796 NullFields []string `json:"-"` 5797} 5798 5799func (s *HistogramSeries) MarshalJSON() ([]byte, error) { 5800 type NoMethod HistogramSeries 5801 raw := NoMethod(*s) 5802 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5803} 5804 5805// InsertDimensionRequest: Inserts rows or columns in a sheet at a 5806// particular index. 5807type InsertDimensionRequest struct { 5808 // InheritFromBefore: Whether dimension properties should be extended 5809 // from the dimensions 5810 // before or after the newly inserted dimensions. 5811 // True to inherit from the dimensions before (in which case the 5812 // start 5813 // index must be greater than 0), and false to inherit from the 5814 // dimensions 5815 // after. 5816 // 5817 // For example, if row index 0 has red background and row index 1 5818 // has a green background, then inserting 2 rows at index 1 can 5819 // inherit 5820 // either the green or red background. If `inheritFromBefore` is 5821 // true, 5822 // the two new rows will be red (because the row before the insertion 5823 // point 5824 // was red), whereas if `inheritFromBefore` is false, the two new rows 5825 // will 5826 // be green (because the row after the insertion point was green). 5827 InheritFromBefore bool `json:"inheritFromBefore,omitempty"` 5828 5829 // Range: The dimensions to insert. Both the start and end indexes must 5830 // be bounded. 5831 Range *DimensionRange `json:"range,omitempty"` 5832 5833 // ForceSendFields is a list of field names (e.g. "InheritFromBefore") 5834 // to unconditionally include in API requests. By default, fields with 5835 // empty values are omitted from API requests. However, any non-pointer, 5836 // non-interface field appearing in ForceSendFields will be sent to the 5837 // server regardless of whether the field is empty or not. This may be 5838 // used to include empty fields in Patch requests. 5839 ForceSendFields []string `json:"-"` 5840 5841 // NullFields is a list of field names (e.g. "InheritFromBefore") to 5842 // include in API requests with the JSON null value. By default, fields 5843 // with empty values are omitted from API requests. However, any field 5844 // with an empty value appearing in NullFields will be sent to the 5845 // server as null. It is an error if a field in this list has a 5846 // non-empty value. This may be used to include null fields in Patch 5847 // requests. 5848 NullFields []string `json:"-"` 5849} 5850 5851func (s *InsertDimensionRequest) MarshalJSON() ([]byte, error) { 5852 type NoMethod InsertDimensionRequest 5853 raw := NoMethod(*s) 5854 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5855} 5856 5857// InsertRangeRequest: Inserts cells into a range, shifting the existing 5858// cells over or down. 5859type InsertRangeRequest struct { 5860 // Range: The range to insert new cells into. 5861 Range *GridRange `json:"range,omitempty"` 5862 5863 // ShiftDimension: The dimension which will be shifted when inserting 5864 // cells. 5865 // If ROWS, existing cells will be shifted down. 5866 // If COLUMNS, existing cells will be shifted right. 5867 // 5868 // Possible values: 5869 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 5870 // "ROWS" - Operates on the rows of a sheet. 5871 // "COLUMNS" - Operates on the columns of a sheet. 5872 ShiftDimension string `json:"shiftDimension,omitempty"` 5873 5874 // ForceSendFields is a list of field names (e.g. "Range") to 5875 // unconditionally include in API requests. By default, fields with 5876 // empty values are omitted from API requests. However, any non-pointer, 5877 // non-interface field appearing in ForceSendFields will be sent to the 5878 // server regardless of whether the field is empty or not. This may be 5879 // used to include empty fields in Patch requests. 5880 ForceSendFields []string `json:"-"` 5881 5882 // NullFields is a list of field names (e.g. "Range") to include in API 5883 // requests with the JSON null value. By default, fields with empty 5884 // values are omitted from API requests. However, any field with an 5885 // empty value appearing in NullFields will be sent to the server as 5886 // null. It is an error if a field in this list has a non-empty value. 5887 // This may be used to include null fields in Patch requests. 5888 NullFields []string `json:"-"` 5889} 5890 5891func (s *InsertRangeRequest) MarshalJSON() ([]byte, error) { 5892 type NoMethod InsertRangeRequest 5893 raw := NoMethod(*s) 5894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5895} 5896 5897// InterpolationPoint: A single interpolation point on a gradient 5898// conditional format. 5899// These pin the gradient color scale according to the color, 5900// type and value chosen. 5901type InterpolationPoint struct { 5902 // Color: The color this interpolation point should use. 5903 Color *Color `json:"color,omitempty"` 5904 5905 // Type: How the value should be interpreted. 5906 // 5907 // Possible values: 5908 // "INTERPOLATION_POINT_TYPE_UNSPECIFIED" - The default value, do not 5909 // use. 5910 // "MIN" - The interpolation point uses the minimum value in the 5911 // cells over the range of the conditional format. 5912 // "MAX" - The interpolation point uses the maximum value in the 5913 // cells over the range of the conditional format. 5914 // "NUMBER" - The interpolation point uses exactly the value 5915 // in 5916 // InterpolationPoint.value. 5917 // "PERCENT" - The interpolation point is the given percentage 5918 // over 5919 // all the cells in the range of the conditional format. 5920 // This is equivalent to NUMBER if the value was: 5921 // `=(MAX(FLATTEN(range)) * (value / 100)) 5922 // + (MIN(FLATTEN(range)) * (1 - (value / 100)))` 5923 // (where errors in the range are ignored when flattening). 5924 // "PERCENTILE" - The interpolation point is the given percentile 5925 // over all the cells in the range of the conditional format. 5926 // This is equivalent to NUMBER if the value 5927 // was: 5928 // `=PERCENTILE(FLATTEN(range), value / 100)` 5929 // (where errors in the range are ignored when flattening). 5930 Type string `json:"type,omitempty"` 5931 5932 // Value: The value this interpolation point uses. May be a 5933 // formula. 5934 // Unused if type is MIN or 5935 // MAX. 5936 Value string `json:"value,omitempty"` 5937 5938 // ForceSendFields is a list of field names (e.g. "Color") 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. "Color") to include in API 5947 // 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 *InterpolationPoint) MarshalJSON() ([]byte, error) { 5956 type NoMethod InterpolationPoint 5957 raw := NoMethod(*s) 5958 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5959} 5960 5961// IterativeCalculationSettings: Settings to control how circular 5962// dependencies are resolved with iterative 5963// calculation. 5964type IterativeCalculationSettings struct { 5965 // ConvergenceThreshold: When iterative calculation is enabled and 5966 // successive results differ by 5967 // less than this threshold value, the calculation rounds stop. 5968 ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"` 5969 5970 // MaxIterations: When iterative calculation is enabled, the maximum 5971 // number of calculation 5972 // rounds to perform. 5973 MaxIterations int64 `json:"maxIterations,omitempty"` 5974 5975 // ForceSendFields is a list of field names (e.g. 5976 // "ConvergenceThreshold") to unconditionally include in API requests. 5977 // By default, fields with empty values are omitted from API requests. 5978 // However, any non-pointer, non-interface field appearing in 5979 // ForceSendFields will be sent to the server regardless of whether the 5980 // field is empty or not. This may be used to include empty fields in 5981 // Patch requests. 5982 ForceSendFields []string `json:"-"` 5983 5984 // NullFields is a list of field names (e.g. "ConvergenceThreshold") to 5985 // include in API requests with the JSON null value. By default, fields 5986 // with empty values are omitted from API requests. However, any field 5987 // with an empty value appearing in NullFields will be sent to the 5988 // server as null. It is an error if a field in this list has a 5989 // non-empty value. This may be used to include null fields in Patch 5990 // requests. 5991 NullFields []string `json:"-"` 5992} 5993 5994func (s *IterativeCalculationSettings) MarshalJSON() ([]byte, error) { 5995 type NoMethod IterativeCalculationSettings 5996 raw := NoMethod(*s) 5997 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5998} 5999 6000func (s *IterativeCalculationSettings) UnmarshalJSON(data []byte) error { 6001 type NoMethod IterativeCalculationSettings 6002 var s1 struct { 6003 ConvergenceThreshold gensupport.JSONFloat64 `json:"convergenceThreshold"` 6004 *NoMethod 6005 } 6006 s1.NoMethod = (*NoMethod)(s) 6007 if err := json.Unmarshal(data, &s1); err != nil { 6008 return err 6009 } 6010 s.ConvergenceThreshold = float64(s1.ConvergenceThreshold) 6011 return nil 6012} 6013 6014// LineStyle: Properties that describe the style of a line. 6015type LineStyle struct { 6016 // Type: The dash type of the line. 6017 // 6018 // Possible values: 6019 // "LINE_DASH_TYPE_UNSPECIFIED" - Default value, do not use. 6020 // "INVISIBLE" - No dash type, which is equivalent to a non-visible 6021 // line. 6022 // "CUSTOM" - A custom dash for a line. Modifying the exact custom 6023 // dash style is 6024 // currently unsupported. 6025 // "SOLID" - A solid line. 6026 // "DOTTED" - A dotted line. 6027 // "MEDIUM_DASHED" - A dashed line where the dashes have "medium" 6028 // length. 6029 // "MEDIUM_DASHED_DOTTED" - A line that alternates between a "medium" 6030 // dash and a dot. 6031 // "LONG_DASHED" - A dashed line where the dashes have "long" length. 6032 // "LONG_DASHED_DOTTED" - A line that alternates between a "long" dash 6033 // and a dot. 6034 Type string `json:"type,omitempty"` 6035 6036 // Width: The thickness of the line, in px. 6037 Width int64 `json:"width,omitempty"` 6038 6039 // ForceSendFields is a list of field names (e.g. "Type") to 6040 // unconditionally include in API requests. By default, fields with 6041 // empty values are omitted from API requests. However, any non-pointer, 6042 // non-interface field appearing in ForceSendFields will be sent to the 6043 // server regardless of whether the field is empty or not. This may be 6044 // used to include empty fields in Patch requests. 6045 ForceSendFields []string `json:"-"` 6046 6047 // NullFields is a list of field names (e.g. "Type") to include in API 6048 // requests with the JSON null value. By default, fields with empty 6049 // values are omitted from API requests. However, any field with an 6050 // empty value appearing in NullFields will be sent to the server as 6051 // null. It is an error if a field in this list has a non-empty value. 6052 // This may be used to include null fields in Patch requests. 6053 NullFields []string `json:"-"` 6054} 6055 6056func (s *LineStyle) MarshalJSON() ([]byte, error) { 6057 type NoMethod LineStyle 6058 raw := NoMethod(*s) 6059 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6060} 6061 6062// ManualRule: Allows you to manually organize the values in a source 6063// data column into 6064// buckets with names of your choosing. For example, a pivot table 6065// that 6066// aggregates population by state: 6067// 6068// +-------+-------------------+ 6069// | State | SUM of Population | 6070// +-------+-------------------+ 6071// | AK | 0.7 | 6072// | AL | 4.8 | 6073// | AR | 2.9 | 6074// ... 6075// +-------+-------------------+ 6076// could be turned into a pivot table that aggregates population by time 6077// zone 6078// by providing a list of groups (for example, groupName = 6079// 'Central', 6080// items = ['AL', 'AR', 'IA', ...]) to a manual group rule. 6081// Note that a similar effect could be achieved by adding a time zone 6082// column 6083// to the source data and adjusting the pivot table. 6084// 6085// +-----------+-------------------+ 6086// | Time Zone | SUM of Population | 6087// +-----------+-------------------+ 6088// | Central | 106.3 | 6089// | Eastern | 151.9 | 6090// | Mountain | 17.4 | 6091// ... 6092// +-----------+-------------------+ 6093type ManualRule struct { 6094 // Groups: The list of group names and the corresponding items from the 6095 // source data 6096 // that map to each group name. 6097 Groups []*ManualRuleGroup `json:"groups,omitempty"` 6098 6099 // ForceSendFields is a list of field names (e.g. "Groups") to 6100 // unconditionally include in API requests. By default, fields with 6101 // empty values are omitted from API requests. However, any non-pointer, 6102 // non-interface field appearing in ForceSendFields will be sent to the 6103 // server regardless of whether the field is empty or not. This may be 6104 // used to include empty fields in Patch requests. 6105 ForceSendFields []string `json:"-"` 6106 6107 // NullFields is a list of field names (e.g. "Groups") to include in API 6108 // requests with the JSON null value. By default, fields with empty 6109 // values are omitted from API requests. However, any field with an 6110 // empty value appearing in NullFields will be sent to the server as 6111 // null. It is an error if a field in this list has a non-empty value. 6112 // This may be used to include null fields in Patch requests. 6113 NullFields []string `json:"-"` 6114} 6115 6116func (s *ManualRule) MarshalJSON() ([]byte, error) { 6117 type NoMethod ManualRule 6118 raw := NoMethod(*s) 6119 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6120} 6121 6122// ManualRuleGroup: A group name and a list of items from the source 6123// data that should be placed 6124// in the group with this name. 6125type ManualRuleGroup struct { 6126 // GroupName: The group name, which must be a string. Each group in a 6127 // given 6128 // ManualRule must have a unique group name. 6129 GroupName *ExtendedValue `json:"groupName,omitempty"` 6130 6131 // Items: The items in the source data that should be placed into this 6132 // group. Each 6133 // item may be a string, number, or boolean. Items may appear in at most 6134 // one 6135 // group within a given ManualRule. Items that do not appear in 6136 // any 6137 // group will appear on their own. 6138 Items []*ExtendedValue `json:"items,omitempty"` 6139 6140 // ForceSendFields is a list of field names (e.g. "GroupName") to 6141 // unconditionally include in API requests. By default, fields with 6142 // empty values are omitted from API requests. However, any non-pointer, 6143 // non-interface field appearing in ForceSendFields will be sent to the 6144 // server regardless of whether the field is empty or not. This may be 6145 // used to include empty fields in Patch requests. 6146 ForceSendFields []string `json:"-"` 6147 6148 // NullFields is a list of field names (e.g. "GroupName") to include in 6149 // API requests with the JSON null value. By default, fields with empty 6150 // values are omitted from API requests. However, any field with an 6151 // empty value appearing in NullFields will be sent to the server as 6152 // null. It is an error if a field in this list has a non-empty value. 6153 // This may be used to include null fields in Patch requests. 6154 NullFields []string `json:"-"` 6155} 6156 6157func (s *ManualRuleGroup) MarshalJSON() ([]byte, error) { 6158 type NoMethod ManualRuleGroup 6159 raw := NoMethod(*s) 6160 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6161} 6162 6163// MatchedDeveloperMetadata: A developer metadata entry and the data 6164// filters specified in the original 6165// request that matched it. 6166type MatchedDeveloperMetadata struct { 6167 // DataFilters: All filters matching the returned developer metadata. 6168 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6169 6170 // DeveloperMetadata: The developer metadata matching the specified 6171 // filters. 6172 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 6173 6174 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6175 // unconditionally include in API requests. By default, fields with 6176 // empty values are omitted from API requests. However, any non-pointer, 6177 // non-interface field appearing in ForceSendFields will be sent to the 6178 // server regardless of whether the field is empty or not. This may be 6179 // used to include empty fields in Patch requests. 6180 ForceSendFields []string `json:"-"` 6181 6182 // NullFields is a list of field names (e.g. "DataFilters") to include 6183 // in API requests with the JSON null value. By default, fields with 6184 // empty values are omitted from API requests. However, any field with 6185 // an empty value appearing in NullFields will be sent to the server as 6186 // null. It is an error if a field in this list has a non-empty value. 6187 // This may be used to include null fields in Patch requests. 6188 NullFields []string `json:"-"` 6189} 6190 6191func (s *MatchedDeveloperMetadata) MarshalJSON() ([]byte, error) { 6192 type NoMethod MatchedDeveloperMetadata 6193 raw := NoMethod(*s) 6194 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6195} 6196 6197// MatchedValueRange: A value range that was matched by one or more data 6198// filers. 6199type MatchedValueRange struct { 6200 // DataFilters: The DataFilters from the request that matched the range 6201 // of 6202 // values. 6203 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6204 6205 // ValueRange: The values matched by the DataFilter. 6206 ValueRange *ValueRange `json:"valueRange,omitempty"` 6207 6208 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6209 // unconditionally include in API requests. By default, fields with 6210 // empty values are omitted from API requests. However, any non-pointer, 6211 // non-interface field appearing in ForceSendFields will be sent to the 6212 // server regardless of whether the field is empty or not. This may be 6213 // used to include empty fields in Patch requests. 6214 ForceSendFields []string `json:"-"` 6215 6216 // NullFields is a list of field names (e.g. "DataFilters") to include 6217 // in API requests with the JSON null value. By default, fields with 6218 // empty values are omitted from API requests. However, any field with 6219 // an empty value appearing in NullFields will be sent to the server as 6220 // null. It is an error if a field in this list has a non-empty value. 6221 // This may be used to include null fields in Patch requests. 6222 NullFields []string `json:"-"` 6223} 6224 6225func (s *MatchedValueRange) MarshalJSON() ([]byte, error) { 6226 type NoMethod MatchedValueRange 6227 raw := NoMethod(*s) 6228 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6229} 6230 6231// MergeCellsRequest: Merges all cells in the range. 6232type MergeCellsRequest struct { 6233 // MergeType: How the cells should be merged. 6234 // 6235 // Possible values: 6236 // "MERGE_ALL" - Create a single merge from the range 6237 // "MERGE_COLUMNS" - Create a merge for each column in the range 6238 // "MERGE_ROWS" - Create a merge for each row in the range 6239 MergeType string `json:"mergeType,omitempty"` 6240 6241 // Range: The range of cells to merge. 6242 Range *GridRange `json:"range,omitempty"` 6243 6244 // ForceSendFields is a list of field names (e.g. "MergeType") to 6245 // unconditionally include in API requests. By default, fields with 6246 // empty values are omitted from API requests. However, any non-pointer, 6247 // non-interface field appearing in ForceSendFields will be sent to the 6248 // server regardless of whether the field is empty or not. This may be 6249 // used to include empty fields in Patch requests. 6250 ForceSendFields []string `json:"-"` 6251 6252 // NullFields is a list of field names (e.g. "MergeType") to include in 6253 // API requests with the JSON null value. By default, fields with empty 6254 // values are omitted from API requests. However, any field with an 6255 // empty value appearing in NullFields will be sent to the server as 6256 // null. It is an error if a field in this list has a non-empty value. 6257 // This may be used to include null fields in Patch requests. 6258 NullFields []string `json:"-"` 6259} 6260 6261func (s *MergeCellsRequest) MarshalJSON() ([]byte, error) { 6262 type NoMethod MergeCellsRequest 6263 raw := NoMethod(*s) 6264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6265} 6266 6267// MoveDimensionRequest: Moves one or more rows or columns. 6268type MoveDimensionRequest struct { 6269 // DestinationIndex: The zero-based start index of where to move the 6270 // source data to, 6271 // based on the coordinates *before* the source data is removed 6272 // from the grid. Existing data will be shifted down or 6273 // right 6274 // (depending on the dimension) to make room for the moved 6275 // dimensions. 6276 // The source dimensions are removed from the grid, so the 6277 // the data may end up in a different index than specified. 6278 // 6279 // For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to 6280 // move 6281 // "1" and "2" to between "3" and "4", the source would be 6282 // `ROWS [1..3)`,and the destination index would be "4" 6283 // (the zero-based index of row 5). 6284 // The end result would be `A1..A5` of `0, 3, 1, 2, 4`. 6285 DestinationIndex int64 `json:"destinationIndex,omitempty"` 6286 6287 // Source: The source dimensions to move. 6288 Source *DimensionRange `json:"source,omitempty"` 6289 6290 // ForceSendFields is a list of field names (e.g. "DestinationIndex") to 6291 // unconditionally include in API requests. By default, fields with 6292 // empty values are omitted from API requests. However, any non-pointer, 6293 // non-interface field appearing in ForceSendFields will be sent to the 6294 // server regardless of whether the field is empty or not. This may be 6295 // used to include empty fields in Patch requests. 6296 ForceSendFields []string `json:"-"` 6297 6298 // NullFields is a list of field names (e.g. "DestinationIndex") to 6299 // include in API requests with the JSON null value. By default, fields 6300 // with empty values are omitted from API requests. However, any field 6301 // with an empty value appearing in NullFields will be sent to the 6302 // server as null. It is an error if a field in this list has a 6303 // non-empty value. This may be used to include null fields in Patch 6304 // requests. 6305 NullFields []string `json:"-"` 6306} 6307 6308func (s *MoveDimensionRequest) MarshalJSON() ([]byte, error) { 6309 type NoMethod MoveDimensionRequest 6310 raw := NoMethod(*s) 6311 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6312} 6313 6314// NamedRange: A named range. 6315type NamedRange struct { 6316 // Name: The name of the named range. 6317 Name string `json:"name,omitempty"` 6318 6319 // NamedRangeId: The ID of the named range. 6320 NamedRangeId string `json:"namedRangeId,omitempty"` 6321 6322 // Range: The range this represents. 6323 Range *GridRange `json:"range,omitempty"` 6324 6325 // ForceSendFields is a list of field names (e.g. "Name") to 6326 // unconditionally include in API requests. By default, fields with 6327 // empty values are omitted from API requests. However, any non-pointer, 6328 // non-interface field appearing in ForceSendFields will be sent to the 6329 // server regardless of whether the field is empty or not. This may be 6330 // used to include empty fields in Patch requests. 6331 ForceSendFields []string `json:"-"` 6332 6333 // NullFields is a list of field names (e.g. "Name") to include in API 6334 // requests with the JSON null value. By default, fields with empty 6335 // values are omitted from API requests. However, any field with an 6336 // empty value appearing in NullFields will be sent to the server as 6337 // null. It is an error if a field in this list has a non-empty value. 6338 // This may be used to include null fields in Patch requests. 6339 NullFields []string `json:"-"` 6340} 6341 6342func (s *NamedRange) MarshalJSON() ([]byte, error) { 6343 type NoMethod NamedRange 6344 raw := NoMethod(*s) 6345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6346} 6347 6348// NumberFormat: The number format of a cell. 6349type NumberFormat struct { 6350 // Pattern: Pattern string used for formatting. If not set, a default 6351 // pattern based on 6352 // the user's locale will be used if necessary for the given type. 6353 // See the [Date and Number Formats guide](/sheets/api/guides/formats) 6354 // for 6355 // more information about the supported patterns. 6356 Pattern string `json:"pattern,omitempty"` 6357 6358 // Type: The type of the number format. 6359 // When writing, this field must be set. 6360 // 6361 // Possible values: 6362 // "NUMBER_FORMAT_TYPE_UNSPECIFIED" - The number format is not 6363 // specified 6364 // and is based on the contents of the cell. 6365 // Do not explicitly use this. 6366 // "TEXT" - Text formatting, e.g `1000.12` 6367 // "NUMBER" - Number formatting, e.g, `1,000.12` 6368 // "PERCENT" - Percent formatting, e.g `10.12%` 6369 // "CURRENCY" - Currency formatting, e.g `$1,000.12` 6370 // "DATE" - Date formatting, e.g `9/26/2008` 6371 // "TIME" - Time formatting, e.g `3:59:00 PM` 6372 // "DATE_TIME" - Date+Time formatting, e.g `9/26/08 15:59:00` 6373 // "SCIENTIFIC" - Scientific number formatting, e.g `1.01E+03` 6374 Type string `json:"type,omitempty"` 6375 6376 // ForceSendFields is a list of field names (e.g. "Pattern") to 6377 // unconditionally include in API requests. By default, fields with 6378 // empty values are omitted from API requests. However, any non-pointer, 6379 // non-interface field appearing in ForceSendFields will be sent to the 6380 // server regardless of whether the field is empty or not. This may be 6381 // used to include empty fields in Patch requests. 6382 ForceSendFields []string `json:"-"` 6383 6384 // NullFields is a list of field names (e.g. "Pattern") to include in 6385 // API requests with the JSON null value. By default, fields with empty 6386 // values are omitted from API requests. However, any field with an 6387 // empty value appearing in NullFields will be sent to the server as 6388 // null. It is an error if a field in this list has a non-empty value. 6389 // This may be used to include null fields in Patch requests. 6390 NullFields []string `json:"-"` 6391} 6392 6393func (s *NumberFormat) MarshalJSON() ([]byte, error) { 6394 type NoMethod NumberFormat 6395 raw := NoMethod(*s) 6396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6397} 6398 6399// OrgChartSpec: An <a 6400// href="/chart/interactive/docs/gallery/orgchart">org chart</a>. 6401// Org charts require a unique set of labels in labels and 6402// may 6403// optionally include parent_labels and tooltips. 6404// parent_labels contain, for each node, the label identifying the 6405// parent 6406// node. tooltips contain, for each node, an optional tooltip. 6407// 6408// For example, to describe an OrgChart with Alice as the CEO, Bob as 6409// the 6410// President (reporting to Alice) and Cathy as VP of Sales (also 6411// reporting to 6412// Alice), have labels contain "Alice", "Bob", "Cathy", 6413// parent_labels contain "", "Alice", "Alice" and tooltips 6414// contain 6415// "CEO", "President", "VP Sales". 6416type OrgChartSpec struct { 6417 // Labels: The data containing the labels for all the nodes in the 6418 // chart. Labels 6419 // must be unique. 6420 Labels *ChartData `json:"labels,omitempty"` 6421 6422 // NodeColor: The color of the org chart nodes. 6423 NodeColor *Color `json:"nodeColor,omitempty"` 6424 6425 // NodeSize: The size of the org chart nodes. 6426 // 6427 // Possible values: 6428 // "ORG_CHART_LABEL_SIZE_UNSPECIFIED" - Default value, do not use. 6429 // "SMALL" - The small org chart node size. 6430 // "MEDIUM" - The medium org chart node size. 6431 // "LARGE" - The large org chart node size. 6432 NodeSize string `json:"nodeSize,omitempty"` 6433 6434 // ParentLabels: The data containing the label of the parent for the 6435 // corresponding node. 6436 // A blank value indicates that the node has no parent and is a 6437 // top-level 6438 // node. 6439 // This field is optional. 6440 ParentLabels *ChartData `json:"parentLabels,omitempty"` 6441 6442 // SelectedNodeColor: The color of the selected org chart nodes. 6443 SelectedNodeColor *Color `json:"selectedNodeColor,omitempty"` 6444 6445 // Tooltips: The data containing the tooltip for the corresponding node. 6446 // A blank value 6447 // results in no tooltip being displayed for the node. 6448 // This field is optional. 6449 Tooltips *ChartData `json:"tooltips,omitempty"` 6450 6451 // ForceSendFields is a list of field names (e.g. "Labels") to 6452 // unconditionally include in API requests. By default, fields with 6453 // empty values are omitted from API requests. However, any non-pointer, 6454 // non-interface field appearing in ForceSendFields will be sent to the 6455 // server regardless of whether the field is empty or not. This may be 6456 // used to include empty fields in Patch requests. 6457 ForceSendFields []string `json:"-"` 6458 6459 // NullFields is a list of field names (e.g. "Labels") to include in API 6460 // requests with the JSON null value. By default, fields with empty 6461 // values are omitted from API requests. However, any field with an 6462 // empty value appearing in NullFields will be sent to the server as 6463 // null. It is an error if a field in this list has a non-empty value. 6464 // This may be used to include null fields in Patch requests. 6465 NullFields []string `json:"-"` 6466} 6467 6468func (s *OrgChartSpec) MarshalJSON() ([]byte, error) { 6469 type NoMethod OrgChartSpec 6470 raw := NoMethod(*s) 6471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6472} 6473 6474// OverlayPosition: The location an object is overlaid on top of a grid. 6475type OverlayPosition struct { 6476 // AnchorCell: The cell the object is anchored to. 6477 AnchorCell *GridCoordinate `json:"anchorCell,omitempty"` 6478 6479 // HeightPixels: The height of the object, in pixels. Defaults to 371. 6480 HeightPixels int64 `json:"heightPixels,omitempty"` 6481 6482 // OffsetXPixels: The horizontal offset, in pixels, that the object is 6483 // offset 6484 // from the anchor cell. 6485 OffsetXPixels int64 `json:"offsetXPixels,omitempty"` 6486 6487 // OffsetYPixels: The vertical offset, in pixels, that the object is 6488 // offset 6489 // from the anchor cell. 6490 OffsetYPixels int64 `json:"offsetYPixels,omitempty"` 6491 6492 // WidthPixels: The width of the object, in pixels. Defaults to 600. 6493 WidthPixels int64 `json:"widthPixels,omitempty"` 6494 6495 // ForceSendFields is a list of field names (e.g. "AnchorCell") to 6496 // unconditionally include in API requests. By default, fields with 6497 // empty values are omitted from API requests. However, any non-pointer, 6498 // non-interface field appearing in ForceSendFields will be sent to the 6499 // server regardless of whether the field is empty or not. This may be 6500 // used to include empty fields in Patch requests. 6501 ForceSendFields []string `json:"-"` 6502 6503 // NullFields is a list of field names (e.g. "AnchorCell") to include in 6504 // API requests with the JSON null value. By default, fields with empty 6505 // values are omitted from API requests. However, any field with an 6506 // empty value appearing in NullFields will be sent to the server as 6507 // null. It is an error if a field in this list has a non-empty value. 6508 // This may be used to include null fields in Patch requests. 6509 NullFields []string `json:"-"` 6510} 6511 6512func (s *OverlayPosition) MarshalJSON() ([]byte, error) { 6513 type NoMethod OverlayPosition 6514 raw := NoMethod(*s) 6515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6516} 6517 6518// Padding: The amount of padding around the cell, in pixels. 6519// When updating padding, every field must be specified. 6520type Padding struct { 6521 // Bottom: The bottom padding of the cell. 6522 Bottom int64 `json:"bottom,omitempty"` 6523 6524 // Left: The left padding of the cell. 6525 Left int64 `json:"left,omitempty"` 6526 6527 // Right: The right padding of the cell. 6528 Right int64 `json:"right,omitempty"` 6529 6530 // Top: The top padding of the cell. 6531 Top int64 `json:"top,omitempty"` 6532 6533 // ForceSendFields is a list of field names (e.g. "Bottom") to 6534 // unconditionally include in API requests. By default, fields with 6535 // empty values are omitted from API requests. However, any non-pointer, 6536 // non-interface field appearing in ForceSendFields will be sent to the 6537 // server regardless of whether the field is empty or not. This may be 6538 // used to include empty fields in Patch requests. 6539 ForceSendFields []string `json:"-"` 6540 6541 // NullFields is a list of field names (e.g. "Bottom") to include in API 6542 // requests with the JSON null value. By default, fields with empty 6543 // values are omitted from API requests. However, any field with an 6544 // empty value appearing in NullFields will be sent to the server as 6545 // null. It is an error if a field in this list has a non-empty value. 6546 // This may be used to include null fields in Patch requests. 6547 NullFields []string `json:"-"` 6548} 6549 6550func (s *Padding) MarshalJSON() ([]byte, error) { 6551 type NoMethod Padding 6552 raw := NoMethod(*s) 6553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6554} 6555 6556// PasteDataRequest: Inserts data into the spreadsheet starting at the 6557// specified coordinate. 6558type PasteDataRequest struct { 6559 // Coordinate: The coordinate at which the data should start being 6560 // inserted. 6561 Coordinate *GridCoordinate `json:"coordinate,omitempty"` 6562 6563 // Data: The data to insert. 6564 Data string `json:"data,omitempty"` 6565 6566 // Delimiter: The delimiter in the data. 6567 Delimiter string `json:"delimiter,omitempty"` 6568 6569 // Html: True if the data is HTML. 6570 Html bool `json:"html,omitempty"` 6571 6572 // Type: How the data should be pasted. 6573 // 6574 // Possible values: 6575 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 6576 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 6577 // or merges. 6578 // "PASTE_FORMAT" - Paste the format and data validation only. 6579 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 6580 // "PASTE_FORMULA" - Paste the formulas only. 6581 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 6582 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 6583 // rules only. 6584 Type string `json:"type,omitempty"` 6585 6586 // ForceSendFields is a list of field names (e.g. "Coordinate") to 6587 // unconditionally include in API requests. By default, fields with 6588 // empty values are omitted from API requests. However, any non-pointer, 6589 // non-interface field appearing in ForceSendFields will be sent to the 6590 // server regardless of whether the field is empty or not. This may be 6591 // used to include empty fields in Patch requests. 6592 ForceSendFields []string `json:"-"` 6593 6594 // NullFields is a list of field names (e.g. "Coordinate") to include in 6595 // API requests with the JSON null value. By default, fields with empty 6596 // values are omitted from API requests. However, any field with an 6597 // empty value appearing in NullFields will be sent to the server as 6598 // null. It is an error if a field in this list has a non-empty value. 6599 // This may be used to include null fields in Patch requests. 6600 NullFields []string `json:"-"` 6601} 6602 6603func (s *PasteDataRequest) MarshalJSON() ([]byte, error) { 6604 type NoMethod PasteDataRequest 6605 raw := NoMethod(*s) 6606 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6607} 6608 6609// PieChartSpec: A <a 6610// href="/chart/interactive/docs/gallery/piechart">pie chart</a>. 6611type PieChartSpec struct { 6612 // Domain: The data that covers the domain of the pie chart. 6613 Domain *ChartData `json:"domain,omitempty"` 6614 6615 // LegendPosition: Where the legend of the pie chart should be drawn. 6616 // 6617 // Possible values: 6618 // "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 6619 // use. 6620 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 6621 // chart. 6622 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 6623 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 6624 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 6625 // "NO_LEGEND" - No legend is rendered. 6626 // "LABELED_LEGEND" - Each pie slice has a label attached to it. 6627 LegendPosition string `json:"legendPosition,omitempty"` 6628 6629 // PieHole: The size of the hole in the pie chart. 6630 PieHole float64 `json:"pieHole,omitempty"` 6631 6632 // Series: The data that covers the one and only series of the pie 6633 // chart. 6634 Series *ChartData `json:"series,omitempty"` 6635 6636 // ThreeDimensional: True if the pie is three dimensional. 6637 ThreeDimensional bool `json:"threeDimensional,omitempty"` 6638 6639 // ForceSendFields is a list of field names (e.g. "Domain") to 6640 // unconditionally include in API requests. By default, fields with 6641 // empty values are omitted from API requests. However, any non-pointer, 6642 // non-interface field appearing in ForceSendFields will be sent to the 6643 // server regardless of whether the field is empty or not. This may be 6644 // used to include empty fields in Patch requests. 6645 ForceSendFields []string `json:"-"` 6646 6647 // NullFields is a list of field names (e.g. "Domain") to include in API 6648 // requests with the JSON null value. By default, fields with empty 6649 // values are omitted from API requests. However, any field with an 6650 // empty value appearing in NullFields will be sent to the server as 6651 // null. It is an error if a field in this list has a non-empty value. 6652 // This may be used to include null fields in Patch requests. 6653 NullFields []string `json:"-"` 6654} 6655 6656func (s *PieChartSpec) MarshalJSON() ([]byte, error) { 6657 type NoMethod PieChartSpec 6658 raw := NoMethod(*s) 6659 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6660} 6661 6662func (s *PieChartSpec) UnmarshalJSON(data []byte) error { 6663 type NoMethod PieChartSpec 6664 var s1 struct { 6665 PieHole gensupport.JSONFloat64 `json:"pieHole"` 6666 *NoMethod 6667 } 6668 s1.NoMethod = (*NoMethod)(s) 6669 if err := json.Unmarshal(data, &s1); err != nil { 6670 return err 6671 } 6672 s.PieHole = float64(s1.PieHole) 6673 return nil 6674} 6675 6676// PivotFilterCriteria: Criteria for showing/hiding rows in a pivot 6677// table. 6678type PivotFilterCriteria struct { 6679 // VisibleValues: Values that should be included. Values not listed 6680 // here are excluded. 6681 VisibleValues []string `json:"visibleValues,omitempty"` 6682 6683 // ForceSendFields is a list of field names (e.g. "VisibleValues") to 6684 // unconditionally include in API requests. By default, fields with 6685 // empty values are omitted from API requests. However, any non-pointer, 6686 // non-interface field appearing in ForceSendFields will be sent to the 6687 // server regardless of whether the field is empty or not. This may be 6688 // used to include empty fields in Patch requests. 6689 ForceSendFields []string `json:"-"` 6690 6691 // NullFields is a list of field names (e.g. "VisibleValues") to include 6692 // in API requests with the JSON null value. By default, fields with 6693 // empty values are omitted from API requests. However, any field with 6694 // an empty value appearing in NullFields will be sent to the server as 6695 // null. It is an error if a field in this list has a non-empty value. 6696 // This may be used to include null fields in Patch requests. 6697 NullFields []string `json:"-"` 6698} 6699 6700func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) { 6701 type NoMethod PivotFilterCriteria 6702 raw := NoMethod(*s) 6703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6704} 6705 6706// PivotGroup: A single grouping (either row or column) in a pivot 6707// table. 6708type PivotGroup struct { 6709 // GroupRule: The group rule to apply to this row/column group. 6710 GroupRule *PivotGroupRule `json:"groupRule,omitempty"` 6711 6712 // Label: The labels to use for the row/column groups which can be 6713 // customized. For 6714 // example, in the following pivot table, the row label is `Region` 6715 // (which 6716 // could be renamed to `State`) and the column label is `Product` 6717 // (which 6718 // could be renamed `Item`). Pivot tables created before December 2017 6719 // do 6720 // not have header labels. If you'd like to add header labels to an 6721 // existing 6722 // pivot table, please delete the existing pivot table and then create a 6723 // new 6724 // pivot table with same parameters. 6725 // 6726 // +--------------+---------+-------+ 6727 // | SUM of Units | Product | | 6728 // | Region | Pen | Paper | 6729 // +--------------+---------+-------+ 6730 // | New York | 345 | 98 | 6731 // | Oregon | 234 | 123 | 6732 // | Tennessee | 531 | 415 | 6733 // +--------------+---------+-------+ 6734 // | Grand Total | 1110 | 636 | 6735 // +--------------+---------+-------+ 6736 Label string `json:"label,omitempty"` 6737 6738 // RepeatHeadings: True if the headings in this pivot group should be 6739 // repeated. 6740 // This is only valid for row groupings and is ignored by columns. 6741 // 6742 // By default, we minimize repitition of headings by not showing 6743 // higher 6744 // level headings where they are the same. For example, even though 6745 // the 6746 // third row below corresponds to "Q1 Mar", "Q1" is not shown because 6747 // it is redundant with previous rows. Setting repeat_headings to 6748 // true 6749 // would cause "Q1" to be repeated for "Feb" and "Mar". 6750 // 6751 // +--------------+ 6752 // | Q1 | Jan | 6753 // | | Feb | 6754 // | | Mar | 6755 // +--------+-----+ 6756 // | Q1 Total | 6757 // +--------------+ 6758 RepeatHeadings bool `json:"repeatHeadings,omitempty"` 6759 6760 // ShowTotals: True if the pivot table should include the totals for 6761 // this grouping. 6762 ShowTotals bool `json:"showTotals,omitempty"` 6763 6764 // SortOrder: The order the values in this group should be sorted. 6765 // 6766 // Possible values: 6767 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 6768 // "ASCENDING" - Sort ascending. 6769 // "DESCENDING" - Sort descending. 6770 SortOrder string `json:"sortOrder,omitempty"` 6771 6772 // SourceColumnOffset: The column offset of the source range that this 6773 // grouping is based on. 6774 // 6775 // For example, if the source was `C10:E15`, a `sourceColumnOffset` of 6776 // `0` 6777 // means this group refers to column `C`, whereas the offset `1` would 6778 // refer 6779 // to column `D`. 6780 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 6781 6782 // ValueBucket: The bucket of the opposite pivot group to sort by. 6783 // If not specified, sorting is alphabetical by this group's values. 6784 ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"` 6785 6786 // ValueMetadata: Metadata about values in the grouping. 6787 ValueMetadata []*PivotGroupValueMetadata `json:"valueMetadata,omitempty"` 6788 6789 // ForceSendFields is a list of field names (e.g. "GroupRule") to 6790 // unconditionally include in API requests. By default, fields with 6791 // empty values are omitted from API requests. However, any non-pointer, 6792 // non-interface field appearing in ForceSendFields will be sent to the 6793 // server regardless of whether the field is empty or not. This may be 6794 // used to include empty fields in Patch requests. 6795 ForceSendFields []string `json:"-"` 6796 6797 // NullFields is a list of field names (e.g. "GroupRule") to include in 6798 // API requests with the JSON null value. By default, fields with empty 6799 // values are omitted from API requests. However, any field with an 6800 // empty value appearing in NullFields will be sent to the server as 6801 // null. It is an error if a field in this list has a non-empty value. 6802 // This may be used to include null fields in Patch requests. 6803 NullFields []string `json:"-"` 6804} 6805 6806func (s *PivotGroup) MarshalJSON() ([]byte, error) { 6807 type NoMethod PivotGroup 6808 raw := NoMethod(*s) 6809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6810} 6811 6812// PivotGroupRule: An optional setting on a PivotGroup that defines 6813// buckets for the values 6814// in the source data column rather than breaking out each individual 6815// value. 6816// Only one PivotGroup with a group rule may be added for each column 6817// in 6818// the source data, though on any given column you may add both 6819// a 6820// PivotGroup that has a rule and a PivotGroup that does not. 6821type PivotGroupRule struct { 6822 // DateTimeRule: A DateTimeRule. 6823 DateTimeRule *DateTimeRule `json:"dateTimeRule,omitempty"` 6824 6825 // HistogramRule: A HistogramRule. 6826 HistogramRule *HistogramRule `json:"histogramRule,omitempty"` 6827 6828 // ManualRule: A ManualRule. 6829 ManualRule *ManualRule `json:"manualRule,omitempty"` 6830 6831 // ForceSendFields is a list of field names (e.g. "DateTimeRule") to 6832 // unconditionally include in API requests. By default, fields with 6833 // empty values are omitted from API requests. However, any non-pointer, 6834 // non-interface field appearing in ForceSendFields will be sent to the 6835 // server regardless of whether the field is empty or not. This may be 6836 // used to include empty fields in Patch requests. 6837 ForceSendFields []string `json:"-"` 6838 6839 // NullFields is a list of field names (e.g. "DateTimeRule") to include 6840 // in API requests with the JSON null value. By default, fields with 6841 // empty values are omitted from API requests. However, any field with 6842 // an empty value appearing in NullFields will be sent to the server as 6843 // null. It is an error if a field in this list has a non-empty value. 6844 // This may be used to include null fields in Patch requests. 6845 NullFields []string `json:"-"` 6846} 6847 6848func (s *PivotGroupRule) MarshalJSON() ([]byte, error) { 6849 type NoMethod PivotGroupRule 6850 raw := NoMethod(*s) 6851 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6852} 6853 6854// PivotGroupSortValueBucket: Information about which values in a pivot 6855// group should be used for sorting. 6856type PivotGroupSortValueBucket struct { 6857 // Buckets: Determines the bucket from which values are chosen to 6858 // sort. 6859 // 6860 // For example, in a pivot table with one row group & two column 6861 // groups, 6862 // the row group can list up to two values. The first value 6863 // corresponds 6864 // to a value within the first column group, and the second 6865 // value 6866 // corresponds to a value in the second column group. If no values 6867 // are listed, this would indicate that the row should be sorted 6868 // according 6869 // to the "Grand Total" over the column groups. If a single value is 6870 // listed, 6871 // this would correspond to using the "Total" of that bucket. 6872 Buckets []*ExtendedValue `json:"buckets,omitempty"` 6873 6874 // ValuesIndex: The offset in the PivotTable.values list which the 6875 // values in this 6876 // grouping should be sorted by. 6877 ValuesIndex int64 `json:"valuesIndex,omitempty"` 6878 6879 // ForceSendFields is a list of field names (e.g. "Buckets") to 6880 // unconditionally include in API requests. By default, fields with 6881 // empty values are omitted from API requests. However, any non-pointer, 6882 // non-interface field appearing in ForceSendFields will be sent to the 6883 // server regardless of whether the field is empty or not. This may be 6884 // used to include empty fields in Patch requests. 6885 ForceSendFields []string `json:"-"` 6886 6887 // NullFields is a list of field names (e.g. "Buckets") to include in 6888 // API requests with the JSON null value. By default, fields with empty 6889 // values are omitted from API requests. However, any field with an 6890 // empty value appearing in NullFields will be sent to the server as 6891 // null. It is an error if a field in this list has a non-empty value. 6892 // This may be used to include null fields in Patch requests. 6893 NullFields []string `json:"-"` 6894} 6895 6896func (s *PivotGroupSortValueBucket) MarshalJSON() ([]byte, error) { 6897 type NoMethod PivotGroupSortValueBucket 6898 raw := NoMethod(*s) 6899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6900} 6901 6902// PivotGroupValueMetadata: Metadata about a value in a pivot grouping. 6903type PivotGroupValueMetadata struct { 6904 // Collapsed: True if the data corresponding to the value is collapsed. 6905 Collapsed bool `json:"collapsed,omitempty"` 6906 6907 // Value: The calculated value the metadata corresponds to. 6908 // (Note that formulaValue is not valid, 6909 // because the values will be calculated.) 6910 Value *ExtendedValue `json:"value,omitempty"` 6911 6912 // ForceSendFields is a list of field names (e.g. "Collapsed") to 6913 // unconditionally include in API requests. By default, fields with 6914 // empty values are omitted from API requests. However, any non-pointer, 6915 // non-interface field appearing in ForceSendFields will be sent to the 6916 // server regardless of whether the field is empty or not. This may be 6917 // used to include empty fields in Patch requests. 6918 ForceSendFields []string `json:"-"` 6919 6920 // NullFields is a list of field names (e.g. "Collapsed") to include in 6921 // API requests with the JSON null value. By default, fields with empty 6922 // values are omitted from API requests. However, any field with an 6923 // empty value appearing in NullFields will be sent to the server as 6924 // null. It is an error if a field in this list has a non-empty value. 6925 // This may be used to include null fields in Patch requests. 6926 NullFields []string `json:"-"` 6927} 6928 6929func (s *PivotGroupValueMetadata) MarshalJSON() ([]byte, error) { 6930 type NoMethod PivotGroupValueMetadata 6931 raw := NoMethod(*s) 6932 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6933} 6934 6935// PivotTable: A pivot table. 6936type PivotTable struct { 6937 // Columns: Each column grouping in the pivot table. 6938 Columns []*PivotGroup `json:"columns,omitempty"` 6939 6940 // Criteria: An optional mapping of filters per source column 6941 // offset. 6942 // 6943 // The filters are applied before aggregating data into the pivot 6944 // table. 6945 // The map's key is the column offset of the source range that you want 6946 // to 6947 // filter, and the value is the criteria for that column. 6948 // 6949 // For example, if the source was `C10:E15`, a key of `0` will have the 6950 // filter 6951 // for column `C`, whereas the key `1` is for column `D`. 6952 Criteria map[string]PivotFilterCriteria `json:"criteria,omitempty"` 6953 6954 // Rows: Each row grouping in the pivot table. 6955 Rows []*PivotGroup `json:"rows,omitempty"` 6956 6957 // Source: The range the pivot table is reading data from. 6958 Source *GridRange `json:"source,omitempty"` 6959 6960 // ValueLayout: Whether values should be listed horizontally (as 6961 // columns) 6962 // or vertically (as rows). 6963 // 6964 // Possible values: 6965 // "HORIZONTAL" - Values are laid out horizontally (as columns). 6966 // "VERTICAL" - Values are laid out vertically (as rows). 6967 ValueLayout string `json:"valueLayout,omitempty"` 6968 6969 // Values: A list of values to include in the pivot table. 6970 Values []*PivotValue `json:"values,omitempty"` 6971 6972 // ForceSendFields is a list of field names (e.g. "Columns") to 6973 // unconditionally include in API requests. By default, fields with 6974 // empty values are omitted from API requests. However, any non-pointer, 6975 // non-interface field appearing in ForceSendFields will be sent to the 6976 // server regardless of whether the field is empty or not. This may be 6977 // used to include empty fields in Patch requests. 6978 ForceSendFields []string `json:"-"` 6979 6980 // NullFields is a list of field names (e.g. "Columns") to include in 6981 // API requests with the JSON null value. By default, fields with empty 6982 // values are omitted from API requests. However, any field with an 6983 // empty value appearing in NullFields will be sent to the server as 6984 // null. It is an error if a field in this list has a non-empty value. 6985 // This may be used to include null fields in Patch requests. 6986 NullFields []string `json:"-"` 6987} 6988 6989func (s *PivotTable) MarshalJSON() ([]byte, error) { 6990 type NoMethod PivotTable 6991 raw := NoMethod(*s) 6992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6993} 6994 6995// PivotValue: The definition of how a value in a pivot table should be 6996// calculated. 6997type PivotValue struct { 6998 // CalculatedDisplayType: If specified, indicates that pivot values 6999 // should be displayed as 7000 // the result of a calculation with another pivot value. For example, 7001 // if 7002 // calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all 7003 // the 7004 // pivot values are displayed as the percentage of the grand total. 7005 // In 7006 // the Sheets UI, this is referred to as "Show As" in the value section 7007 // of a 7008 // pivot table. 7009 // 7010 // Possible values: 7011 // "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" - Default value, 7012 // do not use. 7013 // "PERCENT_OF_ROW_TOTAL" - Shows the pivot values as percentage of 7014 // the row total values. 7015 // "PERCENT_OF_COLUMN_TOTAL" - Shows the pivot values as percentage of 7016 // the column total values. 7017 // "PERCENT_OF_GRAND_TOTAL" - Shows the pivot values as percentage of 7018 // the grand total values. 7019 CalculatedDisplayType string `json:"calculatedDisplayType,omitempty"` 7020 7021 // Formula: A custom formula to calculate the value. The formula must 7022 // start 7023 // with an `=` character. 7024 Formula string `json:"formula,omitempty"` 7025 7026 // Name: A name to use for the value. 7027 Name string `json:"name,omitempty"` 7028 7029 // SourceColumnOffset: The column offset of the source range that this 7030 // value reads from. 7031 // 7032 // For example, if the source was `C10:E15`, a `sourceColumnOffset` of 7033 // `0` 7034 // means this value refers to column `C`, whereas the offset `1` 7035 // would 7036 // refer to column `D`. 7037 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 7038 7039 // SummarizeFunction: A function to summarize the value. 7040 // If formula is set, the only supported values are 7041 // SUM and 7042 // CUSTOM. 7043 // If sourceColumnOffset is set, then `CUSTOM` 7044 // is not supported. 7045 // 7046 // Possible values: 7047 // "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" - The default, do not 7048 // use. 7049 // "SUM" - Corresponds to the `SUM` function. 7050 // "COUNTA" - Corresponds to the `COUNTA` function. 7051 // "COUNT" - Corresponds to the `COUNT` function. 7052 // "COUNTUNIQUE" - Corresponds to the `COUNTUNIQUE` function. 7053 // "AVERAGE" - Corresponds to the `AVERAGE` function. 7054 // "MAX" - Corresponds to the `MAX` function. 7055 // "MIN" - Corresponds to the `MIN` function. 7056 // "MEDIAN" - Corresponds to the `MEDIAN` function. 7057 // "PRODUCT" - Corresponds to the `PRODUCT` function. 7058 // "STDEV" - Corresponds to the `STDEV` function. 7059 // "STDEVP" - Corresponds to the `STDEVP` function. 7060 // "VAR" - Corresponds to the `VAR` function. 7061 // "VARP" - Corresponds to the `VARP` function. 7062 // "CUSTOM" - Indicates the formula should be used as-is. 7063 // Only valid if PivotValue.formula was set. 7064 SummarizeFunction string `json:"summarizeFunction,omitempty"` 7065 7066 // ForceSendFields is a list of field names (e.g. 7067 // "CalculatedDisplayType") to unconditionally include in API requests. 7068 // By default, fields with empty values are omitted from API requests. 7069 // However, any non-pointer, non-interface field appearing in 7070 // ForceSendFields will be sent to the server regardless of whether the 7071 // field is empty or not. This may be used to include empty fields in 7072 // Patch requests. 7073 ForceSendFields []string `json:"-"` 7074 7075 // NullFields is a list of field names (e.g. "CalculatedDisplayType") to 7076 // include in API requests with the JSON null value. By default, fields 7077 // with empty values are omitted from API requests. However, any field 7078 // with an empty value appearing in NullFields will be sent to the 7079 // server as null. It is an error if a field in this list has a 7080 // non-empty value. This may be used to include null fields in Patch 7081 // requests. 7082 NullFields []string `json:"-"` 7083} 7084 7085func (s *PivotValue) MarshalJSON() ([]byte, error) { 7086 type NoMethod PivotValue 7087 raw := NoMethod(*s) 7088 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7089} 7090 7091// ProtectedRange: A protected range. 7092type ProtectedRange struct { 7093 // Description: The description of this protected range. 7094 Description string `json:"description,omitempty"` 7095 7096 // Editors: The users and groups with edit access to the protected 7097 // range. 7098 // This field is only visible to users with edit access to the 7099 // protected 7100 // range and the document. 7101 // Editors are not supported with warning_only protection. 7102 Editors *Editors `json:"editors,omitempty"` 7103 7104 // NamedRangeId: The named range this protected range is backed by, if 7105 // any. 7106 // 7107 // When writing, only one of range or named_range_id 7108 // may be set. 7109 NamedRangeId string `json:"namedRangeId,omitempty"` 7110 7111 // ProtectedRangeId: The ID of the protected range. 7112 // This field is read-only. 7113 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 7114 7115 // Range: The range that is being protected. 7116 // The range may be fully unbounded, in which case this is considered 7117 // a protected sheet. 7118 // 7119 // When writing, only one of range or named_range_id 7120 // may be set. 7121 Range *GridRange `json:"range,omitempty"` 7122 7123 // RequestingUserCanEdit: True if the user who requested this protected 7124 // range can edit the 7125 // protected area. 7126 // This field is read-only. 7127 RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"` 7128 7129 // UnprotectedRanges: The list of unprotected ranges within a protected 7130 // sheet. 7131 // Unprotected ranges are only supported on protected sheets. 7132 UnprotectedRanges []*GridRange `json:"unprotectedRanges,omitempty"` 7133 7134 // WarningOnly: True if this protected range will show a warning when 7135 // editing. 7136 // Warning-based protection means that every user can edit data in 7137 // the 7138 // protected range, except editing will prompt a warning asking the 7139 // user 7140 // to confirm the edit. 7141 // 7142 // When writing: if this field is true, then editors is 7143 // ignored. 7144 // Additionally, if this field is changed from true to false and 7145 // the 7146 // `editors` field is not set (nor included in the field mask), then 7147 // the editors will be set to all the editors in the document. 7148 WarningOnly bool `json:"warningOnly,omitempty"` 7149 7150 // ForceSendFields is a list of field names (e.g. "Description") to 7151 // unconditionally include in API requests. By default, fields with 7152 // empty values are omitted from API requests. However, any non-pointer, 7153 // non-interface field appearing in ForceSendFields will be sent to the 7154 // server regardless of whether the field is empty or not. This may be 7155 // used to include empty fields in Patch requests. 7156 ForceSendFields []string `json:"-"` 7157 7158 // NullFields is a list of field names (e.g. "Description") to include 7159 // in API requests with the JSON null value. By default, fields with 7160 // empty values are omitted from API requests. However, any field with 7161 // an empty value appearing in NullFields will be sent to the server as 7162 // null. It is an error if a field in this list has a non-empty value. 7163 // This may be used to include null fields in Patch requests. 7164 NullFields []string `json:"-"` 7165} 7166 7167func (s *ProtectedRange) MarshalJSON() ([]byte, error) { 7168 type NoMethod ProtectedRange 7169 raw := NoMethod(*s) 7170 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7171} 7172 7173// RandomizeRangeRequest: Randomizes the order of the rows in a range. 7174type RandomizeRangeRequest struct { 7175 // Range: The range to randomize. 7176 Range *GridRange `json:"range,omitempty"` 7177 7178 // ForceSendFields is a list of field names (e.g. "Range") to 7179 // unconditionally include in API requests. By default, fields with 7180 // empty values are omitted from API requests. However, any non-pointer, 7181 // non-interface field appearing in ForceSendFields will be sent to the 7182 // server regardless of whether the field is empty or not. This may be 7183 // used to include empty fields in Patch requests. 7184 ForceSendFields []string `json:"-"` 7185 7186 // NullFields is a list of field names (e.g. "Range") to include in API 7187 // requests with the JSON null value. By default, fields with empty 7188 // values are omitted from API requests. However, any field with an 7189 // empty value appearing in NullFields will be sent to the server as 7190 // null. It is an error if a field in this list has a non-empty value. 7191 // This may be used to include null fields in Patch requests. 7192 NullFields []string `json:"-"` 7193} 7194 7195func (s *RandomizeRangeRequest) MarshalJSON() ([]byte, error) { 7196 type NoMethod RandomizeRangeRequest 7197 raw := NoMethod(*s) 7198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7199} 7200 7201// RepeatCellRequest: Updates all cells in the range to the values in 7202// the given Cell object. 7203// Only the fields listed in the fields field are updated; others 7204// are 7205// unchanged. 7206// 7207// If writing a cell with a formula, the formula's ranges will 7208// automatically 7209// increment for each field in the range. 7210// For example, if writing a cell with formula `=A1` into range 7211// B2:C4, 7212// B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, 7213// C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. 7214// 7215// To keep the formula's ranges static, use the `$` indicator. 7216// For example, use the formula `=$A$1` to prevent both the row and 7217// the 7218// column from incrementing. 7219type RepeatCellRequest struct { 7220 // Cell: The data to write. 7221 Cell *CellData `json:"cell,omitempty"` 7222 7223 // Fields: The fields that should be updated. At least one field must 7224 // be specified. 7225 // The root `cell` is implied and should not be specified. 7226 // A single "*" can be used as short-hand for listing every field. 7227 Fields string `json:"fields,omitempty"` 7228 7229 // Range: The range to repeat the cell in. 7230 Range *GridRange `json:"range,omitempty"` 7231 7232 // ForceSendFields is a list of field names (e.g. "Cell") to 7233 // unconditionally include in API requests. By default, fields with 7234 // empty values are omitted from API requests. However, any non-pointer, 7235 // non-interface field appearing in ForceSendFields will be sent to the 7236 // server regardless of whether the field is empty or not. This may be 7237 // used to include empty fields in Patch requests. 7238 ForceSendFields []string `json:"-"` 7239 7240 // NullFields is a list of field names (e.g. "Cell") to include in API 7241 // requests with the JSON null value. By default, fields with empty 7242 // values are omitted from API requests. However, any field with an 7243 // empty value appearing in NullFields will be sent to the server as 7244 // null. It is an error if a field in this list has a non-empty value. 7245 // This may be used to include null fields in Patch requests. 7246 NullFields []string `json:"-"` 7247} 7248 7249func (s *RepeatCellRequest) MarshalJSON() ([]byte, error) { 7250 type NoMethod RepeatCellRequest 7251 raw := NoMethod(*s) 7252 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7253} 7254 7255// Request: A single kind of update to apply to a spreadsheet. 7256type Request struct { 7257 // AddBanding: Adds a new banded range 7258 AddBanding *AddBandingRequest `json:"addBanding,omitempty"` 7259 7260 // AddChart: Adds a chart. 7261 AddChart *AddChartRequest `json:"addChart,omitempty"` 7262 7263 // AddConditionalFormatRule: Adds a new conditional format rule. 7264 AddConditionalFormatRule *AddConditionalFormatRuleRequest `json:"addConditionalFormatRule,omitempty"` 7265 7266 // AddDimensionGroup: Creates a group over the specified range. 7267 AddDimensionGroup *AddDimensionGroupRequest `json:"addDimensionGroup,omitempty"` 7268 7269 // AddFilterView: Adds a filter view. 7270 AddFilterView *AddFilterViewRequest `json:"addFilterView,omitempty"` 7271 7272 // AddNamedRange: Adds a named range. 7273 AddNamedRange *AddNamedRangeRequest `json:"addNamedRange,omitempty"` 7274 7275 // AddProtectedRange: Adds a protected range. 7276 AddProtectedRange *AddProtectedRangeRequest `json:"addProtectedRange,omitempty"` 7277 7278 // AddSheet: Adds a sheet. 7279 AddSheet *AddSheetRequest `json:"addSheet,omitempty"` 7280 7281 // AppendCells: Appends cells after the last row with data in a sheet. 7282 AppendCells *AppendCellsRequest `json:"appendCells,omitempty"` 7283 7284 // AppendDimension: Appends dimensions to the end of a sheet. 7285 AppendDimension *AppendDimensionRequest `json:"appendDimension,omitempty"` 7286 7287 // AutoFill: Automatically fills in more data based on existing data. 7288 AutoFill *AutoFillRequest `json:"autoFill,omitempty"` 7289 7290 // AutoResizeDimensions: Automatically resizes one or more dimensions 7291 // based on the contents 7292 // of the cells in that dimension. 7293 AutoResizeDimensions *AutoResizeDimensionsRequest `json:"autoResizeDimensions,omitempty"` 7294 7295 // ClearBasicFilter: Clears the basic filter on a sheet. 7296 ClearBasicFilter *ClearBasicFilterRequest `json:"clearBasicFilter,omitempty"` 7297 7298 // CopyPaste: Copies data from one area and pastes it to another. 7299 CopyPaste *CopyPasteRequest `json:"copyPaste,omitempty"` 7300 7301 // CreateDeveloperMetadata: Creates new developer metadata 7302 CreateDeveloperMetadata *CreateDeveloperMetadataRequest `json:"createDeveloperMetadata,omitempty"` 7303 7304 // CutPaste: Cuts data from one area and pastes it to another. 7305 CutPaste *CutPasteRequest `json:"cutPaste,omitempty"` 7306 7307 // DeleteBanding: Removes a banded range 7308 DeleteBanding *DeleteBandingRequest `json:"deleteBanding,omitempty"` 7309 7310 // DeleteConditionalFormatRule: Deletes an existing conditional format 7311 // rule. 7312 DeleteConditionalFormatRule *DeleteConditionalFormatRuleRequest `json:"deleteConditionalFormatRule,omitempty"` 7313 7314 // DeleteDeveloperMetadata: Deletes developer metadata 7315 DeleteDeveloperMetadata *DeleteDeveloperMetadataRequest `json:"deleteDeveloperMetadata,omitempty"` 7316 7317 // DeleteDimension: Deletes rows or columns in a sheet. 7318 DeleteDimension *DeleteDimensionRequest `json:"deleteDimension,omitempty"` 7319 7320 // DeleteDimensionGroup: Deletes a group over the specified range. 7321 DeleteDimensionGroup *DeleteDimensionGroupRequest `json:"deleteDimensionGroup,omitempty"` 7322 7323 // DeleteEmbeddedObject: Deletes an embedded object (e.g, chart, image) 7324 // in a sheet. 7325 DeleteEmbeddedObject *DeleteEmbeddedObjectRequest `json:"deleteEmbeddedObject,omitempty"` 7326 7327 // DeleteFilterView: Deletes a filter view from a sheet. 7328 DeleteFilterView *DeleteFilterViewRequest `json:"deleteFilterView,omitempty"` 7329 7330 // DeleteNamedRange: Deletes a named range. 7331 DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"` 7332 7333 // DeleteProtectedRange: Deletes a protected range. 7334 DeleteProtectedRange *DeleteProtectedRangeRequest `json:"deleteProtectedRange,omitempty"` 7335 7336 // DeleteRange: Deletes a range of cells from a sheet, shifting the 7337 // remaining cells. 7338 DeleteRange *DeleteRangeRequest `json:"deleteRange,omitempty"` 7339 7340 // DeleteSheet: Deletes a sheet. 7341 DeleteSheet *DeleteSheetRequest `json:"deleteSheet,omitempty"` 7342 7343 // DuplicateFilterView: Duplicates a filter view. 7344 DuplicateFilterView *DuplicateFilterViewRequest `json:"duplicateFilterView,omitempty"` 7345 7346 // DuplicateSheet: Duplicates a sheet. 7347 DuplicateSheet *DuplicateSheetRequest `json:"duplicateSheet,omitempty"` 7348 7349 // FindReplace: Finds and replaces occurrences of some text with other 7350 // text. 7351 FindReplace *FindReplaceRequest `json:"findReplace,omitempty"` 7352 7353 // InsertDimension: Inserts new rows or columns in a sheet. 7354 InsertDimension *InsertDimensionRequest `json:"insertDimension,omitempty"` 7355 7356 // InsertRange: Inserts new cells in a sheet, shifting the existing 7357 // cells. 7358 InsertRange *InsertRangeRequest `json:"insertRange,omitempty"` 7359 7360 // MergeCells: Merges cells together. 7361 MergeCells *MergeCellsRequest `json:"mergeCells,omitempty"` 7362 7363 // MoveDimension: Moves rows or columns to another location in a sheet. 7364 MoveDimension *MoveDimensionRequest `json:"moveDimension,omitempty"` 7365 7366 // PasteData: Pastes data (HTML or delimited) into a sheet. 7367 PasteData *PasteDataRequest `json:"pasteData,omitempty"` 7368 7369 // RandomizeRange: Randomizes the order of the rows in a range. 7370 RandomizeRange *RandomizeRangeRequest `json:"randomizeRange,omitempty"` 7371 7372 // RepeatCell: Repeats a single cell across a range. 7373 RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"` 7374 7375 // SetBasicFilter: Sets the basic filter on a sheet. 7376 SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"` 7377 7378 // SetDataValidation: Sets data validation for one or more cells. 7379 SetDataValidation *SetDataValidationRequest `json:"setDataValidation,omitempty"` 7380 7381 // SortRange: Sorts data in a range. 7382 SortRange *SortRangeRequest `json:"sortRange,omitempty"` 7383 7384 // TextToColumns: Converts a column of text into many columns of text. 7385 TextToColumns *TextToColumnsRequest `json:"textToColumns,omitempty"` 7386 7387 // UnmergeCells: Unmerges merged cells. 7388 UnmergeCells *UnmergeCellsRequest `json:"unmergeCells,omitempty"` 7389 7390 // UpdateBanding: Updates a banded range 7391 UpdateBanding *UpdateBandingRequest `json:"updateBanding,omitempty"` 7392 7393 // UpdateBorders: Updates the borders in a range of cells. 7394 UpdateBorders *UpdateBordersRequest `json:"updateBorders,omitempty"` 7395 7396 // UpdateCells: Updates many cells at once. 7397 UpdateCells *UpdateCellsRequest `json:"updateCells,omitempty"` 7398 7399 // UpdateChartSpec: Updates a chart's specifications. 7400 UpdateChartSpec *UpdateChartSpecRequest `json:"updateChartSpec,omitempty"` 7401 7402 // UpdateConditionalFormatRule: Updates an existing conditional format 7403 // rule. 7404 UpdateConditionalFormatRule *UpdateConditionalFormatRuleRequest `json:"updateConditionalFormatRule,omitempty"` 7405 7406 // UpdateDeveloperMetadata: Updates an existing developer metadata entry 7407 UpdateDeveloperMetadata *UpdateDeveloperMetadataRequest `json:"updateDeveloperMetadata,omitempty"` 7408 7409 // UpdateDimensionGroup: Updates the state of the specified group. 7410 UpdateDimensionGroup *UpdateDimensionGroupRequest `json:"updateDimensionGroup,omitempty"` 7411 7412 // UpdateDimensionProperties: Updates dimensions' properties. 7413 UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"` 7414 7415 // UpdateEmbeddedObjectPosition: Updates an embedded object's (e.g. 7416 // chart, image) position. 7417 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionRequest `json:"updateEmbeddedObjectPosition,omitempty"` 7418 7419 // UpdateFilterView: Updates the properties of a filter view. 7420 UpdateFilterView *UpdateFilterViewRequest `json:"updateFilterView,omitempty"` 7421 7422 // UpdateNamedRange: Updates a named range. 7423 UpdateNamedRange *UpdateNamedRangeRequest `json:"updateNamedRange,omitempty"` 7424 7425 // UpdateProtectedRange: Updates a protected range. 7426 UpdateProtectedRange *UpdateProtectedRangeRequest `json:"updateProtectedRange,omitempty"` 7427 7428 // UpdateSheetProperties: Updates a sheet's properties. 7429 UpdateSheetProperties *UpdateSheetPropertiesRequest `json:"updateSheetProperties,omitempty"` 7430 7431 // UpdateSpreadsheetProperties: Updates the spreadsheet's properties. 7432 UpdateSpreadsheetProperties *UpdateSpreadsheetPropertiesRequest `json:"updateSpreadsheetProperties,omitempty"` 7433 7434 // ForceSendFields is a list of field names (e.g. "AddBanding") to 7435 // unconditionally include in API requests. By default, fields with 7436 // empty values are omitted from API requests. However, any non-pointer, 7437 // non-interface field appearing in ForceSendFields will be sent to the 7438 // server regardless of whether the field is empty or not. This may be 7439 // used to include empty fields in Patch requests. 7440 ForceSendFields []string `json:"-"` 7441 7442 // NullFields is a list of field names (e.g. "AddBanding") to include in 7443 // API requests with the JSON null value. By default, fields with empty 7444 // values are omitted from API requests. However, any field with an 7445 // empty value appearing in NullFields will be sent to the server as 7446 // null. It is an error if a field in this list has a non-empty value. 7447 // This may be used to include null fields in Patch requests. 7448 NullFields []string `json:"-"` 7449} 7450 7451func (s *Request) MarshalJSON() ([]byte, error) { 7452 type NoMethod Request 7453 raw := NoMethod(*s) 7454 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7455} 7456 7457// Response: A single response from an update. 7458type Response struct { 7459 // AddBanding: A reply from adding a banded range. 7460 AddBanding *AddBandingResponse `json:"addBanding,omitempty"` 7461 7462 // AddChart: A reply from adding a chart. 7463 AddChart *AddChartResponse `json:"addChart,omitempty"` 7464 7465 // AddDimensionGroup: A reply from adding a dimension group. 7466 AddDimensionGroup *AddDimensionGroupResponse `json:"addDimensionGroup,omitempty"` 7467 7468 // AddFilterView: A reply from adding a filter view. 7469 AddFilterView *AddFilterViewResponse `json:"addFilterView,omitempty"` 7470 7471 // AddNamedRange: A reply from adding a named range. 7472 AddNamedRange *AddNamedRangeResponse `json:"addNamedRange,omitempty"` 7473 7474 // AddProtectedRange: A reply from adding a protected range. 7475 AddProtectedRange *AddProtectedRangeResponse `json:"addProtectedRange,omitempty"` 7476 7477 // AddSheet: A reply from adding a sheet. 7478 AddSheet *AddSheetResponse `json:"addSheet,omitempty"` 7479 7480 // CreateDeveloperMetadata: A reply from creating a developer metadata 7481 // entry. 7482 CreateDeveloperMetadata *CreateDeveloperMetadataResponse `json:"createDeveloperMetadata,omitempty"` 7483 7484 // DeleteConditionalFormatRule: A reply from deleting a conditional 7485 // format rule. 7486 DeleteConditionalFormatRule *DeleteConditionalFormatRuleResponse `json:"deleteConditionalFormatRule,omitempty"` 7487 7488 // DeleteDeveloperMetadata: A reply from deleting a developer metadata 7489 // entry. 7490 DeleteDeveloperMetadata *DeleteDeveloperMetadataResponse `json:"deleteDeveloperMetadata,omitempty"` 7491 7492 // DeleteDimensionGroup: A reply from deleting a dimension group. 7493 DeleteDimensionGroup *DeleteDimensionGroupResponse `json:"deleteDimensionGroup,omitempty"` 7494 7495 // DuplicateFilterView: A reply from duplicating a filter view. 7496 DuplicateFilterView *DuplicateFilterViewResponse `json:"duplicateFilterView,omitempty"` 7497 7498 // DuplicateSheet: A reply from duplicating a sheet. 7499 DuplicateSheet *DuplicateSheetResponse `json:"duplicateSheet,omitempty"` 7500 7501 // FindReplace: A reply from doing a find/replace. 7502 FindReplace *FindReplaceResponse `json:"findReplace,omitempty"` 7503 7504 // UpdateConditionalFormatRule: A reply from updating a conditional 7505 // format rule. 7506 UpdateConditionalFormatRule *UpdateConditionalFormatRuleResponse `json:"updateConditionalFormatRule,omitempty"` 7507 7508 // UpdateDeveloperMetadata: A reply from updating a developer metadata 7509 // entry. 7510 UpdateDeveloperMetadata *UpdateDeveloperMetadataResponse `json:"updateDeveloperMetadata,omitempty"` 7511 7512 // UpdateEmbeddedObjectPosition: A reply from updating an embedded 7513 // object's position. 7514 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionResponse `json:"updateEmbeddedObjectPosition,omitempty"` 7515 7516 // ForceSendFields is a list of field names (e.g. "AddBanding") to 7517 // unconditionally include in API requests. By default, fields with 7518 // empty values are omitted from API requests. However, any non-pointer, 7519 // non-interface field appearing in ForceSendFields will be sent to the 7520 // server regardless of whether the field is empty or not. This may be 7521 // used to include empty fields in Patch requests. 7522 ForceSendFields []string `json:"-"` 7523 7524 // NullFields is a list of field names (e.g. "AddBanding") to include in 7525 // API requests with the JSON null value. By default, fields with empty 7526 // values are omitted from API requests. However, any field with an 7527 // empty value appearing in NullFields will be sent to the server as 7528 // null. It is an error if a field in this list has a non-empty value. 7529 // This may be used to include null fields in Patch requests. 7530 NullFields []string `json:"-"` 7531} 7532 7533func (s *Response) MarshalJSON() ([]byte, error) { 7534 type NoMethod Response 7535 raw := NoMethod(*s) 7536 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7537} 7538 7539// RowData: Data about each cell in a row. 7540type RowData struct { 7541 // Values: The values in the row, one per column. 7542 Values []*CellData `json:"values,omitempty"` 7543 7544 // ForceSendFields is a list of field names (e.g. "Values") to 7545 // unconditionally include in API requests. By default, fields with 7546 // empty values are omitted from API requests. However, any non-pointer, 7547 // non-interface field appearing in ForceSendFields will be sent to the 7548 // server regardless of whether the field is empty or not. This may be 7549 // used to include empty fields in Patch requests. 7550 ForceSendFields []string `json:"-"` 7551 7552 // NullFields is a list of field names (e.g. "Values") to include in API 7553 // requests with the JSON null value. By default, fields with empty 7554 // values are omitted from API requests. However, any field with an 7555 // empty value appearing in NullFields will be sent to the server as 7556 // null. It is an error if a field in this list has a non-empty value. 7557 // This may be used to include null fields in Patch requests. 7558 NullFields []string `json:"-"` 7559} 7560 7561func (s *RowData) MarshalJSON() ([]byte, error) { 7562 type NoMethod RowData 7563 raw := NoMethod(*s) 7564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7565} 7566 7567// SearchDeveloperMetadataRequest: A request to retrieve all developer 7568// metadata matching the set of specified 7569// criteria. 7570type SearchDeveloperMetadataRequest struct { 7571 // DataFilters: The data filters describing the criteria used to 7572 // determine which 7573 // DeveloperMetadata entries to return. DeveloperMetadata matching any 7574 // of the 7575 // specified filters will be included in the response. 7576 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 7577 7578 // ForceSendFields is a list of field names (e.g. "DataFilters") to 7579 // unconditionally include in API requests. By default, fields with 7580 // empty values are omitted from API requests. However, any non-pointer, 7581 // non-interface field appearing in ForceSendFields will be sent to the 7582 // server regardless of whether the field is empty or not. This may be 7583 // used to include empty fields in Patch requests. 7584 ForceSendFields []string `json:"-"` 7585 7586 // NullFields is a list of field names (e.g. "DataFilters") to include 7587 // in API requests with the JSON null value. By default, fields with 7588 // empty values are omitted from API requests. However, any field with 7589 // an empty value appearing in NullFields will be sent to the server as 7590 // null. It is an error if a field in this list has a non-empty value. 7591 // This may be used to include null fields in Patch requests. 7592 NullFields []string `json:"-"` 7593} 7594 7595func (s *SearchDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 7596 type NoMethod SearchDeveloperMetadataRequest 7597 raw := NoMethod(*s) 7598 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7599} 7600 7601// SearchDeveloperMetadataResponse: A reply to a developer metadata 7602// search request. 7603type SearchDeveloperMetadataResponse struct { 7604 // MatchedDeveloperMetadata: The metadata matching the criteria of the 7605 // search request. 7606 MatchedDeveloperMetadata []*MatchedDeveloperMetadata `json:"matchedDeveloperMetadata,omitempty"` 7607 7608 // ServerResponse contains the HTTP response code and headers from the 7609 // server. 7610 googleapi.ServerResponse `json:"-"` 7611 7612 // ForceSendFields is a list of field names (e.g. 7613 // "MatchedDeveloperMetadata") to unconditionally include in API 7614 // requests. By default, fields with empty values are omitted from API 7615 // requests. However, any non-pointer, non-interface field appearing in 7616 // ForceSendFields will be sent to the server regardless of whether the 7617 // field is empty or not. This may be used to include empty fields in 7618 // Patch requests. 7619 ForceSendFields []string `json:"-"` 7620 7621 // NullFields is a list of field names (e.g. "MatchedDeveloperMetadata") 7622 // to include in API requests with the JSON null value. By default, 7623 // fields with empty values are omitted from API requests. However, any 7624 // field with an empty value appearing in NullFields will be sent to the 7625 // server as null. It is an error if a field in this list has a 7626 // non-empty value. This may be used to include null fields in Patch 7627 // requests. 7628 NullFields []string `json:"-"` 7629} 7630 7631func (s *SearchDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 7632 type NoMethod SearchDeveloperMetadataResponse 7633 raw := NoMethod(*s) 7634 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7635} 7636 7637// SetBasicFilterRequest: Sets the basic filter associated with a sheet. 7638type SetBasicFilterRequest struct { 7639 // Filter: The filter to set. 7640 Filter *BasicFilter `json:"filter,omitempty"` 7641 7642 // ForceSendFields is a list of field names (e.g. "Filter") to 7643 // unconditionally include in API requests. By default, fields with 7644 // empty values are omitted from API requests. However, any non-pointer, 7645 // non-interface field appearing in ForceSendFields will be sent to the 7646 // server regardless of whether the field is empty or not. This may be 7647 // used to include empty fields in Patch requests. 7648 ForceSendFields []string `json:"-"` 7649 7650 // NullFields is a list of field names (e.g. "Filter") to include in API 7651 // requests with the JSON null value. By default, fields with empty 7652 // values are omitted from API requests. However, any field with an 7653 // empty value appearing in NullFields will be sent to the server as 7654 // null. It is an error if a field in this list has a non-empty value. 7655 // This may be used to include null fields in Patch requests. 7656 NullFields []string `json:"-"` 7657} 7658 7659func (s *SetBasicFilterRequest) MarshalJSON() ([]byte, error) { 7660 type NoMethod SetBasicFilterRequest 7661 raw := NoMethod(*s) 7662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7663} 7664 7665// SetDataValidationRequest: Sets a data validation rule to every cell 7666// in the range. 7667// To clear validation in a range, call this with no rule specified. 7668type SetDataValidationRequest struct { 7669 // Range: The range the data validation rule should apply to. 7670 Range *GridRange `json:"range,omitempty"` 7671 7672 // Rule: The data validation rule to set on each cell in the range, 7673 // or empty to clear the data validation in the range. 7674 Rule *DataValidationRule `json:"rule,omitempty"` 7675 7676 // ForceSendFields is a list of field names (e.g. "Range") to 7677 // unconditionally include in API requests. By default, fields with 7678 // empty values are omitted from API requests. However, any non-pointer, 7679 // non-interface field appearing in ForceSendFields will be sent to the 7680 // server regardless of whether the field is empty or not. This may be 7681 // used to include empty fields in Patch requests. 7682 ForceSendFields []string `json:"-"` 7683 7684 // NullFields is a list of field names (e.g. "Range") to include in API 7685 // requests with the JSON null value. By default, fields with empty 7686 // values are omitted from API requests. However, any field with an 7687 // empty value appearing in NullFields will be sent to the server as 7688 // null. It is an error if a field in this list has a non-empty value. 7689 // This may be used to include null fields in Patch requests. 7690 NullFields []string `json:"-"` 7691} 7692 7693func (s *SetDataValidationRequest) MarshalJSON() ([]byte, error) { 7694 type NoMethod SetDataValidationRequest 7695 raw := NoMethod(*s) 7696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7697} 7698 7699// Sheet: A sheet in a spreadsheet. 7700type Sheet struct { 7701 // BandedRanges: The banded (alternating colors) ranges on this sheet. 7702 BandedRanges []*BandedRange `json:"bandedRanges,omitempty"` 7703 7704 // BasicFilter: The filter on this sheet, if any. 7705 BasicFilter *BasicFilter `json:"basicFilter,omitempty"` 7706 7707 // Charts: The specifications of every chart on this sheet. 7708 Charts []*EmbeddedChart `json:"charts,omitempty"` 7709 7710 // ColumnGroups: All column groups on this sheet, ordered by increasing 7711 // range start index, 7712 // then by group depth. 7713 ColumnGroups []*DimensionGroup `json:"columnGroups,omitempty"` 7714 7715 // ConditionalFormats: The conditional format rules in this sheet. 7716 ConditionalFormats []*ConditionalFormatRule `json:"conditionalFormats,omitempty"` 7717 7718 // Data: Data in the grid, if this is a grid sheet. 7719 // The number of GridData objects returned is dependent on the number 7720 // of 7721 // ranges requested on this sheet. For example, if this is 7722 // representing 7723 // `Sheet1`, and the spreadsheet was requested with 7724 // ranges 7725 // `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will 7726 // have a 7727 // startRow/startColumn of `0`, 7728 // while the second one will have `startRow 14` (zero-based row 15), 7729 // and `startColumn 3` (zero-based column D). 7730 Data []*GridData `json:"data,omitempty"` 7731 7732 // DeveloperMetadata: The developer metadata associated with a sheet. 7733 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 7734 7735 // FilterViews: The filter views in this sheet. 7736 FilterViews []*FilterView `json:"filterViews,omitempty"` 7737 7738 // Merges: The ranges that are merged together. 7739 Merges []*GridRange `json:"merges,omitempty"` 7740 7741 // Properties: The properties of the sheet. 7742 Properties *SheetProperties `json:"properties,omitempty"` 7743 7744 // ProtectedRanges: The protected ranges in this sheet. 7745 ProtectedRanges []*ProtectedRange `json:"protectedRanges,omitempty"` 7746 7747 // RowGroups: All row groups on this sheet, ordered by increasing range 7748 // start index, then 7749 // by group depth. 7750 RowGroups []*DimensionGroup `json:"rowGroups,omitempty"` 7751 7752 // ForceSendFields is a list of field names (e.g. "BandedRanges") to 7753 // unconditionally include in API requests. By default, fields with 7754 // empty values are omitted from API requests. However, any non-pointer, 7755 // non-interface field appearing in ForceSendFields will be sent to the 7756 // server regardless of whether the field is empty or not. This may be 7757 // used to include empty fields in Patch requests. 7758 ForceSendFields []string `json:"-"` 7759 7760 // NullFields is a list of field names (e.g. "BandedRanges") to include 7761 // in API requests with the JSON null value. By default, fields with 7762 // empty values are omitted from API requests. However, any field with 7763 // an empty value appearing in NullFields will be sent to the server as 7764 // null. It is an error if a field in this list has a non-empty value. 7765 // This may be used to include null fields in Patch requests. 7766 NullFields []string `json:"-"` 7767} 7768 7769func (s *Sheet) MarshalJSON() ([]byte, error) { 7770 type NoMethod Sheet 7771 raw := NoMethod(*s) 7772 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7773} 7774 7775// SheetProperties: Properties of a sheet. 7776type SheetProperties struct { 7777 // GridProperties: Additional properties of the sheet if this sheet is a 7778 // grid. 7779 // (If the sheet is an object sheet, containing a chart or image, 7780 // then 7781 // this field will be absent.) 7782 // When writing it is an error to set any grid properties on non-grid 7783 // sheets. 7784 GridProperties *GridProperties `json:"gridProperties,omitempty"` 7785 7786 // Hidden: True if the sheet is hidden in the UI, false if it's visible. 7787 Hidden bool `json:"hidden,omitempty"` 7788 7789 // Index: The index of the sheet within the spreadsheet. 7790 // When adding or updating sheet properties, if this field 7791 // is excluded then the sheet is added or moved to the end 7792 // of the sheet list. When updating sheet indices or inserting 7793 // sheets, movement is considered in "before the move" indexes. 7794 // For example, if there were 3 sheets (S1, S2, S3) in order to 7795 // move S1 ahead of S2 the index would have to be set to 2. A 7796 // sheet 7797 // index update request is ignored if the requested index is 7798 // identical to the sheets current index or if the requested new 7799 // index is equal to the current sheet index + 1. 7800 Index int64 `json:"index,omitempty"` 7801 7802 // RightToLeft: True if the sheet is an RTL sheet instead of an LTR 7803 // sheet. 7804 RightToLeft bool `json:"rightToLeft,omitempty"` 7805 7806 // SheetId: The ID of the sheet. Must be non-negative. 7807 // This field cannot be changed once set. 7808 SheetId int64 `json:"sheetId,omitempty"` 7809 7810 // SheetType: The type of sheet. Defaults to GRID. 7811 // This field cannot be changed once set. 7812 // 7813 // Possible values: 7814 // "SHEET_TYPE_UNSPECIFIED" - Default value, do not use. 7815 // "GRID" - The sheet is a grid. 7816 // "OBJECT" - The sheet has no grid and instead has an object like a 7817 // chart or image. 7818 SheetType string `json:"sheetType,omitempty"` 7819 7820 // TabColor: The color of the tab in the UI. 7821 TabColor *Color `json:"tabColor,omitempty"` 7822 7823 // Title: The name of the sheet. 7824 Title string `json:"title,omitempty"` 7825 7826 // ServerResponse contains the HTTP response code and headers from the 7827 // server. 7828 googleapi.ServerResponse `json:"-"` 7829 7830 // ForceSendFields is a list of field names (e.g. "GridProperties") to 7831 // unconditionally include in API requests. By default, fields with 7832 // empty values are omitted from API requests. However, any non-pointer, 7833 // non-interface field appearing in ForceSendFields will be sent to the 7834 // server regardless of whether the field is empty or not. This may be 7835 // used to include empty fields in Patch requests. 7836 ForceSendFields []string `json:"-"` 7837 7838 // NullFields is a list of field names (e.g. "GridProperties") to 7839 // include in API requests with the JSON null value. By default, fields 7840 // with empty values are omitted from API requests. However, any field 7841 // with an empty value appearing in NullFields will be sent to the 7842 // server as null. It is an error if a field in this list has a 7843 // non-empty value. This may be used to include null fields in Patch 7844 // requests. 7845 NullFields []string `json:"-"` 7846} 7847 7848func (s *SheetProperties) MarshalJSON() ([]byte, error) { 7849 type NoMethod SheetProperties 7850 raw := NoMethod(*s) 7851 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7852} 7853 7854// SortRangeRequest: Sorts data in rows based on a sort order per 7855// column. 7856type SortRangeRequest struct { 7857 // Range: The range to sort. 7858 Range *GridRange `json:"range,omitempty"` 7859 7860 // SortSpecs: The sort order per column. Later specifications are used 7861 // when values 7862 // are equal in the earlier specifications. 7863 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 7864 7865 // ForceSendFields is a list of field names (e.g. "Range") to 7866 // unconditionally include in API requests. By default, fields with 7867 // empty values are omitted from API requests. However, any non-pointer, 7868 // non-interface field appearing in ForceSendFields will be sent to the 7869 // server regardless of whether the field is empty or not. This may be 7870 // used to include empty fields in Patch requests. 7871 ForceSendFields []string `json:"-"` 7872 7873 // NullFields is a list of field names (e.g. "Range") to include in API 7874 // requests with the JSON null value. By default, fields with empty 7875 // values are omitted from API requests. However, any field with an 7876 // empty value appearing in NullFields will be sent to the server as 7877 // null. It is an error if a field in this list has a non-empty value. 7878 // This may be used to include null fields in Patch requests. 7879 NullFields []string `json:"-"` 7880} 7881 7882func (s *SortRangeRequest) MarshalJSON() ([]byte, error) { 7883 type NoMethod SortRangeRequest 7884 raw := NoMethod(*s) 7885 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7886} 7887 7888// SortSpec: A sort order associated with a specific column or row. 7889type SortSpec struct { 7890 // DimensionIndex: The dimension the sort should be applied to. 7891 DimensionIndex int64 `json:"dimensionIndex,omitempty"` 7892 7893 // SortOrder: The order data should be sorted. 7894 // 7895 // Possible values: 7896 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 7897 // "ASCENDING" - Sort ascending. 7898 // "DESCENDING" - Sort descending. 7899 SortOrder string `json:"sortOrder,omitempty"` 7900 7901 // ForceSendFields is a list of field names (e.g. "DimensionIndex") to 7902 // unconditionally include in API requests. By default, fields with 7903 // empty values are omitted from API requests. However, any non-pointer, 7904 // non-interface field appearing in ForceSendFields will be sent to the 7905 // server regardless of whether the field is empty or not. This may be 7906 // used to include empty fields in Patch requests. 7907 ForceSendFields []string `json:"-"` 7908 7909 // NullFields is a list of field names (e.g. "DimensionIndex") to 7910 // include in API requests with the JSON null value. By default, fields 7911 // with empty values are omitted from API requests. However, any field 7912 // with an empty value appearing in NullFields will be sent to the 7913 // server as null. It is an error if a field in this list has a 7914 // non-empty value. This may be used to include null fields in Patch 7915 // requests. 7916 NullFields []string `json:"-"` 7917} 7918 7919func (s *SortSpec) MarshalJSON() ([]byte, error) { 7920 type NoMethod SortSpec 7921 raw := NoMethod(*s) 7922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7923} 7924 7925// SourceAndDestination: A combination of a source range and how to 7926// extend that source. 7927type SourceAndDestination struct { 7928 // Dimension: The dimension that data should be filled into. 7929 // 7930 // Possible values: 7931 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 7932 // "ROWS" - Operates on the rows of a sheet. 7933 // "COLUMNS" - Operates on the columns of a sheet. 7934 Dimension string `json:"dimension,omitempty"` 7935 7936 // FillLength: The number of rows or columns that data should be filled 7937 // into. 7938 // Positive numbers expand beyond the last row or last column 7939 // of the source. Negative numbers expand before the first row 7940 // or first column of the source. 7941 FillLength int64 `json:"fillLength,omitempty"` 7942 7943 // Source: The location of the data to use as the source of the 7944 // autofill. 7945 Source *GridRange `json:"source,omitempty"` 7946 7947 // ForceSendFields is a list of field names (e.g. "Dimension") to 7948 // unconditionally include in API requests. By default, fields with 7949 // empty values are omitted from API requests. However, any non-pointer, 7950 // non-interface field appearing in ForceSendFields will be sent to the 7951 // server regardless of whether the field is empty or not. This may be 7952 // used to include empty fields in Patch requests. 7953 ForceSendFields []string `json:"-"` 7954 7955 // NullFields is a list of field names (e.g. "Dimension") to include in 7956 // API requests with the JSON null value. By default, fields with empty 7957 // values are omitted from API requests. However, any field with an 7958 // empty value appearing in NullFields will be sent to the server as 7959 // null. It is an error if a field in this list has a non-empty value. 7960 // This may be used to include null fields in Patch requests. 7961 NullFields []string `json:"-"` 7962} 7963 7964func (s *SourceAndDestination) MarshalJSON() ([]byte, error) { 7965 type NoMethod SourceAndDestination 7966 raw := NoMethod(*s) 7967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7968} 7969 7970// Spreadsheet: Resource that represents a spreadsheet. 7971type Spreadsheet struct { 7972 // DeveloperMetadata: The developer metadata associated with a 7973 // spreadsheet. 7974 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 7975 7976 // NamedRanges: The named ranges defined in a spreadsheet. 7977 NamedRanges []*NamedRange `json:"namedRanges,omitempty"` 7978 7979 // Properties: Overall properties of a spreadsheet. 7980 Properties *SpreadsheetProperties `json:"properties,omitempty"` 7981 7982 // Sheets: The sheets that are part of a spreadsheet. 7983 Sheets []*Sheet `json:"sheets,omitempty"` 7984 7985 // SpreadsheetId: The ID of the spreadsheet. 7986 // This field is read-only. 7987 SpreadsheetId string `json:"spreadsheetId,omitempty"` 7988 7989 // SpreadsheetUrl: The url of the spreadsheet. 7990 // This field is read-only. 7991 SpreadsheetUrl string `json:"spreadsheetUrl,omitempty"` 7992 7993 // ServerResponse contains the HTTP response code and headers from the 7994 // server. 7995 googleapi.ServerResponse `json:"-"` 7996 7997 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 7998 // to unconditionally include in API requests. By default, fields with 7999 // empty values are omitted from API requests. However, any non-pointer, 8000 // non-interface field appearing in ForceSendFields will be sent to the 8001 // server regardless of whether the field is empty or not. This may be 8002 // used to include empty fields in Patch requests. 8003 ForceSendFields []string `json:"-"` 8004 8005 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 8006 // include in API requests with the JSON null value. By default, fields 8007 // with empty values are omitted from API requests. However, any field 8008 // with an empty value appearing in NullFields will be sent to the 8009 // server as null. It is an error if a field in this list has a 8010 // non-empty value. This may be used to include null fields in Patch 8011 // requests. 8012 NullFields []string `json:"-"` 8013} 8014 8015func (s *Spreadsheet) MarshalJSON() ([]byte, error) { 8016 type NoMethod Spreadsheet 8017 raw := NoMethod(*s) 8018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8019} 8020 8021// SpreadsheetProperties: Properties of a spreadsheet. 8022type SpreadsheetProperties struct { 8023 // AutoRecalc: The amount of time to wait before volatile functions are 8024 // recalculated. 8025 // 8026 // Possible values: 8027 // "RECALCULATION_INTERVAL_UNSPECIFIED" - Default value. This value 8028 // must not be used. 8029 // "ON_CHANGE" - Volatile functions are updated on every change. 8030 // "MINUTE" - Volatile functions are updated on every change and every 8031 // minute. 8032 // "HOUR" - Volatile functions are updated on every change and hourly. 8033 AutoRecalc string `json:"autoRecalc,omitempty"` 8034 8035 // DefaultFormat: The default format of all cells in the 8036 // spreadsheet. 8037 // CellData.effectiveFormat will not be set if 8038 // the cell's format is equal to this default format. This field is 8039 // read-only. 8040 DefaultFormat *CellFormat `json:"defaultFormat,omitempty"` 8041 8042 // IterativeCalculationSettings: Determines whether and how circular 8043 // references are resolved with iterative 8044 // calculation. Absence of this field means that circular references 8045 // will 8046 // result in calculation errors. 8047 IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"` 8048 8049 // Locale: The locale of the spreadsheet in one of the following 8050 // formats: 8051 // 8052 // * an ISO 639-1 language code such as `en` 8053 // 8054 // * an ISO 639-2 language code such as `fil`, if no 639-1 code 8055 // exists 8056 // 8057 // * a combination of the ISO language code and country code, such as 8058 // `en_US` 8059 // 8060 // Note: when updating this field, not all locales/languages are 8061 // supported. 8062 Locale string `json:"locale,omitempty"` 8063 8064 // TimeZone: The time zone of the spreadsheet, in CLDR format such 8065 // as 8066 // `America/New_York`. If the time zone isn't recognized, this may 8067 // be a custom time zone such as `GMT-07:00`. 8068 TimeZone string `json:"timeZone,omitempty"` 8069 8070 // Title: The title of the spreadsheet. 8071 Title string `json:"title,omitempty"` 8072 8073 // ForceSendFields is a list of field names (e.g. "AutoRecalc") 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. "AutoRecalc") to include in 8082 // API requests with the JSON null value. By default, fields with empty 8083 // values are omitted from API requests. However, any field with an 8084 // empty value appearing in NullFields will be sent to the server as 8085 // null. It is an error if a field in this list has a non-empty value. 8086 // This may be used to include null fields in Patch requests. 8087 NullFields []string `json:"-"` 8088} 8089 8090func (s *SpreadsheetProperties) MarshalJSON() ([]byte, error) { 8091 type NoMethod SpreadsheetProperties 8092 raw := NoMethod(*s) 8093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8094} 8095 8096// TextFormat: The format of a run of text in a cell. 8097// Absent values indicate that the field isn't specified. 8098type TextFormat struct { 8099 // Bold: True if the text is bold. 8100 Bold bool `json:"bold,omitempty"` 8101 8102 // FontFamily: The font family. 8103 FontFamily string `json:"fontFamily,omitempty"` 8104 8105 // FontSize: The size of the font. 8106 FontSize int64 `json:"fontSize,omitempty"` 8107 8108 // ForegroundColor: The foreground color of the text. 8109 ForegroundColor *Color `json:"foregroundColor,omitempty"` 8110 8111 // Italic: True if the text is italicized. 8112 Italic bool `json:"italic,omitempty"` 8113 8114 // Strikethrough: True if the text has a strikethrough. 8115 Strikethrough bool `json:"strikethrough,omitempty"` 8116 8117 // Underline: True if the text is underlined. 8118 Underline bool `json:"underline,omitempty"` 8119 8120 // ForceSendFields is a list of field names (e.g. "Bold") to 8121 // unconditionally include in API requests. By default, fields with 8122 // empty values are omitted from API requests. However, any non-pointer, 8123 // non-interface field appearing in ForceSendFields will be sent to the 8124 // server regardless of whether the field is empty or not. This may be 8125 // used to include empty fields in Patch requests. 8126 ForceSendFields []string `json:"-"` 8127 8128 // NullFields is a list of field names (e.g. "Bold") to include in API 8129 // requests with the JSON null value. By default, fields with empty 8130 // values are omitted from API requests. However, any field with an 8131 // empty value appearing in NullFields will be sent to the server as 8132 // null. It is an error if a field in this list has a non-empty value. 8133 // This may be used to include null fields in Patch requests. 8134 NullFields []string `json:"-"` 8135} 8136 8137func (s *TextFormat) MarshalJSON() ([]byte, error) { 8138 type NoMethod TextFormat 8139 raw := NoMethod(*s) 8140 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8141} 8142 8143// TextFormatRun: A run of a text format. The format of this run 8144// continues until the start 8145// index of the next run. 8146// When updating, all fields must be set. 8147type TextFormatRun struct { 8148 // Format: The format of this run. Absent values inherit the cell's 8149 // format. 8150 Format *TextFormat `json:"format,omitempty"` 8151 8152 // StartIndex: The character index where this run starts. 8153 StartIndex int64 `json:"startIndex,omitempty"` 8154 8155 // ForceSendFields is a list of field names (e.g. "Format") to 8156 // unconditionally include in API requests. By default, fields with 8157 // empty values are omitted from API requests. However, any non-pointer, 8158 // non-interface field appearing in ForceSendFields will be sent to the 8159 // server regardless of whether the field is empty or not. This may be 8160 // used to include empty fields in Patch requests. 8161 ForceSendFields []string `json:"-"` 8162 8163 // NullFields is a list of field names (e.g. "Format") to include in API 8164 // requests with the JSON null value. By default, fields with empty 8165 // values are omitted from API requests. However, any field with an 8166 // empty value appearing in NullFields will be sent to the server as 8167 // null. It is an error if a field in this list has a non-empty value. 8168 // This may be used to include null fields in Patch requests. 8169 NullFields []string `json:"-"` 8170} 8171 8172func (s *TextFormatRun) MarshalJSON() ([]byte, error) { 8173 type NoMethod TextFormatRun 8174 raw := NoMethod(*s) 8175 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8176} 8177 8178// TextPosition: Position settings for text. 8179type TextPosition struct { 8180 // HorizontalAlignment: Horizontal alignment setting for the piece of 8181 // text. 8182 // 8183 // Possible values: 8184 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 8185 // specified. Do not use this. 8186 // "LEFT" - The text is explicitly aligned to the left of the cell. 8187 // "CENTER" - The text is explicitly aligned to the center of the 8188 // cell. 8189 // "RIGHT" - The text is explicitly aligned to the right of the cell. 8190 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 8191 8192 // ForceSendFields is a list of field names (e.g. "HorizontalAlignment") 8193 // to unconditionally include in API requests. By default, fields with 8194 // empty values are omitted from API requests. However, any non-pointer, 8195 // non-interface field appearing in ForceSendFields will be sent to the 8196 // server regardless of whether the field is empty or not. This may be 8197 // used to include empty fields in Patch requests. 8198 ForceSendFields []string `json:"-"` 8199 8200 // NullFields is a list of field names (e.g. "HorizontalAlignment") to 8201 // include in API requests with the JSON null value. By default, fields 8202 // with empty values are omitted from API requests. However, any field 8203 // with an empty value appearing in NullFields will be sent to the 8204 // server as null. It is an error if a field in this list has a 8205 // non-empty value. This may be used to include null fields in Patch 8206 // requests. 8207 NullFields []string `json:"-"` 8208} 8209 8210func (s *TextPosition) MarshalJSON() ([]byte, error) { 8211 type NoMethod TextPosition 8212 raw := NoMethod(*s) 8213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8214} 8215 8216// TextRotation: The rotation applied to text in a cell. 8217type TextRotation struct { 8218 // Angle: The angle between the standard orientation and the desired 8219 // orientation. 8220 // Measured in degrees. Valid values are between -90 and 90. 8221 // Positive 8222 // angles are angled upwards, negative are angled downwards. 8223 // 8224 // Note: For LTR text direction positive angles are in 8225 // the 8226 // counterclockwise direction, whereas for RTL they are in the 8227 // clockwise 8228 // direction 8229 Angle int64 `json:"angle,omitempty"` 8230 8231 // Vertical: If true, text reads top to bottom, but the orientation of 8232 // individual 8233 // characters is unchanged. 8234 // For example: 8235 // 8236 // | V | 8237 // | e | 8238 // | r | 8239 // | t | 8240 // | i | 8241 // | c | 8242 // | a | 8243 // | l | 8244 Vertical bool `json:"vertical,omitempty"` 8245 8246 // ForceSendFields is a list of field names (e.g. "Angle") to 8247 // unconditionally include in API requests. By default, fields with 8248 // empty values are omitted from API requests. However, any non-pointer, 8249 // non-interface field appearing in ForceSendFields will be sent to the 8250 // server regardless of whether the field is empty or not. This may be 8251 // used to include empty fields in Patch requests. 8252 ForceSendFields []string `json:"-"` 8253 8254 // NullFields is a list of field names (e.g. "Angle") to include in API 8255 // requests with the JSON null value. By default, fields with empty 8256 // values are omitted from API requests. However, any field with an 8257 // empty value appearing in NullFields will be sent to the server as 8258 // null. It is an error if a field in this list has a non-empty value. 8259 // This may be used to include null fields in Patch requests. 8260 NullFields []string `json:"-"` 8261} 8262 8263func (s *TextRotation) MarshalJSON() ([]byte, error) { 8264 type NoMethod TextRotation 8265 raw := NoMethod(*s) 8266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8267} 8268 8269// TextToColumnsRequest: Splits a column of text into multiple 8270// columns, 8271// based on a delimiter in each cell. 8272type TextToColumnsRequest struct { 8273 // Delimiter: The delimiter to use. Used only if delimiterType 8274 // is 8275 // CUSTOM. 8276 Delimiter string `json:"delimiter,omitempty"` 8277 8278 // DelimiterType: The delimiter type to use. 8279 // 8280 // Possible values: 8281 // "DELIMITER_TYPE_UNSPECIFIED" - Default value. This value must not 8282 // be used. 8283 // "COMMA" - "," 8284 // "SEMICOLON" - ";" 8285 // "PERIOD" - "." 8286 // "SPACE" - " " 8287 // "CUSTOM" - A custom value as defined in delimiter. 8288 // "AUTODETECT" - Automatically detect columns. 8289 DelimiterType string `json:"delimiterType,omitempty"` 8290 8291 // Source: The source data range. This must span exactly one column. 8292 Source *GridRange `json:"source,omitempty"` 8293 8294 // ForceSendFields is a list of field names (e.g. "Delimiter") to 8295 // unconditionally include in API requests. By default, fields with 8296 // empty values are omitted from API requests. However, any non-pointer, 8297 // non-interface field appearing in ForceSendFields will be sent to the 8298 // server regardless of whether the field is empty or not. This may be 8299 // used to include empty fields in Patch requests. 8300 ForceSendFields []string `json:"-"` 8301 8302 // NullFields is a list of field names (e.g. "Delimiter") to include in 8303 // API requests with the JSON null value. By default, fields with empty 8304 // values are omitted from API requests. However, any field with an 8305 // empty value appearing in NullFields will be sent to the server as 8306 // null. It is an error if a field in this list has a non-empty value. 8307 // This may be used to include null fields in Patch requests. 8308 NullFields []string `json:"-"` 8309} 8310 8311func (s *TextToColumnsRequest) MarshalJSON() ([]byte, error) { 8312 type NoMethod TextToColumnsRequest 8313 raw := NoMethod(*s) 8314 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8315} 8316 8317// TreemapChartColorScale: A color scale for a treemap chart. 8318type TreemapChartColorScale struct { 8319 // MaxValueColor: The background color for cells with a color value 8320 // greater than or equal 8321 // to maxValue. Defaults to #109618 if not 8322 // specified. 8323 MaxValueColor *Color `json:"maxValueColor,omitempty"` 8324 8325 // MidValueColor: The background color for cells with a color value at 8326 // the midpoint between 8327 // minValue and 8328 // maxValue. Defaults to #efe6dc if not 8329 // specified. 8330 MidValueColor *Color `json:"midValueColor,omitempty"` 8331 8332 // MinValueColor: The background color for cells with a color value less 8333 // than or equal to 8334 // minValue. Defaults to #dc3912 if not 8335 // specified. 8336 MinValueColor *Color `json:"minValueColor,omitempty"` 8337 8338 // NoDataColor: The background color for cells that have no color data 8339 // associated with 8340 // them. Defaults to #000000 if not specified. 8341 NoDataColor *Color `json:"noDataColor,omitempty"` 8342 8343 // ForceSendFields is a list of field names (e.g. "MaxValueColor") to 8344 // unconditionally include in API requests. By default, fields with 8345 // empty values are omitted from API requests. However, any non-pointer, 8346 // non-interface field appearing in ForceSendFields will be sent to the 8347 // server regardless of whether the field is empty or not. This may be 8348 // used to include empty fields in Patch requests. 8349 ForceSendFields []string `json:"-"` 8350 8351 // NullFields is a list of field names (e.g. "MaxValueColor") to include 8352 // in API requests with the JSON null value. By default, fields with 8353 // empty values are omitted from API requests. However, any field with 8354 // an empty value appearing in NullFields will be sent to the server as 8355 // null. It is an error if a field in this list has a non-empty value. 8356 // This may be used to include null fields in Patch requests. 8357 NullFields []string `json:"-"` 8358} 8359 8360func (s *TreemapChartColorScale) MarshalJSON() ([]byte, error) { 8361 type NoMethod TreemapChartColorScale 8362 raw := NoMethod(*s) 8363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8364} 8365 8366// TreemapChartSpec: A <a 8367// href="/chart/interactive/docs/gallery/treemap">Treemap chart</a>. 8368type TreemapChartSpec struct { 8369 // ColorData: The data that determines the background color of each 8370 // treemap data cell. 8371 // This field is optional. If not specified, size_data is used 8372 // to 8373 // determine background colors. If specified, the data is expected to 8374 // be 8375 // numeric. color_scale will determine how the values in this data map 8376 // to 8377 // data cell background colors. 8378 ColorData *ChartData `json:"colorData,omitempty"` 8379 8380 // ColorScale: The color scale for data cells in the treemap chart. Data 8381 // cells are 8382 // assigned colors based on their color values. These color values come 8383 // from 8384 // color_data, or from size_data if color_data is not specified. 8385 // Cells with color values less than or equal to min_value will 8386 // have minValueColor as their 8387 // background color. Cells with color values greater than or equal 8388 // to 8389 // max_value will have 8390 // maxValueColor as their background 8391 // color. Cells with color values between min_value and max_value 8392 // will 8393 // have background colors on a gradient between 8394 // minValueColor and 8395 // maxValueColor, the midpoint of 8396 // the gradient being midValueColor. 8397 // Cells with missing or non-numeric color values will have 8398 // noDataColor as their background 8399 // color. 8400 ColorScale *TreemapChartColorScale `json:"colorScale,omitempty"` 8401 8402 // HeaderColor: The background color for header cells. 8403 HeaderColor *Color `json:"headerColor,omitempty"` 8404 8405 // HideTooltips: True to hide tooltips. 8406 HideTooltips bool `json:"hideTooltips,omitempty"` 8407 8408 // HintedLevels: The number of additional data levels beyond the labeled 8409 // levels to be shown 8410 // on the treemap chart. These levels are not interactive and are 8411 // shown 8412 // without their labels. Defaults to 0 if not specified. 8413 HintedLevels int64 `json:"hintedLevels,omitempty"` 8414 8415 // Labels: The data that contains the treemap cell labels. 8416 Labels *ChartData `json:"labels,omitempty"` 8417 8418 // Levels: The number of data levels to show on the treemap chart. These 8419 // levels are 8420 // interactive and are shown with their labels. Defaults to 2 if 8421 // not 8422 // specified. 8423 Levels int64 `json:"levels,omitempty"` 8424 8425 // MaxValue: The maximum possible data value. Cells with values greater 8426 // than this will 8427 // have the same color as cells with this value. If not specified, 8428 // defaults 8429 // to the actual maximum value from color_data, or the maximum value 8430 // from 8431 // size_data if color_data is not specified. 8432 MaxValue float64 `json:"maxValue,omitempty"` 8433 8434 // MinValue: The minimum possible data value. Cells with values less 8435 // than this will 8436 // have the same color as cells with this value. If not specified, 8437 // defaults 8438 // to the actual minimum value from color_data, or the minimum value 8439 // from 8440 // size_data if color_data is not specified. 8441 MinValue float64 `json:"minValue,omitempty"` 8442 8443 // ParentLabels: The data the contains the treemap cells' parent labels. 8444 ParentLabels *ChartData `json:"parentLabels,omitempty"` 8445 8446 // SizeData: The data that determines the size of each treemap data 8447 // cell. This data is 8448 // expected to be numeric. The cells corresponding to non-numeric or 8449 // missing 8450 // data will not be rendered. If color_data is not specified, this 8451 // data 8452 // is used to determine data cell background colors as well. 8453 SizeData *ChartData `json:"sizeData,omitempty"` 8454 8455 // TextFormat: The text format for all labels on the chart. 8456 TextFormat *TextFormat `json:"textFormat,omitempty"` 8457 8458 // ForceSendFields is a list of field names (e.g. "ColorData") to 8459 // unconditionally include in API requests. By default, fields with 8460 // empty values are omitted from API requests. However, any non-pointer, 8461 // non-interface field appearing in ForceSendFields will be sent to the 8462 // server regardless of whether the field is empty or not. This may be 8463 // used to include empty fields in Patch requests. 8464 ForceSendFields []string `json:"-"` 8465 8466 // NullFields is a list of field names (e.g. "ColorData") to include in 8467 // API requests with the JSON null value. By default, fields with empty 8468 // values are omitted from API requests. However, any field with an 8469 // empty value appearing in NullFields will be sent to the server as 8470 // null. It is an error if a field in this list has a non-empty value. 8471 // This may be used to include null fields in Patch requests. 8472 NullFields []string `json:"-"` 8473} 8474 8475func (s *TreemapChartSpec) MarshalJSON() ([]byte, error) { 8476 type NoMethod TreemapChartSpec 8477 raw := NoMethod(*s) 8478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8479} 8480 8481func (s *TreemapChartSpec) UnmarshalJSON(data []byte) error { 8482 type NoMethod TreemapChartSpec 8483 var s1 struct { 8484 MaxValue gensupport.JSONFloat64 `json:"maxValue"` 8485 MinValue gensupport.JSONFloat64 `json:"minValue"` 8486 *NoMethod 8487 } 8488 s1.NoMethod = (*NoMethod)(s) 8489 if err := json.Unmarshal(data, &s1); err != nil { 8490 return err 8491 } 8492 s.MaxValue = float64(s1.MaxValue) 8493 s.MinValue = float64(s1.MinValue) 8494 return nil 8495} 8496 8497// UnmergeCellsRequest: Unmerges cells in the given range. 8498type UnmergeCellsRequest struct { 8499 // Range: The range within which all cells should be unmerged. 8500 // If the range spans multiple merges, all will be unmerged. 8501 // The range must not partially span any merge. 8502 Range *GridRange `json:"range,omitempty"` 8503 8504 // ForceSendFields is a list of field names (e.g. "Range") to 8505 // unconditionally include in API requests. By default, fields with 8506 // empty values are omitted from API requests. However, any non-pointer, 8507 // non-interface field appearing in ForceSendFields will be sent to the 8508 // server regardless of whether the field is empty or not. This may be 8509 // used to include empty fields in Patch requests. 8510 ForceSendFields []string `json:"-"` 8511 8512 // NullFields is a list of field names (e.g. "Range") to include in API 8513 // requests with the JSON null value. By default, fields with empty 8514 // values are omitted from API requests. However, any field with an 8515 // empty value appearing in NullFields will be sent to the server as 8516 // null. It is an error if a field in this list has a non-empty value. 8517 // This may be used to include null fields in Patch requests. 8518 NullFields []string `json:"-"` 8519} 8520 8521func (s *UnmergeCellsRequest) MarshalJSON() ([]byte, error) { 8522 type NoMethod UnmergeCellsRequest 8523 raw := NoMethod(*s) 8524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8525} 8526 8527// UpdateBandingRequest: Updates properties of the supplied banded 8528// range. 8529type UpdateBandingRequest struct { 8530 // BandedRange: The banded range to update with the new properties. 8531 BandedRange *BandedRange `json:"bandedRange,omitempty"` 8532 8533 // Fields: The fields that should be updated. At least one field must 8534 // be specified. 8535 // The root `bandedRange` is implied and should not be specified. 8536 // A single "*" can be used as short-hand for listing every field. 8537 Fields string `json:"fields,omitempty"` 8538 8539 // ForceSendFields is a list of field names (e.g. "BandedRange") to 8540 // unconditionally include in API requests. By default, fields with 8541 // empty values are omitted from API requests. However, any non-pointer, 8542 // non-interface field appearing in ForceSendFields will be sent to the 8543 // server regardless of whether the field is empty or not. This may be 8544 // used to include empty fields in Patch requests. 8545 ForceSendFields []string `json:"-"` 8546 8547 // NullFields is a list of field names (e.g. "BandedRange") to include 8548 // in API requests with the JSON null value. By default, fields with 8549 // empty values are omitted from API requests. However, any field with 8550 // an empty value appearing in NullFields will be sent to the server as 8551 // null. It is an error if a field in this list has a non-empty value. 8552 // This may be used to include null fields in Patch requests. 8553 NullFields []string `json:"-"` 8554} 8555 8556func (s *UpdateBandingRequest) MarshalJSON() ([]byte, error) { 8557 type NoMethod UpdateBandingRequest 8558 raw := NoMethod(*s) 8559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8560} 8561 8562// UpdateBordersRequest: Updates the borders of a range. 8563// If a field is not set in the request, that means the border remains 8564// as-is. 8565// For example, with two subsequent UpdateBordersRequest: 8566// 8567// 1. range: A1:A5 `{ top: RED, bottom: WHITE }` 8568// 2. range: A1:A5 `{ left: BLUE }` 8569// 8570// That would result in A1:A5 having a borders of 8571// `{ top: RED, bottom: WHITE, left: BLUE }`. 8572// If you want to clear a border, explicitly set the style to 8573// NONE. 8574type UpdateBordersRequest struct { 8575 // Bottom: The border to put at the bottom of the range. 8576 Bottom *Border `json:"bottom,omitempty"` 8577 8578 // InnerHorizontal: The horizontal border to put within the range. 8579 InnerHorizontal *Border `json:"innerHorizontal,omitempty"` 8580 8581 // InnerVertical: The vertical border to put within the range. 8582 InnerVertical *Border `json:"innerVertical,omitempty"` 8583 8584 // Left: The border to put at the left of the range. 8585 Left *Border `json:"left,omitempty"` 8586 8587 // Range: The range whose borders should be updated. 8588 Range *GridRange `json:"range,omitempty"` 8589 8590 // Right: The border to put at the right of the range. 8591 Right *Border `json:"right,omitempty"` 8592 8593 // Top: The border to put at the top of the range. 8594 Top *Border `json:"top,omitempty"` 8595 8596 // ForceSendFields is a list of field names (e.g. "Bottom") to 8597 // unconditionally include in API requests. By default, fields with 8598 // empty values are omitted from API requests. However, any non-pointer, 8599 // non-interface field appearing in ForceSendFields will be sent to the 8600 // server regardless of whether the field is empty or not. This may be 8601 // used to include empty fields in Patch requests. 8602 ForceSendFields []string `json:"-"` 8603 8604 // NullFields is a list of field names (e.g. "Bottom") to include in API 8605 // requests with the JSON null value. By default, fields with empty 8606 // values are omitted from API requests. However, any field with an 8607 // empty value appearing in NullFields will be sent to the server as 8608 // null. It is an error if a field in this list has a non-empty value. 8609 // This may be used to include null fields in Patch requests. 8610 NullFields []string `json:"-"` 8611} 8612 8613func (s *UpdateBordersRequest) MarshalJSON() ([]byte, error) { 8614 type NoMethod UpdateBordersRequest 8615 raw := NoMethod(*s) 8616 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8617} 8618 8619// UpdateCellsRequest: Updates all cells in a range with new data. 8620type UpdateCellsRequest struct { 8621 // Fields: The fields of CellData that should be updated. 8622 // At least one field must be specified. 8623 // The root is the CellData; 'row.values.' should not be specified. 8624 // A single "*" can be used as short-hand for listing every field. 8625 Fields string `json:"fields,omitempty"` 8626 8627 // Range: The range to write data to. 8628 // 8629 // If the data in rows does not cover the entire requested range, 8630 // the fields matching those set in fields will be cleared. 8631 Range *GridRange `json:"range,omitempty"` 8632 8633 // Rows: The data to write. 8634 Rows []*RowData `json:"rows,omitempty"` 8635 8636 // Start: The coordinate to start writing data at. 8637 // Any number of rows and columns (including a different number 8638 // of 8639 // columns per row) may be written. 8640 Start *GridCoordinate `json:"start,omitempty"` 8641 8642 // ForceSendFields is a list of field names (e.g. "Fields") to 8643 // unconditionally include in API requests. By default, fields with 8644 // empty values are omitted from API requests. However, any non-pointer, 8645 // non-interface field appearing in ForceSendFields will be sent to the 8646 // server regardless of whether the field is empty or not. This may be 8647 // used to include empty fields in Patch requests. 8648 ForceSendFields []string `json:"-"` 8649 8650 // NullFields is a list of field names (e.g. "Fields") to include in API 8651 // requests with the JSON null value. By default, fields with empty 8652 // values are omitted from API requests. However, any field with an 8653 // empty value appearing in NullFields will be sent to the server as 8654 // null. It is an error if a field in this list has a non-empty value. 8655 // This may be used to include null fields in Patch requests. 8656 NullFields []string `json:"-"` 8657} 8658 8659func (s *UpdateCellsRequest) MarshalJSON() ([]byte, error) { 8660 type NoMethod UpdateCellsRequest 8661 raw := NoMethod(*s) 8662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8663} 8664 8665// UpdateChartSpecRequest: Updates a chart's specifications. 8666// (This does not move or resize a chart. To move or resize a chart, 8667// use 8668// UpdateEmbeddedObjectPositionRequest.) 8669type UpdateChartSpecRequest struct { 8670 // ChartId: The ID of the chart to update. 8671 ChartId int64 `json:"chartId,omitempty"` 8672 8673 // Spec: The specification to apply to the chart. 8674 Spec *ChartSpec `json:"spec,omitempty"` 8675 8676 // ForceSendFields is a list of field names (e.g. "ChartId") to 8677 // unconditionally include in API requests. By default, fields with 8678 // empty values are omitted from API requests. However, any non-pointer, 8679 // non-interface field appearing in ForceSendFields will be sent to the 8680 // server regardless of whether the field is empty or not. This may be 8681 // used to include empty fields in Patch requests. 8682 ForceSendFields []string `json:"-"` 8683 8684 // NullFields is a list of field names (e.g. "ChartId") to include in 8685 // API requests with the JSON null value. By default, fields with empty 8686 // values are omitted from API requests. However, any field with an 8687 // empty value appearing in NullFields will be sent to the server as 8688 // null. It is an error if a field in this list has a non-empty value. 8689 // This may be used to include null fields in Patch requests. 8690 NullFields []string `json:"-"` 8691} 8692 8693func (s *UpdateChartSpecRequest) MarshalJSON() ([]byte, error) { 8694 type NoMethod UpdateChartSpecRequest 8695 raw := NoMethod(*s) 8696 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8697} 8698 8699// UpdateConditionalFormatRuleRequest: Updates a conditional format rule 8700// at the given index, 8701// or moves a conditional format rule to another index. 8702type UpdateConditionalFormatRuleRequest struct { 8703 // Index: The zero-based index of the rule that should be replaced or 8704 // moved. 8705 Index int64 `json:"index,omitempty"` 8706 8707 // NewIndex: The zero-based new index the rule should end up at. 8708 NewIndex int64 `json:"newIndex,omitempty"` 8709 8710 // Rule: The rule that should replace the rule at the given index. 8711 Rule *ConditionalFormatRule `json:"rule,omitempty"` 8712 8713 // SheetId: The sheet of the rule to move. Required if new_index is 8714 // set, 8715 // unused otherwise. 8716 SheetId int64 `json:"sheetId,omitempty"` 8717 8718 // ForceSendFields is a list of field names (e.g. "Index") to 8719 // unconditionally include in API requests. By default, fields with 8720 // empty values are omitted from API requests. However, any non-pointer, 8721 // non-interface field appearing in ForceSendFields will be sent to the 8722 // server regardless of whether the field is empty or not. This may be 8723 // used to include empty fields in Patch requests. 8724 ForceSendFields []string `json:"-"` 8725 8726 // NullFields is a list of field names (e.g. "Index") to include in API 8727 // requests with the JSON null value. By default, fields with empty 8728 // values are omitted from API requests. However, any field with an 8729 // empty value appearing in NullFields will be sent to the server as 8730 // null. It is an error if a field in this list has a non-empty value. 8731 // This may be used to include null fields in Patch requests. 8732 NullFields []string `json:"-"` 8733} 8734 8735func (s *UpdateConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 8736 type NoMethod UpdateConditionalFormatRuleRequest 8737 raw := NoMethod(*s) 8738 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8739} 8740 8741// UpdateConditionalFormatRuleResponse: The result of updating a 8742// conditional format rule. 8743type UpdateConditionalFormatRuleResponse struct { 8744 // NewIndex: The index of the new rule. 8745 NewIndex int64 `json:"newIndex,omitempty"` 8746 8747 // NewRule: The new rule that replaced the old rule (if replacing), 8748 // or the rule that was moved (if moved) 8749 NewRule *ConditionalFormatRule `json:"newRule,omitempty"` 8750 8751 // OldIndex: The old index of the rule. Not set if a rule was 8752 // replaced 8753 // (because it is the same as new_index). 8754 OldIndex int64 `json:"oldIndex,omitempty"` 8755 8756 // OldRule: The old (deleted) rule. Not set if a rule was moved 8757 // (because it is the same as new_rule). 8758 OldRule *ConditionalFormatRule `json:"oldRule,omitempty"` 8759 8760 // ForceSendFields is a list of field names (e.g. "NewIndex") to 8761 // unconditionally include in API requests. By default, fields with 8762 // empty values are omitted from API requests. However, any non-pointer, 8763 // non-interface field appearing in ForceSendFields will be sent to the 8764 // server regardless of whether the field is empty or not. This may be 8765 // used to include empty fields in Patch requests. 8766 ForceSendFields []string `json:"-"` 8767 8768 // NullFields is a list of field names (e.g. "NewIndex") to include in 8769 // API requests with the JSON null value. By default, fields with empty 8770 // values are omitted from API requests. However, any field with an 8771 // empty value appearing in NullFields will be sent to the server as 8772 // null. It is an error if a field in this list has a non-empty value. 8773 // This may be used to include null fields in Patch requests. 8774 NullFields []string `json:"-"` 8775} 8776 8777func (s *UpdateConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 8778 type NoMethod UpdateConditionalFormatRuleResponse 8779 raw := NoMethod(*s) 8780 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8781} 8782 8783// UpdateDeveloperMetadataRequest: A request to update properties of 8784// developer metadata. 8785// Updates the properties of the developer metadata selected by the 8786// filters to 8787// the values provided in the DeveloperMetadata resource. Callers 8788// must 8789// specify the properties they wish to update in the fields parameter, 8790// as well 8791// as specify at least one DataFilter matching the metadata they wish 8792// to 8793// update. 8794type UpdateDeveloperMetadataRequest struct { 8795 // DataFilters: The filters matching the developer metadata entries to 8796 // update. 8797 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 8798 8799 // DeveloperMetadata: The value that all metadata matched by the data 8800 // filters will be updated to. 8801 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 8802 8803 // Fields: The fields that should be updated. At least one field must 8804 // be specified. 8805 // The root `developerMetadata` is implied and should not be 8806 // specified. 8807 // A single "*" can be used as short-hand for listing every field. 8808 Fields string `json:"fields,omitempty"` 8809 8810 // ForceSendFields is a list of field names (e.g. "DataFilters") to 8811 // unconditionally include in API requests. By default, fields with 8812 // empty values are omitted from API requests. However, any non-pointer, 8813 // non-interface field appearing in ForceSendFields will be sent to the 8814 // server regardless of whether the field is empty or not. This may be 8815 // used to include empty fields in Patch requests. 8816 ForceSendFields []string `json:"-"` 8817 8818 // NullFields is a list of field names (e.g. "DataFilters") to include 8819 // in API requests with the JSON null value. By default, fields with 8820 // empty values are omitted from API requests. However, any field with 8821 // an empty value appearing in NullFields will be sent to the server as 8822 // null. It is an error if a field in this list has a non-empty value. 8823 // This may be used to include null fields in Patch requests. 8824 NullFields []string `json:"-"` 8825} 8826 8827func (s *UpdateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 8828 type NoMethod UpdateDeveloperMetadataRequest 8829 raw := NoMethod(*s) 8830 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8831} 8832 8833// UpdateDeveloperMetadataResponse: The response from updating developer 8834// metadata. 8835type UpdateDeveloperMetadataResponse struct { 8836 // DeveloperMetadata: The updated developer metadata. 8837 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 8838 8839 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 8840 // to unconditionally include in API requests. By default, fields with 8841 // empty values are omitted from API requests. However, any non-pointer, 8842 // non-interface field appearing in ForceSendFields will be sent to the 8843 // server regardless of whether the field is empty or not. This may be 8844 // used to include empty fields in Patch requests. 8845 ForceSendFields []string `json:"-"` 8846 8847 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 8848 // include in API requests with the JSON null value. By default, fields 8849 // with empty values are omitted from API requests. However, any field 8850 // with an empty value appearing in NullFields will be sent to the 8851 // server as null. It is an error if a field in this list has a 8852 // non-empty value. This may be used to include null fields in Patch 8853 // requests. 8854 NullFields []string `json:"-"` 8855} 8856 8857func (s *UpdateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 8858 type NoMethod UpdateDeveloperMetadataResponse 8859 raw := NoMethod(*s) 8860 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8861} 8862 8863// UpdateDimensionGroupRequest: Updates the state of the specified 8864// group. 8865type UpdateDimensionGroupRequest struct { 8866 // DimensionGroup: The group whose state should be updated. The range 8867 // and depth of the group 8868 // should specify a valid group on the sheet, and all other fields 8869 // updated. 8870 DimensionGroup *DimensionGroup `json:"dimensionGroup,omitempty"` 8871 8872 // Fields: The fields that should be updated. At least one field must 8873 // be specified. 8874 // The root `dimensionGroup` is implied and should not be specified. 8875 // A single "*" can be used as short-hand for listing every field. 8876 Fields string `json:"fields,omitempty"` 8877 8878 // ForceSendFields is a list of field names (e.g. "DimensionGroup") to 8879 // unconditionally include in API requests. By default, fields with 8880 // empty values are omitted from API requests. However, any non-pointer, 8881 // non-interface field appearing in ForceSendFields will be sent to the 8882 // server regardless of whether the field is empty or not. This may be 8883 // used to include empty fields in Patch requests. 8884 ForceSendFields []string `json:"-"` 8885 8886 // NullFields is a list of field names (e.g. "DimensionGroup") to 8887 // include in API requests with the JSON null value. By default, fields 8888 // with empty values are omitted from API requests. However, any field 8889 // with an empty value appearing in NullFields will be sent to the 8890 // server as null. It is an error if a field in this list has a 8891 // non-empty value. This may be used to include null fields in Patch 8892 // requests. 8893 NullFields []string `json:"-"` 8894} 8895 8896func (s *UpdateDimensionGroupRequest) MarshalJSON() ([]byte, error) { 8897 type NoMethod UpdateDimensionGroupRequest 8898 raw := NoMethod(*s) 8899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8900} 8901 8902// UpdateDimensionPropertiesRequest: Updates properties of dimensions 8903// within the specified range. 8904type UpdateDimensionPropertiesRequest struct { 8905 // Fields: The fields that should be updated. At least one field must 8906 // be specified. 8907 // The root `properties` is implied and should not be specified. 8908 // A single "*" can be used as short-hand for listing every field. 8909 Fields string `json:"fields,omitempty"` 8910 8911 // Properties: Properties to update. 8912 Properties *DimensionProperties `json:"properties,omitempty"` 8913 8914 // Range: The rows or columns to update. 8915 Range *DimensionRange `json:"range,omitempty"` 8916 8917 // ForceSendFields is a list of field names (e.g. "Fields") to 8918 // unconditionally include in API requests. By default, fields with 8919 // empty values are omitted from API requests. However, any non-pointer, 8920 // non-interface field appearing in ForceSendFields will be sent to the 8921 // server regardless of whether the field is empty or not. This may be 8922 // used to include empty fields in Patch requests. 8923 ForceSendFields []string `json:"-"` 8924 8925 // NullFields is a list of field names (e.g. "Fields") to include in API 8926 // requests with the JSON null value. By default, fields with empty 8927 // values are omitted from API requests. However, any field with an 8928 // empty value appearing in NullFields will be sent to the server as 8929 // null. It is an error if a field in this list has a non-empty value. 8930 // This may be used to include null fields in Patch requests. 8931 NullFields []string `json:"-"` 8932} 8933 8934func (s *UpdateDimensionPropertiesRequest) MarshalJSON() ([]byte, error) { 8935 type NoMethod UpdateDimensionPropertiesRequest 8936 raw := NoMethod(*s) 8937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8938} 8939 8940// UpdateEmbeddedObjectPositionRequest: Update an embedded object's 8941// position (such as a moving or resizing a 8942// chart or image). 8943type UpdateEmbeddedObjectPositionRequest struct { 8944 // Fields: The fields of OverlayPosition 8945 // that should be updated when setting a new position. Used only 8946 // if 8947 // newPosition.overlayPosition 8948 // is set, in which case at least one field must 8949 // be specified. The root `newPosition.overlayPosition` is implied 8950 // and 8951 // should not be specified. 8952 // A single "*" can be used as short-hand for listing every field. 8953 Fields string `json:"fields,omitempty"` 8954 8955 // NewPosition: An explicit position to move the embedded object to. 8956 // If newPosition.sheetId is set, 8957 // a new sheet with that ID will be created. 8958 // If newPosition.newSheet is set to true, 8959 // a new sheet will be created with an ID that will be chosen for you. 8960 NewPosition *EmbeddedObjectPosition `json:"newPosition,omitempty"` 8961 8962 // ObjectId: The ID of the object to moved. 8963 ObjectId int64 `json:"objectId,omitempty"` 8964 8965 // ForceSendFields is a list of field names (e.g. "Fields") to 8966 // unconditionally include in API requests. By default, fields with 8967 // empty values are omitted from API requests. However, any non-pointer, 8968 // non-interface field appearing in ForceSendFields will be sent to the 8969 // server regardless of whether the field is empty or not. This may be 8970 // used to include empty fields in Patch requests. 8971 ForceSendFields []string `json:"-"` 8972 8973 // NullFields is a list of field names (e.g. "Fields") to include in API 8974 // requests with the JSON null value. By default, fields with empty 8975 // values are omitted from API requests. However, any field with an 8976 // empty value appearing in NullFields will be sent to the server as 8977 // null. It is an error if a field in this list has a non-empty value. 8978 // This may be used to include null fields in Patch requests. 8979 NullFields []string `json:"-"` 8980} 8981 8982func (s *UpdateEmbeddedObjectPositionRequest) MarshalJSON() ([]byte, error) { 8983 type NoMethod UpdateEmbeddedObjectPositionRequest 8984 raw := NoMethod(*s) 8985 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8986} 8987 8988// UpdateEmbeddedObjectPositionResponse: The result of updating an 8989// embedded object's position. 8990type UpdateEmbeddedObjectPositionResponse struct { 8991 // Position: The new position of the embedded object. 8992 Position *EmbeddedObjectPosition `json:"position,omitempty"` 8993 8994 // ForceSendFields is a list of field names (e.g. "Position") to 8995 // unconditionally include in API requests. By default, fields with 8996 // empty values are omitted from API requests. However, any non-pointer, 8997 // non-interface field appearing in ForceSendFields will be sent to the 8998 // server regardless of whether the field is empty or not. This may be 8999 // used to include empty fields in Patch requests. 9000 ForceSendFields []string `json:"-"` 9001 9002 // NullFields is a list of field names (e.g. "Position") to include in 9003 // API requests with the JSON null value. By default, fields with empty 9004 // values are omitted from API requests. However, any field with an 9005 // empty value appearing in NullFields will be sent to the server as 9006 // null. It is an error if a field in this list has a non-empty value. 9007 // This may be used to include null fields in Patch requests. 9008 NullFields []string `json:"-"` 9009} 9010 9011func (s *UpdateEmbeddedObjectPositionResponse) MarshalJSON() ([]byte, error) { 9012 type NoMethod UpdateEmbeddedObjectPositionResponse 9013 raw := NoMethod(*s) 9014 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9015} 9016 9017// UpdateFilterViewRequest: Updates properties of the filter view. 9018type UpdateFilterViewRequest struct { 9019 // Fields: The fields that should be updated. At least one field must 9020 // be specified. 9021 // The root `filter` is implied and should not be specified. 9022 // A single "*" can be used as short-hand for listing every field. 9023 Fields string `json:"fields,omitempty"` 9024 9025 // Filter: The new properties of the filter view. 9026 Filter *FilterView `json:"filter,omitempty"` 9027 9028 // ForceSendFields is a list of field names (e.g. "Fields") to 9029 // unconditionally include in API requests. By default, fields with 9030 // empty values are omitted from API requests. However, any non-pointer, 9031 // non-interface field appearing in ForceSendFields will be sent to the 9032 // server regardless of whether the field is empty or not. This may be 9033 // used to include empty fields in Patch requests. 9034 ForceSendFields []string `json:"-"` 9035 9036 // NullFields is a list of field names (e.g. "Fields") to include in API 9037 // requests with the JSON null value. By default, fields with empty 9038 // values are omitted from API requests. However, any field with an 9039 // empty value appearing in NullFields will be sent to the server as 9040 // null. It is an error if a field in this list has a non-empty value. 9041 // This may be used to include null fields in Patch requests. 9042 NullFields []string `json:"-"` 9043} 9044 9045func (s *UpdateFilterViewRequest) MarshalJSON() ([]byte, error) { 9046 type NoMethod UpdateFilterViewRequest 9047 raw := NoMethod(*s) 9048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9049} 9050 9051// UpdateNamedRangeRequest: Updates properties of the named range with 9052// the specified 9053// namedRangeId. 9054type UpdateNamedRangeRequest struct { 9055 // Fields: The fields that should be updated. At least one field must 9056 // be specified. 9057 // The root `namedRange` is implied and should not be specified. 9058 // A single "*" can be used as short-hand for listing every field. 9059 Fields string `json:"fields,omitempty"` 9060 9061 // NamedRange: The named range to update with the new properties. 9062 NamedRange *NamedRange `json:"namedRange,omitempty"` 9063 9064 // ForceSendFields is a list of field names (e.g. "Fields") to 9065 // unconditionally include in API requests. By default, fields with 9066 // empty values are omitted from API requests. However, any non-pointer, 9067 // non-interface field appearing in ForceSendFields will be sent to the 9068 // server regardless of whether the field is empty or not. This may be 9069 // used to include empty fields in Patch requests. 9070 ForceSendFields []string `json:"-"` 9071 9072 // NullFields is a list of field names (e.g. "Fields") to include in API 9073 // requests with the JSON null value. By default, fields with empty 9074 // values are omitted from API requests. However, any field with an 9075 // empty value appearing in NullFields will be sent to the server as 9076 // null. It is an error if a field in this list has a non-empty value. 9077 // This may be used to include null fields in Patch requests. 9078 NullFields []string `json:"-"` 9079} 9080 9081func (s *UpdateNamedRangeRequest) MarshalJSON() ([]byte, error) { 9082 type NoMethod UpdateNamedRangeRequest 9083 raw := NoMethod(*s) 9084 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9085} 9086 9087// UpdateProtectedRangeRequest: Updates an existing protected range with 9088// the specified 9089// protectedRangeId. 9090type UpdateProtectedRangeRequest struct { 9091 // Fields: The fields that should be updated. At least one field must 9092 // be specified. 9093 // The root `protectedRange` is implied and should not be specified. 9094 // A single "*" can be used as short-hand for listing every field. 9095 Fields string `json:"fields,omitempty"` 9096 9097 // ProtectedRange: The protected range to update with the new 9098 // properties. 9099 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 9100 9101 // ForceSendFields is a list of field names (e.g. "Fields") to 9102 // unconditionally include in API requests. By default, fields with 9103 // empty values are omitted from API requests. However, any non-pointer, 9104 // non-interface field appearing in ForceSendFields will be sent to the 9105 // server regardless of whether the field is empty or not. This may be 9106 // used to include empty fields in Patch requests. 9107 ForceSendFields []string `json:"-"` 9108 9109 // NullFields is a list of field names (e.g. "Fields") to include in API 9110 // requests with the JSON null value. By default, fields with empty 9111 // values are omitted from API requests. However, any field with an 9112 // empty value appearing in NullFields will be sent to the server as 9113 // null. It is an error if a field in this list has a non-empty value. 9114 // This may be used to include null fields in Patch requests. 9115 NullFields []string `json:"-"` 9116} 9117 9118func (s *UpdateProtectedRangeRequest) MarshalJSON() ([]byte, error) { 9119 type NoMethod UpdateProtectedRangeRequest 9120 raw := NoMethod(*s) 9121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9122} 9123 9124// UpdateSheetPropertiesRequest: Updates properties of the sheet with 9125// the specified 9126// sheetId. 9127type UpdateSheetPropertiesRequest struct { 9128 // Fields: The fields that should be updated. At least one field must 9129 // be specified. 9130 // The root `properties` is implied and should not be specified. 9131 // A single "*" can be used as short-hand for listing every field. 9132 Fields string `json:"fields,omitempty"` 9133 9134 // Properties: The properties to update. 9135 Properties *SheetProperties `json:"properties,omitempty"` 9136 9137 // ForceSendFields is a list of field names (e.g. "Fields") to 9138 // unconditionally include in API requests. By default, fields with 9139 // empty values are omitted from API requests. However, any non-pointer, 9140 // non-interface field appearing in ForceSendFields will be sent to the 9141 // server regardless of whether the field is empty or not. This may be 9142 // used to include empty fields in Patch requests. 9143 ForceSendFields []string `json:"-"` 9144 9145 // NullFields is a list of field names (e.g. "Fields") to include in API 9146 // requests with the JSON null value. By default, fields with empty 9147 // values are omitted from API requests. However, any field with an 9148 // empty value appearing in NullFields will be sent to the server as 9149 // null. It is an error if a field in this list has a non-empty value. 9150 // This may be used to include null fields in Patch requests. 9151 NullFields []string `json:"-"` 9152} 9153 9154func (s *UpdateSheetPropertiesRequest) MarshalJSON() ([]byte, error) { 9155 type NoMethod UpdateSheetPropertiesRequest 9156 raw := NoMethod(*s) 9157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9158} 9159 9160// UpdateSpreadsheetPropertiesRequest: Updates properties of a 9161// spreadsheet. 9162type UpdateSpreadsheetPropertiesRequest struct { 9163 // Fields: The fields that should be updated. At least one field must 9164 // be specified. 9165 // The root 'properties' is implied and should not be specified. 9166 // A single "*" can be used as short-hand for listing every field. 9167 Fields string `json:"fields,omitempty"` 9168 9169 // Properties: The properties to update. 9170 Properties *SpreadsheetProperties `json:"properties,omitempty"` 9171 9172 // ForceSendFields is a list of field names (e.g. "Fields") to 9173 // unconditionally include in API requests. By default, fields with 9174 // empty values are omitted from API requests. However, any non-pointer, 9175 // non-interface field appearing in ForceSendFields will be sent to the 9176 // server regardless of whether the field is empty or not. This may be 9177 // used to include empty fields in Patch requests. 9178 ForceSendFields []string `json:"-"` 9179 9180 // NullFields is a list of field names (e.g. "Fields") to include in API 9181 // requests with the JSON null value. By default, fields with empty 9182 // values are omitted from API requests. However, any field with an 9183 // empty value appearing in NullFields will be sent to the server as 9184 // null. It is an error if a field in this list has a non-empty value. 9185 // This may be used to include null fields in Patch requests. 9186 NullFields []string `json:"-"` 9187} 9188 9189func (s *UpdateSpreadsheetPropertiesRequest) MarshalJSON() ([]byte, error) { 9190 type NoMethod UpdateSpreadsheetPropertiesRequest 9191 raw := NoMethod(*s) 9192 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9193} 9194 9195// UpdateValuesByDataFilterResponse: The response when updating a range 9196// of values by a data filter in a 9197// spreadsheet. 9198type UpdateValuesByDataFilterResponse struct { 9199 // DataFilter: The data filter that selected the range that was updated. 9200 DataFilter *DataFilter `json:"dataFilter,omitempty"` 9201 9202 // UpdatedCells: The number of cells updated. 9203 UpdatedCells int64 `json:"updatedCells,omitempty"` 9204 9205 // UpdatedColumns: The number of columns where at least one cell in the 9206 // column was updated. 9207 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 9208 9209 // UpdatedData: The values of the cells in the range matched by the 9210 // dataFilter after all 9211 // updates were applied. This is only included if the 9212 // request's 9213 // `includeValuesInResponse` field was `true`. 9214 UpdatedData *ValueRange `json:"updatedData,omitempty"` 9215 9216 // UpdatedRange: The range (in A1 notation) that updates were applied 9217 // to. 9218 UpdatedRange string `json:"updatedRange,omitempty"` 9219 9220 // UpdatedRows: The number of rows where at least one cell in the row 9221 // was updated. 9222 UpdatedRows int64 `json:"updatedRows,omitempty"` 9223 9224 // ForceSendFields is a list of field names (e.g. "DataFilter") to 9225 // unconditionally include in API requests. By default, fields with 9226 // empty values are omitted from API requests. However, any non-pointer, 9227 // non-interface field appearing in ForceSendFields will be sent to the 9228 // server regardless of whether the field is empty or not. This may be 9229 // used to include empty fields in Patch requests. 9230 ForceSendFields []string `json:"-"` 9231 9232 // NullFields is a list of field names (e.g. "DataFilter") to include in 9233 // API requests with the JSON null value. By default, fields with empty 9234 // values are omitted from API requests. However, any field with an 9235 // empty value appearing in NullFields will be sent to the server as 9236 // null. It is an error if a field in this list has a non-empty value. 9237 // This may be used to include null fields in Patch requests. 9238 NullFields []string `json:"-"` 9239} 9240 9241func (s *UpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 9242 type NoMethod UpdateValuesByDataFilterResponse 9243 raw := NoMethod(*s) 9244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9245} 9246 9247// UpdateValuesResponse: The response when updating a range of values in 9248// a spreadsheet. 9249type UpdateValuesResponse struct { 9250 // SpreadsheetId: The spreadsheet the updates were applied to. 9251 SpreadsheetId string `json:"spreadsheetId,omitempty"` 9252 9253 // UpdatedCells: The number of cells updated. 9254 UpdatedCells int64 `json:"updatedCells,omitempty"` 9255 9256 // UpdatedColumns: The number of columns where at least one cell in the 9257 // column was updated. 9258 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 9259 9260 // UpdatedData: The values of the cells after updates were applied. 9261 // This is only included if the request's `includeValuesInResponse` 9262 // field 9263 // was `true`. 9264 UpdatedData *ValueRange `json:"updatedData,omitempty"` 9265 9266 // UpdatedRange: The range (in A1 notation) that updates were applied 9267 // to. 9268 UpdatedRange string `json:"updatedRange,omitempty"` 9269 9270 // UpdatedRows: The number of rows where at least one cell in the row 9271 // was updated. 9272 UpdatedRows int64 `json:"updatedRows,omitempty"` 9273 9274 // ServerResponse contains the HTTP response code and headers from the 9275 // server. 9276 googleapi.ServerResponse `json:"-"` 9277 9278 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 9279 // unconditionally include in API requests. By default, fields with 9280 // empty values are omitted from API requests. However, any non-pointer, 9281 // non-interface field appearing in ForceSendFields will be sent to the 9282 // server regardless of whether the field is empty or not. This may be 9283 // used to include empty fields in Patch requests. 9284 ForceSendFields []string `json:"-"` 9285 9286 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 9287 // in API requests with the JSON null value. By default, fields with 9288 // empty values are omitted from API requests. However, any field with 9289 // an empty value appearing in NullFields will be sent to the server as 9290 // null. It is an error if a field in this list has a non-empty value. 9291 // This may be used to include null fields in Patch requests. 9292 NullFields []string `json:"-"` 9293} 9294 9295func (s *UpdateValuesResponse) MarshalJSON() ([]byte, error) { 9296 type NoMethod UpdateValuesResponse 9297 raw := NoMethod(*s) 9298 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9299} 9300 9301// ValueRange: Data within a range of the spreadsheet. 9302type ValueRange struct { 9303 // MajorDimension: The major dimension of the values. 9304 // 9305 // For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 9306 // then requesting `range=A1:B2,majorDimension=ROWS` will 9307 // return 9308 // `[[1,2],[3,4]]`, 9309 // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 9310 // return 9311 // `[[1,3],[2,4]]`. 9312 // 9313 // For input, with `range=A1:B2,majorDimension=ROWS` then 9314 // `[[1,2],[3,4]]` 9315 // will set `A1=1,B1=2,A2=3,B2=4`. With 9316 // `range=A1:B2,majorDimension=COLUMNS` 9317 // then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. 9318 // 9319 // When writing, if this field is not set, it defaults to ROWS. 9320 // 9321 // Possible values: 9322 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 9323 // "ROWS" - Operates on the rows of a sheet. 9324 // "COLUMNS" - Operates on the columns of a sheet. 9325 MajorDimension string `json:"majorDimension,omitempty"` 9326 9327 // Range: The range the values cover, in A1 notation. 9328 // For output, this range indicates the entire requested range, 9329 // even though the values will exclude trailing rows and columns. 9330 // When appending values, this field represents the range to search for 9331 // a 9332 // table, after which values will be appended. 9333 Range string `json:"range,omitempty"` 9334 9335 // Values: The data that was read or to be written. This is an array of 9336 // arrays, 9337 // the outer array representing all the data and each inner 9338 // array 9339 // representing a major dimension. Each item in the inner 9340 // array 9341 // corresponds with one cell. 9342 // 9343 // For output, empty trailing rows and columns will not be 9344 // included. 9345 // 9346 // For input, supported value types are: bool, string, and double. 9347 // Null values will be skipped. 9348 // To set a cell to an empty value, set the string value to an empty 9349 // string. 9350 Values [][]interface{} `json:"values,omitempty"` 9351 9352 // ServerResponse contains the HTTP response code and headers from the 9353 // server. 9354 googleapi.ServerResponse `json:"-"` 9355 9356 // ForceSendFields is a list of field names (e.g. "MajorDimension") to 9357 // unconditionally include in API requests. By default, fields with 9358 // empty values are omitted from API requests. However, any non-pointer, 9359 // non-interface field appearing in ForceSendFields will be sent to the 9360 // server regardless of whether the field is empty or not. This may be 9361 // used to include empty fields in Patch requests. 9362 ForceSendFields []string `json:"-"` 9363 9364 // NullFields is a list of field names (e.g. "MajorDimension") to 9365 // include in API requests with the JSON null value. By default, fields 9366 // with empty values are omitted from API requests. However, any field 9367 // with an empty value appearing in NullFields will be sent to the 9368 // server as null. It is an error if a field in this list has a 9369 // non-empty value. This may be used to include null fields in Patch 9370 // requests. 9371 NullFields []string `json:"-"` 9372} 9373 9374func (s *ValueRange) MarshalJSON() ([]byte, error) { 9375 type NoMethod ValueRange 9376 raw := NoMethod(*s) 9377 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9378} 9379 9380// WaterfallChartColumnStyle: Styles for a waterfall chart column. 9381type WaterfallChartColumnStyle struct { 9382 // Color: The color of the column. 9383 Color *Color `json:"color,omitempty"` 9384 9385 // Label: The label of the column's legend. 9386 Label string `json:"label,omitempty"` 9387 9388 // ForceSendFields is a list of field names (e.g. "Color") to 9389 // unconditionally include in API requests. By default, fields with 9390 // empty values are omitted from API requests. However, any non-pointer, 9391 // non-interface field appearing in ForceSendFields will be sent to the 9392 // server regardless of whether the field is empty or not. This may be 9393 // used to include empty fields in Patch requests. 9394 ForceSendFields []string `json:"-"` 9395 9396 // NullFields is a list of field names (e.g. "Color") to include in API 9397 // requests with the JSON null value. By default, fields with empty 9398 // values are omitted from API requests. However, any field with an 9399 // empty value appearing in NullFields will be sent to the server as 9400 // null. It is an error if a field in this list has a non-empty value. 9401 // This may be used to include null fields in Patch requests. 9402 NullFields []string `json:"-"` 9403} 9404 9405func (s *WaterfallChartColumnStyle) MarshalJSON() ([]byte, error) { 9406 type NoMethod WaterfallChartColumnStyle 9407 raw := NoMethod(*s) 9408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9409} 9410 9411// WaterfallChartCustomSubtotal: A custom subtotal column for a 9412// waterfall chart series. 9413type WaterfallChartCustomSubtotal struct { 9414 // DataIsSubtotal: True if the data point at subtotal_index is the 9415 // subtotal. If false, 9416 // the subtotal will be computed and appear after the data point. 9417 DataIsSubtotal bool `json:"dataIsSubtotal,omitempty"` 9418 9419 // Label: A label for the subtotal column. 9420 Label string `json:"label,omitempty"` 9421 9422 // SubtotalIndex: The 0-based index of a data point within the series. 9423 // If 9424 // data_is_subtotal is true, the data point at this index is 9425 // the 9426 // subtotal. Otherwise, the subtotal appears after the data point 9427 // with 9428 // this index. A series can have multiple subtotals at arbitrary 9429 // indices, 9430 // but subtotals do not affect the indices of the data points. 9431 // For 9432 // example, if a series has three data points, their indices will 9433 // always 9434 // be 0, 1, and 2, regardless of how many subtotals exist on the series 9435 // or 9436 // what data points they are associated with. 9437 SubtotalIndex int64 `json:"subtotalIndex,omitempty"` 9438 9439 // ForceSendFields is a list of field names (e.g. "DataIsSubtotal") to 9440 // unconditionally include in API requests. By default, fields with 9441 // empty values are omitted from API requests. However, any non-pointer, 9442 // non-interface field appearing in ForceSendFields will be sent to the 9443 // server regardless of whether the field is empty or not. This may be 9444 // used to include empty fields in Patch requests. 9445 ForceSendFields []string `json:"-"` 9446 9447 // NullFields is a list of field names (e.g. "DataIsSubtotal") to 9448 // include in API requests with the JSON null value. By default, fields 9449 // with empty values are omitted from API requests. However, any field 9450 // with an empty value appearing in NullFields will be sent to the 9451 // server as null. It is an error if a field in this list has a 9452 // non-empty value. This may be used to include null fields in Patch 9453 // requests. 9454 NullFields []string `json:"-"` 9455} 9456 9457func (s *WaterfallChartCustomSubtotal) MarshalJSON() ([]byte, error) { 9458 type NoMethod WaterfallChartCustomSubtotal 9459 raw := NoMethod(*s) 9460 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9461} 9462 9463// WaterfallChartDomain: The domain of a waterfall chart. 9464type WaterfallChartDomain struct { 9465 // Data: The data of the WaterfallChartDomain. 9466 Data *ChartData `json:"data,omitempty"` 9467 9468 // Reversed: True to reverse the order of the domain values (horizontal 9469 // axis). 9470 Reversed bool `json:"reversed,omitempty"` 9471 9472 // ForceSendFields is a list of field names (e.g. "Data") to 9473 // unconditionally include in API requests. By default, fields with 9474 // empty values are omitted from API requests. However, any non-pointer, 9475 // non-interface field appearing in ForceSendFields will be sent to the 9476 // server regardless of whether the field is empty or not. This may be 9477 // used to include empty fields in Patch requests. 9478 ForceSendFields []string `json:"-"` 9479 9480 // NullFields is a list of field names (e.g. "Data") to include in API 9481 // requests with the JSON null value. By default, fields with empty 9482 // values are omitted from API requests. However, any field with an 9483 // empty value appearing in NullFields will be sent to the server as 9484 // null. It is an error if a field in this list has a non-empty value. 9485 // This may be used to include null fields in Patch requests. 9486 NullFields []string `json:"-"` 9487} 9488 9489func (s *WaterfallChartDomain) MarshalJSON() ([]byte, error) { 9490 type NoMethod WaterfallChartDomain 9491 raw := NoMethod(*s) 9492 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9493} 9494 9495// WaterfallChartSeries: A single series of data for a waterfall chart. 9496type WaterfallChartSeries struct { 9497 // CustomSubtotals: Custom subtotal columns appearing in this series. 9498 // The order in which 9499 // subtotals are defined is not significant. Only one subtotal may 9500 // be 9501 // defined for each data point. 9502 CustomSubtotals []*WaterfallChartCustomSubtotal `json:"customSubtotals,omitempty"` 9503 9504 // Data: The data being visualized in this series. 9505 Data *ChartData `json:"data,omitempty"` 9506 9507 // HideTrailingSubtotal: True to hide the subtotal column from the end 9508 // of the series. By default, 9509 // a subtotal column will appear at the end of each series. Setting 9510 // this 9511 // field to true will hide that subtotal column for this series. 9512 HideTrailingSubtotal bool `json:"hideTrailingSubtotal,omitempty"` 9513 9514 // NegativeColumnsStyle: Styles for all columns in this series with 9515 // negative values. 9516 NegativeColumnsStyle *WaterfallChartColumnStyle `json:"negativeColumnsStyle,omitempty"` 9517 9518 // PositiveColumnsStyle: Styles for all columns in this series with 9519 // positive values. 9520 PositiveColumnsStyle *WaterfallChartColumnStyle `json:"positiveColumnsStyle,omitempty"` 9521 9522 // SubtotalColumnsStyle: Styles for all subtotal columns in this series. 9523 SubtotalColumnsStyle *WaterfallChartColumnStyle `json:"subtotalColumnsStyle,omitempty"` 9524 9525 // ForceSendFields is a list of field names (e.g. "CustomSubtotals") to 9526 // unconditionally include in API requests. By default, fields with 9527 // empty values are omitted from API requests. However, any non-pointer, 9528 // non-interface field appearing in ForceSendFields will be sent to the 9529 // server regardless of whether the field is empty or not. This may be 9530 // used to include empty fields in Patch requests. 9531 ForceSendFields []string `json:"-"` 9532 9533 // NullFields is a list of field names (e.g. "CustomSubtotals") to 9534 // include in API requests with the JSON null value. By default, fields 9535 // with empty values are omitted from API requests. However, any field 9536 // with an empty value appearing in NullFields will be sent to the 9537 // server as null. It is an error if a field in this list has a 9538 // non-empty value. This may be used to include null fields in Patch 9539 // requests. 9540 NullFields []string `json:"-"` 9541} 9542 9543func (s *WaterfallChartSeries) MarshalJSON() ([]byte, error) { 9544 type NoMethod WaterfallChartSeries 9545 raw := NoMethod(*s) 9546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9547} 9548 9549// WaterfallChartSpec: A waterfall chart. 9550type WaterfallChartSpec struct { 9551 // ConnectorLineStyle: The line style for the connector lines. 9552 ConnectorLineStyle *LineStyle `json:"connectorLineStyle,omitempty"` 9553 9554 // Domain: The domain data (horizontal axis) for the waterfall chart. 9555 Domain *WaterfallChartDomain `json:"domain,omitempty"` 9556 9557 // FirstValueIsTotal: True to interpret the first value as a total. 9558 FirstValueIsTotal bool `json:"firstValueIsTotal,omitempty"` 9559 9560 // HideConnectorLines: True to hide connector lines between columns. 9561 HideConnectorLines bool `json:"hideConnectorLines,omitempty"` 9562 9563 // Series: The data this waterfall chart is visualizing. 9564 Series []*WaterfallChartSeries `json:"series,omitempty"` 9565 9566 // StackedType: The stacked type. 9567 // 9568 // Possible values: 9569 // "WATERFALL_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 9570 // "STACKED" - Values corresponding to the same domain (horizontal 9571 // axis) value will be 9572 // stacked vertically. 9573 // "SEQUENTIAL" - Series will spread out along the horizontal axis. 9574 StackedType string `json:"stackedType,omitempty"` 9575 9576 // ForceSendFields is a list of field names (e.g. "ConnectorLineStyle") 9577 // to unconditionally include in API requests. By default, fields with 9578 // empty values are omitted from API requests. However, any non-pointer, 9579 // non-interface field appearing in ForceSendFields will be sent to the 9580 // server regardless of whether the field is empty or not. This may be 9581 // used to include empty fields in Patch requests. 9582 ForceSendFields []string `json:"-"` 9583 9584 // NullFields is a list of field names (e.g. "ConnectorLineStyle") to 9585 // include in API requests with the JSON null value. By default, fields 9586 // with empty values are omitted from API requests. However, any field 9587 // with an empty value appearing in NullFields will be sent to the 9588 // server as null. It is an error if a field in this list has a 9589 // non-empty value. This may be used to include null fields in Patch 9590 // requests. 9591 NullFields []string `json:"-"` 9592} 9593 9594func (s *WaterfallChartSpec) MarshalJSON() ([]byte, error) { 9595 type NoMethod WaterfallChartSpec 9596 raw := NoMethod(*s) 9597 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9598} 9599 9600// method id "sheets.spreadsheets.batchUpdate": 9601 9602type SpreadsheetsBatchUpdateCall struct { 9603 s *Service 9604 spreadsheetId string 9605 batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest 9606 urlParams_ gensupport.URLParams 9607 ctx_ context.Context 9608 header_ http.Header 9609} 9610 9611// BatchUpdate: Applies one or more updates to the spreadsheet. 9612// 9613// Each request is validated before 9614// being applied. If any request is not valid then the entire request 9615// will 9616// fail and nothing will be applied. 9617// 9618// Some requests have replies to 9619// give you some information about how 9620// they are applied. The replies will mirror the requests. For 9621// example, 9622// if you applied 4 updates and the 3rd one had a reply, then 9623// the 9624// response will have 2 empty replies, the actual reply, and another 9625// empty 9626// reply, in that order. 9627// 9628// Due to the collaborative nature of spreadsheets, it is not guaranteed 9629// that 9630// the spreadsheet will reflect exactly your changes after this 9631// completes, 9632// however it is guaranteed that the updates in the request will 9633// be 9634// applied together atomically. Your changes may be altered with respect 9635// to 9636// collaborator changes. If there are no collaborators, the 9637// spreadsheet 9638// should reflect your changes. 9639func (r *SpreadsheetsService) BatchUpdate(spreadsheetId string, batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest) *SpreadsheetsBatchUpdateCall { 9640 c := &SpreadsheetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9641 c.spreadsheetId = spreadsheetId 9642 c.batchupdatespreadsheetrequest = batchupdatespreadsheetrequest 9643 return c 9644} 9645 9646// Fields allows partial responses to be retrieved. See 9647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9648// for more information. 9649func (c *SpreadsheetsBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsBatchUpdateCall { 9650 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9651 return c 9652} 9653 9654// Context sets the context to be used in this call's Do method. Any 9655// pending HTTP request will be aborted if the provided context is 9656// canceled. 9657func (c *SpreadsheetsBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsBatchUpdateCall { 9658 c.ctx_ = ctx 9659 return c 9660} 9661 9662// Header returns an http.Header that can be modified by the caller to 9663// add HTTP headers to the request. 9664func (c *SpreadsheetsBatchUpdateCall) Header() http.Header { 9665 if c.header_ == nil { 9666 c.header_ = make(http.Header) 9667 } 9668 return c.header_ 9669} 9670 9671func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 9672 reqHeaders := make(http.Header) 9673 for k, v := range c.header_ { 9674 reqHeaders[k] = v 9675 } 9676 reqHeaders.Set("User-Agent", c.s.userAgent()) 9677 var body io.Reader = nil 9678 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatespreadsheetrequest) 9679 if err != nil { 9680 return nil, err 9681 } 9682 reqHeaders.Set("Content-Type", "application/json") 9683 c.urlParams_.Set("alt", alt) 9684 c.urlParams_.Set("prettyPrint", "false") 9685 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate") 9686 urls += "?" + c.urlParams_.Encode() 9687 req, err := http.NewRequest("POST", urls, body) 9688 if err != nil { 9689 return nil, err 9690 } 9691 req.Header = reqHeaders 9692 googleapi.Expand(req.URL, map[string]string{ 9693 "spreadsheetId": c.spreadsheetId, 9694 }) 9695 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9696} 9697 9698// Do executes the "sheets.spreadsheets.batchUpdate" call. 9699// Exactly one of *BatchUpdateSpreadsheetResponse or error will be 9700// non-nil. Any non-2xx status code is an error. Response headers are in 9701// either *BatchUpdateSpreadsheetResponse.ServerResponse.Header or (if a 9702// response was returned at all) in error.(*googleapi.Error).Header. Use 9703// googleapi.IsNotModified to check whether the returned error was 9704// because http.StatusNotModified was returned. 9705func (c *SpreadsheetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateSpreadsheetResponse, error) { 9706 gensupport.SetOptions(c.urlParams_, opts...) 9707 res, err := c.doRequest("json") 9708 if res != nil && res.StatusCode == http.StatusNotModified { 9709 if res.Body != nil { 9710 res.Body.Close() 9711 } 9712 return nil, &googleapi.Error{ 9713 Code: res.StatusCode, 9714 Header: res.Header, 9715 } 9716 } 9717 if err != nil { 9718 return nil, err 9719 } 9720 defer googleapi.CloseBody(res) 9721 if err := googleapi.CheckResponse(res); err != nil { 9722 return nil, err 9723 } 9724 ret := &BatchUpdateSpreadsheetResponse{ 9725 ServerResponse: googleapi.ServerResponse{ 9726 Header: res.Header, 9727 HTTPStatusCode: res.StatusCode, 9728 }, 9729 } 9730 target := &ret 9731 if err := gensupport.DecodeResponse(target, res); err != nil { 9732 return nil, err 9733 } 9734 return ret, nil 9735 // { 9736 // "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.", 9737 // "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 9738 // "httpMethod": "POST", 9739 // "id": "sheets.spreadsheets.batchUpdate", 9740 // "parameterOrder": [ 9741 // "spreadsheetId" 9742 // ], 9743 // "parameters": { 9744 // "spreadsheetId": { 9745 // "description": "The spreadsheet to apply the updates to.", 9746 // "location": "path", 9747 // "required": true, 9748 // "type": "string" 9749 // } 9750 // }, 9751 // "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 9752 // "request": { 9753 // "$ref": "BatchUpdateSpreadsheetRequest" 9754 // }, 9755 // "response": { 9756 // "$ref": "BatchUpdateSpreadsheetResponse" 9757 // }, 9758 // "scopes": [ 9759 // "https://www.googleapis.com/auth/drive", 9760 // "https://www.googleapis.com/auth/drive.file", 9761 // "https://www.googleapis.com/auth/spreadsheets" 9762 // ] 9763 // } 9764 9765} 9766 9767// method id "sheets.spreadsheets.create": 9768 9769type SpreadsheetsCreateCall struct { 9770 s *Service 9771 spreadsheet *Spreadsheet 9772 urlParams_ gensupport.URLParams 9773 ctx_ context.Context 9774 header_ http.Header 9775} 9776 9777// Create: Creates a spreadsheet, returning the newly created 9778// spreadsheet. 9779func (r *SpreadsheetsService) Create(spreadsheet *Spreadsheet) *SpreadsheetsCreateCall { 9780 c := &SpreadsheetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9781 c.spreadsheet = spreadsheet 9782 return c 9783} 9784 9785// Fields allows partial responses to be retrieved. See 9786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9787// for more information. 9788func (c *SpreadsheetsCreateCall) Fields(s ...googleapi.Field) *SpreadsheetsCreateCall { 9789 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9790 return c 9791} 9792 9793// Context sets the context to be used in this call's Do method. Any 9794// pending HTTP request will be aborted if the provided context is 9795// canceled. 9796func (c *SpreadsheetsCreateCall) Context(ctx context.Context) *SpreadsheetsCreateCall { 9797 c.ctx_ = ctx 9798 return c 9799} 9800 9801// Header returns an http.Header that can be modified by the caller to 9802// add HTTP headers to the request. 9803func (c *SpreadsheetsCreateCall) Header() http.Header { 9804 if c.header_ == nil { 9805 c.header_ = make(http.Header) 9806 } 9807 return c.header_ 9808} 9809 9810func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) { 9811 reqHeaders := make(http.Header) 9812 for k, v := range c.header_ { 9813 reqHeaders[k] = v 9814 } 9815 reqHeaders.Set("User-Agent", c.s.userAgent()) 9816 var body io.Reader = nil 9817 body, err := googleapi.WithoutDataWrapper.JSONReader(c.spreadsheet) 9818 if err != nil { 9819 return nil, err 9820 } 9821 reqHeaders.Set("Content-Type", "application/json") 9822 c.urlParams_.Set("alt", alt) 9823 c.urlParams_.Set("prettyPrint", "false") 9824 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets") 9825 urls += "?" + c.urlParams_.Encode() 9826 req, err := http.NewRequest("POST", urls, body) 9827 if err != nil { 9828 return nil, err 9829 } 9830 req.Header = reqHeaders 9831 return gensupport.SendRequest(c.ctx_, c.s.client, req) 9832} 9833 9834// Do executes the "sheets.spreadsheets.create" call. 9835// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 9836// status code is an error. Response headers are in either 9837// *Spreadsheet.ServerResponse.Header or (if a response was returned at 9838// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 9839// to check whether the returned error was because 9840// http.StatusNotModified was returned. 9841func (c *SpreadsheetsCreateCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 9842 gensupport.SetOptions(c.urlParams_, opts...) 9843 res, err := c.doRequest("json") 9844 if res != nil && res.StatusCode == http.StatusNotModified { 9845 if res.Body != nil { 9846 res.Body.Close() 9847 } 9848 return nil, &googleapi.Error{ 9849 Code: res.StatusCode, 9850 Header: res.Header, 9851 } 9852 } 9853 if err != nil { 9854 return nil, err 9855 } 9856 defer googleapi.CloseBody(res) 9857 if err := googleapi.CheckResponse(res); err != nil { 9858 return nil, err 9859 } 9860 ret := &Spreadsheet{ 9861 ServerResponse: googleapi.ServerResponse{ 9862 Header: res.Header, 9863 HTTPStatusCode: res.StatusCode, 9864 }, 9865 } 9866 target := &ret 9867 if err := gensupport.DecodeResponse(target, res); err != nil { 9868 return nil, err 9869 } 9870 return ret, nil 9871 // { 9872 // "description": "Creates a spreadsheet, returning the newly created spreadsheet.", 9873 // "flatPath": "v4/spreadsheets", 9874 // "httpMethod": "POST", 9875 // "id": "sheets.spreadsheets.create", 9876 // "parameterOrder": [], 9877 // "parameters": {}, 9878 // "path": "v4/spreadsheets", 9879 // "request": { 9880 // "$ref": "Spreadsheet" 9881 // }, 9882 // "response": { 9883 // "$ref": "Spreadsheet" 9884 // }, 9885 // "scopes": [ 9886 // "https://www.googleapis.com/auth/drive", 9887 // "https://www.googleapis.com/auth/drive.file", 9888 // "https://www.googleapis.com/auth/spreadsheets" 9889 // ] 9890 // } 9891 9892} 9893 9894// method id "sheets.spreadsheets.get": 9895 9896type SpreadsheetsGetCall struct { 9897 s *Service 9898 spreadsheetId string 9899 urlParams_ gensupport.URLParams 9900 ifNoneMatch_ string 9901 ctx_ context.Context 9902 header_ http.Header 9903} 9904 9905// Get: Returns the spreadsheet at the given ID. 9906// The caller must specify the spreadsheet ID. 9907// 9908// By default, data within grids will not be returned. 9909// You can include grid data one of two ways: 9910// 9911// * Specify a field mask listing your desired fields using the `fields` 9912// URL 9913// parameter in HTTP 9914// 9915// * Set the includeGridData 9916// URL parameter to true. If a field mask is set, the 9917// `includeGridData` 9918// parameter is ignored 9919// 9920// For large spreadsheets, it is recommended to retrieve only the 9921// specific 9922// fields of the spreadsheet that you want. 9923// 9924// To retrieve only subsets of the spreadsheet, use the 9925// ranges URL parameter. 9926// Multiple ranges can be specified. Limiting the range will 9927// return only the portions of the spreadsheet that intersect the 9928// requested 9929// ranges. Ranges are specified using A1 notation. 9930func (r *SpreadsheetsService) Get(spreadsheetId string) *SpreadsheetsGetCall { 9931 c := &SpreadsheetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 9932 c.spreadsheetId = spreadsheetId 9933 return c 9934} 9935 9936// IncludeGridData sets the optional parameter "includeGridData": True 9937// if grid data should be returned. 9938// This parameter is ignored if a field mask was set in the request. 9939func (c *SpreadsheetsGetCall) IncludeGridData(includeGridData bool) *SpreadsheetsGetCall { 9940 c.urlParams_.Set("includeGridData", fmt.Sprint(includeGridData)) 9941 return c 9942} 9943 9944// Ranges sets the optional parameter "ranges": The ranges to retrieve 9945// from the spreadsheet. 9946func (c *SpreadsheetsGetCall) Ranges(ranges ...string) *SpreadsheetsGetCall { 9947 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 9948 return c 9949} 9950 9951// Fields allows partial responses to be retrieved. See 9952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 9953// for more information. 9954func (c *SpreadsheetsGetCall) Fields(s ...googleapi.Field) *SpreadsheetsGetCall { 9955 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 9956 return c 9957} 9958 9959// IfNoneMatch sets the optional parameter which makes the operation 9960// fail if the object's ETag matches the given value. This is useful for 9961// getting updates only after the object has changed since the last 9962// request. Use googleapi.IsNotModified to check whether the response 9963// error from Do is the result of In-None-Match. 9964func (c *SpreadsheetsGetCall) IfNoneMatch(entityTag string) *SpreadsheetsGetCall { 9965 c.ifNoneMatch_ = entityTag 9966 return c 9967} 9968 9969// Context sets the context to be used in this call's Do method. Any 9970// pending HTTP request will be aborted if the provided context is 9971// canceled. 9972func (c *SpreadsheetsGetCall) Context(ctx context.Context) *SpreadsheetsGetCall { 9973 c.ctx_ = ctx 9974 return c 9975} 9976 9977// Header returns an http.Header that can be modified by the caller to 9978// add HTTP headers to the request. 9979func (c *SpreadsheetsGetCall) Header() http.Header { 9980 if c.header_ == nil { 9981 c.header_ = make(http.Header) 9982 } 9983 return c.header_ 9984} 9985 9986func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) { 9987 reqHeaders := make(http.Header) 9988 for k, v := range c.header_ { 9989 reqHeaders[k] = v 9990 } 9991 reqHeaders.Set("User-Agent", c.s.userAgent()) 9992 if c.ifNoneMatch_ != "" { 9993 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 9994 } 9995 var body io.Reader = nil 9996 c.urlParams_.Set("alt", alt) 9997 c.urlParams_.Set("prettyPrint", "false") 9998 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}") 9999 urls += "?" + c.urlParams_.Encode() 10000 req, err := http.NewRequest("GET", urls, body) 10001 if err != nil { 10002 return nil, err 10003 } 10004 req.Header = reqHeaders 10005 googleapi.Expand(req.URL, map[string]string{ 10006 "spreadsheetId": c.spreadsheetId, 10007 }) 10008 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10009} 10010 10011// Do executes the "sheets.spreadsheets.get" call. 10012// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10013// status code is an error. Response headers are in either 10014// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10015// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10016// to check whether the returned error was because 10017// http.StatusNotModified was returned. 10018func (c *SpreadsheetsGetCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10019 gensupport.SetOptions(c.urlParams_, opts...) 10020 res, err := c.doRequest("json") 10021 if res != nil && res.StatusCode == http.StatusNotModified { 10022 if res.Body != nil { 10023 res.Body.Close() 10024 } 10025 return nil, &googleapi.Error{ 10026 Code: res.StatusCode, 10027 Header: res.Header, 10028 } 10029 } 10030 if err != nil { 10031 return nil, err 10032 } 10033 defer googleapi.CloseBody(res) 10034 if err := googleapi.CheckResponse(res); err != nil { 10035 return nil, err 10036 } 10037 ret := &Spreadsheet{ 10038 ServerResponse: googleapi.ServerResponse{ 10039 Header: res.Header, 10040 HTTPStatusCode: res.StatusCode, 10041 }, 10042 } 10043 target := &ret 10044 if err := gensupport.DecodeResponse(target, res); err != nil { 10045 return nil, err 10046 } 10047 return ret, nil 10048 // { 10049 // "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.", 10050 // "flatPath": "v4/spreadsheets/{spreadsheetId}", 10051 // "httpMethod": "GET", 10052 // "id": "sheets.spreadsheets.get", 10053 // "parameterOrder": [ 10054 // "spreadsheetId" 10055 // ], 10056 // "parameters": { 10057 // "includeGridData": { 10058 // "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", 10059 // "location": "query", 10060 // "type": "boolean" 10061 // }, 10062 // "ranges": { 10063 // "description": "The ranges to retrieve from the spreadsheet.", 10064 // "location": "query", 10065 // "repeated": true, 10066 // "type": "string" 10067 // }, 10068 // "spreadsheetId": { 10069 // "description": "The spreadsheet to request.", 10070 // "location": "path", 10071 // "required": true, 10072 // "type": "string" 10073 // } 10074 // }, 10075 // "path": "v4/spreadsheets/{spreadsheetId}", 10076 // "response": { 10077 // "$ref": "Spreadsheet" 10078 // }, 10079 // "scopes": [ 10080 // "https://www.googleapis.com/auth/drive", 10081 // "https://www.googleapis.com/auth/drive.file", 10082 // "https://www.googleapis.com/auth/drive.readonly", 10083 // "https://www.googleapis.com/auth/spreadsheets", 10084 // "https://www.googleapis.com/auth/spreadsheets.readonly" 10085 // ] 10086 // } 10087 10088} 10089 10090// method id "sheets.spreadsheets.getByDataFilter": 10091 10092type SpreadsheetsGetByDataFilterCall struct { 10093 s *Service 10094 spreadsheetId string 10095 getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest 10096 urlParams_ gensupport.URLParams 10097 ctx_ context.Context 10098 header_ http.Header 10099} 10100 10101// GetByDataFilter: Returns the spreadsheet at the given ID. 10102// The caller must specify the spreadsheet ID. 10103// 10104// This method differs from GetSpreadsheet in that it allows 10105// selecting 10106// which subsets of spreadsheet data to return by specifying 10107// a 10108// dataFilters parameter. 10109// Multiple DataFilters can be specified. Specifying one or 10110// more data filters will return the portions of the spreadsheet 10111// that 10112// intersect ranges matched by any of the filters. 10113// 10114// By default, data within grids will not be returned. 10115// You can include grid data one of two ways: 10116// 10117// * Specify a field mask listing your desired fields using the `fields` 10118// URL 10119// parameter in HTTP 10120// 10121// * Set the includeGridData 10122// parameter to true. If a field mask is set, the 10123// `includeGridData` 10124// parameter is ignored 10125// 10126// For large spreadsheets, it is recommended to retrieve only the 10127// specific 10128// fields of the spreadsheet that you want. 10129func (r *SpreadsheetsService) GetByDataFilter(spreadsheetId string, getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest) *SpreadsheetsGetByDataFilterCall { 10130 c := &SpreadsheetsGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10131 c.spreadsheetId = spreadsheetId 10132 c.getspreadsheetbydatafilterrequest = getspreadsheetbydatafilterrequest 10133 return c 10134} 10135 10136// Fields allows partial responses to be retrieved. See 10137// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10138// for more information. 10139func (c *SpreadsheetsGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsGetByDataFilterCall { 10140 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10141 return c 10142} 10143 10144// Context sets the context to be used in this call's Do method. Any 10145// pending HTTP request will be aborted if the provided context is 10146// canceled. 10147func (c *SpreadsheetsGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsGetByDataFilterCall { 10148 c.ctx_ = ctx 10149 return c 10150} 10151 10152// Header returns an http.Header that can be modified by the caller to 10153// add HTTP headers to the request. 10154func (c *SpreadsheetsGetByDataFilterCall) Header() http.Header { 10155 if c.header_ == nil { 10156 c.header_ = make(http.Header) 10157 } 10158 return c.header_ 10159} 10160 10161func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 10162 reqHeaders := make(http.Header) 10163 for k, v := range c.header_ { 10164 reqHeaders[k] = v 10165 } 10166 reqHeaders.Set("User-Agent", c.s.userAgent()) 10167 var body io.Reader = nil 10168 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getspreadsheetbydatafilterrequest) 10169 if err != nil { 10170 return nil, err 10171 } 10172 reqHeaders.Set("Content-Type", "application/json") 10173 c.urlParams_.Set("alt", alt) 10174 c.urlParams_.Set("prettyPrint", "false") 10175 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter") 10176 urls += "?" + c.urlParams_.Encode() 10177 req, err := http.NewRequest("POST", urls, body) 10178 if err != nil { 10179 return nil, err 10180 } 10181 req.Header = reqHeaders 10182 googleapi.Expand(req.URL, map[string]string{ 10183 "spreadsheetId": c.spreadsheetId, 10184 }) 10185 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10186} 10187 10188// Do executes the "sheets.spreadsheets.getByDataFilter" call. 10189// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10190// status code is an error. Response headers are in either 10191// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10192// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10193// to check whether the returned error was because 10194// http.StatusNotModified was returned. 10195func (c *SpreadsheetsGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10196 gensupport.SetOptions(c.urlParams_, opts...) 10197 res, err := c.doRequest("json") 10198 if res != nil && res.StatusCode == http.StatusNotModified { 10199 if res.Body != nil { 10200 res.Body.Close() 10201 } 10202 return nil, &googleapi.Error{ 10203 Code: res.StatusCode, 10204 Header: res.Header, 10205 } 10206 } 10207 if err != nil { 10208 return nil, err 10209 } 10210 defer googleapi.CloseBody(res) 10211 if err := googleapi.CheckResponse(res); err != nil { 10212 return nil, err 10213 } 10214 ret := &Spreadsheet{ 10215 ServerResponse: googleapi.ServerResponse{ 10216 Header: res.Header, 10217 HTTPStatusCode: res.StatusCode, 10218 }, 10219 } 10220 target := &ret 10221 if err := gensupport.DecodeResponse(target, res); err != nil { 10222 return nil, err 10223 } 10224 return ret, nil 10225 // { 10226 // "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.", 10227 // "flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 10228 // "httpMethod": "POST", 10229 // "id": "sheets.spreadsheets.getByDataFilter", 10230 // "parameterOrder": [ 10231 // "spreadsheetId" 10232 // ], 10233 // "parameters": { 10234 // "spreadsheetId": { 10235 // "description": "The spreadsheet to request.", 10236 // "location": "path", 10237 // "required": true, 10238 // "type": "string" 10239 // } 10240 // }, 10241 // "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 10242 // "request": { 10243 // "$ref": "GetSpreadsheetByDataFilterRequest" 10244 // }, 10245 // "response": { 10246 // "$ref": "Spreadsheet" 10247 // }, 10248 // "scopes": [ 10249 // "https://www.googleapis.com/auth/drive", 10250 // "https://www.googleapis.com/auth/drive.file", 10251 // "https://www.googleapis.com/auth/spreadsheets" 10252 // ] 10253 // } 10254 10255} 10256 10257// method id "sheets.spreadsheets.developerMetadata.get": 10258 10259type SpreadsheetsDeveloperMetadataGetCall struct { 10260 s *Service 10261 spreadsheetId string 10262 metadataId int64 10263 urlParams_ gensupport.URLParams 10264 ifNoneMatch_ string 10265 ctx_ context.Context 10266 header_ http.Header 10267} 10268 10269// Get: Returns the developer metadata with the specified ID. 10270// The caller must specify the spreadsheet ID and the developer 10271// metadata's 10272// unique metadataId. 10273func (r *SpreadsheetsDeveloperMetadataService) Get(spreadsheetId string, metadataId int64) *SpreadsheetsDeveloperMetadataGetCall { 10274 c := &SpreadsheetsDeveloperMetadataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10275 c.spreadsheetId = spreadsheetId 10276 c.metadataId = metadataId 10277 return c 10278} 10279 10280// Fields allows partial responses to be retrieved. See 10281// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10282// for more information. 10283func (c *SpreadsheetsDeveloperMetadataGetCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataGetCall { 10284 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10285 return c 10286} 10287 10288// IfNoneMatch sets the optional parameter which makes the operation 10289// fail if the object's ETag matches the given value. This is useful for 10290// getting updates only after the object has changed since the last 10291// request. Use googleapi.IsNotModified to check whether the response 10292// error from Do is the result of In-None-Match. 10293func (c *SpreadsheetsDeveloperMetadataGetCall) IfNoneMatch(entityTag string) *SpreadsheetsDeveloperMetadataGetCall { 10294 c.ifNoneMatch_ = entityTag 10295 return c 10296} 10297 10298// Context sets the context to be used in this call's Do method. Any 10299// pending HTTP request will be aborted if the provided context is 10300// canceled. 10301func (c *SpreadsheetsDeveloperMetadataGetCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataGetCall { 10302 c.ctx_ = ctx 10303 return c 10304} 10305 10306// Header returns an http.Header that can be modified by the caller to 10307// add HTTP headers to the request. 10308func (c *SpreadsheetsDeveloperMetadataGetCall) Header() http.Header { 10309 if c.header_ == nil { 10310 c.header_ = make(http.Header) 10311 } 10312 return c.header_ 10313} 10314 10315func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Response, error) { 10316 reqHeaders := make(http.Header) 10317 for k, v := range c.header_ { 10318 reqHeaders[k] = v 10319 } 10320 reqHeaders.Set("User-Agent", c.s.userAgent()) 10321 if c.ifNoneMatch_ != "" { 10322 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10323 } 10324 var body io.Reader = nil 10325 c.urlParams_.Set("alt", alt) 10326 c.urlParams_.Set("prettyPrint", "false") 10327 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}") 10328 urls += "?" + c.urlParams_.Encode() 10329 req, err := http.NewRequest("GET", urls, body) 10330 if err != nil { 10331 return nil, err 10332 } 10333 req.Header = reqHeaders 10334 googleapi.Expand(req.URL, map[string]string{ 10335 "spreadsheetId": c.spreadsheetId, 10336 "metadataId": strconv.FormatInt(c.metadataId, 10), 10337 }) 10338 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10339} 10340 10341// Do executes the "sheets.spreadsheets.developerMetadata.get" call. 10342// Exactly one of *DeveloperMetadata or error will be non-nil. Any 10343// non-2xx status code is an error. Response headers are in either 10344// *DeveloperMetadata.ServerResponse.Header or (if a response was 10345// returned at all) in error.(*googleapi.Error).Header. Use 10346// googleapi.IsNotModified to check whether the returned error was 10347// because http.StatusNotModified was returned. 10348func (c *SpreadsheetsDeveloperMetadataGetCall) Do(opts ...googleapi.CallOption) (*DeveloperMetadata, error) { 10349 gensupport.SetOptions(c.urlParams_, opts...) 10350 res, err := c.doRequest("json") 10351 if res != nil && res.StatusCode == http.StatusNotModified { 10352 if res.Body != nil { 10353 res.Body.Close() 10354 } 10355 return nil, &googleapi.Error{ 10356 Code: res.StatusCode, 10357 Header: res.Header, 10358 } 10359 } 10360 if err != nil { 10361 return nil, err 10362 } 10363 defer googleapi.CloseBody(res) 10364 if err := googleapi.CheckResponse(res); err != nil { 10365 return nil, err 10366 } 10367 ret := &DeveloperMetadata{ 10368 ServerResponse: googleapi.ServerResponse{ 10369 Header: res.Header, 10370 HTTPStatusCode: res.StatusCode, 10371 }, 10372 } 10373 target := &ret 10374 if err := gensupport.DecodeResponse(target, res); err != nil { 10375 return nil, err 10376 } 10377 return ret, nil 10378 // { 10379 // "description": "Returns the developer metadata with the specified ID.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId.", 10380 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 10381 // "httpMethod": "GET", 10382 // "id": "sheets.spreadsheets.developerMetadata.get", 10383 // "parameterOrder": [ 10384 // "spreadsheetId", 10385 // "metadataId" 10386 // ], 10387 // "parameters": { 10388 // "metadataId": { 10389 // "description": "The ID of the developer metadata to retrieve.", 10390 // "format": "int32", 10391 // "location": "path", 10392 // "required": true, 10393 // "type": "integer" 10394 // }, 10395 // "spreadsheetId": { 10396 // "description": "The ID of the spreadsheet to retrieve metadata from.", 10397 // "location": "path", 10398 // "required": true, 10399 // "type": "string" 10400 // } 10401 // }, 10402 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 10403 // "response": { 10404 // "$ref": "DeveloperMetadata" 10405 // }, 10406 // "scopes": [ 10407 // "https://www.googleapis.com/auth/drive", 10408 // "https://www.googleapis.com/auth/drive.file", 10409 // "https://www.googleapis.com/auth/spreadsheets" 10410 // ] 10411 // } 10412 10413} 10414 10415// method id "sheets.spreadsheets.developerMetadata.search": 10416 10417type SpreadsheetsDeveloperMetadataSearchCall struct { 10418 s *Service 10419 spreadsheetId string 10420 searchdevelopermetadatarequest *SearchDeveloperMetadataRequest 10421 urlParams_ gensupport.URLParams 10422 ctx_ context.Context 10423 header_ http.Header 10424} 10425 10426// Search: Returns all developer metadata matching the specified 10427// DataFilter. 10428// If the provided DataFilter represents a DeveloperMetadataLookup 10429// object, 10430// this will return all DeveloperMetadata entries selected by it. If 10431// the 10432// DataFilter represents a location in a spreadsheet, this will return 10433// all 10434// developer metadata associated with locations intersecting that 10435// region. 10436func (r *SpreadsheetsDeveloperMetadataService) Search(spreadsheetId string, searchdevelopermetadatarequest *SearchDeveloperMetadataRequest) *SpreadsheetsDeveloperMetadataSearchCall { 10437 c := &SpreadsheetsDeveloperMetadataSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10438 c.spreadsheetId = spreadsheetId 10439 c.searchdevelopermetadatarequest = searchdevelopermetadatarequest 10440 return c 10441} 10442 10443// Fields allows partial responses to be retrieved. See 10444// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10445// for more information. 10446func (c *SpreadsheetsDeveloperMetadataSearchCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataSearchCall { 10447 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10448 return c 10449} 10450 10451// Context sets the context to be used in this call's Do method. Any 10452// pending HTTP request will be aborted if the provided context is 10453// canceled. 10454func (c *SpreadsheetsDeveloperMetadataSearchCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataSearchCall { 10455 c.ctx_ = ctx 10456 return c 10457} 10458 10459// Header returns an http.Header that can be modified by the caller to 10460// add HTTP headers to the request. 10461func (c *SpreadsheetsDeveloperMetadataSearchCall) Header() http.Header { 10462 if c.header_ == nil { 10463 c.header_ = make(http.Header) 10464 } 10465 return c.header_ 10466} 10467 10468func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.Response, error) { 10469 reqHeaders := make(http.Header) 10470 for k, v := range c.header_ { 10471 reqHeaders[k] = v 10472 } 10473 reqHeaders.Set("User-Agent", c.s.userAgent()) 10474 var body io.Reader = nil 10475 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchdevelopermetadatarequest) 10476 if err != nil { 10477 return nil, err 10478 } 10479 reqHeaders.Set("Content-Type", "application/json") 10480 c.urlParams_.Set("alt", alt) 10481 c.urlParams_.Set("prettyPrint", "false") 10482 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search") 10483 urls += "?" + c.urlParams_.Encode() 10484 req, err := http.NewRequest("POST", urls, body) 10485 if err != nil { 10486 return nil, err 10487 } 10488 req.Header = reqHeaders 10489 googleapi.Expand(req.URL, map[string]string{ 10490 "spreadsheetId": c.spreadsheetId, 10491 }) 10492 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10493} 10494 10495// Do executes the "sheets.spreadsheets.developerMetadata.search" call. 10496// Exactly one of *SearchDeveloperMetadataResponse or error will be 10497// non-nil. Any non-2xx status code is an error. Response headers are in 10498// either *SearchDeveloperMetadataResponse.ServerResponse.Header or (if 10499// a response was returned at all) in error.(*googleapi.Error).Header. 10500// Use googleapi.IsNotModified to check whether the returned error was 10501// because http.StatusNotModified was returned. 10502func (c *SpreadsheetsDeveloperMetadataSearchCall) Do(opts ...googleapi.CallOption) (*SearchDeveloperMetadataResponse, error) { 10503 gensupport.SetOptions(c.urlParams_, opts...) 10504 res, err := c.doRequest("json") 10505 if res != nil && res.StatusCode == http.StatusNotModified { 10506 if res.Body != nil { 10507 res.Body.Close() 10508 } 10509 return nil, &googleapi.Error{ 10510 Code: res.StatusCode, 10511 Header: res.Header, 10512 } 10513 } 10514 if err != nil { 10515 return nil, err 10516 } 10517 defer googleapi.CloseBody(res) 10518 if err := googleapi.CheckResponse(res); err != nil { 10519 return nil, err 10520 } 10521 ret := &SearchDeveloperMetadataResponse{ 10522 ServerResponse: googleapi.ServerResponse{ 10523 Header: res.Header, 10524 HTTPStatusCode: res.StatusCode, 10525 }, 10526 } 10527 target := &ret 10528 if err := gensupport.DecodeResponse(target, res); err != nil { 10529 return nil, err 10530 } 10531 return ret, nil 10532 // { 10533 // "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.", 10534 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 10535 // "httpMethod": "POST", 10536 // "id": "sheets.spreadsheets.developerMetadata.search", 10537 // "parameterOrder": [ 10538 // "spreadsheetId" 10539 // ], 10540 // "parameters": { 10541 // "spreadsheetId": { 10542 // "description": "The ID of the spreadsheet to retrieve metadata from.", 10543 // "location": "path", 10544 // "required": true, 10545 // "type": "string" 10546 // } 10547 // }, 10548 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 10549 // "request": { 10550 // "$ref": "SearchDeveloperMetadataRequest" 10551 // }, 10552 // "response": { 10553 // "$ref": "SearchDeveloperMetadataResponse" 10554 // }, 10555 // "scopes": [ 10556 // "https://www.googleapis.com/auth/drive", 10557 // "https://www.googleapis.com/auth/drive.file", 10558 // "https://www.googleapis.com/auth/spreadsheets" 10559 // ] 10560 // } 10561 10562} 10563 10564// method id "sheets.spreadsheets.sheets.copyTo": 10565 10566type SpreadsheetsSheetsCopyToCall struct { 10567 s *Service 10568 spreadsheetId string 10569 sheetId int64 10570 copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest 10571 urlParams_ gensupport.URLParams 10572 ctx_ context.Context 10573 header_ http.Header 10574} 10575 10576// CopyTo: Copies a single sheet from a spreadsheet to another 10577// spreadsheet. 10578// Returns the properties of the newly created sheet. 10579func (r *SpreadsheetsSheetsService) CopyTo(spreadsheetId string, sheetId int64, copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest) *SpreadsheetsSheetsCopyToCall { 10580 c := &SpreadsheetsSheetsCopyToCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10581 c.spreadsheetId = spreadsheetId 10582 c.sheetId = sheetId 10583 c.copysheettoanotherspreadsheetrequest = copysheettoanotherspreadsheetrequest 10584 return c 10585} 10586 10587// Fields allows partial responses to be retrieved. See 10588// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10589// for more information. 10590func (c *SpreadsheetsSheetsCopyToCall) Fields(s ...googleapi.Field) *SpreadsheetsSheetsCopyToCall { 10591 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10592 return c 10593} 10594 10595// Context sets the context to be used in this call's Do method. Any 10596// pending HTTP request will be aborted if the provided context is 10597// canceled. 10598func (c *SpreadsheetsSheetsCopyToCall) Context(ctx context.Context) *SpreadsheetsSheetsCopyToCall { 10599 c.ctx_ = ctx 10600 return c 10601} 10602 10603// Header returns an http.Header that can be modified by the caller to 10604// add HTTP headers to the request. 10605func (c *SpreadsheetsSheetsCopyToCall) Header() http.Header { 10606 if c.header_ == nil { 10607 c.header_ = make(http.Header) 10608 } 10609 return c.header_ 10610} 10611 10612func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, error) { 10613 reqHeaders := make(http.Header) 10614 for k, v := range c.header_ { 10615 reqHeaders[k] = v 10616 } 10617 reqHeaders.Set("User-Agent", c.s.userAgent()) 10618 var body io.Reader = nil 10619 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copysheettoanotherspreadsheetrequest) 10620 if err != nil { 10621 return nil, err 10622 } 10623 reqHeaders.Set("Content-Type", "application/json") 10624 c.urlParams_.Set("alt", alt) 10625 c.urlParams_.Set("prettyPrint", "false") 10626 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo") 10627 urls += "?" + c.urlParams_.Encode() 10628 req, err := http.NewRequest("POST", urls, body) 10629 if err != nil { 10630 return nil, err 10631 } 10632 req.Header = reqHeaders 10633 googleapi.Expand(req.URL, map[string]string{ 10634 "spreadsheetId": c.spreadsheetId, 10635 "sheetId": strconv.FormatInt(c.sheetId, 10), 10636 }) 10637 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10638} 10639 10640// Do executes the "sheets.spreadsheets.sheets.copyTo" call. 10641// Exactly one of *SheetProperties or error will be non-nil. Any non-2xx 10642// status code is an error. Response headers are in either 10643// *SheetProperties.ServerResponse.Header or (if a response was returned 10644// at all) in error.(*googleapi.Error).Header. Use 10645// googleapi.IsNotModified to check whether the returned error was 10646// because http.StatusNotModified was returned. 10647func (c *SpreadsheetsSheetsCopyToCall) Do(opts ...googleapi.CallOption) (*SheetProperties, error) { 10648 gensupport.SetOptions(c.urlParams_, opts...) 10649 res, err := c.doRequest("json") 10650 if res != nil && res.StatusCode == http.StatusNotModified { 10651 if res.Body != nil { 10652 res.Body.Close() 10653 } 10654 return nil, &googleapi.Error{ 10655 Code: res.StatusCode, 10656 Header: res.Header, 10657 } 10658 } 10659 if err != nil { 10660 return nil, err 10661 } 10662 defer googleapi.CloseBody(res) 10663 if err := googleapi.CheckResponse(res); err != nil { 10664 return nil, err 10665 } 10666 ret := &SheetProperties{ 10667 ServerResponse: googleapi.ServerResponse{ 10668 Header: res.Header, 10669 HTTPStatusCode: res.StatusCode, 10670 }, 10671 } 10672 target := &ret 10673 if err := gensupport.DecodeResponse(target, res); err != nil { 10674 return nil, err 10675 } 10676 return ret, nil 10677 // { 10678 // "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.", 10679 // "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 10680 // "httpMethod": "POST", 10681 // "id": "sheets.spreadsheets.sheets.copyTo", 10682 // "parameterOrder": [ 10683 // "spreadsheetId", 10684 // "sheetId" 10685 // ], 10686 // "parameters": { 10687 // "sheetId": { 10688 // "description": "The ID of the sheet to copy.", 10689 // "format": "int32", 10690 // "location": "path", 10691 // "required": true, 10692 // "type": "integer" 10693 // }, 10694 // "spreadsheetId": { 10695 // "description": "The ID of the spreadsheet containing the sheet to copy.", 10696 // "location": "path", 10697 // "required": true, 10698 // "type": "string" 10699 // } 10700 // }, 10701 // "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 10702 // "request": { 10703 // "$ref": "CopySheetToAnotherSpreadsheetRequest" 10704 // }, 10705 // "response": { 10706 // "$ref": "SheetProperties" 10707 // }, 10708 // "scopes": [ 10709 // "https://www.googleapis.com/auth/drive", 10710 // "https://www.googleapis.com/auth/drive.file", 10711 // "https://www.googleapis.com/auth/spreadsheets" 10712 // ] 10713 // } 10714 10715} 10716 10717// method id "sheets.spreadsheets.values.append": 10718 10719type SpreadsheetsValuesAppendCall struct { 10720 s *Service 10721 spreadsheetId string 10722 range_ string 10723 valuerange *ValueRange 10724 urlParams_ gensupport.URLParams 10725 ctx_ context.Context 10726 header_ http.Header 10727} 10728 10729// Append: Appends values to a spreadsheet. The input range is used to 10730// search for 10731// existing data and find a "table" within that range. Values will 10732// be 10733// appended to the next row of the table, starting with the first column 10734// of 10735// the table. See 10736// the 10737// [guide](/sheets/api/guides/values#appending_values) 10738// and 10739// [sample code](/sheets/api/samples/writing#append_values) 10740// for specific details of how tables are detected and data is 10741// appended. 10742// 10743// The caller must specify the spreadsheet ID, range, and 10744// a valueInputOption. The `valueInputOption` only 10745// controls how the input data will be added to the sheet (column-wise 10746// or 10747// row-wise), it does not influence what cell the data starts being 10748// written 10749// to. 10750func (r *SpreadsheetsValuesService) Append(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesAppendCall { 10751 c := &SpreadsheetsValuesAppendCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10752 c.spreadsheetId = spreadsheetId 10753 c.range_ = range_ 10754 c.valuerange = valuerange 10755 return c 10756} 10757 10758// IncludeValuesInResponse sets the optional parameter 10759// "includeValuesInResponse": Determines if the update response should 10760// include the values 10761// of the cells that were appended. By default, responses 10762// do not include the updated values. 10763func (c *SpreadsheetsValuesAppendCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesAppendCall { 10764 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 10765 return c 10766} 10767 10768// InsertDataOption sets the optional parameter "insertDataOption": How 10769// the input data should be inserted. 10770// 10771// Possible values: 10772// "OVERWRITE" 10773// "INSERT_ROWS" 10774func (c *SpreadsheetsValuesAppendCall) InsertDataOption(insertDataOption string) *SpreadsheetsValuesAppendCall { 10775 c.urlParams_.Set("insertDataOption", insertDataOption) 10776 return c 10777} 10778 10779// ResponseDateTimeRenderOption sets the optional parameter 10780// "responseDateTimeRenderOption": Determines how dates, times, and 10781// durations in the response should be 10782// rendered. This is ignored if response_value_render_option 10783// is 10784// FORMATTED_VALUE. 10785// The default dateTime render option is 10786// [DateTimeRenderOption.SERIAL_NUMBER]. 10787// 10788// Possible values: 10789// "SERIAL_NUMBER" 10790// "FORMATTED_STRING" 10791func (c *SpreadsheetsValuesAppendCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesAppendCall { 10792 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 10793 return c 10794} 10795 10796// ResponseValueRenderOption sets the optional parameter 10797// "responseValueRenderOption": Determines how values in the response 10798// should be rendered. 10799// The default render option is ValueRenderOption.FORMATTED_VALUE. 10800// 10801// Possible values: 10802// "FORMATTED_VALUE" 10803// "UNFORMATTED_VALUE" 10804// "FORMULA" 10805func (c *SpreadsheetsValuesAppendCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesAppendCall { 10806 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 10807 return c 10808} 10809 10810// ValueInputOption sets the optional parameter "valueInputOption": How 10811// the input data should be interpreted. 10812// 10813// Possible values: 10814// "INPUT_VALUE_OPTION_UNSPECIFIED" 10815// "RAW" 10816// "USER_ENTERED" 10817func (c *SpreadsheetsValuesAppendCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesAppendCall { 10818 c.urlParams_.Set("valueInputOption", valueInputOption) 10819 return c 10820} 10821 10822// Fields allows partial responses to be retrieved. See 10823// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10824// for more information. 10825func (c *SpreadsheetsValuesAppendCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesAppendCall { 10826 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10827 return c 10828} 10829 10830// Context sets the context to be used in this call's Do method. Any 10831// pending HTTP request will be aborted if the provided context is 10832// canceled. 10833func (c *SpreadsheetsValuesAppendCall) Context(ctx context.Context) *SpreadsheetsValuesAppendCall { 10834 c.ctx_ = ctx 10835 return c 10836} 10837 10838// Header returns an http.Header that can be modified by the caller to 10839// add HTTP headers to the request. 10840func (c *SpreadsheetsValuesAppendCall) Header() http.Header { 10841 if c.header_ == nil { 10842 c.header_ = make(http.Header) 10843 } 10844 return c.header_ 10845} 10846 10847func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, error) { 10848 reqHeaders := make(http.Header) 10849 for k, v := range c.header_ { 10850 reqHeaders[k] = v 10851 } 10852 reqHeaders.Set("User-Agent", c.s.userAgent()) 10853 var body io.Reader = nil 10854 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 10855 if err != nil { 10856 return nil, err 10857 } 10858 reqHeaders.Set("Content-Type", "application/json") 10859 c.urlParams_.Set("alt", alt) 10860 c.urlParams_.Set("prettyPrint", "false") 10861 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append") 10862 urls += "?" + c.urlParams_.Encode() 10863 req, err := http.NewRequest("POST", urls, body) 10864 if err != nil { 10865 return nil, err 10866 } 10867 req.Header = reqHeaders 10868 googleapi.Expand(req.URL, map[string]string{ 10869 "spreadsheetId": c.spreadsheetId, 10870 "range": c.range_, 10871 }) 10872 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10873} 10874 10875// Do executes the "sheets.spreadsheets.values.append" call. 10876// Exactly one of *AppendValuesResponse or error will be non-nil. Any 10877// non-2xx status code is an error. Response headers are in either 10878// *AppendValuesResponse.ServerResponse.Header or (if a response was 10879// returned at all) in error.(*googleapi.Error).Header. Use 10880// googleapi.IsNotModified to check whether the returned error was 10881// because http.StatusNotModified was returned. 10882func (c *SpreadsheetsValuesAppendCall) Do(opts ...googleapi.CallOption) (*AppendValuesResponse, error) { 10883 gensupport.SetOptions(c.urlParams_, opts...) 10884 res, err := c.doRequest("json") 10885 if res != nil && res.StatusCode == http.StatusNotModified { 10886 if res.Body != nil { 10887 res.Body.Close() 10888 } 10889 return nil, &googleapi.Error{ 10890 Code: res.StatusCode, 10891 Header: res.Header, 10892 } 10893 } 10894 if err != nil { 10895 return nil, err 10896 } 10897 defer googleapi.CloseBody(res) 10898 if err := googleapi.CheckResponse(res); err != nil { 10899 return nil, err 10900 } 10901 ret := &AppendValuesResponse{ 10902 ServerResponse: googleapi.ServerResponse{ 10903 Header: res.Header, 10904 HTTPStatusCode: res.StatusCode, 10905 }, 10906 } 10907 target := &ret 10908 if err := gensupport.DecodeResponse(target, res); err != nil { 10909 return nil, err 10910 } 10911 return ret, nil 10912 // { 10913 // "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.", 10914 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 10915 // "httpMethod": "POST", 10916 // "id": "sheets.spreadsheets.values.append", 10917 // "parameterOrder": [ 10918 // "spreadsheetId", 10919 // "range" 10920 // ], 10921 // "parameters": { 10922 // "includeValuesInResponse": { 10923 // "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.", 10924 // "location": "query", 10925 // "type": "boolean" 10926 // }, 10927 // "insertDataOption": { 10928 // "description": "How the input data should be inserted.", 10929 // "enum": [ 10930 // "OVERWRITE", 10931 // "INSERT_ROWS" 10932 // ], 10933 // "location": "query", 10934 // "type": "string" 10935 // }, 10936 // "range": { 10937 // "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.", 10938 // "location": "path", 10939 // "required": true, 10940 // "type": "string" 10941 // }, 10942 // "responseDateTimeRenderOption": { 10943 // "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].", 10944 // "enum": [ 10945 // "SERIAL_NUMBER", 10946 // "FORMATTED_STRING" 10947 // ], 10948 // "location": "query", 10949 // "type": "string" 10950 // }, 10951 // "responseValueRenderOption": { 10952 // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 10953 // "enum": [ 10954 // "FORMATTED_VALUE", 10955 // "UNFORMATTED_VALUE", 10956 // "FORMULA" 10957 // ], 10958 // "location": "query", 10959 // "type": "string" 10960 // }, 10961 // "spreadsheetId": { 10962 // "description": "The ID of the spreadsheet to update.", 10963 // "location": "path", 10964 // "required": true, 10965 // "type": "string" 10966 // }, 10967 // "valueInputOption": { 10968 // "description": "How the input data should be interpreted.", 10969 // "enum": [ 10970 // "INPUT_VALUE_OPTION_UNSPECIFIED", 10971 // "RAW", 10972 // "USER_ENTERED" 10973 // ], 10974 // "location": "query", 10975 // "type": "string" 10976 // } 10977 // }, 10978 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 10979 // "request": { 10980 // "$ref": "ValueRange" 10981 // }, 10982 // "response": { 10983 // "$ref": "AppendValuesResponse" 10984 // }, 10985 // "scopes": [ 10986 // "https://www.googleapis.com/auth/drive", 10987 // "https://www.googleapis.com/auth/drive.file", 10988 // "https://www.googleapis.com/auth/spreadsheets" 10989 // ] 10990 // } 10991 10992} 10993 10994// method id "sheets.spreadsheets.values.batchClear": 10995 10996type SpreadsheetsValuesBatchClearCall struct { 10997 s *Service 10998 spreadsheetId string 10999 batchclearvaluesrequest *BatchClearValuesRequest 11000 urlParams_ gensupport.URLParams 11001 ctx_ context.Context 11002 header_ http.Header 11003} 11004 11005// BatchClear: Clears one or more ranges of values from a 11006// spreadsheet. 11007// The caller must specify the spreadsheet ID and one or more 11008// ranges. 11009// Only values are cleared -- all other properties of the cell (such 11010// as 11011// formatting, data validation, etc..) are kept. 11012func (r *SpreadsheetsValuesService) BatchClear(spreadsheetId string, batchclearvaluesrequest *BatchClearValuesRequest) *SpreadsheetsValuesBatchClearCall { 11013 c := &SpreadsheetsValuesBatchClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11014 c.spreadsheetId = spreadsheetId 11015 c.batchclearvaluesrequest = batchclearvaluesrequest 11016 return c 11017} 11018 11019// Fields allows partial responses to be retrieved. See 11020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11021// for more information. 11022func (c *SpreadsheetsValuesBatchClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearCall { 11023 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11024 return c 11025} 11026 11027// Context sets the context to be used in this call's Do method. Any 11028// pending HTTP request will be aborted if the provided context is 11029// canceled. 11030func (c *SpreadsheetsValuesBatchClearCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearCall { 11031 c.ctx_ = ctx 11032 return c 11033} 11034 11035// Header returns an http.Header that can be modified by the caller to 11036// add HTTP headers to the request. 11037func (c *SpreadsheetsValuesBatchClearCall) Header() http.Header { 11038 if c.header_ == nil { 11039 c.header_ = make(http.Header) 11040 } 11041 return c.header_ 11042} 11043 11044func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response, error) { 11045 reqHeaders := make(http.Header) 11046 for k, v := range c.header_ { 11047 reqHeaders[k] = v 11048 } 11049 reqHeaders.Set("User-Agent", c.s.userAgent()) 11050 var body io.Reader = nil 11051 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesrequest) 11052 if err != nil { 11053 return nil, err 11054 } 11055 reqHeaders.Set("Content-Type", "application/json") 11056 c.urlParams_.Set("alt", alt) 11057 c.urlParams_.Set("prettyPrint", "false") 11058 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear") 11059 urls += "?" + c.urlParams_.Encode() 11060 req, err := http.NewRequest("POST", urls, body) 11061 if err != nil { 11062 return nil, err 11063 } 11064 req.Header = reqHeaders 11065 googleapi.Expand(req.URL, map[string]string{ 11066 "spreadsheetId": c.spreadsheetId, 11067 }) 11068 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11069} 11070 11071// Do executes the "sheets.spreadsheets.values.batchClear" call. 11072// Exactly one of *BatchClearValuesResponse or error will be non-nil. 11073// Any non-2xx status code is an error. Response headers are in either 11074// *BatchClearValuesResponse.ServerResponse.Header or (if a response was 11075// returned at all) in error.(*googleapi.Error).Header. Use 11076// googleapi.IsNotModified to check whether the returned error was 11077// because http.StatusNotModified was returned. 11078func (c *SpreadsheetsValuesBatchClearCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesResponse, error) { 11079 gensupport.SetOptions(c.urlParams_, opts...) 11080 res, err := c.doRequest("json") 11081 if res != nil && res.StatusCode == http.StatusNotModified { 11082 if res.Body != nil { 11083 res.Body.Close() 11084 } 11085 return nil, &googleapi.Error{ 11086 Code: res.StatusCode, 11087 Header: res.Header, 11088 } 11089 } 11090 if err != nil { 11091 return nil, err 11092 } 11093 defer googleapi.CloseBody(res) 11094 if err := googleapi.CheckResponse(res); err != nil { 11095 return nil, err 11096 } 11097 ret := &BatchClearValuesResponse{ 11098 ServerResponse: googleapi.ServerResponse{ 11099 Header: res.Header, 11100 HTTPStatusCode: res.StatusCode, 11101 }, 11102 } 11103 target := &ret 11104 if err := gensupport.DecodeResponse(target, res); err != nil { 11105 return nil, err 11106 } 11107 return ret, nil 11108 // { 11109 // "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.", 11110 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 11111 // "httpMethod": "POST", 11112 // "id": "sheets.spreadsheets.values.batchClear", 11113 // "parameterOrder": [ 11114 // "spreadsheetId" 11115 // ], 11116 // "parameters": { 11117 // "spreadsheetId": { 11118 // "description": "The ID of the spreadsheet to update.", 11119 // "location": "path", 11120 // "required": true, 11121 // "type": "string" 11122 // } 11123 // }, 11124 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 11125 // "request": { 11126 // "$ref": "BatchClearValuesRequest" 11127 // }, 11128 // "response": { 11129 // "$ref": "BatchClearValuesResponse" 11130 // }, 11131 // "scopes": [ 11132 // "https://www.googleapis.com/auth/drive", 11133 // "https://www.googleapis.com/auth/drive.file", 11134 // "https://www.googleapis.com/auth/spreadsheets" 11135 // ] 11136 // } 11137 11138} 11139 11140// method id "sheets.spreadsheets.values.batchClearByDataFilter": 11141 11142type SpreadsheetsValuesBatchClearByDataFilterCall struct { 11143 s *Service 11144 spreadsheetId string 11145 batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest 11146 urlParams_ gensupport.URLParams 11147 ctx_ context.Context 11148 header_ http.Header 11149} 11150 11151// BatchClearByDataFilter: Clears one or more ranges of values from a 11152// spreadsheet. 11153// The caller must specify the spreadsheet ID and one or 11154// more 11155// DataFilters. Ranges matching any of the specified data 11156// filters will be cleared. Only values are cleared -- all other 11157// properties 11158// of the cell (such as formatting, data validation, etc..) are kept. 11159func (r *SpreadsheetsValuesService) BatchClearByDataFilter(spreadsheetId string, batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest) *SpreadsheetsValuesBatchClearByDataFilterCall { 11160 c := &SpreadsheetsValuesBatchClearByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11161 c.spreadsheetId = spreadsheetId 11162 c.batchclearvaluesbydatafilterrequest = batchclearvaluesbydatafilterrequest 11163 return c 11164} 11165 11166// Fields allows partial responses to be retrieved. See 11167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11168// for more information. 11169func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearByDataFilterCall { 11170 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11171 return c 11172} 11173 11174// Context sets the context to be used in this call's Do method. Any 11175// pending HTTP request will be aborted if the provided context is 11176// canceled. 11177func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearByDataFilterCall { 11178 c.ctx_ = ctx 11179 return c 11180} 11181 11182// Header returns an http.Header that can be modified by the caller to 11183// add HTTP headers to the request. 11184func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Header() http.Header { 11185 if c.header_ == nil { 11186 c.header_ = make(http.Header) 11187 } 11188 return c.header_ 11189} 11190 11191func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*http.Response, error) { 11192 reqHeaders := make(http.Header) 11193 for k, v := range c.header_ { 11194 reqHeaders[k] = v 11195 } 11196 reqHeaders.Set("User-Agent", c.s.userAgent()) 11197 var body io.Reader = nil 11198 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesbydatafilterrequest) 11199 if err != nil { 11200 return nil, err 11201 } 11202 reqHeaders.Set("Content-Type", "application/json") 11203 c.urlParams_.Set("alt", alt) 11204 c.urlParams_.Set("prettyPrint", "false") 11205 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter") 11206 urls += "?" + c.urlParams_.Encode() 11207 req, err := http.NewRequest("POST", urls, body) 11208 if err != nil { 11209 return nil, err 11210 } 11211 req.Header = reqHeaders 11212 googleapi.Expand(req.URL, map[string]string{ 11213 "spreadsheetId": c.spreadsheetId, 11214 }) 11215 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11216} 11217 11218// Do executes the "sheets.spreadsheets.values.batchClearByDataFilter" call. 11219// Exactly one of *BatchClearValuesByDataFilterResponse or error will be 11220// non-nil. Any non-2xx status code is an error. Response headers are in 11221// either *BatchClearValuesByDataFilterResponse.ServerResponse.Header or 11222// (if a response was returned at all) in 11223// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11224// whether the returned error was because http.StatusNotModified was 11225// returned. 11226func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesByDataFilterResponse, error) { 11227 gensupport.SetOptions(c.urlParams_, opts...) 11228 res, err := c.doRequest("json") 11229 if res != nil && res.StatusCode == http.StatusNotModified { 11230 if res.Body != nil { 11231 res.Body.Close() 11232 } 11233 return nil, &googleapi.Error{ 11234 Code: res.StatusCode, 11235 Header: res.Header, 11236 } 11237 } 11238 if err != nil { 11239 return nil, err 11240 } 11241 defer googleapi.CloseBody(res) 11242 if err := googleapi.CheckResponse(res); err != nil { 11243 return nil, err 11244 } 11245 ret := &BatchClearValuesByDataFilterResponse{ 11246 ServerResponse: googleapi.ServerResponse{ 11247 Header: res.Header, 11248 HTTPStatusCode: res.StatusCode, 11249 }, 11250 } 11251 target := &ret 11252 if err := gensupport.DecodeResponse(target, res); err != nil { 11253 return nil, err 11254 } 11255 return ret, nil 11256 // { 11257 // "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.", 11258 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 11259 // "httpMethod": "POST", 11260 // "id": "sheets.spreadsheets.values.batchClearByDataFilter", 11261 // "parameterOrder": [ 11262 // "spreadsheetId" 11263 // ], 11264 // "parameters": { 11265 // "spreadsheetId": { 11266 // "description": "The ID of the spreadsheet to update.", 11267 // "location": "path", 11268 // "required": true, 11269 // "type": "string" 11270 // } 11271 // }, 11272 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 11273 // "request": { 11274 // "$ref": "BatchClearValuesByDataFilterRequest" 11275 // }, 11276 // "response": { 11277 // "$ref": "BatchClearValuesByDataFilterResponse" 11278 // }, 11279 // "scopes": [ 11280 // "https://www.googleapis.com/auth/drive", 11281 // "https://www.googleapis.com/auth/drive.file", 11282 // "https://www.googleapis.com/auth/spreadsheets" 11283 // ] 11284 // } 11285 11286} 11287 11288// method id "sheets.spreadsheets.values.batchGet": 11289 11290type SpreadsheetsValuesBatchGetCall struct { 11291 s *Service 11292 spreadsheetId string 11293 urlParams_ gensupport.URLParams 11294 ifNoneMatch_ string 11295 ctx_ context.Context 11296 header_ http.Header 11297} 11298 11299// BatchGet: Returns one or more ranges of values from a 11300// spreadsheet. 11301// The caller must specify the spreadsheet ID and one or more ranges. 11302func (r *SpreadsheetsValuesService) BatchGet(spreadsheetId string) *SpreadsheetsValuesBatchGetCall { 11303 c := &SpreadsheetsValuesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11304 c.spreadsheetId = spreadsheetId 11305 return c 11306} 11307 11308// DateTimeRenderOption sets the optional parameter 11309// "dateTimeRenderOption": How dates, times, and durations should be 11310// represented in the output. 11311// This is ignored if value_render_option is 11312// FORMATTED_VALUE. 11313// The default dateTime render option is 11314// [DateTimeRenderOption.SERIAL_NUMBER]. 11315// 11316// Possible values: 11317// "SERIAL_NUMBER" 11318// "FORMATTED_STRING" 11319func (c *SpreadsheetsValuesBatchGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesBatchGetCall { 11320 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 11321 return c 11322} 11323 11324// MajorDimension sets the optional parameter "majorDimension": The 11325// major dimension that results should use. 11326// 11327// For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 11328// then requesting `range=A1:B2,majorDimension=ROWS` will 11329// return 11330// `[[1,2],[3,4]]`, 11331// whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 11332// return 11333// `[[1,3],[2,4]]`. 11334// 11335// Possible values: 11336// "DIMENSION_UNSPECIFIED" 11337// "ROWS" 11338// "COLUMNS" 11339func (c *SpreadsheetsValuesBatchGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesBatchGetCall { 11340 c.urlParams_.Set("majorDimension", majorDimension) 11341 return c 11342} 11343 11344// Ranges sets the optional parameter "ranges": The A1 notation of the 11345// values to retrieve. 11346func (c *SpreadsheetsValuesBatchGetCall) Ranges(ranges ...string) *SpreadsheetsValuesBatchGetCall { 11347 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 11348 return c 11349} 11350 11351// ValueRenderOption sets the optional parameter "valueRenderOption": 11352// How values should be represented in the output. 11353// The default render option is ValueRenderOption.FORMATTED_VALUE. 11354// 11355// Possible values: 11356// "FORMATTED_VALUE" 11357// "UNFORMATTED_VALUE" 11358// "FORMULA" 11359func (c *SpreadsheetsValuesBatchGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesBatchGetCall { 11360 c.urlParams_.Set("valueRenderOption", valueRenderOption) 11361 return c 11362} 11363 11364// Fields allows partial responses to be retrieved. See 11365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11366// for more information. 11367func (c *SpreadsheetsValuesBatchGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetCall { 11368 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11369 return c 11370} 11371 11372// IfNoneMatch sets the optional parameter which makes the operation 11373// fail if the object's ETag matches the given value. This is useful for 11374// getting updates only after the object has changed since the last 11375// request. Use googleapi.IsNotModified to check whether the response 11376// error from Do is the result of In-None-Match. 11377func (c *SpreadsheetsValuesBatchGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesBatchGetCall { 11378 c.ifNoneMatch_ = entityTag 11379 return c 11380} 11381 11382// Context sets the context to be used in this call's Do method. Any 11383// pending HTTP request will be aborted if the provided context is 11384// canceled. 11385func (c *SpreadsheetsValuesBatchGetCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetCall { 11386 c.ctx_ = ctx 11387 return c 11388} 11389 11390// Header returns an http.Header that can be modified by the caller to 11391// add HTTP headers to the request. 11392func (c *SpreadsheetsValuesBatchGetCall) Header() http.Header { 11393 if c.header_ == nil { 11394 c.header_ = make(http.Header) 11395 } 11396 return c.header_ 11397} 11398 11399func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, error) { 11400 reqHeaders := make(http.Header) 11401 for k, v := range c.header_ { 11402 reqHeaders[k] = v 11403 } 11404 reqHeaders.Set("User-Agent", c.s.userAgent()) 11405 if c.ifNoneMatch_ != "" { 11406 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11407 } 11408 var body io.Reader = nil 11409 c.urlParams_.Set("alt", alt) 11410 c.urlParams_.Set("prettyPrint", "false") 11411 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet") 11412 urls += "?" + c.urlParams_.Encode() 11413 req, err := http.NewRequest("GET", urls, body) 11414 if err != nil { 11415 return nil, err 11416 } 11417 req.Header = reqHeaders 11418 googleapi.Expand(req.URL, map[string]string{ 11419 "spreadsheetId": c.spreadsheetId, 11420 }) 11421 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11422} 11423 11424// Do executes the "sheets.spreadsheets.values.batchGet" call. 11425// Exactly one of *BatchGetValuesResponse or error will be non-nil. Any 11426// non-2xx status code is an error. Response headers are in either 11427// *BatchGetValuesResponse.ServerResponse.Header or (if a response was 11428// returned at all) in error.(*googleapi.Error).Header. Use 11429// googleapi.IsNotModified to check whether the returned error was 11430// because http.StatusNotModified was returned. 11431func (c *SpreadsheetsValuesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesResponse, error) { 11432 gensupport.SetOptions(c.urlParams_, opts...) 11433 res, err := c.doRequest("json") 11434 if res != nil && res.StatusCode == http.StatusNotModified { 11435 if res.Body != nil { 11436 res.Body.Close() 11437 } 11438 return nil, &googleapi.Error{ 11439 Code: res.StatusCode, 11440 Header: res.Header, 11441 } 11442 } 11443 if err != nil { 11444 return nil, err 11445 } 11446 defer googleapi.CloseBody(res) 11447 if err := googleapi.CheckResponse(res); err != nil { 11448 return nil, err 11449 } 11450 ret := &BatchGetValuesResponse{ 11451 ServerResponse: googleapi.ServerResponse{ 11452 Header: res.Header, 11453 HTTPStatusCode: res.StatusCode, 11454 }, 11455 } 11456 target := &ret 11457 if err := gensupport.DecodeResponse(target, res); err != nil { 11458 return nil, err 11459 } 11460 return ret, nil 11461 // { 11462 // "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.", 11463 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 11464 // "httpMethod": "GET", 11465 // "id": "sheets.spreadsheets.values.batchGet", 11466 // "parameterOrder": [ 11467 // "spreadsheetId" 11468 // ], 11469 // "parameters": { 11470 // "dateTimeRenderOption": { 11471 // "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].", 11472 // "enum": [ 11473 // "SERIAL_NUMBER", 11474 // "FORMATTED_STRING" 11475 // ], 11476 // "location": "query", 11477 // "type": "string" 11478 // }, 11479 // "majorDimension": { 11480 // "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]]`.", 11481 // "enum": [ 11482 // "DIMENSION_UNSPECIFIED", 11483 // "ROWS", 11484 // "COLUMNS" 11485 // ], 11486 // "location": "query", 11487 // "type": "string" 11488 // }, 11489 // "ranges": { 11490 // "description": "The A1 notation of the values to retrieve.", 11491 // "location": "query", 11492 // "repeated": true, 11493 // "type": "string" 11494 // }, 11495 // "spreadsheetId": { 11496 // "description": "The ID of the spreadsheet to retrieve data from.", 11497 // "location": "path", 11498 // "required": true, 11499 // "type": "string" 11500 // }, 11501 // "valueRenderOption": { 11502 // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 11503 // "enum": [ 11504 // "FORMATTED_VALUE", 11505 // "UNFORMATTED_VALUE", 11506 // "FORMULA" 11507 // ], 11508 // "location": "query", 11509 // "type": "string" 11510 // } 11511 // }, 11512 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 11513 // "response": { 11514 // "$ref": "BatchGetValuesResponse" 11515 // }, 11516 // "scopes": [ 11517 // "https://www.googleapis.com/auth/drive", 11518 // "https://www.googleapis.com/auth/drive.file", 11519 // "https://www.googleapis.com/auth/drive.readonly", 11520 // "https://www.googleapis.com/auth/spreadsheets", 11521 // "https://www.googleapis.com/auth/spreadsheets.readonly" 11522 // ] 11523 // } 11524 11525} 11526 11527// method id "sheets.spreadsheets.values.batchGetByDataFilter": 11528 11529type SpreadsheetsValuesBatchGetByDataFilterCall struct { 11530 s *Service 11531 spreadsheetId string 11532 batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest 11533 urlParams_ gensupport.URLParams 11534 ctx_ context.Context 11535 header_ http.Header 11536} 11537 11538// BatchGetByDataFilter: Returns one or more ranges of values that match 11539// the specified data filters. 11540// The caller must specify the spreadsheet ID and one or 11541// more 11542// DataFilters. Ranges that match any of the data filters in 11543// the request will be returned. 11544func (r *SpreadsheetsValuesService) BatchGetByDataFilter(spreadsheetId string, batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest) *SpreadsheetsValuesBatchGetByDataFilterCall { 11545 c := &SpreadsheetsValuesBatchGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11546 c.spreadsheetId = spreadsheetId 11547 c.batchgetvaluesbydatafilterrequest = batchgetvaluesbydatafilterrequest 11548 return c 11549} 11550 11551// Fields allows partial responses to be retrieved. See 11552// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11553// for more information. 11554func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetByDataFilterCall { 11555 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11556 return c 11557} 11558 11559// Context sets the context to be used in this call's Do method. Any 11560// pending HTTP request will be aborted if the provided context is 11561// canceled. 11562func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetByDataFilterCall { 11563 c.ctx_ = ctx 11564 return c 11565} 11566 11567// Header returns an http.Header that can be modified by the caller to 11568// add HTTP headers to the request. 11569func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Header() http.Header { 11570 if c.header_ == nil { 11571 c.header_ = make(http.Header) 11572 } 11573 return c.header_ 11574} 11575 11576func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 11577 reqHeaders := make(http.Header) 11578 for k, v := range c.header_ { 11579 reqHeaders[k] = v 11580 } 11581 reqHeaders.Set("User-Agent", c.s.userAgent()) 11582 var body io.Reader = nil 11583 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetvaluesbydatafilterrequest) 11584 if err != nil { 11585 return nil, err 11586 } 11587 reqHeaders.Set("Content-Type", "application/json") 11588 c.urlParams_.Set("alt", alt) 11589 c.urlParams_.Set("prettyPrint", "false") 11590 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter") 11591 urls += "?" + c.urlParams_.Encode() 11592 req, err := http.NewRequest("POST", urls, body) 11593 if err != nil { 11594 return nil, err 11595 } 11596 req.Header = reqHeaders 11597 googleapi.Expand(req.URL, map[string]string{ 11598 "spreadsheetId": c.spreadsheetId, 11599 }) 11600 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11601} 11602 11603// Do executes the "sheets.spreadsheets.values.batchGetByDataFilter" call. 11604// Exactly one of *BatchGetValuesByDataFilterResponse or error will be 11605// non-nil. Any non-2xx status code is an error. Response headers are in 11606// either *BatchGetValuesByDataFilterResponse.ServerResponse.Header or 11607// (if a response was returned at all) in 11608// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11609// whether the returned error was because http.StatusNotModified was 11610// returned. 11611func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesByDataFilterResponse, error) { 11612 gensupport.SetOptions(c.urlParams_, opts...) 11613 res, err := c.doRequest("json") 11614 if res != nil && res.StatusCode == http.StatusNotModified { 11615 if res.Body != nil { 11616 res.Body.Close() 11617 } 11618 return nil, &googleapi.Error{ 11619 Code: res.StatusCode, 11620 Header: res.Header, 11621 } 11622 } 11623 if err != nil { 11624 return nil, err 11625 } 11626 defer googleapi.CloseBody(res) 11627 if err := googleapi.CheckResponse(res); err != nil { 11628 return nil, err 11629 } 11630 ret := &BatchGetValuesByDataFilterResponse{ 11631 ServerResponse: googleapi.ServerResponse{ 11632 Header: res.Header, 11633 HTTPStatusCode: res.StatusCode, 11634 }, 11635 } 11636 target := &ret 11637 if err := gensupport.DecodeResponse(target, res); err != nil { 11638 return nil, err 11639 } 11640 return ret, nil 11641 // { 11642 // "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.", 11643 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 11644 // "httpMethod": "POST", 11645 // "id": "sheets.spreadsheets.values.batchGetByDataFilter", 11646 // "parameterOrder": [ 11647 // "spreadsheetId" 11648 // ], 11649 // "parameters": { 11650 // "spreadsheetId": { 11651 // "description": "The ID of the spreadsheet to retrieve data from.", 11652 // "location": "path", 11653 // "required": true, 11654 // "type": "string" 11655 // } 11656 // }, 11657 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 11658 // "request": { 11659 // "$ref": "BatchGetValuesByDataFilterRequest" 11660 // }, 11661 // "response": { 11662 // "$ref": "BatchGetValuesByDataFilterResponse" 11663 // }, 11664 // "scopes": [ 11665 // "https://www.googleapis.com/auth/drive", 11666 // "https://www.googleapis.com/auth/drive.file", 11667 // "https://www.googleapis.com/auth/spreadsheets" 11668 // ] 11669 // } 11670 11671} 11672 11673// method id "sheets.spreadsheets.values.batchUpdate": 11674 11675type SpreadsheetsValuesBatchUpdateCall struct { 11676 s *Service 11677 spreadsheetId string 11678 batchupdatevaluesrequest *BatchUpdateValuesRequest 11679 urlParams_ gensupport.URLParams 11680 ctx_ context.Context 11681 header_ http.Header 11682} 11683 11684// BatchUpdate: Sets values in one or more ranges of a spreadsheet. 11685// The caller must specify the spreadsheet ID, 11686// a valueInputOption, and one or more 11687// ValueRanges. 11688func (r *SpreadsheetsValuesService) BatchUpdate(spreadsheetId string, batchupdatevaluesrequest *BatchUpdateValuesRequest) *SpreadsheetsValuesBatchUpdateCall { 11689 c := &SpreadsheetsValuesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11690 c.spreadsheetId = spreadsheetId 11691 c.batchupdatevaluesrequest = batchupdatevaluesrequest 11692 return c 11693} 11694 11695// Fields allows partial responses to be retrieved. See 11696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11697// for more information. 11698func (c *SpreadsheetsValuesBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateCall { 11699 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11700 return c 11701} 11702 11703// Context sets the context to be used in this call's Do method. Any 11704// pending HTTP request will be aborted if the provided context is 11705// canceled. 11706func (c *SpreadsheetsValuesBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateCall { 11707 c.ctx_ = ctx 11708 return c 11709} 11710 11711// Header returns an http.Header that can be modified by the caller to 11712// add HTTP headers to the request. 11713func (c *SpreadsheetsValuesBatchUpdateCall) Header() http.Header { 11714 if c.header_ == nil { 11715 c.header_ = make(http.Header) 11716 } 11717 return c.header_ 11718} 11719 11720func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 11721 reqHeaders := make(http.Header) 11722 for k, v := range c.header_ { 11723 reqHeaders[k] = v 11724 } 11725 reqHeaders.Set("User-Agent", c.s.userAgent()) 11726 var body io.Reader = nil 11727 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesrequest) 11728 if err != nil { 11729 return nil, err 11730 } 11731 reqHeaders.Set("Content-Type", "application/json") 11732 c.urlParams_.Set("alt", alt) 11733 c.urlParams_.Set("prettyPrint", "false") 11734 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate") 11735 urls += "?" + c.urlParams_.Encode() 11736 req, err := http.NewRequest("POST", urls, body) 11737 if err != nil { 11738 return nil, err 11739 } 11740 req.Header = reqHeaders 11741 googleapi.Expand(req.URL, map[string]string{ 11742 "spreadsheetId": c.spreadsheetId, 11743 }) 11744 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11745} 11746 11747// Do executes the "sheets.spreadsheets.values.batchUpdate" call. 11748// Exactly one of *BatchUpdateValuesResponse or error will be non-nil. 11749// Any non-2xx status code is an error. Response headers are in either 11750// *BatchUpdateValuesResponse.ServerResponse.Header or (if a response 11751// was returned at all) in error.(*googleapi.Error).Header. Use 11752// googleapi.IsNotModified to check whether the returned error was 11753// because http.StatusNotModified was returned. 11754func (c *SpreadsheetsValuesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesResponse, error) { 11755 gensupport.SetOptions(c.urlParams_, opts...) 11756 res, err := c.doRequest("json") 11757 if res != nil && res.StatusCode == http.StatusNotModified { 11758 if res.Body != nil { 11759 res.Body.Close() 11760 } 11761 return nil, &googleapi.Error{ 11762 Code: res.StatusCode, 11763 Header: res.Header, 11764 } 11765 } 11766 if err != nil { 11767 return nil, err 11768 } 11769 defer googleapi.CloseBody(res) 11770 if err := googleapi.CheckResponse(res); err != nil { 11771 return nil, err 11772 } 11773 ret := &BatchUpdateValuesResponse{ 11774 ServerResponse: googleapi.ServerResponse{ 11775 Header: res.Header, 11776 HTTPStatusCode: res.StatusCode, 11777 }, 11778 } 11779 target := &ret 11780 if err := gensupport.DecodeResponse(target, res); err != nil { 11781 return nil, err 11782 } 11783 return ret, nil 11784 // { 11785 // "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.", 11786 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 11787 // "httpMethod": "POST", 11788 // "id": "sheets.spreadsheets.values.batchUpdate", 11789 // "parameterOrder": [ 11790 // "spreadsheetId" 11791 // ], 11792 // "parameters": { 11793 // "spreadsheetId": { 11794 // "description": "The ID of the spreadsheet to update.", 11795 // "location": "path", 11796 // "required": true, 11797 // "type": "string" 11798 // } 11799 // }, 11800 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 11801 // "request": { 11802 // "$ref": "BatchUpdateValuesRequest" 11803 // }, 11804 // "response": { 11805 // "$ref": "BatchUpdateValuesResponse" 11806 // }, 11807 // "scopes": [ 11808 // "https://www.googleapis.com/auth/drive", 11809 // "https://www.googleapis.com/auth/drive.file", 11810 // "https://www.googleapis.com/auth/spreadsheets" 11811 // ] 11812 // } 11813 11814} 11815 11816// method id "sheets.spreadsheets.values.batchUpdateByDataFilter": 11817 11818type SpreadsheetsValuesBatchUpdateByDataFilterCall struct { 11819 s *Service 11820 spreadsheetId string 11821 batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest 11822 urlParams_ gensupport.URLParams 11823 ctx_ context.Context 11824 header_ http.Header 11825} 11826 11827// BatchUpdateByDataFilter: Sets values in one or more ranges of a 11828// spreadsheet. 11829// The caller must specify the spreadsheet ID, 11830// a valueInputOption, and one or more 11831// DataFilterValueRanges. 11832func (r *SpreadsheetsValuesService) BatchUpdateByDataFilter(spreadsheetId string, batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 11833 c := &SpreadsheetsValuesBatchUpdateByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11834 c.spreadsheetId = spreadsheetId 11835 c.batchupdatevaluesbydatafilterrequest = batchupdatevaluesbydatafilterrequest 11836 return c 11837} 11838 11839// Fields allows partial responses to be retrieved. See 11840// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11841// for more information. 11842func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 11843 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11844 return c 11845} 11846 11847// Context sets the context to be used in this call's Do method. Any 11848// pending HTTP request will be aborted if the provided context is 11849// canceled. 11850func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 11851 c.ctx_ = ctx 11852 return c 11853} 11854 11855// Header returns an http.Header that can be modified by the caller to 11856// add HTTP headers to the request. 11857func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Header() http.Header { 11858 if c.header_ == nil { 11859 c.header_ = make(http.Header) 11860 } 11861 return c.header_ 11862} 11863 11864func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (*http.Response, error) { 11865 reqHeaders := make(http.Header) 11866 for k, v := range c.header_ { 11867 reqHeaders[k] = v 11868 } 11869 reqHeaders.Set("User-Agent", c.s.userAgent()) 11870 var body io.Reader = nil 11871 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesbydatafilterrequest) 11872 if err != nil { 11873 return nil, err 11874 } 11875 reqHeaders.Set("Content-Type", "application/json") 11876 c.urlParams_.Set("alt", alt) 11877 c.urlParams_.Set("prettyPrint", "false") 11878 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter") 11879 urls += "?" + c.urlParams_.Encode() 11880 req, err := http.NewRequest("POST", urls, body) 11881 if err != nil { 11882 return nil, err 11883 } 11884 req.Header = reqHeaders 11885 googleapi.Expand(req.URL, map[string]string{ 11886 "spreadsheetId": c.spreadsheetId, 11887 }) 11888 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11889} 11890 11891// Do executes the "sheets.spreadsheets.values.batchUpdateByDataFilter" call. 11892// Exactly one of *BatchUpdateValuesByDataFilterResponse or error will 11893// be non-nil. Any non-2xx status code is an error. Response headers are 11894// in either 11895// *BatchUpdateValuesByDataFilterResponse.ServerResponse.Header or (if a 11896// response was returned at all) in error.(*googleapi.Error).Header. Use 11897// googleapi.IsNotModified to check whether the returned error was 11898// because http.StatusNotModified was returned. 11899func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesByDataFilterResponse, error) { 11900 gensupport.SetOptions(c.urlParams_, opts...) 11901 res, err := c.doRequest("json") 11902 if res != nil && res.StatusCode == http.StatusNotModified { 11903 if res.Body != nil { 11904 res.Body.Close() 11905 } 11906 return nil, &googleapi.Error{ 11907 Code: res.StatusCode, 11908 Header: res.Header, 11909 } 11910 } 11911 if err != nil { 11912 return nil, err 11913 } 11914 defer googleapi.CloseBody(res) 11915 if err := googleapi.CheckResponse(res); err != nil { 11916 return nil, err 11917 } 11918 ret := &BatchUpdateValuesByDataFilterResponse{ 11919 ServerResponse: googleapi.ServerResponse{ 11920 Header: res.Header, 11921 HTTPStatusCode: res.StatusCode, 11922 }, 11923 } 11924 target := &ret 11925 if err := gensupport.DecodeResponse(target, res); err != nil { 11926 return nil, err 11927 } 11928 return ret, nil 11929 // { 11930 // "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.", 11931 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 11932 // "httpMethod": "POST", 11933 // "id": "sheets.spreadsheets.values.batchUpdateByDataFilter", 11934 // "parameterOrder": [ 11935 // "spreadsheetId" 11936 // ], 11937 // "parameters": { 11938 // "spreadsheetId": { 11939 // "description": "The ID of the spreadsheet to update.", 11940 // "location": "path", 11941 // "required": true, 11942 // "type": "string" 11943 // } 11944 // }, 11945 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 11946 // "request": { 11947 // "$ref": "BatchUpdateValuesByDataFilterRequest" 11948 // }, 11949 // "response": { 11950 // "$ref": "BatchUpdateValuesByDataFilterResponse" 11951 // }, 11952 // "scopes": [ 11953 // "https://www.googleapis.com/auth/drive", 11954 // "https://www.googleapis.com/auth/drive.file", 11955 // "https://www.googleapis.com/auth/spreadsheets" 11956 // ] 11957 // } 11958 11959} 11960 11961// method id "sheets.spreadsheets.values.clear": 11962 11963type SpreadsheetsValuesClearCall struct { 11964 s *Service 11965 spreadsheetId string 11966 range_ string 11967 clearvaluesrequest *ClearValuesRequest 11968 urlParams_ gensupport.URLParams 11969 ctx_ context.Context 11970 header_ http.Header 11971} 11972 11973// Clear: Clears values from a spreadsheet. 11974// The caller must specify the spreadsheet ID and range. 11975// Only values are cleared -- all other properties of the cell (such 11976// as 11977// formatting, data validation, etc..) are kept. 11978func (r *SpreadsheetsValuesService) Clear(spreadsheetId string, range_ string, clearvaluesrequest *ClearValuesRequest) *SpreadsheetsValuesClearCall { 11979 c := &SpreadsheetsValuesClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11980 c.spreadsheetId = spreadsheetId 11981 c.range_ = range_ 11982 c.clearvaluesrequest = clearvaluesrequest 11983 return c 11984} 11985 11986// Fields allows partial responses to be retrieved. See 11987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11988// for more information. 11989func (c *SpreadsheetsValuesClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesClearCall { 11990 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11991 return c 11992} 11993 11994// Context sets the context to be used in this call's Do method. Any 11995// pending HTTP request will be aborted if the provided context is 11996// canceled. 11997func (c *SpreadsheetsValuesClearCall) Context(ctx context.Context) *SpreadsheetsValuesClearCall { 11998 c.ctx_ = ctx 11999 return c 12000} 12001 12002// Header returns an http.Header that can be modified by the caller to 12003// add HTTP headers to the request. 12004func (c *SpreadsheetsValuesClearCall) Header() http.Header { 12005 if c.header_ == nil { 12006 c.header_ = make(http.Header) 12007 } 12008 return c.header_ 12009} 12010 12011func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, error) { 12012 reqHeaders := make(http.Header) 12013 for k, v := range c.header_ { 12014 reqHeaders[k] = v 12015 } 12016 reqHeaders.Set("User-Agent", c.s.userAgent()) 12017 var body io.Reader = nil 12018 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearvaluesrequest) 12019 if err != nil { 12020 return nil, err 12021 } 12022 reqHeaders.Set("Content-Type", "application/json") 12023 c.urlParams_.Set("alt", alt) 12024 c.urlParams_.Set("prettyPrint", "false") 12025 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear") 12026 urls += "?" + c.urlParams_.Encode() 12027 req, err := http.NewRequest("POST", urls, body) 12028 if err != nil { 12029 return nil, err 12030 } 12031 req.Header = reqHeaders 12032 googleapi.Expand(req.URL, map[string]string{ 12033 "spreadsheetId": c.spreadsheetId, 12034 "range": c.range_, 12035 }) 12036 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12037} 12038 12039// Do executes the "sheets.spreadsheets.values.clear" call. 12040// Exactly one of *ClearValuesResponse or error will be non-nil. Any 12041// non-2xx status code is an error. Response headers are in either 12042// *ClearValuesResponse.ServerResponse.Header or (if a response was 12043// returned at all) in error.(*googleapi.Error).Header. Use 12044// googleapi.IsNotModified to check whether the returned error was 12045// because http.StatusNotModified was returned. 12046func (c *SpreadsheetsValuesClearCall) Do(opts ...googleapi.CallOption) (*ClearValuesResponse, error) { 12047 gensupport.SetOptions(c.urlParams_, opts...) 12048 res, err := c.doRequest("json") 12049 if res != nil && res.StatusCode == http.StatusNotModified { 12050 if res.Body != nil { 12051 res.Body.Close() 12052 } 12053 return nil, &googleapi.Error{ 12054 Code: res.StatusCode, 12055 Header: res.Header, 12056 } 12057 } 12058 if err != nil { 12059 return nil, err 12060 } 12061 defer googleapi.CloseBody(res) 12062 if err := googleapi.CheckResponse(res); err != nil { 12063 return nil, err 12064 } 12065 ret := &ClearValuesResponse{ 12066 ServerResponse: googleapi.ServerResponse{ 12067 Header: res.Header, 12068 HTTPStatusCode: res.StatusCode, 12069 }, 12070 } 12071 target := &ret 12072 if err := gensupport.DecodeResponse(target, res); err != nil { 12073 return nil, err 12074 } 12075 return ret, nil 12076 // { 12077 // "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.", 12078 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 12079 // "httpMethod": "POST", 12080 // "id": "sheets.spreadsheets.values.clear", 12081 // "parameterOrder": [ 12082 // "spreadsheetId", 12083 // "range" 12084 // ], 12085 // "parameters": { 12086 // "range": { 12087 // "description": "The A1 notation of the values to clear.", 12088 // "location": "path", 12089 // "required": true, 12090 // "type": "string" 12091 // }, 12092 // "spreadsheetId": { 12093 // "description": "The ID of the spreadsheet to update.", 12094 // "location": "path", 12095 // "required": true, 12096 // "type": "string" 12097 // } 12098 // }, 12099 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 12100 // "request": { 12101 // "$ref": "ClearValuesRequest" 12102 // }, 12103 // "response": { 12104 // "$ref": "ClearValuesResponse" 12105 // }, 12106 // "scopes": [ 12107 // "https://www.googleapis.com/auth/drive", 12108 // "https://www.googleapis.com/auth/drive.file", 12109 // "https://www.googleapis.com/auth/spreadsheets" 12110 // ] 12111 // } 12112 12113} 12114 12115// method id "sheets.spreadsheets.values.get": 12116 12117type SpreadsheetsValuesGetCall struct { 12118 s *Service 12119 spreadsheetId string 12120 range_ string 12121 urlParams_ gensupport.URLParams 12122 ifNoneMatch_ string 12123 ctx_ context.Context 12124 header_ http.Header 12125} 12126 12127// Get: Returns a range of values from a spreadsheet. 12128// The caller must specify the spreadsheet ID and a range. 12129func (r *SpreadsheetsValuesService) Get(spreadsheetId string, range_ string) *SpreadsheetsValuesGetCall { 12130 c := &SpreadsheetsValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12131 c.spreadsheetId = spreadsheetId 12132 c.range_ = range_ 12133 return c 12134} 12135 12136// DateTimeRenderOption sets the optional parameter 12137// "dateTimeRenderOption": How dates, times, and durations should be 12138// represented in the output. 12139// This is ignored if value_render_option is 12140// FORMATTED_VALUE. 12141// The default dateTime render option is 12142// [DateTimeRenderOption.SERIAL_NUMBER]. 12143// 12144// Possible values: 12145// "SERIAL_NUMBER" 12146// "FORMATTED_STRING" 12147func (c *SpreadsheetsValuesGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesGetCall { 12148 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 12149 return c 12150} 12151 12152// MajorDimension sets the optional parameter "majorDimension": The 12153// major dimension that results should use. 12154// 12155// For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 12156// then requesting `range=A1:B2,majorDimension=ROWS` will 12157// return 12158// `[[1,2],[3,4]]`, 12159// whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 12160// return 12161// `[[1,3],[2,4]]`. 12162// 12163// Possible values: 12164// "DIMENSION_UNSPECIFIED" 12165// "ROWS" 12166// "COLUMNS" 12167func (c *SpreadsheetsValuesGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesGetCall { 12168 c.urlParams_.Set("majorDimension", majorDimension) 12169 return c 12170} 12171 12172// ValueRenderOption sets the optional parameter "valueRenderOption": 12173// How values should be represented in the output. 12174// The default render option is ValueRenderOption.FORMATTED_VALUE. 12175// 12176// Possible values: 12177// "FORMATTED_VALUE" 12178// "UNFORMATTED_VALUE" 12179// "FORMULA" 12180func (c *SpreadsheetsValuesGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesGetCall { 12181 c.urlParams_.Set("valueRenderOption", valueRenderOption) 12182 return c 12183} 12184 12185// Fields allows partial responses to be retrieved. See 12186// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12187// for more information. 12188func (c *SpreadsheetsValuesGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesGetCall { 12189 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12190 return c 12191} 12192 12193// IfNoneMatch sets the optional parameter which makes the operation 12194// fail if the object's ETag matches the given value. This is useful for 12195// getting updates only after the object has changed since the last 12196// request. Use googleapi.IsNotModified to check whether the response 12197// error from Do is the result of In-None-Match. 12198func (c *SpreadsheetsValuesGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesGetCall { 12199 c.ifNoneMatch_ = entityTag 12200 return c 12201} 12202 12203// Context sets the context to be used in this call's Do method. Any 12204// pending HTTP request will be aborted if the provided context is 12205// canceled. 12206func (c *SpreadsheetsValuesGetCall) Context(ctx context.Context) *SpreadsheetsValuesGetCall { 12207 c.ctx_ = ctx 12208 return c 12209} 12210 12211// Header returns an http.Header that can be modified by the caller to 12212// add HTTP headers to the request. 12213func (c *SpreadsheetsValuesGetCall) Header() http.Header { 12214 if c.header_ == nil { 12215 c.header_ = make(http.Header) 12216 } 12217 return c.header_ 12218} 12219 12220func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error) { 12221 reqHeaders := make(http.Header) 12222 for k, v := range c.header_ { 12223 reqHeaders[k] = v 12224 } 12225 reqHeaders.Set("User-Agent", c.s.userAgent()) 12226 if c.ifNoneMatch_ != "" { 12227 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12228 } 12229 var body io.Reader = nil 12230 c.urlParams_.Set("alt", alt) 12231 c.urlParams_.Set("prettyPrint", "false") 12232 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 12233 urls += "?" + c.urlParams_.Encode() 12234 req, err := http.NewRequest("GET", urls, body) 12235 if err != nil { 12236 return nil, err 12237 } 12238 req.Header = reqHeaders 12239 googleapi.Expand(req.URL, map[string]string{ 12240 "spreadsheetId": c.spreadsheetId, 12241 "range": c.range_, 12242 }) 12243 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12244} 12245 12246// Do executes the "sheets.spreadsheets.values.get" call. 12247// Exactly one of *ValueRange or error will be non-nil. Any non-2xx 12248// status code is an error. Response headers are in either 12249// *ValueRange.ServerResponse.Header or (if a response was returned at 12250// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12251// to check whether the returned error was because 12252// http.StatusNotModified was returned. 12253func (c *SpreadsheetsValuesGetCall) Do(opts ...googleapi.CallOption) (*ValueRange, error) { 12254 gensupport.SetOptions(c.urlParams_, opts...) 12255 res, err := c.doRequest("json") 12256 if res != nil && res.StatusCode == http.StatusNotModified { 12257 if res.Body != nil { 12258 res.Body.Close() 12259 } 12260 return nil, &googleapi.Error{ 12261 Code: res.StatusCode, 12262 Header: res.Header, 12263 } 12264 } 12265 if err != nil { 12266 return nil, err 12267 } 12268 defer googleapi.CloseBody(res) 12269 if err := googleapi.CheckResponse(res); err != nil { 12270 return nil, err 12271 } 12272 ret := &ValueRange{ 12273 ServerResponse: googleapi.ServerResponse{ 12274 Header: res.Header, 12275 HTTPStatusCode: res.StatusCode, 12276 }, 12277 } 12278 target := &ret 12279 if err := gensupport.DecodeResponse(target, res); err != nil { 12280 return nil, err 12281 } 12282 return ret, nil 12283 // { 12284 // "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", 12285 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12286 // "httpMethod": "GET", 12287 // "id": "sheets.spreadsheets.values.get", 12288 // "parameterOrder": [ 12289 // "spreadsheetId", 12290 // "range" 12291 // ], 12292 // "parameters": { 12293 // "dateTimeRenderOption": { 12294 // "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].", 12295 // "enum": [ 12296 // "SERIAL_NUMBER", 12297 // "FORMATTED_STRING" 12298 // ], 12299 // "location": "query", 12300 // "type": "string" 12301 // }, 12302 // "majorDimension": { 12303 // "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]]`.", 12304 // "enum": [ 12305 // "DIMENSION_UNSPECIFIED", 12306 // "ROWS", 12307 // "COLUMNS" 12308 // ], 12309 // "location": "query", 12310 // "type": "string" 12311 // }, 12312 // "range": { 12313 // "description": "The A1 notation of the values to retrieve.", 12314 // "location": "path", 12315 // "required": true, 12316 // "type": "string" 12317 // }, 12318 // "spreadsheetId": { 12319 // "description": "The ID of the spreadsheet to retrieve data from.", 12320 // "location": "path", 12321 // "required": true, 12322 // "type": "string" 12323 // }, 12324 // "valueRenderOption": { 12325 // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 12326 // "enum": [ 12327 // "FORMATTED_VALUE", 12328 // "UNFORMATTED_VALUE", 12329 // "FORMULA" 12330 // ], 12331 // "location": "query", 12332 // "type": "string" 12333 // } 12334 // }, 12335 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12336 // "response": { 12337 // "$ref": "ValueRange" 12338 // }, 12339 // "scopes": [ 12340 // "https://www.googleapis.com/auth/drive", 12341 // "https://www.googleapis.com/auth/drive.file", 12342 // "https://www.googleapis.com/auth/drive.readonly", 12343 // "https://www.googleapis.com/auth/spreadsheets", 12344 // "https://www.googleapis.com/auth/spreadsheets.readonly" 12345 // ] 12346 // } 12347 12348} 12349 12350// method id "sheets.spreadsheets.values.update": 12351 12352type SpreadsheetsValuesUpdateCall struct { 12353 s *Service 12354 spreadsheetId string 12355 range_ string 12356 valuerange *ValueRange 12357 urlParams_ gensupport.URLParams 12358 ctx_ context.Context 12359 header_ http.Header 12360} 12361 12362// Update: Sets values in a range of a spreadsheet. 12363// The caller must specify the spreadsheet ID, range, and 12364// a valueInputOption. 12365func (r *SpreadsheetsValuesService) Update(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesUpdateCall { 12366 c := &SpreadsheetsValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12367 c.spreadsheetId = spreadsheetId 12368 c.range_ = range_ 12369 c.valuerange = valuerange 12370 return c 12371} 12372 12373// IncludeValuesInResponse sets the optional parameter 12374// "includeValuesInResponse": Determines if the update response should 12375// include the values 12376// of the cells that were updated. By default, responses 12377// do not include the updated values. 12378// If the range to write was larger than than the range actually 12379// written, 12380// the response will include all values in the requested range 12381// (excluding 12382// trailing empty rows and columns). 12383func (c *SpreadsheetsValuesUpdateCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesUpdateCall { 12384 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 12385 return c 12386} 12387 12388// ResponseDateTimeRenderOption sets the optional parameter 12389// "responseDateTimeRenderOption": Determines how dates, times, and 12390// durations in the response should be 12391// rendered. This is ignored if response_value_render_option 12392// is 12393// FORMATTED_VALUE. 12394// The default dateTime render option 12395// is 12396// DateTimeRenderOption.SERIAL_NUMBER. 12397// 12398// Possible values: 12399// "SERIAL_NUMBER" 12400// "FORMATTED_STRING" 12401func (c *SpreadsheetsValuesUpdateCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesUpdateCall { 12402 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 12403 return c 12404} 12405 12406// ResponseValueRenderOption sets the optional parameter 12407// "responseValueRenderOption": Determines how values in the response 12408// should be rendered. 12409// The default render option is ValueRenderOption.FORMATTED_VALUE. 12410// 12411// Possible values: 12412// "FORMATTED_VALUE" 12413// "UNFORMATTED_VALUE" 12414// "FORMULA" 12415func (c *SpreadsheetsValuesUpdateCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesUpdateCall { 12416 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 12417 return c 12418} 12419 12420// ValueInputOption sets the optional parameter "valueInputOption": How 12421// the input data should be interpreted. 12422// 12423// Possible values: 12424// "INPUT_VALUE_OPTION_UNSPECIFIED" 12425// "RAW" 12426// "USER_ENTERED" 12427func (c *SpreadsheetsValuesUpdateCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesUpdateCall { 12428 c.urlParams_.Set("valueInputOption", valueInputOption) 12429 return c 12430} 12431 12432// Fields allows partial responses to be retrieved. See 12433// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12434// for more information. 12435func (c *SpreadsheetsValuesUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesUpdateCall { 12436 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12437 return c 12438} 12439 12440// Context sets the context to be used in this call's Do method. Any 12441// pending HTTP request will be aborted if the provided context is 12442// canceled. 12443func (c *SpreadsheetsValuesUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesUpdateCall { 12444 c.ctx_ = ctx 12445 return c 12446} 12447 12448// Header returns an http.Header that can be modified by the caller to 12449// add HTTP headers to the request. 12450func (c *SpreadsheetsValuesUpdateCall) Header() http.Header { 12451 if c.header_ == nil { 12452 c.header_ = make(http.Header) 12453 } 12454 return c.header_ 12455} 12456 12457func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, error) { 12458 reqHeaders := make(http.Header) 12459 for k, v := range c.header_ { 12460 reqHeaders[k] = v 12461 } 12462 reqHeaders.Set("User-Agent", c.s.userAgent()) 12463 var body io.Reader = nil 12464 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 12465 if err != nil { 12466 return nil, err 12467 } 12468 reqHeaders.Set("Content-Type", "application/json") 12469 c.urlParams_.Set("alt", alt) 12470 c.urlParams_.Set("prettyPrint", "false") 12471 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 12472 urls += "?" + c.urlParams_.Encode() 12473 req, err := http.NewRequest("PUT", urls, body) 12474 if err != nil { 12475 return nil, err 12476 } 12477 req.Header = reqHeaders 12478 googleapi.Expand(req.URL, map[string]string{ 12479 "spreadsheetId": c.spreadsheetId, 12480 "range": c.range_, 12481 }) 12482 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12483} 12484 12485// Do executes the "sheets.spreadsheets.values.update" call. 12486// Exactly one of *UpdateValuesResponse or error will be non-nil. Any 12487// non-2xx status code is an error. Response headers are in either 12488// *UpdateValuesResponse.ServerResponse.Header or (if a response was 12489// returned at all) in error.(*googleapi.Error).Header. Use 12490// googleapi.IsNotModified to check whether the returned error was 12491// because http.StatusNotModified was returned. 12492func (c *SpreadsheetsValuesUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateValuesResponse, error) { 12493 gensupport.SetOptions(c.urlParams_, opts...) 12494 res, err := c.doRequest("json") 12495 if res != nil && res.StatusCode == http.StatusNotModified { 12496 if res.Body != nil { 12497 res.Body.Close() 12498 } 12499 return nil, &googleapi.Error{ 12500 Code: res.StatusCode, 12501 Header: res.Header, 12502 } 12503 } 12504 if err != nil { 12505 return nil, err 12506 } 12507 defer googleapi.CloseBody(res) 12508 if err := googleapi.CheckResponse(res); err != nil { 12509 return nil, err 12510 } 12511 ret := &UpdateValuesResponse{ 12512 ServerResponse: googleapi.ServerResponse{ 12513 Header: res.Header, 12514 HTTPStatusCode: res.StatusCode, 12515 }, 12516 } 12517 target := &ret 12518 if err := gensupport.DecodeResponse(target, res); err != nil { 12519 return nil, err 12520 } 12521 return ret, nil 12522 // { 12523 // "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", 12524 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12525 // "httpMethod": "PUT", 12526 // "id": "sheets.spreadsheets.values.update", 12527 // "parameterOrder": [ 12528 // "spreadsheetId", 12529 // "range" 12530 // ], 12531 // "parameters": { 12532 // "includeValuesInResponse": { 12533 // "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).", 12534 // "location": "query", 12535 // "type": "boolean" 12536 // }, 12537 // "range": { 12538 // "description": "The A1 notation of the values to update.", 12539 // "location": "path", 12540 // "required": true, 12541 // "type": "string" 12542 // }, 12543 // "responseDateTimeRenderOption": { 12544 // "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.", 12545 // "enum": [ 12546 // "SERIAL_NUMBER", 12547 // "FORMATTED_STRING" 12548 // ], 12549 // "location": "query", 12550 // "type": "string" 12551 // }, 12552 // "responseValueRenderOption": { 12553 // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 12554 // "enum": [ 12555 // "FORMATTED_VALUE", 12556 // "UNFORMATTED_VALUE", 12557 // "FORMULA" 12558 // ], 12559 // "location": "query", 12560 // "type": "string" 12561 // }, 12562 // "spreadsheetId": { 12563 // "description": "The ID of the spreadsheet to update.", 12564 // "location": "path", 12565 // "required": true, 12566 // "type": "string" 12567 // }, 12568 // "valueInputOption": { 12569 // "description": "How the input data should be interpreted.", 12570 // "enum": [ 12571 // "INPUT_VALUE_OPTION_UNSPECIFIED", 12572 // "RAW", 12573 // "USER_ENTERED" 12574 // ], 12575 // "location": "query", 12576 // "type": "string" 12577 // } 12578 // }, 12579 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 12580 // "request": { 12581 // "$ref": "ValueRange" 12582 // }, 12583 // "response": { 12584 // "$ref": "UpdateValuesResponse" 12585 // }, 12586 // "scopes": [ 12587 // "https://www.googleapis.com/auth/drive", 12588 // "https://www.googleapis.com/auth/drive.file", 12589 // "https://www.googleapis.com/auth/spreadsheets" 12590 // ] 12591 // } 12592 12593} 12594