1// Copyright 2019 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package sheets provides access to the Google Sheets API. 8// 9// For product documentation, see: https://developers.google.com/sheets/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/sheets/v4" 16// ... 17// ctx := context.Background() 18// sheetsService, err := sheets.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes: 27// 28// sheetsService, err := sheets.NewService(ctx, option.WithScopes(sheets.SpreadsheetsReadonlyScope)) 29// 30// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 31// 32// sheetsService, err := sheets.NewService(ctx, option.WithAPIKey("AIza...")) 33// 34// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 35// 36// config := &oauth2.Config{...} 37// // ... 38// token, err := config.Exchange(ctx, ...) 39// sheetsService, err := sheets.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 40// 41// See https://godoc.org/google.golang.org/api/option/ for details on options. 42package sheets // import "google.golang.org/api/sheets/v4" 43 44import ( 45 "bytes" 46 "context" 47 "encoding/json" 48 "errors" 49 "fmt" 50 "io" 51 "net/http" 52 "net/url" 53 "strconv" 54 "strings" 55 56 googleapi "google.golang.org/api/googleapi" 57 gensupport "google.golang.org/api/internal/gensupport" 58 option "google.golang.org/api/option" 59 htransport "google.golang.org/api/transport/http" 60) 61 62// Always reference these packages, just in case the auto-generated code 63// below doesn't. 64var _ = bytes.NewBuffer 65var _ = strconv.Itoa 66var _ = fmt.Sprintf 67var _ = json.NewDecoder 68var _ = io.Copy 69var _ = url.Parse 70var _ = gensupport.MarshalJSON 71var _ = googleapi.Version 72var _ = errors.New 73var _ = strings.Replace 74var _ = context.Canceled 75 76const apiId = "sheets:v4" 77const apiName = "sheets" 78const apiVersion = "v4" 79const basePath = "https://sheets.googleapis.com/" 80 81// OAuth2 scopes used by this API. 82const ( 83 // See, edit, create, and delete all of your Google Drive files 84 DriveScope = "https://www.googleapis.com/auth/drive" 85 86 // View and manage Google Drive files and folders that you have opened 87 // or created with this app 88 DriveFileScope = "https://www.googleapis.com/auth/drive.file" 89 90 // See and download all your Google Drive files 91 DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly" 92 93 // See, edit, create, and delete your spreadsheets in Google Drive 94 SpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets" 95 96 // View your Google Spreadsheets 97 SpreadsheetsReadonlyScope = "https://www.googleapis.com/auth/spreadsheets.readonly" 98) 99 100// NewService creates a new Service. 101func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 102 scopesOption := option.WithScopes( 103 "https://www.googleapis.com/auth/drive", 104 "https://www.googleapis.com/auth/drive.file", 105 "https://www.googleapis.com/auth/drive.readonly", 106 "https://www.googleapis.com/auth/spreadsheets", 107 "https://www.googleapis.com/auth/spreadsheets.readonly", 108 ) 109 // NOTE: prepend, so we don't override user-specified scopes. 110 opts = append([]option.ClientOption{scopesOption}, opts...) 111 client, endpoint, err := htransport.NewClient(ctx, opts...) 112 if err != nil { 113 return nil, err 114 } 115 s, err := New(client) 116 if err != nil { 117 return nil, err 118 } 119 if endpoint != "" { 120 s.BasePath = endpoint 121 } 122 return s, nil 123} 124 125// New creates a new Service. It uses the provided http.Client for requests. 126// 127// Deprecated: please use NewService instead. 128// To provide a custom HTTP client, use option.WithHTTPClient. 129// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 130func New(client *http.Client) (*Service, error) { 131 if client == nil { 132 return nil, errors.New("client is nil") 133 } 134 s := &Service{client: client, BasePath: basePath} 135 s.Spreadsheets = NewSpreadsheetsService(s) 136 return s, nil 137} 138 139type Service struct { 140 client *http.Client 141 BasePath string // API endpoint base URL 142 UserAgent string // optional additional User-Agent fragment 143 144 Spreadsheets *SpreadsheetsService 145} 146 147func (s *Service) userAgent() string { 148 if s.UserAgent == "" { 149 return googleapi.UserAgent 150 } 151 return googleapi.UserAgent + " " + s.UserAgent 152} 153 154func NewSpreadsheetsService(s *Service) *SpreadsheetsService { 155 rs := &SpreadsheetsService{s: s} 156 rs.DeveloperMetadata = NewSpreadsheetsDeveloperMetadataService(s) 157 rs.Sheets = NewSpreadsheetsSheetsService(s) 158 rs.Values = NewSpreadsheetsValuesService(s) 159 return rs 160} 161 162type SpreadsheetsService struct { 163 s *Service 164 165 DeveloperMetadata *SpreadsheetsDeveloperMetadataService 166 167 Sheets *SpreadsheetsSheetsService 168 169 Values *SpreadsheetsValuesService 170} 171 172func NewSpreadsheetsDeveloperMetadataService(s *Service) *SpreadsheetsDeveloperMetadataService { 173 rs := &SpreadsheetsDeveloperMetadataService{s: s} 174 return rs 175} 176 177type SpreadsheetsDeveloperMetadataService struct { 178 s *Service 179} 180 181func NewSpreadsheetsSheetsService(s *Service) *SpreadsheetsSheetsService { 182 rs := &SpreadsheetsSheetsService{s: s} 183 return rs 184} 185 186type SpreadsheetsSheetsService struct { 187 s *Service 188} 189 190func NewSpreadsheetsValuesService(s *Service) *SpreadsheetsValuesService { 191 rs := &SpreadsheetsValuesService{s: s} 192 return rs 193} 194 195type SpreadsheetsValuesService struct { 196 s *Service 197} 198 199// AddBandingRequest: Adds a new banded range to the spreadsheet. 200type AddBandingRequest struct { 201 // BandedRange: The banded range to add. The bandedRangeId 202 // field is optional; if one is not set, an id will be randomly 203 // generated. (It 204 // is an error to specify the ID of a range that already exists.) 205 BandedRange *BandedRange `json:"bandedRange,omitempty"` 206 207 // ForceSendFields is a list of field names (e.g. "BandedRange") to 208 // unconditionally include in API requests. By default, fields with 209 // empty values are omitted from API requests. However, any non-pointer, 210 // non-interface field appearing in ForceSendFields will be sent to the 211 // server regardless of whether the field is empty or not. This may be 212 // used to include empty fields in Patch requests. 213 ForceSendFields []string `json:"-"` 214 215 // NullFields is a list of field names (e.g. "BandedRange") to include 216 // in API requests with the JSON null value. By default, fields with 217 // empty values are omitted from API requests. However, any field with 218 // an empty value appearing in NullFields will be sent to the server as 219 // null. It is an error if a field in this list has a non-empty value. 220 // This may be used to include null fields in Patch requests. 221 NullFields []string `json:"-"` 222} 223 224func (s *AddBandingRequest) MarshalJSON() ([]byte, error) { 225 type NoMethod AddBandingRequest 226 raw := NoMethod(*s) 227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 228} 229 230// AddBandingResponse: The result of adding a banded range. 231type AddBandingResponse struct { 232 // BandedRange: The banded range that was added. 233 BandedRange *BandedRange `json:"bandedRange,omitempty"` 234 235 // ForceSendFields is a list of field names (e.g. "BandedRange") to 236 // unconditionally include in API requests. By default, fields with 237 // empty values are omitted from API requests. However, any non-pointer, 238 // non-interface field appearing in ForceSendFields will be sent to the 239 // server regardless of whether the field is empty or not. This may be 240 // used to include empty fields in Patch requests. 241 ForceSendFields []string `json:"-"` 242 243 // NullFields is a list of field names (e.g. "BandedRange") to include 244 // in API requests with the JSON null value. By default, fields with 245 // empty values are omitted from API requests. However, any field with 246 // an empty value appearing in NullFields will be sent to the server as 247 // null. It is an error if a field in this list has a non-empty value. 248 // This may be used to include null fields in Patch requests. 249 NullFields []string `json:"-"` 250} 251 252func (s *AddBandingResponse) MarshalJSON() ([]byte, error) { 253 type NoMethod AddBandingResponse 254 raw := NoMethod(*s) 255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 256} 257 258// AddChartRequest: Adds a chart to a sheet in the spreadsheet. 259type AddChartRequest struct { 260 // Chart: The chart that should be added to the spreadsheet, including 261 // the position 262 // where it should be placed. The chartId 263 // field is optional; if one is not set, an id will be randomly 264 // generated. (It 265 // is an error to specify the ID of an embedded object that already 266 // exists.) 267 Chart *EmbeddedChart `json:"chart,omitempty"` 268 269 // ForceSendFields is a list of field names (e.g. "Chart") to 270 // unconditionally include in API requests. By default, fields with 271 // empty values are omitted from API requests. However, any non-pointer, 272 // non-interface field appearing in ForceSendFields will be sent to the 273 // server regardless of whether the field is empty or not. This may be 274 // used to include empty fields in Patch requests. 275 ForceSendFields []string `json:"-"` 276 277 // NullFields is a list of field names (e.g. "Chart") to include in API 278 // requests with the JSON null value. By default, fields with empty 279 // values are omitted from API requests. However, any field with an 280 // empty value appearing in NullFields will be sent to the server as 281 // null. It is an error if a field in this list has a non-empty value. 282 // This may be used to include null fields in Patch requests. 283 NullFields []string `json:"-"` 284} 285 286func (s *AddChartRequest) MarshalJSON() ([]byte, error) { 287 type NoMethod AddChartRequest 288 raw := NoMethod(*s) 289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 290} 291 292// AddChartResponse: The result of adding a chart to a spreadsheet. 293type AddChartResponse struct { 294 // Chart: The newly added chart. 295 Chart *EmbeddedChart `json:"chart,omitempty"` 296 297 // ForceSendFields is a list of field names (e.g. "Chart") to 298 // unconditionally include in API requests. By default, fields with 299 // empty values are omitted from API requests. However, any non-pointer, 300 // non-interface field appearing in ForceSendFields will be sent to the 301 // server regardless of whether the field is empty or not. This may be 302 // used to include empty fields in Patch requests. 303 ForceSendFields []string `json:"-"` 304 305 // NullFields is a list of field names (e.g. "Chart") to include in API 306 // requests with the JSON null value. By default, fields with empty 307 // values are omitted from API requests. However, any field with an 308 // empty value appearing in NullFields will be sent to the server as 309 // null. It is an error if a field in this list has a non-empty value. 310 // This may be used to include null fields in Patch requests. 311 NullFields []string `json:"-"` 312} 313 314func (s *AddChartResponse) MarshalJSON() ([]byte, error) { 315 type NoMethod AddChartResponse 316 raw := NoMethod(*s) 317 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 318} 319 320// AddConditionalFormatRuleRequest: Adds a new conditional format rule 321// at the given index. 322// All subsequent rules' indexes are incremented. 323type AddConditionalFormatRuleRequest struct { 324 // Index: The zero-based index where the rule should be inserted. 325 Index int64 `json:"index,omitempty"` 326 327 // Rule: The rule to add. 328 Rule *ConditionalFormatRule `json:"rule,omitempty"` 329 330 // ForceSendFields is a list of field names (e.g. "Index") to 331 // unconditionally include in API requests. By default, fields with 332 // empty values are omitted from API requests. However, any non-pointer, 333 // non-interface field appearing in ForceSendFields will be sent to the 334 // server regardless of whether the field is empty or not. This may be 335 // used to include empty fields in Patch requests. 336 ForceSendFields []string `json:"-"` 337 338 // NullFields is a list of field names (e.g. "Index") to include in API 339 // requests with the JSON null value. By default, fields with empty 340 // values are omitted from API requests. However, any field with an 341 // empty value appearing in NullFields will be sent to the server as 342 // null. It is an error if a field in this list has a non-empty value. 343 // This may be used to include null fields in Patch requests. 344 NullFields []string `json:"-"` 345} 346 347func (s *AddConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 348 type NoMethod AddConditionalFormatRuleRequest 349 raw := NoMethod(*s) 350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 351} 352 353// AddDimensionGroupRequest: Creates a group over the specified 354// range. 355// 356// If the requested range is a superset of the range of an existing 357// group G, 358// then the depth of G is incremented and this new group G' has 359// the 360// depth of that group. For example, a group [C:D, depth 1] + [B:E] 361// results in 362// groups [B:E, depth 1] and [C:D, depth 2]. 363// If the requested range is a subset of the range of an existing group 364// G, 365// then the depth of the new group G' becomes one greater than the depth 366// of G. 367// For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, 368// depth 1] 369// and [C:D, depth 2]. 370// If the requested range starts before and ends within, or starts 371// within and 372// ends after, the range of an existing group G, then the range of the 373// existing 374// group G becomes the union of the ranges, and the new group G' 375// has 376// depth one greater than the depth of G and range as the intersection 377// of the 378// ranges. For example, a group [B:D, depth 1] + [C:E] results in groups 379// [B:E, 380// depth 1] and [C:D, depth 2]. 381type AddDimensionGroupRequest struct { 382 // Range: The range over which to create a group. 383 Range *DimensionRange `json:"range,omitempty"` 384 385 // ForceSendFields is a list of field names (e.g. "Range") to 386 // unconditionally include in API requests. By default, fields with 387 // empty values are omitted from API requests. However, any non-pointer, 388 // non-interface field appearing in ForceSendFields will be sent to the 389 // server regardless of whether the field is empty or not. This may be 390 // used to include empty fields in Patch requests. 391 ForceSendFields []string `json:"-"` 392 393 // NullFields is a list of field names (e.g. "Range") to include in API 394 // requests with the JSON null value. By default, fields with empty 395 // values are omitted from API requests. However, any field with an 396 // empty value appearing in NullFields will be sent to the server as 397 // null. It is an error if a field in this list has a non-empty value. 398 // This may be used to include null fields in Patch requests. 399 NullFields []string `json:"-"` 400} 401 402func (s *AddDimensionGroupRequest) MarshalJSON() ([]byte, error) { 403 type NoMethod AddDimensionGroupRequest 404 raw := NoMethod(*s) 405 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 406} 407 408// AddDimensionGroupResponse: The result of adding a group. 409type AddDimensionGroupResponse struct { 410 // DimensionGroups: All groups of a dimension after adding a group to 411 // that dimension. 412 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 413 414 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 415 // unconditionally include in API requests. By default, fields with 416 // empty values are omitted from API requests. However, any non-pointer, 417 // non-interface field appearing in ForceSendFields will be sent to the 418 // server regardless of whether the field is empty or not. This may be 419 // used to include empty fields in Patch requests. 420 ForceSendFields []string `json:"-"` 421 422 // NullFields is a list of field names (e.g. "DimensionGroups") to 423 // include in API requests with the JSON null value. By default, fields 424 // with empty values are omitted from API requests. However, any field 425 // with an empty value appearing in NullFields will be sent to the 426 // server as null. It is an error if a field in this list has a 427 // non-empty value. This may be used to include null fields in Patch 428 // requests. 429 NullFields []string `json:"-"` 430} 431 432func (s *AddDimensionGroupResponse) MarshalJSON() ([]byte, error) { 433 type NoMethod AddDimensionGroupResponse 434 raw := NoMethod(*s) 435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 436} 437 438// AddFilterViewRequest: Adds a filter view. 439type AddFilterViewRequest struct { 440 // Filter: The filter to add. The filterViewId 441 // field is optional; if one is not set, an id will be randomly 442 // generated. (It 443 // is an error to specify the ID of a filter that already exists.) 444 Filter *FilterView `json:"filter,omitempty"` 445 446 // ForceSendFields is a list of field names (e.g. "Filter") to 447 // unconditionally include in API requests. By default, fields with 448 // empty values are omitted from API requests. However, any non-pointer, 449 // non-interface field appearing in ForceSendFields will be sent to the 450 // server regardless of whether the field is empty or not. This may be 451 // used to include empty fields in Patch requests. 452 ForceSendFields []string `json:"-"` 453 454 // NullFields is a list of field names (e.g. "Filter") to include in API 455 // requests with the JSON null value. By default, fields with empty 456 // values are omitted from API requests. However, any field with an 457 // empty value appearing in NullFields will be sent to the server as 458 // null. It is an error if a field in this list has a non-empty value. 459 // This may be used to include null fields in Patch requests. 460 NullFields []string `json:"-"` 461} 462 463func (s *AddFilterViewRequest) MarshalJSON() ([]byte, error) { 464 type NoMethod AddFilterViewRequest 465 raw := NoMethod(*s) 466 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 467} 468 469// AddFilterViewResponse: The result of adding a filter view. 470type AddFilterViewResponse struct { 471 // Filter: The newly added filter view. 472 Filter *FilterView `json:"filter,omitempty"` 473 474 // ForceSendFields is a list of field names (e.g. "Filter") to 475 // unconditionally include in API requests. By default, fields with 476 // empty values are omitted from API requests. However, any non-pointer, 477 // non-interface field appearing in ForceSendFields will be sent to the 478 // server regardless of whether the field is empty or not. This may be 479 // used to include empty fields in Patch requests. 480 ForceSendFields []string `json:"-"` 481 482 // NullFields is a list of field names (e.g. "Filter") to include in API 483 // requests with the JSON null value. By default, fields with empty 484 // values are omitted from API requests. However, any field with an 485 // empty value appearing in NullFields will be sent to the server as 486 // null. It is an error if a field in this list has a non-empty value. 487 // This may be used to include null fields in Patch requests. 488 NullFields []string `json:"-"` 489} 490 491func (s *AddFilterViewResponse) MarshalJSON() ([]byte, error) { 492 type NoMethod AddFilterViewResponse 493 raw := NoMethod(*s) 494 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 495} 496 497// AddNamedRangeRequest: Adds a named range to the spreadsheet. 498type AddNamedRangeRequest struct { 499 // NamedRange: The named range to add. The namedRangeId 500 // field is optional; if one is not set, an id will be randomly 501 // generated. (It 502 // is an error to specify the ID of a range that already exists.) 503 NamedRange *NamedRange `json:"namedRange,omitempty"` 504 505 // ForceSendFields is a list of field names (e.g. "NamedRange") to 506 // unconditionally include in API requests. By default, fields with 507 // empty values are omitted from API requests. However, any non-pointer, 508 // non-interface field appearing in ForceSendFields will be sent to the 509 // server regardless of whether the field is empty or not. This may be 510 // used to include empty fields in Patch requests. 511 ForceSendFields []string `json:"-"` 512 513 // NullFields is a list of field names (e.g. "NamedRange") to include in 514 // API requests with the JSON null value. By default, fields with empty 515 // values are omitted from API requests. However, any field with an 516 // empty value appearing in NullFields will be sent to the server as 517 // null. It is an error if a field in this list has a non-empty value. 518 // This may be used to include null fields in Patch requests. 519 NullFields []string `json:"-"` 520} 521 522func (s *AddNamedRangeRequest) MarshalJSON() ([]byte, error) { 523 type NoMethod AddNamedRangeRequest 524 raw := NoMethod(*s) 525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 526} 527 528// AddNamedRangeResponse: The result of adding a named range. 529type AddNamedRangeResponse struct { 530 // NamedRange: The named range to add. 531 NamedRange *NamedRange `json:"namedRange,omitempty"` 532 533 // ForceSendFields is a list of field names (e.g. "NamedRange") to 534 // unconditionally include in API requests. By default, fields with 535 // empty values are omitted from API requests. However, any non-pointer, 536 // non-interface field appearing in ForceSendFields will be sent to the 537 // server regardless of whether the field is empty or not. This may be 538 // used to include empty fields in Patch requests. 539 ForceSendFields []string `json:"-"` 540 541 // NullFields is a list of field names (e.g. "NamedRange") to include in 542 // API requests with the JSON null value. By default, fields with empty 543 // values are omitted from API requests. However, any field with an 544 // empty value appearing in NullFields will be sent to the server as 545 // null. It is an error if a field in this list has a non-empty value. 546 // This may be used to include null fields in Patch requests. 547 NullFields []string `json:"-"` 548} 549 550func (s *AddNamedRangeResponse) MarshalJSON() ([]byte, error) { 551 type NoMethod AddNamedRangeResponse 552 raw := NoMethod(*s) 553 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 554} 555 556// AddProtectedRangeRequest: Adds a new protected range. 557type AddProtectedRangeRequest struct { 558 // ProtectedRange: The protected range to be added. The 559 // protectedRangeId field is optional; if 560 // one is not set, an id will be randomly generated. (It is an error 561 // to 562 // specify the ID of a range that already exists.) 563 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 564 565 // ForceSendFields is a list of field names (e.g. "ProtectedRange") to 566 // unconditionally include in API requests. By default, fields with 567 // empty values are omitted from API requests. However, any non-pointer, 568 // non-interface field appearing in ForceSendFields will be sent to the 569 // server regardless of whether the field is empty or not. This may be 570 // used to include empty fields in Patch requests. 571 ForceSendFields []string `json:"-"` 572 573 // NullFields is a list of field names (e.g. "ProtectedRange") to 574 // include in API requests with the JSON null value. By default, fields 575 // with empty values are omitted from API requests. However, any field 576 // with an empty value appearing in NullFields will be sent to the 577 // server as null. It is an error if a field in this list has a 578 // non-empty value. This may be used to include null fields in Patch 579 // requests. 580 NullFields []string `json:"-"` 581} 582 583func (s *AddProtectedRangeRequest) MarshalJSON() ([]byte, error) { 584 type NoMethod AddProtectedRangeRequest 585 raw := NoMethod(*s) 586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 587} 588 589// AddProtectedRangeResponse: The result of adding a new protected 590// range. 591type AddProtectedRangeResponse struct { 592 // ProtectedRange: The newly added protected range. 593 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 594 595 // ForceSendFields is a list of field names (e.g. "ProtectedRange") to 596 // unconditionally include in API requests. By default, fields with 597 // empty values are omitted from API requests. However, any non-pointer, 598 // non-interface field appearing in ForceSendFields will be sent to the 599 // server regardless of whether the field is empty or not. This may be 600 // used to include empty fields in Patch requests. 601 ForceSendFields []string `json:"-"` 602 603 // NullFields is a list of field names (e.g. "ProtectedRange") to 604 // include in API requests with the JSON null value. By default, fields 605 // with empty values are omitted from API requests. However, any field 606 // with an empty value appearing in NullFields will be sent to the 607 // server as null. It is an error if a field in this list has a 608 // non-empty value. This may be used to include null fields in Patch 609 // requests. 610 NullFields []string `json:"-"` 611} 612 613func (s *AddProtectedRangeResponse) MarshalJSON() ([]byte, error) { 614 type NoMethod AddProtectedRangeResponse 615 raw := NoMethod(*s) 616 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 617} 618 619// AddSheetRequest: Adds a new sheet. 620// When a sheet is added at a given index, 621// all subsequent sheets' indexes are incremented. 622// To add an object sheet, use AddChartRequest instead and 623// specify 624// EmbeddedObjectPosition.sheetId or 625// EmbeddedObjectPosition.newSheet. 626type AddSheetRequest struct { 627 // Properties: The properties the new sheet should have. 628 // All properties are optional. 629 // The sheetId field is optional; if one is not 630 // set, an id will be randomly generated. (It is an error to specify the 631 // ID 632 // of a sheet that already exists.) 633 Properties *SheetProperties `json:"properties,omitempty"` 634 635 // ForceSendFields is a list of field names (e.g. "Properties") to 636 // unconditionally include in API requests. By default, fields with 637 // empty values are omitted from API requests. However, any non-pointer, 638 // non-interface field appearing in ForceSendFields will be sent to the 639 // server regardless of whether the field is empty or not. This may be 640 // used to include empty fields in Patch requests. 641 ForceSendFields []string `json:"-"` 642 643 // NullFields is a list of field names (e.g. "Properties") to include in 644 // API requests with the JSON null value. By default, fields with empty 645 // values are omitted from API requests. However, any field with an 646 // empty value appearing in NullFields will be sent to the server as 647 // null. It is an error if a field in this list has a non-empty value. 648 // This may be used to include null fields in Patch requests. 649 NullFields []string `json:"-"` 650} 651 652func (s *AddSheetRequest) MarshalJSON() ([]byte, error) { 653 type NoMethod AddSheetRequest 654 raw := NoMethod(*s) 655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 656} 657 658// AddSheetResponse: The result of adding a sheet. 659type AddSheetResponse struct { 660 // Properties: The properties of the newly added sheet. 661 Properties *SheetProperties `json:"properties,omitempty"` 662 663 // ForceSendFields is a list of field names (e.g. "Properties") to 664 // unconditionally include in API requests. By default, fields with 665 // empty values are omitted from API requests. However, any non-pointer, 666 // non-interface field appearing in ForceSendFields will be sent to the 667 // server regardless of whether the field is empty or not. This may be 668 // used to include empty fields in Patch requests. 669 ForceSendFields []string `json:"-"` 670 671 // NullFields is a list of field names (e.g. "Properties") to include in 672 // API requests with the JSON null value. By default, fields with empty 673 // values are omitted from API requests. However, any field with an 674 // empty value appearing in NullFields will be sent to the server as 675 // null. It is an error if a field in this list has a non-empty value. 676 // This may be used to include null fields in Patch requests. 677 NullFields []string `json:"-"` 678} 679 680func (s *AddSheetResponse) MarshalJSON() ([]byte, error) { 681 type NoMethod AddSheetResponse 682 raw := NoMethod(*s) 683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 684} 685 686// AddSlicerRequest: Adds a slicer to a sheet in the spreadsheet. 687type AddSlicerRequest struct { 688 // Slicer: The slicer that should be added to the spreadsheet, 689 // including 690 // the position where it should be placed. The slicerId field is 691 // optional; if one is not set, an id 692 // will be randomly generated. (It is an error to specify the ID 693 // of a slicer that already exists.) 694 Slicer *Slicer `json:"slicer,omitempty"` 695 696 // ForceSendFields is a list of field names (e.g. "Slicer") to 697 // unconditionally include in API requests. By default, fields with 698 // empty values are omitted from API requests. However, any non-pointer, 699 // non-interface field appearing in ForceSendFields will be sent to the 700 // server regardless of whether the field is empty or not. This may be 701 // used to include empty fields in Patch requests. 702 ForceSendFields []string `json:"-"` 703 704 // NullFields is a list of field names (e.g. "Slicer") to include in API 705 // requests with the JSON null value. By default, fields with empty 706 // values are omitted from API requests. However, any field with an 707 // empty value appearing in NullFields will be sent to the server as 708 // null. It is an error if a field in this list has a non-empty value. 709 // This may be used to include null fields in Patch requests. 710 NullFields []string `json:"-"` 711} 712 713func (s *AddSlicerRequest) MarshalJSON() ([]byte, error) { 714 type NoMethod AddSlicerRequest 715 raw := NoMethod(*s) 716 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 717} 718 719// AddSlicerResponse: The result of adding a slicer to a spreadsheet. 720type AddSlicerResponse struct { 721 // Slicer: The newly added slicer. 722 Slicer *Slicer `json:"slicer,omitempty"` 723 724 // ForceSendFields is a list of field names (e.g. "Slicer") to 725 // unconditionally include in API requests. By default, fields with 726 // empty values are omitted from API requests. However, any non-pointer, 727 // non-interface field appearing in ForceSendFields will be sent to the 728 // server regardless of whether the field is empty or not. This may be 729 // used to include empty fields in Patch requests. 730 ForceSendFields []string `json:"-"` 731 732 // NullFields is a list of field names (e.g. "Slicer") to include in API 733 // requests with the JSON null value. By default, fields with empty 734 // values are omitted from API requests. However, any field with an 735 // empty value appearing in NullFields will be sent to the server as 736 // null. It is an error if a field in this list has a non-empty value. 737 // This may be used to include null fields in Patch requests. 738 NullFields []string `json:"-"` 739} 740 741func (s *AddSlicerResponse) MarshalJSON() ([]byte, error) { 742 type NoMethod AddSlicerResponse 743 raw := NoMethod(*s) 744 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 745} 746 747// AppendCellsRequest: Adds new cells after the last row with data in a 748// sheet, 749// inserting new rows into the sheet if necessary. 750type AppendCellsRequest struct { 751 // Fields: The fields of CellData that should be updated. 752 // At least one field must be specified. 753 // The root is the CellData; 'row.values.' should not be specified. 754 // A single "*" can be used as short-hand for listing every field. 755 Fields string `json:"fields,omitempty"` 756 757 // Rows: The data to append. 758 Rows []*RowData `json:"rows,omitempty"` 759 760 // SheetId: The sheet ID to append the data to. 761 SheetId int64 `json:"sheetId,omitempty"` 762 763 // ForceSendFields is a list of field names (e.g. "Fields") to 764 // unconditionally include in API requests. By default, fields with 765 // empty values are omitted from API requests. However, any non-pointer, 766 // non-interface field appearing in ForceSendFields will be sent to the 767 // server regardless of whether the field is empty or not. This may be 768 // used to include empty fields in Patch requests. 769 ForceSendFields []string `json:"-"` 770 771 // NullFields is a list of field names (e.g. "Fields") to include in API 772 // requests with the JSON null value. By default, fields with empty 773 // values are omitted from API requests. However, any field with an 774 // empty value appearing in NullFields will be sent to the server as 775 // null. It is an error if a field in this list has a non-empty value. 776 // This may be used to include null fields in Patch requests. 777 NullFields []string `json:"-"` 778} 779 780func (s *AppendCellsRequest) MarshalJSON() ([]byte, error) { 781 type NoMethod AppendCellsRequest 782 raw := NoMethod(*s) 783 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 784} 785 786// AppendDimensionRequest: Appends rows or columns to the end of a 787// sheet. 788type AppendDimensionRequest struct { 789 // Dimension: Whether rows or columns should be appended. 790 // 791 // Possible values: 792 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 793 // "ROWS" - Operates on the rows of a sheet. 794 // "COLUMNS" - Operates on the columns of a sheet. 795 Dimension string `json:"dimension,omitempty"` 796 797 // Length: The number of rows or columns to append. 798 Length int64 `json:"length,omitempty"` 799 800 // SheetId: The sheet to append rows or columns to. 801 SheetId int64 `json:"sheetId,omitempty"` 802 803 // ForceSendFields is a list of field names (e.g. "Dimension") to 804 // unconditionally include in API requests. By default, fields with 805 // empty values are omitted from API requests. However, any non-pointer, 806 // non-interface field appearing in ForceSendFields will be sent to the 807 // server regardless of whether the field is empty or not. This may be 808 // used to include empty fields in Patch requests. 809 ForceSendFields []string `json:"-"` 810 811 // NullFields is a list of field names (e.g. "Dimension") to include in 812 // API requests with the JSON null value. By default, fields with empty 813 // values are omitted from API requests. However, any field with an 814 // empty value appearing in NullFields will be sent to the server as 815 // null. It is an error if a field in this list has a non-empty value. 816 // This may be used to include null fields in Patch requests. 817 NullFields []string `json:"-"` 818} 819 820func (s *AppendDimensionRequest) MarshalJSON() ([]byte, error) { 821 type NoMethod AppendDimensionRequest 822 raw := NoMethod(*s) 823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 824} 825 826// AppendValuesResponse: The response when updating a range of values in 827// a spreadsheet. 828type AppendValuesResponse struct { 829 // SpreadsheetId: The spreadsheet the updates were applied to. 830 SpreadsheetId string `json:"spreadsheetId,omitempty"` 831 832 // TableRange: The range (in A1 notation) of the table that values are 833 // being appended to 834 // (before the values were appended). 835 // Empty if no table was found. 836 TableRange string `json:"tableRange,omitempty"` 837 838 // Updates: Information about the updates that were applied. 839 Updates *UpdateValuesResponse `json:"updates,omitempty"` 840 841 // ServerResponse contains the HTTP response code and headers from the 842 // server. 843 googleapi.ServerResponse `json:"-"` 844 845 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 846 // unconditionally include in API requests. By default, fields with 847 // empty values are omitted from API requests. However, any non-pointer, 848 // non-interface field appearing in ForceSendFields will be sent to the 849 // server regardless of whether the field is empty or not. This may be 850 // used to include empty fields in Patch requests. 851 ForceSendFields []string `json:"-"` 852 853 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 854 // in API requests with the JSON null value. By default, fields with 855 // empty values are omitted from API requests. However, any field with 856 // an empty value appearing in NullFields will be sent to the server as 857 // null. It is an error if a field in this list has a non-empty value. 858 // This may be used to include null fields in Patch requests. 859 NullFields []string `json:"-"` 860} 861 862func (s *AppendValuesResponse) MarshalJSON() ([]byte, error) { 863 type NoMethod AppendValuesResponse 864 raw := NoMethod(*s) 865 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 866} 867 868// AutoFillRequest: Fills in more data based on existing data. 869type AutoFillRequest struct { 870 // Range: The range to autofill. This will examine the range and 871 // detect 872 // the location that has data and automatically fill that data 873 // in to the rest of the range. 874 Range *GridRange `json:"range,omitempty"` 875 876 // SourceAndDestination: The source and destination areas to 877 // autofill. 878 // This explicitly lists the source of the autofill and where to 879 // extend that data. 880 SourceAndDestination *SourceAndDestination `json:"sourceAndDestination,omitempty"` 881 882 // UseAlternateSeries: True if we should generate data with the 883 // "alternate" series. 884 // This differs based on the type and amount of source data. 885 UseAlternateSeries bool `json:"useAlternateSeries,omitempty"` 886 887 // ForceSendFields is a list of field names (e.g. "Range") to 888 // unconditionally include in API requests. By default, fields with 889 // empty values are omitted from API requests. However, any non-pointer, 890 // non-interface field appearing in ForceSendFields will be sent to the 891 // server regardless of whether the field is empty or not. This may be 892 // used to include empty fields in Patch requests. 893 ForceSendFields []string `json:"-"` 894 895 // NullFields is a list of field names (e.g. "Range") to include in API 896 // requests with the JSON null value. By default, fields with empty 897 // values are omitted from API requests. However, any field with an 898 // empty value appearing in NullFields will be sent to the server as 899 // null. It is an error if a field in this list has a non-empty value. 900 // This may be used to include null fields in Patch requests. 901 NullFields []string `json:"-"` 902} 903 904func (s *AutoFillRequest) MarshalJSON() ([]byte, error) { 905 type NoMethod AutoFillRequest 906 raw := NoMethod(*s) 907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 908} 909 910// AutoResizeDimensionsRequest: Automatically resizes one or more 911// dimensions based on the contents 912// of the cells in that dimension. 913type AutoResizeDimensionsRequest struct { 914 // Dimensions: The dimensions to automatically resize. 915 Dimensions *DimensionRange `json:"dimensions,omitempty"` 916 917 // ForceSendFields is a list of field names (e.g. "Dimensions") to 918 // unconditionally include in API requests. By default, fields with 919 // empty values are omitted from API requests. However, any non-pointer, 920 // non-interface field appearing in ForceSendFields will be sent to the 921 // server regardless of whether the field is empty or not. This may be 922 // used to include empty fields in Patch requests. 923 ForceSendFields []string `json:"-"` 924 925 // NullFields is a list of field names (e.g. "Dimensions") to include in 926 // API requests with the JSON null value. By default, fields with empty 927 // values are omitted from API requests. However, any field with an 928 // empty value appearing in NullFields will be sent to the server as 929 // null. It is an error if a field in this list has a non-empty value. 930 // This may be used to include null fields in Patch requests. 931 NullFields []string `json:"-"` 932} 933 934func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) { 935 type NoMethod AutoResizeDimensionsRequest 936 raw := NoMethod(*s) 937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 938} 939 940// BandedRange: A banded (alternating colors) range in a sheet. 941type BandedRange struct { 942 // BandedRangeId: The id of the banded range. 943 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 944 945 // ColumnProperties: Properties for column bands. These properties are 946 // applied on a column- 947 // by-column basis throughout all the columns in the range. At least one 948 // of 949 // row_properties or column_properties must be specified. 950 ColumnProperties *BandingProperties `json:"columnProperties,omitempty"` 951 952 // Range: The range over which these properties are applied. 953 Range *GridRange `json:"range,omitempty"` 954 955 // RowProperties: Properties for row bands. These properties are applied 956 // on a row-by-row 957 // basis throughout all the rows in the range. At least one 958 // of 959 // row_properties or column_properties must be specified. 960 RowProperties *BandingProperties `json:"rowProperties,omitempty"` 961 962 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 963 // unconditionally include in API requests. By default, fields with 964 // empty values are omitted from API requests. However, any non-pointer, 965 // non-interface field appearing in ForceSendFields will be sent to the 966 // server regardless of whether the field is empty or not. This may be 967 // used to include empty fields in Patch requests. 968 ForceSendFields []string `json:"-"` 969 970 // NullFields is a list of field names (e.g. "BandedRangeId") to include 971 // in API requests with the JSON null value. By default, fields with 972 // empty values are omitted from API requests. However, any field with 973 // an empty value appearing in NullFields will be sent to the server as 974 // null. It is an error if a field in this list has a non-empty value. 975 // This may be used to include null fields in Patch requests. 976 NullFields []string `json:"-"` 977} 978 979func (s *BandedRange) MarshalJSON() ([]byte, error) { 980 type NoMethod BandedRange 981 raw := NoMethod(*s) 982 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 983} 984 985// BandingProperties: Properties referring a single dimension (either 986// row or column). If both 987// BandedRange.row_properties and BandedRange.column_properties are 988// set, the fill colors are applied to cells according to the following 989// rules: 990// 991// * header_color and footer_color take priority over band colors. 992// * first_band_color takes priority over second_band_color. 993// * row_properties takes priority over column_properties. 994// 995// For example, the first row color takes priority over the first 996// column 997// color, but the first column color takes priority over the second row 998// color. 999// Similarly, the row header takes priority over the column header in 1000// the 1001// top left cell, but the column header takes priority over the first 1002// row 1003// color if the row header is not set. 1004type BandingProperties struct { 1005 // FirstBandColor: The first color that is alternating. (Required) 1006 FirstBandColor *Color `json:"firstBandColor,omitempty"` 1007 1008 // FooterColor: The color of the last row or column. If this field is 1009 // not set, the last 1010 // row or column will be filled with either first_band_color 1011 // or 1012 // second_band_color, depending on the color of the previous row 1013 // or 1014 // column. 1015 FooterColor *Color `json:"footerColor,omitempty"` 1016 1017 // HeaderColor: The color of the first row or column. If this field is 1018 // set, the first 1019 // row or column will be filled with this color and the colors 1020 // will 1021 // alternate between first_band_color and second_band_color 1022 // starting 1023 // from the second row or column. Otherwise, the first row or column 1024 // will be 1025 // filled with first_band_color and the colors will proceed to 1026 // alternate 1027 // as they normally would. 1028 HeaderColor *Color `json:"headerColor,omitempty"` 1029 1030 // SecondBandColor: The second color that is alternating. (Required) 1031 SecondBandColor *Color `json:"secondBandColor,omitempty"` 1032 1033 // ForceSendFields is a list of field names (e.g. "FirstBandColor") to 1034 // unconditionally include in API requests. By default, fields with 1035 // empty values are omitted from API requests. However, any non-pointer, 1036 // non-interface field appearing in ForceSendFields will be sent to the 1037 // server regardless of whether the field is empty or not. This may be 1038 // used to include empty fields in Patch requests. 1039 ForceSendFields []string `json:"-"` 1040 1041 // NullFields is a list of field names (e.g. "FirstBandColor") to 1042 // include in API requests with the JSON null value. By default, fields 1043 // with empty values are omitted from API requests. However, any field 1044 // with an empty value appearing in NullFields will be sent to the 1045 // server as null. It is an error if a field in this list has a 1046 // non-empty value. This may be used to include null fields in Patch 1047 // requests. 1048 NullFields []string `json:"-"` 1049} 1050 1051func (s *BandingProperties) MarshalJSON() ([]byte, error) { 1052 type NoMethod BandingProperties 1053 raw := NoMethod(*s) 1054 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1055} 1056 1057// BaselineValueFormat: Formatting options for baseline value. 1058type BaselineValueFormat struct { 1059 // ComparisonType: The comparison type of key value with baseline value. 1060 // 1061 // Possible values: 1062 // "COMPARISON_TYPE_UNDEFINED" - Default value, do not use. 1063 // "ABSOLUTE_DIFFERENCE" - Use absolute difference between key and 1064 // baseline value. 1065 // "PERCENTAGE_DIFFERENCE" - Use percentage difference between key and 1066 // baseline value. 1067 ComparisonType string `json:"comparisonType,omitempty"` 1068 1069 // Description: Description which is appended after the baseline 1070 // value. 1071 // This field is optional. 1072 Description string `json:"description,omitempty"` 1073 1074 // NegativeColor: Color to be used, in case baseline value represents a 1075 // negative change for 1076 // key value. This field is optional. 1077 NegativeColor *Color `json:"negativeColor,omitempty"` 1078 1079 // Position: Specifies the horizontal text positioning of baseline 1080 // value. 1081 // This field is optional. If not specified, default positioning is 1082 // used. 1083 Position *TextPosition `json:"position,omitempty"` 1084 1085 // PositiveColor: Color to be used, in case baseline value represents a 1086 // positive change for 1087 // key value. This field is optional. 1088 PositiveColor *Color `json:"positiveColor,omitempty"` 1089 1090 // TextFormat: Text formatting options for baseline value. 1091 TextFormat *TextFormat `json:"textFormat,omitempty"` 1092 1093 // ForceSendFields is a list of field names (e.g. "ComparisonType") to 1094 // unconditionally include in API requests. By default, fields with 1095 // empty values are omitted from API requests. However, any non-pointer, 1096 // non-interface field appearing in ForceSendFields will be sent to the 1097 // server regardless of whether the field is empty or not. This may be 1098 // used to include empty fields in Patch requests. 1099 ForceSendFields []string `json:"-"` 1100 1101 // NullFields is a list of field names (e.g. "ComparisonType") to 1102 // include in API requests with the JSON null value. By default, fields 1103 // with empty values are omitted from API requests. However, any field 1104 // with an empty value appearing in NullFields will be sent to the 1105 // server as null. It is an error if a field in this list has a 1106 // non-empty value. This may be used to include null fields in Patch 1107 // requests. 1108 NullFields []string `json:"-"` 1109} 1110 1111func (s *BaselineValueFormat) MarshalJSON() ([]byte, error) { 1112 type NoMethod BaselineValueFormat 1113 raw := NoMethod(*s) 1114 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1115} 1116 1117// BasicChartAxis: An axis of the chart. 1118// A chart may not have more than one axis per 1119// axis position. 1120type BasicChartAxis struct { 1121 // Format: The format of the title. 1122 // Only valid if the axis is not associated with the domain. 1123 Format *TextFormat `json:"format,omitempty"` 1124 1125 // Position: The position of this axis. 1126 // 1127 // Possible values: 1128 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1129 // use. 1130 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. 1131 // For most charts, this is the standard major axis. 1132 // For bar charts, this is a minor axis. 1133 // "LEFT_AXIS" - The axis rendered at the left of a chart. 1134 // For most charts, this is a minor axis. 1135 // For bar charts, this is the standard major axis. 1136 // "RIGHT_AXIS" - The axis rendered at the right of a chart. 1137 // For most charts, this is a minor axis. 1138 // For bar charts, this is an unusual major axis. 1139 Position string `json:"position,omitempty"` 1140 1141 // Title: The title of this axis. If set, this overrides any title 1142 // inferred 1143 // from headers of the data. 1144 Title string `json:"title,omitempty"` 1145 1146 // TitleTextPosition: The axis title text position. 1147 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 1148 1149 // ViewWindowOptions: The view window options for this axis. 1150 ViewWindowOptions *ChartAxisViewWindowOptions `json:"viewWindowOptions,omitempty"` 1151 1152 // ForceSendFields is a list of field names (e.g. "Format") to 1153 // unconditionally include in API requests. By default, fields with 1154 // empty values are omitted from API requests. However, any non-pointer, 1155 // non-interface field appearing in ForceSendFields will be sent to the 1156 // server regardless of whether the field is empty or not. This may be 1157 // used to include empty fields in Patch requests. 1158 ForceSendFields []string `json:"-"` 1159 1160 // NullFields is a list of field names (e.g. "Format") to include in API 1161 // requests with the JSON null value. By default, fields with empty 1162 // values are omitted from API requests. However, any field with an 1163 // empty value appearing in NullFields will be sent to the server as 1164 // null. It is an error if a field in this list has a non-empty value. 1165 // This may be used to include null fields in Patch requests. 1166 NullFields []string `json:"-"` 1167} 1168 1169func (s *BasicChartAxis) MarshalJSON() ([]byte, error) { 1170 type NoMethod BasicChartAxis 1171 raw := NoMethod(*s) 1172 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1173} 1174 1175// BasicChartDomain: The domain of a chart. 1176// For example, if charting stock prices over time, this would be the 1177// date. 1178type BasicChartDomain struct { 1179 // Domain: The data of the domain. For example, if charting stock prices 1180 // over time, 1181 // this is the data representing the dates. 1182 Domain *ChartData `json:"domain,omitempty"` 1183 1184 // Reversed: True to reverse the order of the domain values (horizontal 1185 // axis). 1186 Reversed bool `json:"reversed,omitempty"` 1187 1188 // ForceSendFields is a list of field names (e.g. "Domain") to 1189 // unconditionally include in API requests. By default, fields with 1190 // empty values are omitted from API requests. However, any non-pointer, 1191 // non-interface field appearing in ForceSendFields will be sent to the 1192 // server regardless of whether the field is empty or not. This may be 1193 // used to include empty fields in Patch requests. 1194 ForceSendFields []string `json:"-"` 1195 1196 // NullFields is a list of field names (e.g. "Domain") to include in API 1197 // requests with the JSON null value. By default, fields with empty 1198 // values are omitted from API requests. However, any field with an 1199 // empty value appearing in NullFields will be sent to the server as 1200 // null. It is an error if a field in this list has a non-empty value. 1201 // This may be used to include null fields in Patch requests. 1202 NullFields []string `json:"-"` 1203} 1204 1205func (s *BasicChartDomain) MarshalJSON() ([]byte, error) { 1206 type NoMethod BasicChartDomain 1207 raw := NoMethod(*s) 1208 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1209} 1210 1211// BasicChartSeries: A single series of data in a chart. 1212// For example, if charting stock prices over time, multiple series may 1213// exist, 1214// one for the "Open Price", "High Price", "Low Price" and "Close 1215// Price". 1216type BasicChartSeries struct { 1217 // Color: The color for elements (i.e. bars, lines, points) associated 1218 // with this 1219 // series. If empty, a default color is used. 1220 Color *Color `json:"color,omitempty"` 1221 1222 // LineStyle: The line style of this series. Valid only if the 1223 // chartType is AREA, 1224 // LINE, or SCATTER. 1225 // COMBO charts are also supported if the 1226 // series chart type is 1227 // AREA or LINE. 1228 LineStyle *LineStyle `json:"lineStyle,omitempty"` 1229 1230 // Series: The data being visualized in this chart series. 1231 Series *ChartData `json:"series,omitempty"` 1232 1233 // TargetAxis: The minor axis that will specify the range of values for 1234 // this series. 1235 // For example, if charting stocks over time, the "Volume" series 1236 // may want to be pinned to the right with the prices pinned to the 1237 // left, 1238 // because the scale of trading volume is different than the scale 1239 // of 1240 // prices. 1241 // It is an error to specify an axis that isn't a valid minor axis 1242 // for the chart's type. 1243 // 1244 // Possible values: 1245 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1246 // use. 1247 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. 1248 // For most charts, this is the standard major axis. 1249 // For bar charts, this is a minor axis. 1250 // "LEFT_AXIS" - The axis rendered at the left of a chart. 1251 // For most charts, this is a minor axis. 1252 // For bar charts, this is the standard major axis. 1253 // "RIGHT_AXIS" - The axis rendered at the right of a chart. 1254 // For most charts, this is a minor axis. 1255 // For bar charts, this is an unusual major axis. 1256 TargetAxis string `json:"targetAxis,omitempty"` 1257 1258 // Type: The type of this series. Valid only if the 1259 // chartType is 1260 // COMBO. 1261 // Different types will change the way the series is visualized. 1262 // Only LINE, AREA, 1263 // and COLUMN are supported. 1264 // 1265 // Possible values: 1266 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1267 // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar 1268 // chart</a>. 1269 // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line 1270 // chart</a>. 1271 // "AREA" - An <a 1272 // href="/chart/interactive/docs/gallery/areachart">area chart</a>. 1273 // "COLUMN" - A <a 1274 // href="/chart/interactive/docs/gallery/columnchart">column chart</a>. 1275 // "SCATTER" - A <a 1276 // href="/chart/interactive/docs/gallery/scatterchart">scatter 1277 // chart</a>. 1278 // "COMBO" - A <a 1279 // href="/chart/interactive/docs/gallery/combochart">combo chart</a>. 1280 // "STEPPED_AREA" - A <a 1281 // href="/chart/interactive/docs/gallery/steppedareachart">stepped 1282 // area 1283 // chart</a>. 1284 Type string `json:"type,omitempty"` 1285 1286 // ForceSendFields is a list of field names (e.g. "Color") to 1287 // unconditionally include in API requests. By default, fields with 1288 // empty values are omitted from API requests. However, any non-pointer, 1289 // non-interface field appearing in ForceSendFields will be sent to the 1290 // server regardless of whether the field is empty or not. This may be 1291 // used to include empty fields in Patch requests. 1292 ForceSendFields []string `json:"-"` 1293 1294 // NullFields is a list of field names (e.g. "Color") to include in API 1295 // requests with the JSON null value. By default, fields with empty 1296 // values are omitted from API requests. However, any field with an 1297 // empty value appearing in NullFields will be sent to the server as 1298 // null. It is an error if a field in this list has a non-empty value. 1299 // This may be used to include null fields in Patch requests. 1300 NullFields []string `json:"-"` 1301} 1302 1303func (s *BasicChartSeries) MarshalJSON() ([]byte, error) { 1304 type NoMethod BasicChartSeries 1305 raw := NoMethod(*s) 1306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1307} 1308 1309// BasicChartSpec: The specification for a basic chart. See 1310// BasicChartType for the list 1311// of charts this supports. 1312type BasicChartSpec struct { 1313 // Axis: The axis on the chart. 1314 Axis []*BasicChartAxis `json:"axis,omitempty"` 1315 1316 // ChartType: The type of the chart. 1317 // 1318 // Possible values: 1319 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1320 // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar 1321 // chart</a>. 1322 // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line 1323 // chart</a>. 1324 // "AREA" - An <a 1325 // href="/chart/interactive/docs/gallery/areachart">area chart</a>. 1326 // "COLUMN" - A <a 1327 // href="/chart/interactive/docs/gallery/columnchart">column chart</a>. 1328 // "SCATTER" - A <a 1329 // href="/chart/interactive/docs/gallery/scatterchart">scatter 1330 // chart</a>. 1331 // "COMBO" - A <a 1332 // href="/chart/interactive/docs/gallery/combochart">combo chart</a>. 1333 // "STEPPED_AREA" - A <a 1334 // href="/chart/interactive/docs/gallery/steppedareachart">stepped 1335 // area 1336 // chart</a>. 1337 ChartType string `json:"chartType,omitempty"` 1338 1339 // CompareMode: The behavior of tooltips and data highlighting when 1340 // hovering on data and 1341 // chart area. 1342 // 1343 // Possible values: 1344 // "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" - Default value, do not use. 1345 // "DATUM" - Only the focused data element is highlighted and shown in 1346 // the tooltip. 1347 // "CATEGORY" - All data elements with the same category (e.g., domain 1348 // value) are 1349 // highlighted and shown in the tooltip. 1350 CompareMode string `json:"compareMode,omitempty"` 1351 1352 // Domains: The domain of data this is charting. 1353 // Only a single domain is supported. 1354 Domains []*BasicChartDomain `json:"domains,omitempty"` 1355 1356 // HeaderCount: The number of rows or columns in the data that are 1357 // "headers". 1358 // If not set, Google Sheets will guess how many rows are headers 1359 // based 1360 // on the data. 1361 // 1362 // (Note that BasicChartAxis.title may override the axis title 1363 // inferred from the header values.) 1364 HeaderCount int64 `json:"headerCount,omitempty"` 1365 1366 // InterpolateNulls: If some values in a series are missing, gaps may 1367 // appear in the chart (e.g, 1368 // segments of lines in a line chart will be missing). To eliminate 1369 // these 1370 // gaps set this to true. 1371 // Applies to Line, Area, and Combo charts. 1372 InterpolateNulls bool `json:"interpolateNulls,omitempty"` 1373 1374 // LegendPosition: The position of the chart legend. 1375 // 1376 // Possible values: 1377 // "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 1378 // use. 1379 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 1380 // chart. 1381 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 1382 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 1383 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 1384 // "NO_LEGEND" - No legend is rendered. 1385 LegendPosition string `json:"legendPosition,omitempty"` 1386 1387 // LineSmoothing: Gets whether all lines should be rendered smooth or 1388 // straight by default. 1389 // Applies to Line charts. 1390 LineSmoothing bool `json:"lineSmoothing,omitempty"` 1391 1392 // Series: The data this chart is visualizing. 1393 Series []*BasicChartSeries `json:"series,omitempty"` 1394 1395 // StackedType: The stacked type for charts that support vertical 1396 // stacking. 1397 // Applies to Area, Bar, Column, Combo, and Stepped Area charts. 1398 // 1399 // Possible values: 1400 // "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 1401 // "NOT_STACKED" - Series are not stacked. 1402 // "STACKED" - Series values are stacked, each value is rendered 1403 // vertically beginning 1404 // from the top of the value below it. 1405 // "PERCENT_STACKED" - Vertical stacks are stretched to reach the top 1406 // of the chart, with 1407 // values laid out as percentages of each other. 1408 StackedType string `json:"stackedType,omitempty"` 1409 1410 // ThreeDimensional: True to make the chart 3D. 1411 // Applies to Bar and Column charts. 1412 ThreeDimensional bool `json:"threeDimensional,omitempty"` 1413 1414 // ForceSendFields is a list of field names (e.g. "Axis") to 1415 // unconditionally include in API requests. By default, fields with 1416 // empty values are omitted from API requests. However, any non-pointer, 1417 // non-interface field appearing in ForceSendFields will be sent to the 1418 // server regardless of whether the field is empty or not. This may be 1419 // used to include empty fields in Patch requests. 1420 ForceSendFields []string `json:"-"` 1421 1422 // NullFields is a list of field names (e.g. "Axis") to include in API 1423 // requests with the JSON null value. By default, fields with empty 1424 // values are omitted from API requests. However, any field with an 1425 // empty value appearing in NullFields will be sent to the server as 1426 // null. It is an error if a field in this list has a non-empty value. 1427 // This may be used to include null fields in Patch requests. 1428 NullFields []string `json:"-"` 1429} 1430 1431func (s *BasicChartSpec) MarshalJSON() ([]byte, error) { 1432 type NoMethod BasicChartSpec 1433 raw := NoMethod(*s) 1434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1435} 1436 1437// BasicFilter: The default filter associated with a sheet. 1438type BasicFilter struct { 1439 // Criteria: The criteria for showing/hiding values per column. 1440 // The map's key is the column index, and the value is the criteria 1441 // for 1442 // that column. 1443 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 1444 1445 // Range: The range the filter covers. 1446 Range *GridRange `json:"range,omitempty"` 1447 1448 // SortSpecs: The sort order per column. Later specifications are used 1449 // when values 1450 // are equal in the earlier specifications. 1451 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 1452 1453 // ForceSendFields is a list of field names (e.g. "Criteria") to 1454 // unconditionally include in API requests. By default, fields with 1455 // empty values are omitted from API requests. However, any non-pointer, 1456 // non-interface field appearing in ForceSendFields will be sent to the 1457 // server regardless of whether the field is empty or not. This may be 1458 // used to include empty fields in Patch requests. 1459 ForceSendFields []string `json:"-"` 1460 1461 // NullFields is a list of field names (e.g. "Criteria") to include in 1462 // API requests with the JSON null value. By default, fields with empty 1463 // values are omitted from API requests. However, any field with an 1464 // empty value appearing in NullFields will be sent to the server as 1465 // null. It is an error if a field in this list has a non-empty value. 1466 // This may be used to include null fields in Patch requests. 1467 NullFields []string `json:"-"` 1468} 1469 1470func (s *BasicFilter) MarshalJSON() ([]byte, error) { 1471 type NoMethod BasicFilter 1472 raw := NoMethod(*s) 1473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1474} 1475 1476// BatchClearValuesByDataFilterRequest: The request for clearing more 1477// than one range selected by a 1478// DataFilter in a spreadsheet. 1479type BatchClearValuesByDataFilterRequest struct { 1480 // DataFilters: The DataFilters used to determine which ranges to clear. 1481 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1482 1483 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1484 // unconditionally include in API requests. By default, fields with 1485 // empty values are omitted from API requests. However, any non-pointer, 1486 // non-interface field appearing in ForceSendFields will be sent to the 1487 // server regardless of whether the field is empty or not. This may be 1488 // used to include empty fields in Patch requests. 1489 ForceSendFields []string `json:"-"` 1490 1491 // NullFields is a list of field names (e.g. "DataFilters") to include 1492 // in API requests with the JSON null value. By default, fields with 1493 // empty values are omitted from API requests. However, any field with 1494 // an empty value appearing in NullFields will be sent to the server as 1495 // null. It is an error if a field in this list has a non-empty value. 1496 // This may be used to include null fields in Patch requests. 1497 NullFields []string `json:"-"` 1498} 1499 1500func (s *BatchClearValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1501 type NoMethod BatchClearValuesByDataFilterRequest 1502 raw := NoMethod(*s) 1503 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1504} 1505 1506// BatchClearValuesByDataFilterResponse: The response when clearing a 1507// range of values selected with 1508// DataFilters in a spreadsheet. 1509type BatchClearValuesByDataFilterResponse struct { 1510 // ClearedRanges: The ranges that were cleared, in A1 notation. 1511 // (If the requests were for an unbounded range or a ranger larger 1512 // than the bounds of the sheet, this will be the actual ranges 1513 // that were cleared, bounded to the sheet's limits.) 1514 ClearedRanges []string `json:"clearedRanges,omitempty"` 1515 1516 // SpreadsheetId: The spreadsheet the updates were applied to. 1517 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1518 1519 // ServerResponse contains the HTTP response code and headers from the 1520 // server. 1521 googleapi.ServerResponse `json:"-"` 1522 1523 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1524 // unconditionally include in API requests. By default, fields with 1525 // empty values are omitted from API requests. However, any non-pointer, 1526 // non-interface field appearing in ForceSendFields will be sent to the 1527 // server regardless of whether the field is empty or not. This may be 1528 // used to include empty fields in Patch requests. 1529 ForceSendFields []string `json:"-"` 1530 1531 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1532 // in API requests with the JSON null value. By default, fields with 1533 // empty values are omitted from API requests. However, any field with 1534 // an empty value appearing in NullFields will be sent to the server as 1535 // null. It is an error if a field in this list has a non-empty value. 1536 // This may be used to include null fields in Patch requests. 1537 NullFields []string `json:"-"` 1538} 1539 1540func (s *BatchClearValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1541 type NoMethod BatchClearValuesByDataFilterResponse 1542 raw := NoMethod(*s) 1543 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1544} 1545 1546// BatchClearValuesRequest: The request for clearing more than one range 1547// of values in a spreadsheet. 1548type BatchClearValuesRequest struct { 1549 // Ranges: The ranges to clear, in A1 notation. 1550 Ranges []string `json:"ranges,omitempty"` 1551 1552 // ForceSendFields is a list of field names (e.g. "Ranges") to 1553 // unconditionally include in API requests. By default, fields with 1554 // empty values are omitted from API requests. However, any non-pointer, 1555 // non-interface field appearing in ForceSendFields will be sent to the 1556 // server regardless of whether the field is empty or not. This may be 1557 // used to include empty fields in Patch requests. 1558 ForceSendFields []string `json:"-"` 1559 1560 // NullFields is a list of field names (e.g. "Ranges") to include in API 1561 // requests with the JSON null value. By default, fields with empty 1562 // values are omitted from API requests. However, any field with an 1563 // empty value appearing in NullFields will be sent to the server as 1564 // null. It is an error if a field in this list has a non-empty value. 1565 // This may be used to include null fields in Patch requests. 1566 NullFields []string `json:"-"` 1567} 1568 1569func (s *BatchClearValuesRequest) MarshalJSON() ([]byte, error) { 1570 type NoMethod BatchClearValuesRequest 1571 raw := NoMethod(*s) 1572 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1573} 1574 1575// BatchClearValuesResponse: The response when clearing a range of 1576// values in a spreadsheet. 1577type BatchClearValuesResponse struct { 1578 // ClearedRanges: The ranges that were cleared, in A1 notation. 1579 // (If the requests were for an unbounded range or a ranger larger 1580 // than the bounds of the sheet, this will be the actual ranges 1581 // that were cleared, bounded to the sheet's limits.) 1582 ClearedRanges []string `json:"clearedRanges,omitempty"` 1583 1584 // SpreadsheetId: The spreadsheet the updates were applied to. 1585 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1586 1587 // ServerResponse contains the HTTP response code and headers from the 1588 // server. 1589 googleapi.ServerResponse `json:"-"` 1590 1591 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1592 // unconditionally include in API requests. By default, fields with 1593 // empty values are omitted from API requests. However, any non-pointer, 1594 // non-interface field appearing in ForceSendFields will be sent to the 1595 // server regardless of whether the field is empty or not. This may be 1596 // used to include empty fields in Patch requests. 1597 ForceSendFields []string `json:"-"` 1598 1599 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1600 // in API requests with the JSON null value. By default, fields with 1601 // empty values are omitted from API requests. However, any field with 1602 // an empty value appearing in NullFields will be sent to the server as 1603 // null. It is an error if a field in this list has a non-empty value. 1604 // This may be used to include null fields in Patch requests. 1605 NullFields []string `json:"-"` 1606} 1607 1608func (s *BatchClearValuesResponse) MarshalJSON() ([]byte, error) { 1609 type NoMethod BatchClearValuesResponse 1610 raw := NoMethod(*s) 1611 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1612} 1613 1614// BatchGetValuesByDataFilterRequest: The request for retrieving a range 1615// of values in a spreadsheet selected by a 1616// set of DataFilters. 1617type BatchGetValuesByDataFilterRequest struct { 1618 // DataFilters: The data filters used to match the ranges of values to 1619 // retrieve. Ranges 1620 // that match any of the specified data filters will be included in 1621 // the 1622 // response. 1623 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1624 1625 // DateTimeRenderOption: How dates, times, and durations should be 1626 // represented in the output. 1627 // This is ignored if value_render_option is 1628 // FORMATTED_VALUE. 1629 // The default dateTime render option is 1630 // [DateTimeRenderOption.SERIAL_NUMBER]. 1631 // 1632 // Possible values: 1633 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1634 // fields to be output 1635 // as doubles in "serial number" format, as popularized by Lotus 1636 // 1-2-3. 1637 // The whole number portion of the value (left of the decimal) 1638 // counts 1639 // the days since December 30th 1899. The fractional portion (right 1640 // of 1641 // the decimal) counts the time as a fraction of the day. For 1642 // example, 1643 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1644 // after 1645 // December 30st 1899, and .5 because noon is half a day. February 1646 // 1st 1647 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1648 // as 1649 // not a leap year. 1650 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1651 // fields to be output 1652 // as strings in their given number format (which is dependent 1653 // on the spreadsheet locale). 1654 DateTimeRenderOption string `json:"dateTimeRenderOption,omitempty"` 1655 1656 // MajorDimension: The major dimension that results should use. 1657 // 1658 // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 1659 // then a request that selects that range and sets `majorDimension=ROWS` 1660 // will 1661 // return `[[1,2],[3,4]]`, 1662 // whereas a request that sets `majorDimension=COLUMNS` will 1663 // return 1664 // `[[1,3],[2,4]]`. 1665 // 1666 // Possible values: 1667 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 1668 // "ROWS" - Operates on the rows of a sheet. 1669 // "COLUMNS" - Operates on the columns of a sheet. 1670 MajorDimension string `json:"majorDimension,omitempty"` 1671 1672 // ValueRenderOption: How values should be represented in the 1673 // output. 1674 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1675 // 1676 // Possible values: 1677 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1678 // reply according to the 1679 // cell's formatting. Formatting is based on the spreadsheet's 1680 // locale, 1681 // not the requesting user's locale. 1682 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1683 // currency, 1684 // then `A2` would return "$1.23". 1685 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1686 // in the reply. 1687 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1688 // currency, 1689 // then `A2` would return the number `1.23`. 1690 // "FORMULA" - Values will not be calculated. The reply will include 1691 // the formulas. 1692 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1693 // currency, 1694 // then A2 would return "=A1". 1695 ValueRenderOption string `json:"valueRenderOption,omitempty"` 1696 1697 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1698 // unconditionally include in API requests. By default, fields with 1699 // empty values are omitted from API requests. However, any non-pointer, 1700 // non-interface field appearing in ForceSendFields will be sent to the 1701 // server regardless of whether the field is empty or not. This may be 1702 // used to include empty fields in Patch requests. 1703 ForceSendFields []string `json:"-"` 1704 1705 // NullFields is a list of field names (e.g. "DataFilters") to include 1706 // in API requests with the JSON null value. By default, fields with 1707 // empty values are omitted from API requests. However, any field with 1708 // an empty value appearing in NullFields will be sent to the server as 1709 // null. It is an error if a field in this list has a non-empty value. 1710 // This may be used to include null fields in Patch requests. 1711 NullFields []string `json:"-"` 1712} 1713 1714func (s *BatchGetValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1715 type NoMethod BatchGetValuesByDataFilterRequest 1716 raw := NoMethod(*s) 1717 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1718} 1719 1720// BatchGetValuesByDataFilterResponse: The response when retrieving more 1721// than one range of values in a spreadsheet 1722// selected by DataFilters. 1723type BatchGetValuesByDataFilterResponse struct { 1724 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1725 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1726 1727 // ValueRanges: The requested values with the list of data filters that 1728 // matched them. 1729 ValueRanges []*MatchedValueRange `json:"valueRanges,omitempty"` 1730 1731 // ServerResponse contains the HTTP response code and headers from the 1732 // server. 1733 googleapi.ServerResponse `json:"-"` 1734 1735 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1736 // unconditionally include in API requests. By default, fields with 1737 // empty values are omitted from API requests. However, any non-pointer, 1738 // non-interface field appearing in ForceSendFields will be sent to the 1739 // server regardless of whether the field is empty or not. This may be 1740 // used to include empty fields in Patch requests. 1741 ForceSendFields []string `json:"-"` 1742 1743 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1744 // in API requests with the JSON null value. By default, fields with 1745 // empty values are omitted from API requests. However, any field with 1746 // an empty value appearing in NullFields will be sent to the server as 1747 // null. It is an error if a field in this list has a non-empty value. 1748 // This may be used to include null fields in Patch requests. 1749 NullFields []string `json:"-"` 1750} 1751 1752func (s *BatchGetValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1753 type NoMethod BatchGetValuesByDataFilterResponse 1754 raw := NoMethod(*s) 1755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1756} 1757 1758// BatchGetValuesResponse: The response when retrieving more than one 1759// range of values in a spreadsheet. 1760type BatchGetValuesResponse struct { 1761 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1762 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1763 1764 // ValueRanges: The requested values. The order of the ValueRanges is 1765 // the same as the 1766 // order of the requested ranges. 1767 ValueRanges []*ValueRange `json:"valueRanges,omitempty"` 1768 1769 // ServerResponse contains the HTTP response code and headers from the 1770 // server. 1771 googleapi.ServerResponse `json:"-"` 1772 1773 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1774 // unconditionally include in API requests. By default, fields with 1775 // empty values are omitted from API requests. However, any non-pointer, 1776 // non-interface field appearing in ForceSendFields will be sent to the 1777 // server regardless of whether the field is empty or not. This may be 1778 // used to include empty fields in Patch requests. 1779 ForceSendFields []string `json:"-"` 1780 1781 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1782 // in API requests with the JSON null value. By default, fields with 1783 // empty values are omitted from API requests. However, any field with 1784 // an empty value appearing in NullFields will be sent to the server as 1785 // null. It is an error if a field in this list has a non-empty value. 1786 // This may be used to include null fields in Patch requests. 1787 NullFields []string `json:"-"` 1788} 1789 1790func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) { 1791 type NoMethod BatchGetValuesResponse 1792 raw := NoMethod(*s) 1793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1794} 1795 1796// BatchUpdateSpreadsheetRequest: The request for updating any aspect of 1797// a spreadsheet. 1798type BatchUpdateSpreadsheetRequest struct { 1799 // IncludeSpreadsheetInResponse: Determines if the update response 1800 // should include the spreadsheet 1801 // resource. 1802 IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"` 1803 1804 // Requests: A list of updates to apply to the spreadsheet. 1805 // Requests will be applied in the order they are specified. 1806 // If any request is not valid, no requests will be applied. 1807 Requests []*Request `json:"requests,omitempty"` 1808 1809 // ResponseIncludeGridData: True if grid data should be returned. 1810 // Meaningful only if 1811 // if include_spreadsheet_in_response is 'true'. 1812 // This parameter is ignored if a field mask was set in the request. 1813 ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"` 1814 1815 // ResponseRanges: Limits the ranges included in the response 1816 // spreadsheet. 1817 // Meaningful only if include_spreadsheet_response is 'true'. 1818 ResponseRanges []string `json:"responseRanges,omitempty"` 1819 1820 // ForceSendFields is a list of field names (e.g. 1821 // "IncludeSpreadsheetInResponse") to unconditionally include in API 1822 // requests. By default, fields with empty values are omitted from API 1823 // requests. However, any non-pointer, non-interface field appearing in 1824 // ForceSendFields will be sent to the server regardless of whether the 1825 // field is empty or not. This may be used to include empty fields in 1826 // Patch requests. 1827 ForceSendFields []string `json:"-"` 1828 1829 // NullFields is a list of field names (e.g. 1830 // "IncludeSpreadsheetInResponse") to include in API requests with the 1831 // JSON null value. By default, fields with empty values are omitted 1832 // from API requests. However, any field with an empty value appearing 1833 // in NullFields will be sent to the server as null. It is an error if a 1834 // field in this list has a non-empty value. This may be used to include 1835 // null fields in Patch requests. 1836 NullFields []string `json:"-"` 1837} 1838 1839func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) { 1840 type NoMethod BatchUpdateSpreadsheetRequest 1841 raw := NoMethod(*s) 1842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1843} 1844 1845// BatchUpdateSpreadsheetResponse: The reply for batch updating a 1846// spreadsheet. 1847type BatchUpdateSpreadsheetResponse struct { 1848 // Replies: The reply of the updates. This maps 1:1 with the updates, 1849 // although 1850 // replies to some requests may be empty. 1851 Replies []*Response `json:"replies,omitempty"` 1852 1853 // SpreadsheetId: The spreadsheet the updates were applied to. 1854 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1855 1856 // UpdatedSpreadsheet: The spreadsheet after updates were applied. This 1857 // is only set 1858 // if 1859 // [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is 1860 // `true`. 1861 UpdatedSpreadsheet *Spreadsheet `json:"updatedSpreadsheet,omitempty"` 1862 1863 // ServerResponse contains the HTTP response code and headers from the 1864 // server. 1865 googleapi.ServerResponse `json:"-"` 1866 1867 // ForceSendFields is a list of field names (e.g. "Replies") to 1868 // unconditionally include in API requests. By default, fields with 1869 // empty values are omitted from API requests. However, any non-pointer, 1870 // non-interface field appearing in ForceSendFields will be sent to the 1871 // server regardless of whether the field is empty or not. This may be 1872 // used to include empty fields in Patch requests. 1873 ForceSendFields []string `json:"-"` 1874 1875 // NullFields is a list of field names (e.g. "Replies") to include in 1876 // API requests with the JSON null value. By default, fields with empty 1877 // values are omitted from API requests. However, any field with an 1878 // empty value appearing in NullFields will be sent to the server as 1879 // null. It is an error if a field in this list has a non-empty value. 1880 // This may be used to include null fields in Patch requests. 1881 NullFields []string `json:"-"` 1882} 1883 1884func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) { 1885 type NoMethod BatchUpdateSpreadsheetResponse 1886 raw := NoMethod(*s) 1887 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1888} 1889 1890// BatchUpdateValuesByDataFilterRequest: The request for updating more 1891// than one range of values in a spreadsheet. 1892type BatchUpdateValuesByDataFilterRequest struct { 1893 // Data: The new values to apply to the spreadsheet. If more than one 1894 // range is 1895 // matched by the specified DataFilter the specified values will 1896 // be 1897 // applied to all of those ranges. 1898 Data []*DataFilterValueRange `json:"data,omitempty"` 1899 1900 // IncludeValuesInResponse: Determines if the update response should 1901 // include the values 1902 // of the cells that were updated. By default, responses 1903 // do not include the updated values. The `updatedData` field 1904 // within 1905 // each of the BatchUpdateValuesResponse.responses will contain 1906 // the updated values. If the range to write was larger than than the 1907 // range 1908 // actually written, the response will include all values in the 1909 // requested 1910 // range (excluding trailing empty rows and columns). 1911 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 1912 1913 // ResponseDateTimeRenderOption: Determines how dates, times, and 1914 // durations in the response should be 1915 // rendered. This is ignored if response_value_render_option 1916 // is 1917 // FORMATTED_VALUE. 1918 // The default dateTime render option 1919 // is 1920 // DateTimeRenderOption.SERIAL_NUMBER. 1921 // 1922 // Possible values: 1923 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1924 // fields to be output 1925 // as doubles in "serial number" format, as popularized by Lotus 1926 // 1-2-3. 1927 // The whole number portion of the value (left of the decimal) 1928 // counts 1929 // the days since December 30th 1899. The fractional portion (right 1930 // of 1931 // the decimal) counts the time as a fraction of the day. For 1932 // example, 1933 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 1934 // after 1935 // December 30st 1899, and .5 because noon is half a day. February 1936 // 1st 1937 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 1938 // as 1939 // not a leap year. 1940 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1941 // fields to be output 1942 // as strings in their given number format (which is dependent 1943 // on the spreadsheet locale). 1944 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 1945 1946 // ResponseValueRenderOption: Determines how values in the response 1947 // should be rendered. 1948 // The default render option is ValueRenderOption.FORMATTED_VALUE. 1949 // 1950 // Possible values: 1951 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1952 // reply according to the 1953 // cell's formatting. Formatting is based on the spreadsheet's 1954 // locale, 1955 // not the requesting user's locale. 1956 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1957 // currency, 1958 // then `A2` would return "$1.23". 1959 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1960 // in the reply. 1961 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1962 // currency, 1963 // then `A2` would return the number `1.23`. 1964 // "FORMULA" - Values will not be calculated. The reply will include 1965 // the formulas. 1966 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 1967 // currency, 1968 // then A2 would return "=A1". 1969 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 1970 1971 // ValueInputOption: How the input data should be interpreted. 1972 // 1973 // Possible values: 1974 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 1975 // must not be used. 1976 // "RAW" - The values the user has entered will not be parsed and will 1977 // be stored 1978 // as-is. 1979 // "USER_ENTERED" - The values will be parsed as if the user typed 1980 // them into the UI. 1981 // Numbers will stay as numbers, but strings may be converted to 1982 // numbers, 1983 // dates, etc. following the same rules that are applied when 1984 // entering 1985 // text into a cell via the Google Sheets UI. 1986 ValueInputOption string `json:"valueInputOption,omitempty"` 1987 1988 // ForceSendFields is a list of field names (e.g. "Data") to 1989 // unconditionally include in API requests. By default, fields with 1990 // empty values are omitted from API requests. However, any non-pointer, 1991 // non-interface field appearing in ForceSendFields will be sent to the 1992 // server regardless of whether the field is empty or not. This may be 1993 // used to include empty fields in Patch requests. 1994 ForceSendFields []string `json:"-"` 1995 1996 // NullFields is a list of field names (e.g. "Data") to include in API 1997 // requests with the JSON null value. By default, fields with empty 1998 // values are omitted from API requests. However, any field with an 1999 // empty value appearing in NullFields will be sent to the server as 2000 // null. It is an error if a field in this list has a non-empty value. 2001 // This may be used to include null fields in Patch requests. 2002 NullFields []string `json:"-"` 2003} 2004 2005func (s *BatchUpdateValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 2006 type NoMethod BatchUpdateValuesByDataFilterRequest 2007 raw := NoMethod(*s) 2008 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2009} 2010 2011// BatchUpdateValuesByDataFilterResponse: The response when updating a 2012// range of values in a spreadsheet. 2013type BatchUpdateValuesByDataFilterResponse struct { 2014 // Responses: The response for each range updated. 2015 Responses []*UpdateValuesByDataFilterResponse `json:"responses,omitempty"` 2016 2017 // SpreadsheetId: The spreadsheet the updates were applied to. 2018 SpreadsheetId string `json:"spreadsheetId,omitempty"` 2019 2020 // TotalUpdatedCells: The total number of cells updated. 2021 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 2022 2023 // TotalUpdatedColumns: The total number of columns where at least one 2024 // cell in the column was 2025 // updated. 2026 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 2027 2028 // TotalUpdatedRows: The total number of rows where at least one cell in 2029 // the row was updated. 2030 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 2031 2032 // TotalUpdatedSheets: The total number of sheets where at least one 2033 // cell in the sheet was 2034 // updated. 2035 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 2036 2037 // ServerResponse contains the HTTP response code and headers from the 2038 // server. 2039 googleapi.ServerResponse `json:"-"` 2040 2041 // ForceSendFields is a list of field names (e.g. "Responses") to 2042 // unconditionally include in API requests. By default, fields with 2043 // empty values are omitted from API requests. However, any non-pointer, 2044 // non-interface field appearing in ForceSendFields will be sent to the 2045 // server regardless of whether the field is empty or not. This may be 2046 // used to include empty fields in Patch requests. 2047 ForceSendFields []string `json:"-"` 2048 2049 // NullFields is a list of field names (e.g. "Responses") to include in 2050 // API requests with the JSON null value. By default, fields with empty 2051 // values are omitted from API requests. However, any field with an 2052 // empty value appearing in NullFields will be sent to the server as 2053 // null. It is an error if a field in this list has a non-empty value. 2054 // This may be used to include null fields in Patch requests. 2055 NullFields []string `json:"-"` 2056} 2057 2058func (s *BatchUpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 2059 type NoMethod BatchUpdateValuesByDataFilterResponse 2060 raw := NoMethod(*s) 2061 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2062} 2063 2064// BatchUpdateValuesRequest: The request for updating more than one 2065// range of values in a spreadsheet. 2066type BatchUpdateValuesRequest struct { 2067 // Data: The new values to apply to the spreadsheet. 2068 Data []*ValueRange `json:"data,omitempty"` 2069 2070 // IncludeValuesInResponse: Determines if the update response should 2071 // include the values 2072 // of the cells that were updated. By default, responses 2073 // do not include the updated values. The `updatedData` field 2074 // within 2075 // each of the BatchUpdateValuesResponse.responses will contain 2076 // the updated values. If the range to write was larger than than the 2077 // range 2078 // actually written, the response will include all values in the 2079 // requested 2080 // range (excluding trailing empty rows and columns). 2081 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 2082 2083 // ResponseDateTimeRenderOption: Determines how dates, times, and 2084 // durations in the response should be 2085 // rendered. This is ignored if response_value_render_option 2086 // is 2087 // FORMATTED_VALUE. 2088 // The default dateTime render option 2089 // is 2090 // DateTimeRenderOption.SERIAL_NUMBER. 2091 // 2092 // Possible values: 2093 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 2094 // fields to be output 2095 // as doubles in "serial number" format, as popularized by Lotus 2096 // 1-2-3. 2097 // The whole number portion of the value (left of the decimal) 2098 // counts 2099 // the days since December 30th 1899. The fractional portion (right 2100 // of 2101 // the decimal) counts the time as a fraction of the day. For 2102 // example, 2103 // January 1st 1900 at noon would be 2.5, 2 because it's 2 days 2104 // after 2105 // December 30st 1899, and .5 because noon is half a day. February 2106 // 1st 2107 // 1900 at 3pm would be 33.625. This correctly treats the year 1900 2108 // as 2109 // not a leap year. 2110 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 2111 // fields to be output 2112 // as strings in their given number format (which is dependent 2113 // on the spreadsheet locale). 2114 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 2115 2116 // ResponseValueRenderOption: Determines how values in the response 2117 // should be rendered. 2118 // The default render option is ValueRenderOption.FORMATTED_VALUE. 2119 // 2120 // Possible values: 2121 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 2122 // reply according to the 2123 // cell's formatting. Formatting is based on the spreadsheet's 2124 // locale, 2125 // not the requesting user's locale. 2126 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2127 // currency, 2128 // then `A2` would return "$1.23". 2129 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 2130 // in the reply. 2131 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2132 // currency, 2133 // then `A2` would return the number `1.23`. 2134 // "FORMULA" - Values will not be calculated. The reply will include 2135 // the formulas. 2136 // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as 2137 // currency, 2138 // then A2 would return "=A1". 2139 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 2140 2141 // ValueInputOption: How the input data should be interpreted. 2142 // 2143 // Possible values: 2144 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 2145 // must not be used. 2146 // "RAW" - The values the user has entered will not be parsed and will 2147 // be stored 2148 // as-is. 2149 // "USER_ENTERED" - The values will be parsed as if the user typed 2150 // them into the UI. 2151 // Numbers will stay as numbers, but strings may be converted to 2152 // numbers, 2153 // dates, etc. following the same rules that are applied when 2154 // entering 2155 // text into a cell via the Google Sheets UI. 2156 ValueInputOption string `json:"valueInputOption,omitempty"` 2157 2158 // ForceSendFields is a list of field names (e.g. "Data") to 2159 // unconditionally include in API requests. By default, fields with 2160 // empty values are omitted from API requests. However, any non-pointer, 2161 // non-interface field appearing in ForceSendFields will be sent to the 2162 // server regardless of whether the field is empty or not. This may be 2163 // used to include empty fields in Patch requests. 2164 ForceSendFields []string `json:"-"` 2165 2166 // NullFields is a list of field names (e.g. "Data") to include in API 2167 // requests with the JSON null value. By default, fields with empty 2168 // values are omitted from API requests. However, any field with an 2169 // empty value appearing in NullFields will be sent to the server as 2170 // null. It is an error if a field in this list has a non-empty value. 2171 // This may be used to include null fields in Patch requests. 2172 NullFields []string `json:"-"` 2173} 2174 2175func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) { 2176 type NoMethod BatchUpdateValuesRequest 2177 raw := NoMethod(*s) 2178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2179} 2180 2181// BatchUpdateValuesResponse: The response when updating a range of 2182// values in a spreadsheet. 2183type BatchUpdateValuesResponse struct { 2184 // Responses: One UpdateValuesResponse per requested range, in the same 2185 // order as 2186 // the requests appeared. 2187 Responses []*UpdateValuesResponse `json:"responses,omitempty"` 2188 2189 // SpreadsheetId: The spreadsheet the updates were applied to. 2190 SpreadsheetId string `json:"spreadsheetId,omitempty"` 2191 2192 // TotalUpdatedCells: The total number of cells updated. 2193 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 2194 2195 // TotalUpdatedColumns: The total number of columns where at least one 2196 // cell in the column was 2197 // updated. 2198 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 2199 2200 // TotalUpdatedRows: The total number of rows where at least one cell in 2201 // the row was updated. 2202 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 2203 2204 // TotalUpdatedSheets: The total number of sheets where at least one 2205 // cell in the sheet was 2206 // updated. 2207 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 2208 2209 // ServerResponse contains the HTTP response code and headers from the 2210 // server. 2211 googleapi.ServerResponse `json:"-"` 2212 2213 // ForceSendFields is a list of field names (e.g. "Responses") to 2214 // unconditionally include in API requests. By default, fields with 2215 // empty values are omitted from API requests. However, any non-pointer, 2216 // non-interface field appearing in ForceSendFields will be sent to the 2217 // server regardless of whether the field is empty or not. This may be 2218 // used to include empty fields in Patch requests. 2219 ForceSendFields []string `json:"-"` 2220 2221 // NullFields is a list of field names (e.g. "Responses") to include in 2222 // API requests with the JSON null value. By default, fields with empty 2223 // values are omitted from API requests. However, any field with an 2224 // empty value appearing in NullFields will be sent to the server as 2225 // null. It is an error if a field in this list has a non-empty value. 2226 // This may be used to include null fields in Patch requests. 2227 NullFields []string `json:"-"` 2228} 2229 2230func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) { 2231 type NoMethod BatchUpdateValuesResponse 2232 raw := NoMethod(*s) 2233 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2234} 2235 2236// BooleanCondition: A condition that can evaluate to true or 2237// false. 2238// BooleanConditions are used by conditional formatting, 2239// data validation, and the criteria in filters. 2240type BooleanCondition struct { 2241 // Type: The type of condition. 2242 // 2243 // Possible values: 2244 // "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use. 2245 // "NUMBER_GREATER" - The cell's value must be greater than the 2246 // condition's value. 2247 // Supported by data validation, conditional formatting and 2248 // filters. 2249 // Requires a single ConditionValue. 2250 // "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or 2251 // equal to the condition's value. 2252 // Supported by data validation, conditional formatting and 2253 // filters. 2254 // Requires a single ConditionValue. 2255 // "NUMBER_LESS" - The cell's value must be less than the condition's 2256 // value. 2257 // Supported by data validation, conditional formatting and 2258 // filters. 2259 // Requires a single ConditionValue. 2260 // "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal 2261 // to the condition's value. 2262 // Supported by data validation, conditional formatting and 2263 // filters. 2264 // Requires a single ConditionValue. 2265 // "NUMBER_EQ" - The cell's value must be equal to the condition's 2266 // value. 2267 // Supported by data validation, conditional formatting and 2268 // filters. 2269 // Requires a single ConditionValue. 2270 // "NUMBER_NOT_EQ" - The cell's value must be not equal to the 2271 // condition's value. 2272 // Supported by data validation, conditional formatting and 2273 // filters. 2274 // Requires a single ConditionValue. 2275 // "NUMBER_BETWEEN" - The cell's value must be between the two 2276 // condition values. 2277 // Supported by data validation, conditional formatting and 2278 // filters. 2279 // Requires exactly two ConditionValues. 2280 // "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two 2281 // condition values. 2282 // Supported by data validation, conditional formatting and 2283 // filters. 2284 // Requires exactly two ConditionValues. 2285 // "TEXT_CONTAINS" - The cell's value must contain the condition's 2286 // value. 2287 // Supported by data validation, conditional formatting and 2288 // filters. 2289 // Requires a single ConditionValue. 2290 // "TEXT_NOT_CONTAINS" - The cell's value must not contain the 2291 // condition's value. 2292 // Supported by data validation, conditional formatting and 2293 // filters. 2294 // Requires a single ConditionValue. 2295 // "TEXT_STARTS_WITH" - The cell's value must start with the 2296 // condition's value. 2297 // Supported by conditional formatting and filters. 2298 // Requires a single ConditionValue. 2299 // "TEXT_ENDS_WITH" - The cell's value must end with the condition's 2300 // value. 2301 // Supported by conditional formatting and filters. 2302 // Requires a single ConditionValue. 2303 // "TEXT_EQ" - The cell's value must be exactly the condition's 2304 // value. 2305 // Supported by data validation, conditional formatting and 2306 // filters. 2307 // Requires a single ConditionValue. 2308 // "TEXT_IS_EMAIL" - The cell's value must be a valid email 2309 // address. 2310 // Supported by data validation. 2311 // Requires no ConditionValues. 2312 // "TEXT_IS_URL" - The cell's value must be a valid URL. 2313 // Supported by data validation. 2314 // Requires no ConditionValues. 2315 // "DATE_EQ" - The cell's value must be the same date as the 2316 // condition's value. 2317 // Supported by data validation, conditional formatting and 2318 // filters. 2319 // Requires a single ConditionValue. 2320 // "DATE_BEFORE" - The cell's value must be before the date of the 2321 // condition's value. 2322 // Supported by data validation, conditional formatting and 2323 // filters. 2324 // Requires a single ConditionValue 2325 // that may be a relative date. 2326 // "DATE_AFTER" - The cell's value must be after the date of the 2327 // condition's value. 2328 // Supported by data validation, conditional formatting and 2329 // filters. 2330 // Requires a single ConditionValue 2331 // that may be a relative date. 2332 // "DATE_ON_OR_BEFORE" - The cell's value must be on or before the 2333 // date of the condition's value. 2334 // Supported by data validation. 2335 // Requires a single ConditionValue 2336 // that may be a relative date. 2337 // "DATE_ON_OR_AFTER" - The cell's value must be on or after the date 2338 // of the condition's value. 2339 // Supported by data validation. 2340 // Requires a single ConditionValue 2341 // that may be a relative date. 2342 // "DATE_BETWEEN" - The cell's value must be between the dates of the 2343 // two condition values. 2344 // Supported by data validation. 2345 // Requires exactly two ConditionValues. 2346 // "DATE_NOT_BETWEEN" - The cell's value must be outside the dates of 2347 // the two condition values. 2348 // Supported by data validation. 2349 // Requires exactly two ConditionValues. 2350 // "DATE_IS_VALID" - The cell's value must be a date. 2351 // Supported by data validation. 2352 // Requires no ConditionValues. 2353 // "ONE_OF_RANGE" - The cell's value must be listed in the grid in 2354 // condition value's range. 2355 // Supported by data validation. 2356 // Requires a single ConditionValue, 2357 // and the value must be a valid range in A1 notation. 2358 // "ONE_OF_LIST" - The cell's value must be in the list of condition 2359 // values. 2360 // Supported by data validation. 2361 // Supports any number of condition values, 2362 // one per item in the list. 2363 // Formulas are not supported in the values. 2364 // "BLANK" - The cell's value must be empty. 2365 // Supported by conditional formatting and filters. 2366 // Requires no ConditionValues. 2367 // "NOT_BLANK" - The cell's value must not be empty. 2368 // Supported by conditional formatting and filters. 2369 // Requires no ConditionValues. 2370 // "CUSTOM_FORMULA" - The condition's formula must evaluate to 2371 // true. 2372 // Supported by data validation, conditional formatting and 2373 // filters. 2374 // Requires a single ConditionValue. 2375 // "BOOLEAN" - The cell's value must be TRUE/FALSE or in the list of 2376 // condition values. 2377 // Supported by data validation. 2378 // Renders as a cell checkbox. 2379 // Supports zero, one or two ConditionValues. No 2380 // values indicates the cell must be TRUE or FALSE, where TRUE renders 2381 // as 2382 // checked and FALSE renders as unchecked. One value indicates the 2383 // cell 2384 // will render as checked when it contains that value and unchecked when 2385 // it 2386 // is blank. Two values indicate that the cell will render as checked 2387 // when 2388 // it contains the first value and unchecked when it contains the 2389 // second 2390 // value. For example, ["Yes","No"] indicates that the cell will render 2391 // a 2392 // checked box when it has the value "Yes" and an unchecked box when it 2393 // has 2394 // the value "No". 2395 Type string `json:"type,omitempty"` 2396 2397 // Values: The values of the condition. The number of supported values 2398 // depends 2399 // on the condition type. Some support zero values, 2400 // others one or two values, 2401 // and ConditionType.ONE_OF_LIST supports an arbitrary number of values. 2402 Values []*ConditionValue `json:"values,omitempty"` 2403 2404 // ForceSendFields is a list of field names (e.g. "Type") to 2405 // unconditionally include in API requests. By default, fields with 2406 // empty values are omitted from API requests. However, any non-pointer, 2407 // non-interface field appearing in ForceSendFields will be sent to the 2408 // server regardless of whether the field is empty or not. This may be 2409 // used to include empty fields in Patch requests. 2410 ForceSendFields []string `json:"-"` 2411 2412 // NullFields is a list of field names (e.g. "Type") to include in API 2413 // requests with the JSON null value. By default, fields with empty 2414 // values are omitted from API requests. However, any field with an 2415 // empty value appearing in NullFields will be sent to the server as 2416 // null. It is an error if a field in this list has a non-empty value. 2417 // This may be used to include null fields in Patch requests. 2418 NullFields []string `json:"-"` 2419} 2420 2421func (s *BooleanCondition) MarshalJSON() ([]byte, error) { 2422 type NoMethod BooleanCondition 2423 raw := NoMethod(*s) 2424 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2425} 2426 2427// BooleanRule: A rule that may or may not match, depending on the 2428// condition. 2429type BooleanRule struct { 2430 // Condition: The condition of the rule. If the condition evaluates to 2431 // true, 2432 // the format is applied. 2433 Condition *BooleanCondition `json:"condition,omitempty"` 2434 2435 // Format: The format to apply. 2436 // Conditional formatting can only apply a subset of formatting: 2437 // bold, italic, 2438 // strikethrough, 2439 // foreground color & 2440 // background color. 2441 Format *CellFormat `json:"format,omitempty"` 2442 2443 // ForceSendFields is a list of field names (e.g. "Condition") to 2444 // unconditionally include in API requests. By default, fields with 2445 // empty values are omitted from API requests. However, any non-pointer, 2446 // non-interface field appearing in ForceSendFields will be sent to the 2447 // server regardless of whether the field is empty or not. This may be 2448 // used to include empty fields in Patch requests. 2449 ForceSendFields []string `json:"-"` 2450 2451 // NullFields is a list of field names (e.g. "Condition") to include in 2452 // API requests with the JSON null value. By default, fields with empty 2453 // values are omitted from API requests. However, any field with an 2454 // empty value appearing in NullFields will be sent to the server as 2455 // null. It is an error if a field in this list has a non-empty value. 2456 // This may be used to include null fields in Patch requests. 2457 NullFields []string `json:"-"` 2458} 2459 2460func (s *BooleanRule) MarshalJSON() ([]byte, error) { 2461 type NoMethod BooleanRule 2462 raw := NoMethod(*s) 2463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2464} 2465 2466// Border: A border along a cell. 2467type Border struct { 2468 // Color: The color of the border. 2469 Color *Color `json:"color,omitempty"` 2470 2471 // Style: The style of the border. 2472 // 2473 // Possible values: 2474 // "STYLE_UNSPECIFIED" - The style is not specified. Do not use this. 2475 // "DOTTED" - The border is dotted. 2476 // "DASHED" - The border is dashed. 2477 // "SOLID" - The border is a thin solid line. 2478 // "SOLID_MEDIUM" - The border is a medium solid line. 2479 // "SOLID_THICK" - The border is a thick solid line. 2480 // "NONE" - No border. 2481 // Used only when updating a border in order to erase it. 2482 // "DOUBLE" - The border is two solid lines. 2483 Style string `json:"style,omitempty"` 2484 2485 // Width: The width of the border, in pixels. 2486 // Deprecated; the width is determined by the "style" field. 2487 Width int64 `json:"width,omitempty"` 2488 2489 // ForceSendFields is a list of field names (e.g. "Color") to 2490 // unconditionally include in API requests. By default, fields with 2491 // empty values are omitted from API requests. However, any non-pointer, 2492 // non-interface field appearing in ForceSendFields will be sent to the 2493 // server regardless of whether the field is empty or not. This may be 2494 // used to include empty fields in Patch requests. 2495 ForceSendFields []string `json:"-"` 2496 2497 // NullFields is a list of field names (e.g. "Color") to include in API 2498 // requests with the JSON null value. By default, fields with empty 2499 // values are omitted from API requests. However, any field with an 2500 // empty value appearing in NullFields will be sent to the server as 2501 // null. It is an error if a field in this list has a non-empty value. 2502 // This may be used to include null fields in Patch requests. 2503 NullFields []string `json:"-"` 2504} 2505 2506func (s *Border) MarshalJSON() ([]byte, error) { 2507 type NoMethod Border 2508 raw := NoMethod(*s) 2509 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2510} 2511 2512// Borders: The borders of the cell. 2513type Borders struct { 2514 // Bottom: The bottom border of the cell. 2515 Bottom *Border `json:"bottom,omitempty"` 2516 2517 // Left: The left border of the cell. 2518 Left *Border `json:"left,omitempty"` 2519 2520 // Right: The right border of the cell. 2521 Right *Border `json:"right,omitempty"` 2522 2523 // Top: The top border of the cell. 2524 Top *Border `json:"top,omitempty"` 2525 2526 // ForceSendFields is a list of field names (e.g. "Bottom") to 2527 // unconditionally include in API requests. By default, fields with 2528 // empty values are omitted from API requests. However, any non-pointer, 2529 // non-interface field appearing in ForceSendFields will be sent to the 2530 // server regardless of whether the field is empty or not. This may be 2531 // used to include empty fields in Patch requests. 2532 ForceSendFields []string `json:"-"` 2533 2534 // NullFields is a list of field names (e.g. "Bottom") to include in API 2535 // requests with the JSON null value. By default, fields with empty 2536 // values are omitted from API requests. However, any field with an 2537 // empty value appearing in NullFields will be sent to the server as 2538 // null. It is an error if a field in this list has a non-empty value. 2539 // This may be used to include null fields in Patch requests. 2540 NullFields []string `json:"-"` 2541} 2542 2543func (s *Borders) MarshalJSON() ([]byte, error) { 2544 type NoMethod Borders 2545 raw := NoMethod(*s) 2546 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2547} 2548 2549// BubbleChartSpec: A <a 2550// href="/chart/interactive/docs/gallery/bubblechart">bubble chart</a>. 2551type BubbleChartSpec struct { 2552 // BubbleBorderColor: The bubble border color. 2553 BubbleBorderColor *Color `json:"bubbleBorderColor,omitempty"` 2554 2555 // BubbleLabels: The data containing the bubble labels. These do not 2556 // need to be unique. 2557 BubbleLabels *ChartData `json:"bubbleLabels,omitempty"` 2558 2559 // BubbleMaxRadiusSize: The max radius size of the bubbles, in 2560 // pixels. 2561 // If specified, the field must be a positive value. 2562 BubbleMaxRadiusSize int64 `json:"bubbleMaxRadiusSize,omitempty"` 2563 2564 // BubbleMinRadiusSize: The minimum radius size of the bubbles, in 2565 // pixels. 2566 // If specific, the field must be a positive value. 2567 BubbleMinRadiusSize int64 `json:"bubbleMinRadiusSize,omitempty"` 2568 2569 // BubbleOpacity: The opacity of the bubbles between 0 and 1.0. 2570 // 0 is fully transparent and 1 is fully opaque. 2571 BubbleOpacity float64 `json:"bubbleOpacity,omitempty"` 2572 2573 // BubbleSizes: The data contianing the bubble sizes. Bubble sizes are 2574 // used to draw 2575 // the bubbles at different sizes relative to each other. 2576 // If specified, group_ids must also be specified. This field 2577 // is 2578 // optional. 2579 BubbleSizes *ChartData `json:"bubbleSizes,omitempty"` 2580 2581 // BubbleTextStyle: The format of the text inside the bubbles. 2582 // Underline and Strikethrough are not supported. 2583 BubbleTextStyle *TextFormat `json:"bubbleTextStyle,omitempty"` 2584 2585 // Domain: The data containing the bubble x-values. These values locate 2586 // the bubbles 2587 // in the chart horizontally. 2588 Domain *ChartData `json:"domain,omitempty"` 2589 2590 // GroupIds: The data containing the bubble group IDs. All bubbles with 2591 // the same group 2592 // ID are drawn in the same color. If bubble_sizes is specified 2593 // then 2594 // this field must also be specified but may contain blank values. 2595 // This field is optional. 2596 GroupIds *ChartData `json:"groupIds,omitempty"` 2597 2598 // LegendPosition: Where the legend of the chart should be drawn. 2599 // 2600 // Possible values: 2601 // "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 2602 // use. 2603 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 2604 // chart. 2605 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 2606 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 2607 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 2608 // "NO_LEGEND" - No legend is rendered. 2609 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 2610 LegendPosition string `json:"legendPosition,omitempty"` 2611 2612 // Series: The data contianing the bubble y-values. These values locate 2613 // the bubbles 2614 // in the chart vertically. 2615 Series *ChartData `json:"series,omitempty"` 2616 2617 // ForceSendFields is a list of field names (e.g. "BubbleBorderColor") 2618 // to unconditionally include in API requests. By default, fields with 2619 // empty values are omitted from API requests. However, any non-pointer, 2620 // non-interface field appearing in ForceSendFields will be sent to the 2621 // server regardless of whether the field is empty or not. This may be 2622 // used to include empty fields in Patch requests. 2623 ForceSendFields []string `json:"-"` 2624 2625 // NullFields is a list of field names (e.g. "BubbleBorderColor") to 2626 // include in API requests with the JSON null value. By default, fields 2627 // with empty values are omitted from API requests. However, any field 2628 // with an empty value appearing in NullFields will be sent to the 2629 // server as null. It is an error if a field in this list has a 2630 // non-empty value. This may be used to include null fields in Patch 2631 // requests. 2632 NullFields []string `json:"-"` 2633} 2634 2635func (s *BubbleChartSpec) MarshalJSON() ([]byte, error) { 2636 type NoMethod BubbleChartSpec 2637 raw := NoMethod(*s) 2638 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2639} 2640 2641func (s *BubbleChartSpec) UnmarshalJSON(data []byte) error { 2642 type NoMethod BubbleChartSpec 2643 var s1 struct { 2644 BubbleOpacity gensupport.JSONFloat64 `json:"bubbleOpacity"` 2645 *NoMethod 2646 } 2647 s1.NoMethod = (*NoMethod)(s) 2648 if err := json.Unmarshal(data, &s1); err != nil { 2649 return err 2650 } 2651 s.BubbleOpacity = float64(s1.BubbleOpacity) 2652 return nil 2653} 2654 2655// CandlestickChartSpec: A <a 2656// href="/chart/interactive/docs/gallery/candlestickchart">candlestick 2657// ch 2658// art</a>. 2659type CandlestickChartSpec struct { 2660 // Data: The Candlestick chart data. 2661 // Only one CandlestickData is supported. 2662 Data []*CandlestickData `json:"data,omitempty"` 2663 2664 // Domain: The domain data (horizontal axis) for the candlestick chart. 2665 // String data 2666 // will be treated as discrete labels, other data will be treated 2667 // as 2668 // continuous values. 2669 Domain *CandlestickDomain `json:"domain,omitempty"` 2670 2671 // ForceSendFields is a list of field names (e.g. "Data") to 2672 // unconditionally include in API requests. By default, fields with 2673 // empty values are omitted from API requests. However, any non-pointer, 2674 // non-interface field appearing in ForceSendFields will be sent to the 2675 // server regardless of whether the field is empty or not. This may be 2676 // used to include empty fields in Patch requests. 2677 ForceSendFields []string `json:"-"` 2678 2679 // NullFields is a list of field names (e.g. "Data") to include in API 2680 // requests with the JSON null value. By default, fields with empty 2681 // values are omitted from API requests. However, any field with an 2682 // empty value appearing in NullFields will be sent to the server as 2683 // null. It is an error if a field in this list has a non-empty value. 2684 // This may be used to include null fields in Patch requests. 2685 NullFields []string `json:"-"` 2686} 2687 2688func (s *CandlestickChartSpec) MarshalJSON() ([]byte, error) { 2689 type NoMethod CandlestickChartSpec 2690 raw := NoMethod(*s) 2691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2692} 2693 2694// CandlestickData: The Candlestick chart data, each containing the low, 2695// open, close, and high 2696// values for a series. 2697type CandlestickData struct { 2698 // CloseSeries: The range data (vertical axis) for the close/final value 2699 // for each candle. 2700 // This is the top of the candle body. If greater than the open value 2701 // the 2702 // candle will be filled. Otherwise the candle will be hollow. 2703 CloseSeries *CandlestickSeries `json:"closeSeries,omitempty"` 2704 2705 // HighSeries: The range data (vertical axis) for the high/maximum value 2706 // for each 2707 // candle. This is the top of the candle's center line. 2708 HighSeries *CandlestickSeries `json:"highSeries,omitempty"` 2709 2710 // LowSeries: The range data (vertical axis) for the low/minimum value 2711 // for each candle. 2712 // This is the bottom of the candle's center line. 2713 LowSeries *CandlestickSeries `json:"lowSeries,omitempty"` 2714 2715 // OpenSeries: The range data (vertical axis) for the open/initial value 2716 // for each 2717 // candle. This is the bottom of the candle body. If less than the 2718 // close 2719 // value the candle will be filled. Otherwise the candle will be 2720 // hollow. 2721 OpenSeries *CandlestickSeries `json:"openSeries,omitempty"` 2722 2723 // ForceSendFields is a list of field names (e.g. "CloseSeries") to 2724 // unconditionally include in API requests. By default, fields with 2725 // empty values are omitted from API requests. However, any non-pointer, 2726 // non-interface field appearing in ForceSendFields will be sent to the 2727 // server regardless of whether the field is empty or not. This may be 2728 // used to include empty fields in Patch requests. 2729 ForceSendFields []string `json:"-"` 2730 2731 // NullFields is a list of field names (e.g. "CloseSeries") to include 2732 // in API requests with the JSON null value. By default, fields with 2733 // empty values are omitted from API requests. However, any field with 2734 // an empty value appearing in NullFields will be sent to the server as 2735 // null. It is an error if a field in this list has a non-empty value. 2736 // This may be used to include null fields in Patch requests. 2737 NullFields []string `json:"-"` 2738} 2739 2740func (s *CandlestickData) MarshalJSON() ([]byte, error) { 2741 type NoMethod CandlestickData 2742 raw := NoMethod(*s) 2743 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2744} 2745 2746// CandlestickDomain: The domain of a CandlestickChart. 2747type CandlestickDomain struct { 2748 // Data: The data of the CandlestickDomain. 2749 Data *ChartData `json:"data,omitempty"` 2750 2751 // Reversed: True to reverse the order of the domain values (horizontal 2752 // axis). 2753 Reversed bool `json:"reversed,omitempty"` 2754 2755 // ForceSendFields is a list of field names (e.g. "Data") to 2756 // unconditionally include in API requests. By default, fields with 2757 // empty values are omitted from API requests. However, any non-pointer, 2758 // non-interface field appearing in ForceSendFields will be sent to the 2759 // server regardless of whether the field is empty or not. This may be 2760 // used to include empty fields in Patch requests. 2761 ForceSendFields []string `json:"-"` 2762 2763 // NullFields is a list of field names (e.g. "Data") to include in API 2764 // requests with the JSON null value. By default, fields with empty 2765 // values are omitted from API requests. However, any field with an 2766 // empty value appearing in NullFields will be sent to the server as 2767 // null. It is an error if a field in this list has a non-empty value. 2768 // This may be used to include null fields in Patch requests. 2769 NullFields []string `json:"-"` 2770} 2771 2772func (s *CandlestickDomain) MarshalJSON() ([]byte, error) { 2773 type NoMethod CandlestickDomain 2774 raw := NoMethod(*s) 2775 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2776} 2777 2778// CandlestickSeries: The series of a CandlestickData. 2779type CandlestickSeries struct { 2780 // Data: The data of the CandlestickSeries. 2781 Data *ChartData `json:"data,omitempty"` 2782 2783 // ForceSendFields is a list of field names (e.g. "Data") to 2784 // unconditionally include in API requests. By default, fields with 2785 // empty values are omitted from API requests. However, any non-pointer, 2786 // non-interface field appearing in ForceSendFields will be sent to the 2787 // server regardless of whether the field is empty or not. This may be 2788 // used to include empty fields in Patch requests. 2789 ForceSendFields []string `json:"-"` 2790 2791 // NullFields is a list of field names (e.g. "Data") to include in API 2792 // requests with the JSON null value. By default, fields with empty 2793 // values are omitted from API requests. However, any field with an 2794 // empty value appearing in NullFields will be sent to the server as 2795 // null. It is an error if a field in this list has a non-empty value. 2796 // This may be used to include null fields in Patch requests. 2797 NullFields []string `json:"-"` 2798} 2799 2800func (s *CandlestickSeries) MarshalJSON() ([]byte, error) { 2801 type NoMethod CandlestickSeries 2802 raw := NoMethod(*s) 2803 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2804} 2805 2806// CellData: Data about a specific cell. 2807type CellData struct { 2808 // DataValidation: A data validation rule on the cell, if any. 2809 // 2810 // When writing, the new data validation rule will overwrite any prior 2811 // rule. 2812 DataValidation *DataValidationRule `json:"dataValidation,omitempty"` 2813 2814 // EffectiveFormat: The effective format being used by the cell. 2815 // This includes the results of applying any conditional formatting 2816 // and, 2817 // if the cell contains a formula, the computed number format. 2818 // If the effective format is the default format, effective format 2819 // will 2820 // not be written. 2821 // This field is read-only. 2822 EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"` 2823 2824 // EffectiveValue: The effective value of the cell. For cells with 2825 // formulas, this is 2826 // the calculated value. For cells with literals, this is 2827 // the same as the user_entered_value. 2828 // This field is read-only. 2829 EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"` 2830 2831 // FormattedValue: The formatted value of the cell. 2832 // This is the value as it's shown to the user. 2833 // This field is read-only. 2834 FormattedValue string `json:"formattedValue,omitempty"` 2835 2836 // Hyperlink: A hyperlink this cell points to, if any. 2837 // This field is read-only. (To set it, use a `=HYPERLINK` formula 2838 // in the userEnteredValue.formulaValue 2839 // field.) 2840 Hyperlink string `json:"hyperlink,omitempty"` 2841 2842 // Note: Any note on the cell. 2843 Note string `json:"note,omitempty"` 2844 2845 // PivotTable: A pivot table anchored at this cell. The size of pivot 2846 // table itself 2847 // is computed dynamically based on its data, grouping, filters, 2848 // values, 2849 // etc. Only the top-left cell of the pivot table contains the pivot 2850 // table 2851 // definition. The other cells will contain the calculated values of 2852 // the 2853 // results of the pivot in their effective_value fields. 2854 PivotTable *PivotTable `json:"pivotTable,omitempty"` 2855 2856 // TextFormatRuns: Runs of rich text applied to subsections of the cell. 2857 // Runs are only valid 2858 // on user entered strings, not formulas, bools, or numbers. 2859 // Runs start at specific indexes in the text and continue until the 2860 // next 2861 // run. Properties of a run will continue unless explicitly changed 2862 // in a subsequent run (and properties of the first run will 2863 // continue 2864 // the properties of the cell unless explicitly changed). 2865 // 2866 // When writing, the new runs will overwrite any prior runs. When 2867 // writing a 2868 // new user_entered_value, previous runs are erased. 2869 TextFormatRuns []*TextFormatRun `json:"textFormatRuns,omitempty"` 2870 2871 // UserEnteredFormat: The format the user entered for the cell. 2872 // 2873 // When writing, the new format will be merged with the existing format. 2874 UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"` 2875 2876 // UserEnteredValue: The value the user entered in the cell. e.g, 2877 // `1234`, `'Hello'`, or `=NOW()` 2878 // Note: Dates, Times and DateTimes are represented as doubles in 2879 // serial number format. 2880 UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"` 2881 2882 // ForceSendFields is a list of field names (e.g. "DataValidation") to 2883 // unconditionally include in API requests. By default, fields with 2884 // empty values are omitted from API requests. However, any non-pointer, 2885 // non-interface field appearing in ForceSendFields will be sent to the 2886 // server regardless of whether the field is empty or not. This may be 2887 // used to include empty fields in Patch requests. 2888 ForceSendFields []string `json:"-"` 2889 2890 // NullFields is a list of field names (e.g. "DataValidation") to 2891 // include in API requests with the JSON null value. By default, fields 2892 // with empty values are omitted from API requests. However, any field 2893 // with an empty value appearing in NullFields will be sent to the 2894 // server as null. It is an error if a field in this list has a 2895 // non-empty value. This may be used to include null fields in Patch 2896 // requests. 2897 NullFields []string `json:"-"` 2898} 2899 2900func (s *CellData) MarshalJSON() ([]byte, error) { 2901 type NoMethod CellData 2902 raw := NoMethod(*s) 2903 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2904} 2905 2906// CellFormat: The format of a cell. 2907type CellFormat struct { 2908 // BackgroundColor: The background color of the cell. 2909 BackgroundColor *Color `json:"backgroundColor,omitempty"` 2910 2911 // Borders: The borders of the cell. 2912 Borders *Borders `json:"borders,omitempty"` 2913 2914 // HorizontalAlignment: The horizontal alignment of the value in the 2915 // cell. 2916 // 2917 // Possible values: 2918 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 2919 // specified. Do not use this. 2920 // "LEFT" - The text is explicitly aligned to the left of the cell. 2921 // "CENTER" - The text is explicitly aligned to the center of the 2922 // cell. 2923 // "RIGHT" - The text is explicitly aligned to the right of the cell. 2924 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 2925 2926 // HyperlinkDisplayType: How a hyperlink, if it exists, should be 2927 // displayed in the cell. 2928 // 2929 // Possible values: 2930 // "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" - The default value: the 2931 // hyperlink is rendered. Do not use this. 2932 // "LINKED" - A hyperlink should be explicitly rendered. 2933 // "PLAIN_TEXT" - A hyperlink should not be rendered. 2934 HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"` 2935 2936 // NumberFormat: A format describing how number values should be 2937 // represented to the user. 2938 NumberFormat *NumberFormat `json:"numberFormat,omitempty"` 2939 2940 // Padding: The padding of the cell. 2941 Padding *Padding `json:"padding,omitempty"` 2942 2943 // TextDirection: The direction of the text in the cell. 2944 // 2945 // Possible values: 2946 // "TEXT_DIRECTION_UNSPECIFIED" - The text direction is not specified. 2947 // Do not use this. 2948 // "LEFT_TO_RIGHT" - The text direction of left-to-right was set by 2949 // the user. 2950 // "RIGHT_TO_LEFT" - The text direction of right-to-left was set by 2951 // the user. 2952 TextDirection string `json:"textDirection,omitempty"` 2953 2954 // TextFormat: The format of the text in the cell (unless overridden by 2955 // a format run). 2956 TextFormat *TextFormat `json:"textFormat,omitempty"` 2957 2958 // TextRotation: The rotation applied to text in a cell 2959 TextRotation *TextRotation `json:"textRotation,omitempty"` 2960 2961 // VerticalAlignment: The vertical alignment of the value in the cell. 2962 // 2963 // Possible values: 2964 // "VERTICAL_ALIGN_UNSPECIFIED" - The vertical alignment is not 2965 // specified. Do not use this. 2966 // "TOP" - The text is explicitly aligned to the top of the cell. 2967 // "MIDDLE" - The text is explicitly aligned to the middle of the 2968 // cell. 2969 // "BOTTOM" - The text is explicitly aligned to the bottom of the 2970 // cell. 2971 VerticalAlignment string `json:"verticalAlignment,omitempty"` 2972 2973 // WrapStrategy: The wrap strategy for the value in the cell. 2974 // 2975 // Possible values: 2976 // "WRAP_STRATEGY_UNSPECIFIED" - The default value, do not use. 2977 // "OVERFLOW_CELL" - Lines that are longer than the cell width will be 2978 // written in the next 2979 // cell over, so long as that cell is empty. If the next cell over 2980 // is 2981 // non-empty, this behaves the same as CLIP. The text will never wrap 2982 // to the next line unless the user manually inserts a new 2983 // line. 2984 // Example: 2985 // 2986 // | First sentence. | 2987 // | Manual newline that is very long. <- Text continues into next 2988 // cell 2989 // | Next newline. | 2990 // "LEGACY_WRAP" - This wrap strategy represents the old Google Sheets 2991 // wrap strategy where 2992 // words that are longer than a line are clipped rather than broken. 2993 // This 2994 // strategy is not supported on all platforms and is being phased 2995 // out. 2996 // Example: 2997 // 2998 // | Cell has a | 2999 // | loooooooooo| <- Word is clipped. 3000 // | word. | 3001 // "CLIP" - Lines that are longer than the cell width will be 3002 // clipped. 3003 // The text will never wrap to the next line unless the user 3004 // manually 3005 // inserts a new line. 3006 // Example: 3007 // 3008 // | First sentence. | 3009 // | Manual newline t| <- Text is clipped 3010 // | Next newline. | 3011 // "WRAP" - Words that are longer than a line are wrapped at the 3012 // character level 3013 // rather than clipped. 3014 // Example: 3015 // 3016 // | Cell has a | 3017 // | loooooooooo| <- Word is broken. 3018 // | ong word. | 3019 WrapStrategy string `json:"wrapStrategy,omitempty"` 3020 3021 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 3022 // unconditionally include in API requests. By default, fields with 3023 // empty values are omitted from API requests. However, any non-pointer, 3024 // non-interface field appearing in ForceSendFields will be sent to the 3025 // server regardless of whether the field is empty or not. This may be 3026 // used to include empty fields in Patch requests. 3027 ForceSendFields []string `json:"-"` 3028 3029 // NullFields is a list of field names (e.g. "BackgroundColor") to 3030 // include in API requests with the JSON null value. By default, fields 3031 // with empty values are omitted from API requests. However, any field 3032 // with an empty value appearing in NullFields will be sent to the 3033 // server as null. It is an error if a field in this list has a 3034 // non-empty value. This may be used to include null fields in Patch 3035 // requests. 3036 NullFields []string `json:"-"` 3037} 3038 3039func (s *CellFormat) MarshalJSON() ([]byte, error) { 3040 type NoMethod CellFormat 3041 raw := NoMethod(*s) 3042 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3043} 3044 3045// ChartAxisViewWindowOptions: The options that define a "view window" 3046// for a chart (such as the visible 3047// values in an axis). 3048type ChartAxisViewWindowOptions struct { 3049 // ViewWindowMax: The maximum numeric value to be shown in this view 3050 // window. If unset, will 3051 // automatically determine a maximum value that looks good for the data. 3052 ViewWindowMax float64 `json:"viewWindowMax,omitempty"` 3053 3054 // ViewWindowMin: The minimum numeric value to be shown in this view 3055 // window. If unset, will 3056 // automatically determine a minimum value that looks good for the data. 3057 ViewWindowMin float64 `json:"viewWindowMin,omitempty"` 3058 3059 // ViewWindowMode: The view window's mode. 3060 // 3061 // Possible values: 3062 // "DEFAULT_VIEW_WINDOW_MODE" - The default view window mode used in 3063 // the Sheets editor for this chart 3064 // type. In most cases, if set, the default mode is equivalent 3065 // to 3066 // `PRETTY`. 3067 // "VIEW_WINDOW_MODE_UNSUPPORTED" - Do not use. Represents that the 3068 // currently set mode is not supported by 3069 // the API. 3070 // "EXPLICIT" - Follows the min and max exactly if specified. If a 3071 // value is unspecified, 3072 // it will fall back to the `PRETTY` value. 3073 // "PRETTY" - Chooses a min and max that make the chart look good. 3074 // Both min and max are 3075 // ignored in this mode. 3076 ViewWindowMode string `json:"viewWindowMode,omitempty"` 3077 3078 // ForceSendFields is a list of field names (e.g. "ViewWindowMax") to 3079 // unconditionally include in API requests. By default, fields with 3080 // empty values are omitted from API requests. However, any non-pointer, 3081 // non-interface field appearing in ForceSendFields will be sent to the 3082 // server regardless of whether the field is empty or not. This may be 3083 // used to include empty fields in Patch requests. 3084 ForceSendFields []string `json:"-"` 3085 3086 // NullFields is a list of field names (e.g. "ViewWindowMax") to include 3087 // in API requests with the JSON null value. By default, fields with 3088 // empty values are omitted from API requests. However, any field with 3089 // an empty value appearing in NullFields will be sent to the server as 3090 // null. It is an error if a field in this list has a non-empty value. 3091 // This may be used to include null fields in Patch requests. 3092 NullFields []string `json:"-"` 3093} 3094 3095func (s *ChartAxisViewWindowOptions) MarshalJSON() ([]byte, error) { 3096 type NoMethod ChartAxisViewWindowOptions 3097 raw := NoMethod(*s) 3098 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3099} 3100 3101func (s *ChartAxisViewWindowOptions) UnmarshalJSON(data []byte) error { 3102 type NoMethod ChartAxisViewWindowOptions 3103 var s1 struct { 3104 ViewWindowMax gensupport.JSONFloat64 `json:"viewWindowMax"` 3105 ViewWindowMin gensupport.JSONFloat64 `json:"viewWindowMin"` 3106 *NoMethod 3107 } 3108 s1.NoMethod = (*NoMethod)(s) 3109 if err := json.Unmarshal(data, &s1); err != nil { 3110 return err 3111 } 3112 s.ViewWindowMax = float64(s1.ViewWindowMax) 3113 s.ViewWindowMin = float64(s1.ViewWindowMin) 3114 return nil 3115} 3116 3117// ChartCustomNumberFormatOptions: Custom number formatting options for 3118// chart attributes. 3119type ChartCustomNumberFormatOptions struct { 3120 // Prefix: Custom prefix to be prepended to the chart attribute. 3121 // This field is optional. 3122 Prefix string `json:"prefix,omitempty"` 3123 3124 // Suffix: Custom suffix to be appended to the chart attribute. 3125 // This field is optional. 3126 Suffix string `json:"suffix,omitempty"` 3127 3128 // ForceSendFields is a list of field names (e.g. "Prefix") to 3129 // unconditionally include in API requests. By default, fields with 3130 // empty values are omitted from API requests. However, any non-pointer, 3131 // non-interface field appearing in ForceSendFields will be sent to the 3132 // server regardless of whether the field is empty or not. This may be 3133 // used to include empty fields in Patch requests. 3134 ForceSendFields []string `json:"-"` 3135 3136 // NullFields is a list of field names (e.g. "Prefix") to include in API 3137 // requests with the JSON null value. By default, fields with empty 3138 // values are omitted from API requests. However, any field with an 3139 // empty value appearing in NullFields will be sent to the server as 3140 // null. It is an error if a field in this list has a non-empty value. 3141 // This may be used to include null fields in Patch requests. 3142 NullFields []string `json:"-"` 3143} 3144 3145func (s *ChartCustomNumberFormatOptions) MarshalJSON() ([]byte, error) { 3146 type NoMethod ChartCustomNumberFormatOptions 3147 raw := NoMethod(*s) 3148 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3149} 3150 3151// ChartData: The data included in a domain or series. 3152type ChartData struct { 3153 // SourceRange: The source ranges of the data. 3154 SourceRange *ChartSourceRange `json:"sourceRange,omitempty"` 3155 3156 // ForceSendFields is a list of field names (e.g. "SourceRange") to 3157 // unconditionally include in API requests. By default, fields with 3158 // empty values are omitted from API requests. However, any non-pointer, 3159 // non-interface field appearing in ForceSendFields will be sent to the 3160 // server regardless of whether the field is empty or not. This may be 3161 // used to include empty fields in Patch requests. 3162 ForceSendFields []string `json:"-"` 3163 3164 // NullFields is a list of field names (e.g. "SourceRange") to include 3165 // in API requests with the JSON null value. By default, fields with 3166 // empty values are omitted from API requests. However, any field with 3167 // an empty value appearing in NullFields will be sent to the server as 3168 // null. It is an error if a field in this list has a non-empty value. 3169 // This may be used to include null fields in Patch requests. 3170 NullFields []string `json:"-"` 3171} 3172 3173func (s *ChartData) MarshalJSON() ([]byte, error) { 3174 type NoMethod ChartData 3175 raw := NoMethod(*s) 3176 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3177} 3178 3179// ChartSourceRange: Source ranges for a chart. 3180type ChartSourceRange struct { 3181 // Sources: The ranges of data for a series or domain. 3182 // Exactly one dimension must have a length of 1, 3183 // and all sources in the list must have the same dimension 3184 // with length 1. 3185 // The domain (if it exists) & all series must have the same number 3186 // of source ranges. If using more than one source range, then the 3187 // source 3188 // range at a given offset must be in order and contiguous across the 3189 // domain 3190 // and series. 3191 // 3192 // For example, these are valid configurations: 3193 // 3194 // domain sources: A1:A5 3195 // series1 sources: B1:B5 3196 // series2 sources: D6:D10 3197 // 3198 // domain sources: A1:A5, C10:C12 3199 // series1 sources: B1:B5, D10:D12 3200 // series2 sources: C1:C5, E10:E12 3201 Sources []*GridRange `json:"sources,omitempty"` 3202 3203 // ForceSendFields is a list of field names (e.g. "Sources") to 3204 // unconditionally include in API requests. By default, fields with 3205 // empty values are omitted from API requests. However, any non-pointer, 3206 // non-interface field appearing in ForceSendFields will be sent to the 3207 // server regardless of whether the field is empty or not. This may be 3208 // used to include empty fields in Patch requests. 3209 ForceSendFields []string `json:"-"` 3210 3211 // NullFields is a list of field names (e.g. "Sources") to include in 3212 // API requests with the JSON null value. By default, fields with empty 3213 // values are omitted from API requests. However, any field with an 3214 // empty value appearing in NullFields will be sent to the server as 3215 // null. It is an error if a field in this list has a non-empty value. 3216 // This may be used to include null fields in Patch requests. 3217 NullFields []string `json:"-"` 3218} 3219 3220func (s *ChartSourceRange) MarshalJSON() ([]byte, error) { 3221 type NoMethod ChartSourceRange 3222 raw := NoMethod(*s) 3223 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3224} 3225 3226// ChartSpec: The specifications of a chart. 3227type ChartSpec struct { 3228 // AltText: The alternative text that describes the chart. This is 3229 // often used 3230 // for accessibility. 3231 AltText string `json:"altText,omitempty"` 3232 3233 // BackgroundColor: The background color of the entire chart. 3234 // Not applicable to Org charts. 3235 BackgroundColor *Color `json:"backgroundColor,omitempty"` 3236 3237 // BasicChart: A basic chart specification, can be one of many kinds of 3238 // charts. 3239 // See BasicChartType for the list of all 3240 // charts this supports. 3241 BasicChart *BasicChartSpec `json:"basicChart,omitempty"` 3242 3243 // BubbleChart: A bubble chart specification. 3244 BubbleChart *BubbleChartSpec `json:"bubbleChart,omitempty"` 3245 3246 // CandlestickChart: A candlestick chart specification. 3247 CandlestickChart *CandlestickChartSpec `json:"candlestickChart,omitempty"` 3248 3249 // FontName: The name of the font to use by default for all chart text 3250 // (e.g. title, 3251 // axis labels, legend). If a font is specified for a specific part of 3252 // the 3253 // chart it will override this font name. 3254 FontName string `json:"fontName,omitempty"` 3255 3256 // HiddenDimensionStrategy: Determines how the charts will use hidden 3257 // rows or columns. 3258 // 3259 // Possible values: 3260 // "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" - Default value, do 3261 // not use. 3262 // "SKIP_HIDDEN_ROWS_AND_COLUMNS" - Charts will skip hidden rows and 3263 // columns. 3264 // "SKIP_HIDDEN_ROWS" - Charts will skip hidden rows only. 3265 // "SKIP_HIDDEN_COLUMNS" - Charts will skip hidden columns only. 3266 // "SHOW_ALL" - Charts will not skip any hidden rows or columns. 3267 HiddenDimensionStrategy string `json:"hiddenDimensionStrategy,omitempty"` 3268 3269 // HistogramChart: A histogram chart specification. 3270 HistogramChart *HistogramChartSpec `json:"histogramChart,omitempty"` 3271 3272 // Maximized: True to make a chart fill the entire space in which it's 3273 // rendered with 3274 // minimum padding. False to use the default padding. 3275 // (Not applicable to Geo and Org charts.) 3276 Maximized bool `json:"maximized,omitempty"` 3277 3278 // OrgChart: An org chart specification. 3279 OrgChart *OrgChartSpec `json:"orgChart,omitempty"` 3280 3281 // PieChart: A pie chart specification. 3282 PieChart *PieChartSpec `json:"pieChart,omitempty"` 3283 3284 // ScorecardChart: A scorecard chart specification. 3285 ScorecardChart *ScorecardChartSpec `json:"scorecardChart,omitempty"` 3286 3287 // Subtitle: The subtitle of the chart. 3288 Subtitle string `json:"subtitle,omitempty"` 3289 3290 // SubtitleTextFormat: The subtitle text format. 3291 // Strikethrough and underline are not supported. 3292 SubtitleTextFormat *TextFormat `json:"subtitleTextFormat,omitempty"` 3293 3294 // SubtitleTextPosition: The subtitle text position. 3295 // This field is optional. 3296 SubtitleTextPosition *TextPosition `json:"subtitleTextPosition,omitempty"` 3297 3298 // Title: The title of the chart. 3299 Title string `json:"title,omitempty"` 3300 3301 // TitleTextFormat: The title text format. 3302 // Strikethrough and underline are not supported. 3303 TitleTextFormat *TextFormat `json:"titleTextFormat,omitempty"` 3304 3305 // TitleTextPosition: The title text position. 3306 // This field is optional. 3307 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 3308 3309 // TreemapChart: A treemap chart specification. 3310 TreemapChart *TreemapChartSpec `json:"treemapChart,omitempty"` 3311 3312 // WaterfallChart: A waterfall chart specification. 3313 WaterfallChart *WaterfallChartSpec `json:"waterfallChart,omitempty"` 3314 3315 // ForceSendFields is a list of field names (e.g. "AltText") to 3316 // unconditionally include in API requests. By default, fields with 3317 // empty values are omitted from API requests. However, any non-pointer, 3318 // non-interface field appearing in ForceSendFields will be sent to the 3319 // server regardless of whether the field is empty or not. This may be 3320 // used to include empty fields in Patch requests. 3321 ForceSendFields []string `json:"-"` 3322 3323 // NullFields is a list of field names (e.g. "AltText") to include in 3324 // API requests with the JSON null value. By default, fields with empty 3325 // values are omitted from API requests. However, any field with an 3326 // empty value appearing in NullFields will be sent to the server as 3327 // null. It is an error if a field in this list has a non-empty value. 3328 // This may be used to include null fields in Patch requests. 3329 NullFields []string `json:"-"` 3330} 3331 3332func (s *ChartSpec) MarshalJSON() ([]byte, error) { 3333 type NoMethod ChartSpec 3334 raw := NoMethod(*s) 3335 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3336} 3337 3338// ClearBasicFilterRequest: Clears the basic filter, if any exists on 3339// the sheet. 3340type ClearBasicFilterRequest struct { 3341 // SheetId: The sheet ID on which the basic filter should be cleared. 3342 SheetId int64 `json:"sheetId,omitempty"` 3343 3344 // ForceSendFields is a list of field names (e.g. "SheetId") to 3345 // unconditionally include in API requests. By default, fields with 3346 // empty values are omitted from API requests. However, any non-pointer, 3347 // non-interface field appearing in ForceSendFields will be sent to the 3348 // server regardless of whether the field is empty or not. This may be 3349 // used to include empty fields in Patch requests. 3350 ForceSendFields []string `json:"-"` 3351 3352 // NullFields is a list of field names (e.g. "SheetId") to include in 3353 // API requests with the JSON null value. By default, fields with empty 3354 // values are omitted from API requests. However, any field with an 3355 // empty value appearing in NullFields will be sent to the server as 3356 // null. It is an error if a field in this list has a non-empty value. 3357 // This may be used to include null fields in Patch requests. 3358 NullFields []string `json:"-"` 3359} 3360 3361func (s *ClearBasicFilterRequest) MarshalJSON() ([]byte, error) { 3362 type NoMethod ClearBasicFilterRequest 3363 raw := NoMethod(*s) 3364 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3365} 3366 3367// ClearValuesRequest: The request for clearing a range of values in a 3368// spreadsheet. 3369type ClearValuesRequest struct { 3370} 3371 3372// ClearValuesResponse: The response when clearing a range of values in 3373// a spreadsheet. 3374type ClearValuesResponse struct { 3375 // ClearedRange: The range (in A1 notation) that was cleared. 3376 // (If the request was for an unbounded range or a ranger larger 3377 // than the bounds of the sheet, this will be the actual range 3378 // that was cleared, bounded to the sheet's limits.) 3379 ClearedRange string `json:"clearedRange,omitempty"` 3380 3381 // SpreadsheetId: The spreadsheet the updates were applied to. 3382 SpreadsheetId string `json:"spreadsheetId,omitempty"` 3383 3384 // ServerResponse contains the HTTP response code and headers from the 3385 // server. 3386 googleapi.ServerResponse `json:"-"` 3387 3388 // ForceSendFields is a list of field names (e.g. "ClearedRange") to 3389 // unconditionally include in API requests. By default, fields with 3390 // empty values are omitted from API requests. However, any non-pointer, 3391 // non-interface field appearing in ForceSendFields will be sent to the 3392 // server regardless of whether the field is empty or not. This may be 3393 // used to include empty fields in Patch requests. 3394 ForceSendFields []string `json:"-"` 3395 3396 // NullFields is a list of field names (e.g. "ClearedRange") to include 3397 // in API requests with the JSON null value. By default, fields with 3398 // empty values are omitted from API requests. However, any field with 3399 // an empty value appearing in NullFields will be sent to the server as 3400 // null. It is an error if a field in this list has a non-empty value. 3401 // This may be used to include null fields in Patch requests. 3402 NullFields []string `json:"-"` 3403} 3404 3405func (s *ClearValuesResponse) MarshalJSON() ([]byte, error) { 3406 type NoMethod ClearValuesResponse 3407 raw := NoMethod(*s) 3408 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3409} 3410 3411// Color: Represents a color in the RGBA color space. This 3412// representation is designed 3413// for simplicity of conversion to/from color representations in 3414// various 3415// languages over compactness; for example, the fields of this 3416// representation 3417// can be trivially provided to the constructor of "java.awt.Color" in 3418// Java; it 3419// can also be trivially provided to UIColor's 3420// "+colorWithRed:green:blue:alpha" 3421// method in iOS; and, with just a little work, it can be easily 3422// formatted into 3423// a CSS "rgba()" string in JavaScript, as well. 3424// 3425// Note: this proto does not carry information about the absolute color 3426// space 3427// that should be used to interpret the RGB value (e.g. sRGB, Adobe 3428// RGB, 3429// DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the 3430// sRGB color 3431// space. 3432// 3433// Example (Java): 3434// 3435// import com.google.type.Color; 3436// 3437// // ... 3438// public static java.awt.Color fromProto(Color protocolor) { 3439// float alpha = protocolor.hasAlpha() 3440// ? protocolor.getAlpha().getValue() 3441// : 1.0; 3442// 3443// return new java.awt.Color( 3444// protocolor.getRed(), 3445// protocolor.getGreen(), 3446// protocolor.getBlue(), 3447// alpha); 3448// } 3449// 3450// public static Color toProto(java.awt.Color color) { 3451// float red = (float) color.getRed(); 3452// float green = (float) color.getGreen(); 3453// float blue = (float) color.getBlue(); 3454// float denominator = 255.0; 3455// Color.Builder resultBuilder = 3456// Color 3457// .newBuilder() 3458// .setRed(red / denominator) 3459// .setGreen(green / denominator) 3460// .setBlue(blue / denominator); 3461// int alpha = color.getAlpha(); 3462// if (alpha != 255) { 3463// result.setAlpha( 3464// FloatValue 3465// .newBuilder() 3466// .setValue(((float) alpha) / denominator) 3467// .build()); 3468// } 3469// return resultBuilder.build(); 3470// } 3471// // ... 3472// 3473// Example (iOS / Obj-C): 3474// 3475// // ... 3476// static UIColor* fromProto(Color* protocolor) { 3477// float red = [protocolor red]; 3478// float green = [protocolor green]; 3479// float blue = [protocolor blue]; 3480// FloatValue* alpha_wrapper = [protocolor alpha]; 3481// float alpha = 1.0; 3482// if (alpha_wrapper != nil) { 3483// alpha = [alpha_wrapper value]; 3484// } 3485// return [UIColor colorWithRed:red green:green blue:blue 3486// alpha:alpha]; 3487// } 3488// 3489// static Color* toProto(UIColor* color) { 3490// CGFloat red, green, blue, alpha; 3491// if (![color getRed:&red green:&green blue:&blue 3492// alpha:&alpha]) { 3493// return nil; 3494// } 3495// Color* result = [[Color alloc] init]; 3496// [result setRed:red]; 3497// [result setGreen:green]; 3498// [result setBlue:blue]; 3499// if (alpha <= 0.9999) { 3500// [result setAlpha:floatWrapperWithValue(alpha)]; 3501// } 3502// [result autorelease]; 3503// return result; 3504// } 3505// // ... 3506// 3507// Example (JavaScript): 3508// 3509// // ... 3510// 3511// var protoToCssColor = function(rgb_color) { 3512// var redFrac = rgb_color.red || 0.0; 3513// var greenFrac = rgb_color.green || 0.0; 3514// var blueFrac = rgb_color.blue || 0.0; 3515// var red = Math.floor(redFrac * 255); 3516// var green = Math.floor(greenFrac * 255); 3517// var blue = Math.floor(blueFrac * 255); 3518// 3519// if (!('alpha' in rgb_color)) { 3520// return rgbToCssColor_(red, green, blue); 3521// } 3522// 3523// var alphaFrac = rgb_color.alpha.value || 0.0; 3524// var rgbParams = [red, green, blue].join(','); 3525// return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); 3526// }; 3527// 3528// var rgbToCssColor_ = function(red, green, blue) { 3529// var rgbNumber = new Number((red << 16) | (green << 8) | blue); 3530// var hexString = rgbNumber.toString(16); 3531// var missingZeros = 6 - hexString.length; 3532// var resultBuilder = ['#']; 3533// for (var i = 0; i < missingZeros; i++) { 3534// resultBuilder.push('0'); 3535// } 3536// resultBuilder.push(hexString); 3537// return resultBuilder.join(''); 3538// }; 3539// 3540// // ... 3541type Color struct { 3542 // Alpha: The fraction of this color that should be applied to the 3543 // pixel. That is, 3544 // the final pixel color is defined by the equation: 3545 // 3546 // pixel color = alpha * (this color) + (1.0 - alpha) * (background 3547 // color) 3548 // 3549 // This means that a value of 1.0 corresponds to a solid color, 3550 // whereas 3551 // a value of 0.0 corresponds to a completely transparent color. 3552 // This 3553 // uses a wrapper message rather than a simple float scalar so that it 3554 // is 3555 // possible to distinguish between a default value and the value being 3556 // unset. 3557 // If omitted, this color object is to be rendered as a solid color 3558 // (as if the alpha value had been explicitly given with a value of 3559 // 1.0). 3560 Alpha float64 `json:"alpha,omitempty"` 3561 3562 // Blue: The amount of blue in the color as a value in the interval [0, 3563 // 1]. 3564 Blue float64 `json:"blue,omitempty"` 3565 3566 // Green: The amount of green in the color as a value in the interval 3567 // [0, 1]. 3568 Green float64 `json:"green,omitempty"` 3569 3570 // Red: The amount of red in the color as a value in the interval [0, 3571 // 1]. 3572 Red float64 `json:"red,omitempty"` 3573 3574 // ForceSendFields is a list of field names (e.g. "Alpha") to 3575 // unconditionally include in API requests. By default, fields with 3576 // empty values are omitted from API requests. However, any non-pointer, 3577 // non-interface field appearing in ForceSendFields will be sent to the 3578 // server regardless of whether the field is empty or not. This may be 3579 // used to include empty fields in Patch requests. 3580 ForceSendFields []string `json:"-"` 3581 3582 // NullFields is a list of field names (e.g. "Alpha") to include in API 3583 // requests with the JSON null value. By default, fields with empty 3584 // values are omitted from API requests. However, any field with an 3585 // empty value appearing in NullFields will be sent to the server as 3586 // null. It is an error if a field in this list has a non-empty value. 3587 // This may be used to include null fields in Patch requests. 3588 NullFields []string `json:"-"` 3589} 3590 3591func (s *Color) MarshalJSON() ([]byte, error) { 3592 type NoMethod Color 3593 raw := NoMethod(*s) 3594 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3595} 3596 3597func (s *Color) UnmarshalJSON(data []byte) error { 3598 type NoMethod Color 3599 var s1 struct { 3600 Alpha gensupport.JSONFloat64 `json:"alpha"` 3601 Blue gensupport.JSONFloat64 `json:"blue"` 3602 Green gensupport.JSONFloat64 `json:"green"` 3603 Red gensupport.JSONFloat64 `json:"red"` 3604 *NoMethod 3605 } 3606 s1.NoMethod = (*NoMethod)(s) 3607 if err := json.Unmarshal(data, &s1); err != nil { 3608 return err 3609 } 3610 s.Alpha = float64(s1.Alpha) 3611 s.Blue = float64(s1.Blue) 3612 s.Green = float64(s1.Green) 3613 s.Red = float64(s1.Red) 3614 return nil 3615} 3616 3617// ConditionValue: The value of the condition. 3618type ConditionValue struct { 3619 // RelativeDate: A relative date (based on the current date). 3620 // Valid only if the type is 3621 // DATE_BEFORE, 3622 // DATE_AFTER, 3623 // DATE_ON_OR_BEFORE or 3624 // DATE_ON_OR_AFTER. 3625 // 3626 // Relative dates are not supported in data validation. 3627 // They are supported only in conditional formatting and 3628 // conditional filters. 3629 // 3630 // Possible values: 3631 // "RELATIVE_DATE_UNSPECIFIED" - Default value, do not use. 3632 // "PAST_YEAR" - The value is one year before today. 3633 // "PAST_MONTH" - The value is one month before today. 3634 // "PAST_WEEK" - The value is one week before today. 3635 // "YESTERDAY" - The value is yesterday. 3636 // "TODAY" - The value is today. 3637 // "TOMORROW" - The value is tomorrow. 3638 RelativeDate string `json:"relativeDate,omitempty"` 3639 3640 // UserEnteredValue: A value the condition is based on. 3641 // The value is parsed as if the user typed into a cell. 3642 // Formulas are supported (and must begin with an `=` or a '+'). 3643 UserEnteredValue string `json:"userEnteredValue,omitempty"` 3644 3645 // ForceSendFields is a list of field names (e.g. "RelativeDate") to 3646 // unconditionally include in API requests. By default, fields with 3647 // empty values are omitted from API requests. However, any non-pointer, 3648 // non-interface field appearing in ForceSendFields will be sent to the 3649 // server regardless of whether the field is empty or not. This may be 3650 // used to include empty fields in Patch requests. 3651 ForceSendFields []string `json:"-"` 3652 3653 // NullFields is a list of field names (e.g. "RelativeDate") to include 3654 // in API requests with the JSON null value. By default, fields with 3655 // empty values are omitted from API requests. However, any field with 3656 // an empty value appearing in NullFields will be sent to the server as 3657 // null. It is an error if a field in this list has a non-empty value. 3658 // This may be used to include null fields in Patch requests. 3659 NullFields []string `json:"-"` 3660} 3661 3662func (s *ConditionValue) MarshalJSON() ([]byte, error) { 3663 type NoMethod ConditionValue 3664 raw := NoMethod(*s) 3665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3666} 3667 3668// ConditionalFormatRule: A rule describing a conditional format. 3669type ConditionalFormatRule struct { 3670 // BooleanRule: The formatting is either "on" or "off" according to the 3671 // rule. 3672 BooleanRule *BooleanRule `json:"booleanRule,omitempty"` 3673 3674 // GradientRule: The formatting will vary based on the gradients in the 3675 // rule. 3676 GradientRule *GradientRule `json:"gradientRule,omitempty"` 3677 3678 // Ranges: The ranges that are formatted if the condition is true. 3679 // All the ranges must be on the same grid. 3680 Ranges []*GridRange `json:"ranges,omitempty"` 3681 3682 // ForceSendFields is a list of field names (e.g. "BooleanRule") to 3683 // unconditionally include in API requests. By default, fields with 3684 // empty values are omitted from API requests. However, any non-pointer, 3685 // non-interface field appearing in ForceSendFields will be sent to the 3686 // server regardless of whether the field is empty or not. This may be 3687 // used to include empty fields in Patch requests. 3688 ForceSendFields []string `json:"-"` 3689 3690 // NullFields is a list of field names (e.g. "BooleanRule") to include 3691 // in API requests with the JSON null value. By default, fields with 3692 // empty values are omitted from API requests. However, any field with 3693 // an empty value appearing in NullFields will be sent to the server as 3694 // null. It is an error if a field in this list has a non-empty value. 3695 // This may be used to include null fields in Patch requests. 3696 NullFields []string `json:"-"` 3697} 3698 3699func (s *ConditionalFormatRule) MarshalJSON() ([]byte, error) { 3700 type NoMethod ConditionalFormatRule 3701 raw := NoMethod(*s) 3702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3703} 3704 3705// CopyPasteRequest: Copies data from the source to the destination. 3706type CopyPasteRequest struct { 3707 // Destination: The location to paste to. If the range covers a span 3708 // that's 3709 // a multiple of the source's height or width, then the 3710 // data will be repeated to fill in the destination range. 3711 // If the range is smaller than the source range, the entire 3712 // source data will still be copied (beyond the end of the destination 3713 // range). 3714 Destination *GridRange `json:"destination,omitempty"` 3715 3716 // PasteOrientation: How that data should be oriented when pasting. 3717 // 3718 // Possible values: 3719 // "NORMAL" - Paste normally. 3720 // "TRANSPOSE" - Paste transposed, where all rows become columns and 3721 // vice versa. 3722 PasteOrientation string `json:"pasteOrientation,omitempty"` 3723 3724 // PasteType: What kind of data to paste. 3725 // 3726 // Possible values: 3727 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3728 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3729 // or merges. 3730 // "PASTE_FORMAT" - Paste the format and data validation only. 3731 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 3732 // "PASTE_FORMULA" - Paste the formulas only. 3733 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3734 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3735 // rules only. 3736 PasteType string `json:"pasteType,omitempty"` 3737 3738 // Source: The source range to copy. 3739 Source *GridRange `json:"source,omitempty"` 3740 3741 // ForceSendFields is a list of field names (e.g. "Destination") to 3742 // unconditionally include in API requests. By default, fields with 3743 // empty values are omitted from API requests. However, any non-pointer, 3744 // non-interface field appearing in ForceSendFields will be sent to the 3745 // server regardless of whether the field is empty or not. This may be 3746 // used to include empty fields in Patch requests. 3747 ForceSendFields []string `json:"-"` 3748 3749 // NullFields is a list of field names (e.g. "Destination") to include 3750 // in API requests with the JSON null value. By default, fields with 3751 // empty values are omitted from API requests. However, any field with 3752 // an empty value appearing in NullFields will be sent to the server as 3753 // null. It is an error if a field in this list has a non-empty value. 3754 // This may be used to include null fields in Patch requests. 3755 NullFields []string `json:"-"` 3756} 3757 3758func (s *CopyPasteRequest) MarshalJSON() ([]byte, error) { 3759 type NoMethod CopyPasteRequest 3760 raw := NoMethod(*s) 3761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3762} 3763 3764// CopySheetToAnotherSpreadsheetRequest: The request to copy a sheet 3765// across spreadsheets. 3766type CopySheetToAnotherSpreadsheetRequest struct { 3767 // DestinationSpreadsheetId: The ID of the spreadsheet to copy the sheet 3768 // to. 3769 DestinationSpreadsheetId string `json:"destinationSpreadsheetId,omitempty"` 3770 3771 // ForceSendFields is a list of field names (e.g. 3772 // "DestinationSpreadsheetId") to unconditionally include in API 3773 // requests. By default, fields with empty values are omitted from API 3774 // requests. However, any non-pointer, non-interface field appearing in 3775 // ForceSendFields will be sent to the server regardless of whether the 3776 // field is empty or not. This may be used to include empty fields in 3777 // Patch requests. 3778 ForceSendFields []string `json:"-"` 3779 3780 // NullFields is a list of field names (e.g. "DestinationSpreadsheetId") 3781 // to include in API requests with the JSON null value. By default, 3782 // fields with empty values are omitted from API requests. However, any 3783 // field with an empty value appearing in NullFields will be sent to the 3784 // server as null. It is an error if a field in this list has a 3785 // non-empty value. This may be used to include null fields in Patch 3786 // requests. 3787 NullFields []string `json:"-"` 3788} 3789 3790func (s *CopySheetToAnotherSpreadsheetRequest) MarshalJSON() ([]byte, error) { 3791 type NoMethod CopySheetToAnotherSpreadsheetRequest 3792 raw := NoMethod(*s) 3793 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3794} 3795 3796// CreateDeveloperMetadataRequest: A request to create developer 3797// metadata. 3798type CreateDeveloperMetadataRequest struct { 3799 // DeveloperMetadata: The developer metadata to create. 3800 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3801 3802 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3803 // to unconditionally include in API requests. By default, fields with 3804 // empty values are omitted from API requests. However, any non-pointer, 3805 // non-interface field appearing in ForceSendFields will be sent to the 3806 // server regardless of whether the field is empty or not. This may be 3807 // used to include empty fields in Patch requests. 3808 ForceSendFields []string `json:"-"` 3809 3810 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3811 // include in API requests with the JSON null value. By default, fields 3812 // with empty values are omitted from API requests. However, any field 3813 // with an empty value appearing in NullFields will be sent to the 3814 // server as null. It is an error if a field in this list has a 3815 // non-empty value. This may be used to include null fields in Patch 3816 // requests. 3817 NullFields []string `json:"-"` 3818} 3819 3820func (s *CreateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 3821 type NoMethod CreateDeveloperMetadataRequest 3822 raw := NoMethod(*s) 3823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3824} 3825 3826// CreateDeveloperMetadataResponse: The response from creating developer 3827// metadata. 3828type CreateDeveloperMetadataResponse struct { 3829 // DeveloperMetadata: The developer metadata that was created. 3830 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3831 3832 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3833 // to unconditionally include in API requests. By default, fields with 3834 // empty values are omitted from API requests. However, any non-pointer, 3835 // non-interface field appearing in ForceSendFields will be sent to the 3836 // server regardless of whether the field is empty or not. This may be 3837 // used to include empty fields in Patch requests. 3838 ForceSendFields []string `json:"-"` 3839 3840 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3841 // include in API requests with the JSON null value. By default, fields 3842 // with empty values are omitted from API requests. However, any field 3843 // with an empty value appearing in NullFields will be sent to the 3844 // server as null. It is an error if a field in this list has a 3845 // non-empty value. This may be used to include null fields in Patch 3846 // requests. 3847 NullFields []string `json:"-"` 3848} 3849 3850func (s *CreateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 3851 type NoMethod CreateDeveloperMetadataResponse 3852 raw := NoMethod(*s) 3853 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3854} 3855 3856// CutPasteRequest: Moves data from the source to the destination. 3857type CutPasteRequest struct { 3858 // Destination: The top-left coordinate where the data should be pasted. 3859 Destination *GridCoordinate `json:"destination,omitempty"` 3860 3861 // PasteType: What kind of data to paste. All the source data will be 3862 // cut, regardless 3863 // of what is pasted. 3864 // 3865 // Possible values: 3866 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3867 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3868 // or merges. 3869 // "PASTE_FORMAT" - Paste the format and data validation only. 3870 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 3871 // "PASTE_FORMULA" - Paste the formulas only. 3872 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3873 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3874 // rules only. 3875 PasteType string `json:"pasteType,omitempty"` 3876 3877 // Source: The source data to cut. 3878 Source *GridRange `json:"source,omitempty"` 3879 3880 // ForceSendFields is a list of field names (e.g. "Destination") to 3881 // unconditionally include in API requests. By default, fields with 3882 // empty values are omitted from API requests. However, any non-pointer, 3883 // non-interface field appearing in ForceSendFields will be sent to the 3884 // server regardless of whether the field is empty or not. This may be 3885 // used to include empty fields in Patch requests. 3886 ForceSendFields []string `json:"-"` 3887 3888 // NullFields is a list of field names (e.g. "Destination") to include 3889 // in API requests with the JSON null value. By default, fields with 3890 // empty values are omitted from API requests. However, any field with 3891 // an empty value appearing in NullFields will be sent to the server as 3892 // null. It is an error if a field in this list has a non-empty value. 3893 // This may be used to include null fields in Patch requests. 3894 NullFields []string `json:"-"` 3895} 3896 3897func (s *CutPasteRequest) MarshalJSON() ([]byte, error) { 3898 type NoMethod CutPasteRequest 3899 raw := NoMethod(*s) 3900 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3901} 3902 3903// DataFilter: Filter that describes what data should be selected or 3904// returned from a 3905// request. 3906type DataFilter struct { 3907 // A1Range: Selects data that matches the specified A1 range. 3908 A1Range string `json:"a1Range,omitempty"` 3909 3910 // DeveloperMetadataLookup: Selects data associated with the developer 3911 // metadata matching the criteria 3912 // described by this DeveloperMetadataLookup. 3913 DeveloperMetadataLookup *DeveloperMetadataLookup `json:"developerMetadataLookup,omitempty"` 3914 3915 // GridRange: Selects data that matches the range described by the 3916 // GridRange. 3917 GridRange *GridRange `json:"gridRange,omitempty"` 3918 3919 // ForceSendFields is a list of field names (e.g. "A1Range") to 3920 // unconditionally include in API requests. By default, fields with 3921 // empty values are omitted from API requests. However, any non-pointer, 3922 // non-interface field appearing in ForceSendFields will be sent to the 3923 // server regardless of whether the field is empty or not. This may be 3924 // used to include empty fields in Patch requests. 3925 ForceSendFields []string `json:"-"` 3926 3927 // NullFields is a list of field names (e.g. "A1Range") to include in 3928 // API requests with the JSON null value. By default, fields with empty 3929 // values are omitted from API requests. However, any field with an 3930 // empty value appearing in NullFields will be sent to the server as 3931 // null. It is an error if a field in this list has a non-empty value. 3932 // This may be used to include null fields in Patch requests. 3933 NullFields []string `json:"-"` 3934} 3935 3936func (s *DataFilter) MarshalJSON() ([]byte, error) { 3937 type NoMethod DataFilter 3938 raw := NoMethod(*s) 3939 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3940} 3941 3942// DataFilterValueRange: A range of values whose location is specified 3943// by a DataFilter. 3944type DataFilterValueRange struct { 3945 // DataFilter: The data filter describing the location of the values in 3946 // the spreadsheet. 3947 DataFilter *DataFilter `json:"dataFilter,omitempty"` 3948 3949 // MajorDimension: The major dimension of the values. 3950 // 3951 // Possible values: 3952 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 3953 // "ROWS" - Operates on the rows of a sheet. 3954 // "COLUMNS" - Operates on the columns of a sheet. 3955 MajorDimension string `json:"majorDimension,omitempty"` 3956 3957 // Values: The data to be written. If the provided values exceed any of 3958 // the ranges 3959 // matched by the data filter then the request will fail. If the 3960 // provided 3961 // values are less than the matched ranges only the specified values 3962 // will be 3963 // written, existing values in the matched ranges will remain 3964 // unaffected. 3965 Values [][]interface{} `json:"values,omitempty"` 3966 3967 // ForceSendFields is a list of field names (e.g. "DataFilter") to 3968 // unconditionally include in API requests. By default, fields with 3969 // empty values are omitted from API requests. However, any non-pointer, 3970 // non-interface field appearing in ForceSendFields will be sent to the 3971 // server regardless of whether the field is empty or not. This may be 3972 // used to include empty fields in Patch requests. 3973 ForceSendFields []string `json:"-"` 3974 3975 // NullFields is a list of field names (e.g. "DataFilter") to include in 3976 // API requests with the JSON null value. By default, fields with empty 3977 // values are omitted from API requests. However, any field with an 3978 // empty value appearing in NullFields will be sent to the server as 3979 // null. It is an error if a field in this list has a non-empty value. 3980 // This may be used to include null fields in Patch requests. 3981 NullFields []string `json:"-"` 3982} 3983 3984func (s *DataFilterValueRange) MarshalJSON() ([]byte, error) { 3985 type NoMethod DataFilterValueRange 3986 raw := NoMethod(*s) 3987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3988} 3989 3990// DataValidationRule: A data validation rule. 3991type DataValidationRule struct { 3992 // Condition: The condition that data in the cell must match. 3993 Condition *BooleanCondition `json:"condition,omitempty"` 3994 3995 // InputMessage: A message to show the user when adding data to the 3996 // cell. 3997 InputMessage string `json:"inputMessage,omitempty"` 3998 3999 // ShowCustomUi: True if the UI should be customized based on the kind 4000 // of condition. 4001 // If true, "List" conditions will show a dropdown. 4002 ShowCustomUi bool `json:"showCustomUi,omitempty"` 4003 4004 // Strict: True if invalid data should be rejected. 4005 Strict bool `json:"strict,omitempty"` 4006 4007 // ForceSendFields is a list of field names (e.g. "Condition") to 4008 // unconditionally include in API requests. By default, fields with 4009 // empty values are omitted from API requests. However, any non-pointer, 4010 // non-interface field appearing in ForceSendFields will be sent to the 4011 // server regardless of whether the field is empty or not. This may be 4012 // used to include empty fields in Patch requests. 4013 ForceSendFields []string `json:"-"` 4014 4015 // NullFields is a list of field names (e.g. "Condition") to include in 4016 // API requests with the JSON null value. By default, fields with empty 4017 // values are omitted from API requests. However, any field with an 4018 // empty value appearing in NullFields will be sent to the server as 4019 // null. It is an error if a field in this list has a non-empty value. 4020 // This may be used to include null fields in Patch requests. 4021 NullFields []string `json:"-"` 4022} 4023 4024func (s *DataValidationRule) MarshalJSON() ([]byte, error) { 4025 type NoMethod DataValidationRule 4026 raw := NoMethod(*s) 4027 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4028} 4029 4030// DateTimeRule: Allows you to organize the date-time values in a source 4031// data column into 4032// buckets based on selected parts of their date or time values. For 4033// example, 4034// consider a pivot table showing sales transactions by date: 4035// 4036// +----------+--------------+ 4037// | Date | SUM of Sales | 4038// +----------+--------------+ 4039// | 1/1/2017 | $621.14 | 4040// | 2/3/2017 | $708.84 | 4041// | 5/8/2017 | $326.84 | 4042// ... 4043// +----------+--------------+ 4044// Applying a date-time group rule with a DateTimeRuleType of 4045// YEAR_MONTH 4046// results in the following pivot table. 4047// 4048// +--------------+--------------+ 4049// | Grouped Date | SUM of Sales | 4050// +--------------+--------------+ 4051// | 2017-Jan | $53,731.78 | 4052// | 2017-Feb | $83,475.32 | 4053// | 2017-Mar | $94,385.05 | 4054// ... 4055// +--------------+--------------+ 4056type DateTimeRule struct { 4057 // Type: The type of date-time grouping to apply. 4058 // 4059 // Possible values: 4060 // "DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not use. 4061 // "SECOND" - Group dates by second, from 0 to 59. 4062 // "MINUTE" - Group dates by minute, from 0 to 59. 4063 // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23. 4064 // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour 4065 // system, for example 19:45. 4066 // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour 4067 // system, for example 7:45 4068 // PM. The AM/PM designation is translated based on the 4069 // spreadsheet 4070 // locale. 4071 // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The 4072 // days of the week will 4073 // be translated based on the spreadsheet locale. 4074 // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note 4075 // that dates after Feb. 29 4076 // fall in different buckets in leap years than in non-leap years. 4077 // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31. 4078 // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The 4079 // month is 4080 // translated based on the spreadsheet locale. 4081 // "MONTH" - Group dates by month, for example Nov. The month is 4082 // translated based 4083 // on the spreadsheet locale. 4084 // "QUARTER" - Group dates by quarter, for example Q1 (which 4085 // represents Jan-Mar). 4086 // "YEAR" - Group dates by year, for example 2008. 4087 // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov. 4088 // The month is 4089 // translated based on the spreadsheet locale. 4090 // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008 4091 // Q4. 4092 // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example 4093 // 2008-11-22. 4094 Type string `json:"type,omitempty"` 4095 4096 // ForceSendFields is a list of field names (e.g. "Type") to 4097 // unconditionally include in API requests. By default, fields with 4098 // empty values are omitted from API requests. However, any non-pointer, 4099 // non-interface field appearing in ForceSendFields will be sent to the 4100 // server regardless of whether the field is empty or not. This may be 4101 // used to include empty fields in Patch requests. 4102 ForceSendFields []string `json:"-"` 4103 4104 // NullFields is a list of field names (e.g. "Type") to include in API 4105 // requests with the JSON null value. By default, fields with empty 4106 // values are omitted from API requests. However, any field with an 4107 // empty value appearing in NullFields will be sent to the server as 4108 // null. It is an error if a field in this list has a non-empty value. 4109 // This may be used to include null fields in Patch requests. 4110 NullFields []string `json:"-"` 4111} 4112 4113func (s *DateTimeRule) MarshalJSON() ([]byte, error) { 4114 type NoMethod DateTimeRule 4115 raw := NoMethod(*s) 4116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4117} 4118 4119// DeleteBandingRequest: Removes the banded range with the given ID from 4120// the spreadsheet. 4121type DeleteBandingRequest struct { 4122 // BandedRangeId: The ID of the banded range to delete. 4123 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 4124 4125 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 4126 // unconditionally include in API requests. By default, fields with 4127 // empty values are omitted from API requests. However, any non-pointer, 4128 // non-interface field appearing in ForceSendFields will be sent to the 4129 // server regardless of whether the field is empty or not. This may be 4130 // used to include empty fields in Patch requests. 4131 ForceSendFields []string `json:"-"` 4132 4133 // NullFields is a list of field names (e.g. "BandedRangeId") to include 4134 // in API requests with the JSON null value. By default, fields with 4135 // empty values are omitted from API requests. However, any field with 4136 // an empty value appearing in NullFields will be sent to the server as 4137 // null. It is an error if a field in this list has a non-empty value. 4138 // This may be used to include null fields in Patch requests. 4139 NullFields []string `json:"-"` 4140} 4141 4142func (s *DeleteBandingRequest) MarshalJSON() ([]byte, error) { 4143 type NoMethod DeleteBandingRequest 4144 raw := NoMethod(*s) 4145 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4146} 4147 4148// DeleteConditionalFormatRuleRequest: Deletes a conditional format rule 4149// at the given index. 4150// All subsequent rules' indexes are decremented. 4151type DeleteConditionalFormatRuleRequest struct { 4152 // Index: The zero-based index of the rule to be deleted. 4153 Index int64 `json:"index,omitempty"` 4154 4155 // SheetId: The sheet the rule is being deleted from. 4156 SheetId int64 `json:"sheetId,omitempty"` 4157 4158 // ForceSendFields is a list of field names (e.g. "Index") to 4159 // unconditionally include in API requests. By default, fields with 4160 // empty values are omitted from API requests. However, any non-pointer, 4161 // non-interface field appearing in ForceSendFields will be sent to the 4162 // server regardless of whether the field is empty or not. This may be 4163 // used to include empty fields in Patch requests. 4164 ForceSendFields []string `json:"-"` 4165 4166 // NullFields is a list of field names (e.g. "Index") to include in API 4167 // requests with the JSON null value. By default, fields with empty 4168 // values are omitted from API requests. However, any field with an 4169 // empty value appearing in NullFields will be sent to the server as 4170 // null. It is an error if a field in this list has a non-empty value. 4171 // This may be used to include null fields in Patch requests. 4172 NullFields []string `json:"-"` 4173} 4174 4175func (s *DeleteConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 4176 type NoMethod DeleteConditionalFormatRuleRequest 4177 raw := NoMethod(*s) 4178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4179} 4180 4181// DeleteConditionalFormatRuleResponse: The result of deleting a 4182// conditional format rule. 4183type DeleteConditionalFormatRuleResponse struct { 4184 // Rule: The rule that was deleted. 4185 Rule *ConditionalFormatRule `json:"rule,omitempty"` 4186 4187 // ForceSendFields is a list of field names (e.g. "Rule") to 4188 // unconditionally include in API requests. By default, fields with 4189 // empty values are omitted from API requests. However, any non-pointer, 4190 // non-interface field appearing in ForceSendFields will be sent to the 4191 // server regardless of whether the field is empty or not. This may be 4192 // used to include empty fields in Patch requests. 4193 ForceSendFields []string `json:"-"` 4194 4195 // NullFields is a list of field names (e.g. "Rule") to include in API 4196 // requests with the JSON null value. By default, fields with empty 4197 // values are omitted from API requests. However, any field with an 4198 // empty value appearing in NullFields will be sent to the server as 4199 // null. It is an error if a field in this list has a non-empty value. 4200 // This may be used to include null fields in Patch requests. 4201 NullFields []string `json:"-"` 4202} 4203 4204func (s *DeleteConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 4205 type NoMethod DeleteConditionalFormatRuleResponse 4206 raw := NoMethod(*s) 4207 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4208} 4209 4210// DeleteDeveloperMetadataRequest: A request to delete developer 4211// metadata. 4212type DeleteDeveloperMetadataRequest struct { 4213 // DataFilter: The data filter describing the criteria used to select 4214 // which developer 4215 // metadata entry to delete. 4216 DataFilter *DataFilter `json:"dataFilter,omitempty"` 4217 4218 // ForceSendFields is a list of field names (e.g. "DataFilter") to 4219 // unconditionally include in API requests. By default, fields with 4220 // empty values are omitted from API requests. However, any non-pointer, 4221 // non-interface field appearing in ForceSendFields will be sent to the 4222 // server regardless of whether the field is empty or not. This may be 4223 // used to include empty fields in Patch requests. 4224 ForceSendFields []string `json:"-"` 4225 4226 // NullFields is a list of field names (e.g. "DataFilter") to include in 4227 // API requests with the JSON null value. By default, fields with empty 4228 // values are omitted from API requests. However, any field with an 4229 // empty value appearing in NullFields will be sent to the server as 4230 // null. It is an error if a field in this list has a non-empty value. 4231 // This may be used to include null fields in Patch requests. 4232 NullFields []string `json:"-"` 4233} 4234 4235func (s *DeleteDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 4236 type NoMethod DeleteDeveloperMetadataRequest 4237 raw := NoMethod(*s) 4238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4239} 4240 4241// DeleteDeveloperMetadataResponse: The response from deleting developer 4242// metadata. 4243type DeleteDeveloperMetadataResponse struct { 4244 // DeletedDeveloperMetadata: The metadata that was deleted. 4245 DeletedDeveloperMetadata []*DeveloperMetadata `json:"deletedDeveloperMetadata,omitempty"` 4246 4247 // ForceSendFields is a list of field names (e.g. 4248 // "DeletedDeveloperMetadata") to unconditionally include in API 4249 // requests. By default, fields with empty values are omitted from API 4250 // requests. However, any non-pointer, non-interface field appearing in 4251 // ForceSendFields will be sent to the server regardless of whether the 4252 // field is empty or not. This may be used to include empty fields in 4253 // Patch requests. 4254 ForceSendFields []string `json:"-"` 4255 4256 // NullFields is a list of field names (e.g. "DeletedDeveloperMetadata") 4257 // to include in API requests with the JSON null value. By default, 4258 // fields with empty values are omitted from API requests. However, any 4259 // field with an empty value appearing in NullFields will be sent to the 4260 // server as null. It is an error if a field in this list has a 4261 // non-empty value. This may be used to include null fields in Patch 4262 // requests. 4263 NullFields []string `json:"-"` 4264} 4265 4266func (s *DeleteDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 4267 type NoMethod DeleteDeveloperMetadataResponse 4268 raw := NoMethod(*s) 4269 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4270} 4271 4272// DeleteDimensionGroupRequest: Deletes a group over the specified range 4273// by decrementing the depth of the 4274// dimensions in the range. 4275// 4276// For example, assume the sheet has a depth-1 group over B:E and a 4277// depth-2 4278// group over C:D. Deleting a group over D:E leaves the sheet with 4279// a 4280// depth-1 group over B:D and a depth-2 group over C:C. 4281type DeleteDimensionGroupRequest struct { 4282 // Range: The range of the group to be deleted. 4283 Range *DimensionRange `json:"range,omitempty"` 4284 4285 // ForceSendFields is a list of field names (e.g. "Range") to 4286 // unconditionally include in API requests. By default, fields with 4287 // empty values are omitted from API requests. However, any non-pointer, 4288 // non-interface field appearing in ForceSendFields will be sent to the 4289 // server regardless of whether the field is empty or not. This may be 4290 // used to include empty fields in Patch requests. 4291 ForceSendFields []string `json:"-"` 4292 4293 // NullFields is a list of field names (e.g. "Range") to include in API 4294 // requests with the JSON null value. By default, fields with empty 4295 // values are omitted from API requests. However, any field with an 4296 // empty value appearing in NullFields will be sent to the server as 4297 // null. It is an error if a field in this list has a non-empty value. 4298 // This may be used to include null fields in Patch requests. 4299 NullFields []string `json:"-"` 4300} 4301 4302func (s *DeleteDimensionGroupRequest) MarshalJSON() ([]byte, error) { 4303 type NoMethod DeleteDimensionGroupRequest 4304 raw := NoMethod(*s) 4305 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4306} 4307 4308// DeleteDimensionGroupResponse: The result of deleting a group. 4309type DeleteDimensionGroupResponse struct { 4310 // DimensionGroups: All groups of a dimension after deleting a group 4311 // from that dimension. 4312 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 4313 4314 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 4315 // unconditionally include in API requests. By default, fields with 4316 // empty values are omitted from API requests. However, any non-pointer, 4317 // non-interface field appearing in ForceSendFields will be sent to the 4318 // server regardless of whether the field is empty or not. This may be 4319 // used to include empty fields in Patch requests. 4320 ForceSendFields []string `json:"-"` 4321 4322 // NullFields is a list of field names (e.g. "DimensionGroups") to 4323 // include in API requests with the JSON null value. By default, fields 4324 // with empty values are omitted from API requests. However, any field 4325 // with an empty value appearing in NullFields will be sent to the 4326 // server as null. It is an error if a field in this list has a 4327 // non-empty value. This may be used to include null fields in Patch 4328 // requests. 4329 NullFields []string `json:"-"` 4330} 4331 4332func (s *DeleteDimensionGroupResponse) MarshalJSON() ([]byte, error) { 4333 type NoMethod DeleteDimensionGroupResponse 4334 raw := NoMethod(*s) 4335 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4336} 4337 4338// DeleteDimensionRequest: Deletes the dimensions from the sheet. 4339type DeleteDimensionRequest struct { 4340 // Range: The dimensions to delete from the sheet. 4341 Range *DimensionRange `json:"range,omitempty"` 4342 4343 // ForceSendFields is a list of field names (e.g. "Range") to 4344 // unconditionally include in API requests. By default, fields with 4345 // empty values are omitted from API requests. However, any non-pointer, 4346 // non-interface field appearing in ForceSendFields will be sent to the 4347 // server regardless of whether the field is empty or not. This may be 4348 // used to include empty fields in Patch requests. 4349 ForceSendFields []string `json:"-"` 4350 4351 // NullFields is a list of field names (e.g. "Range") to include in API 4352 // requests with the JSON null value. By default, fields with empty 4353 // values are omitted from API requests. However, any field with an 4354 // empty value appearing in NullFields will be sent to the server as 4355 // null. It is an error if a field in this list has a non-empty value. 4356 // This may be used to include null fields in Patch requests. 4357 NullFields []string `json:"-"` 4358} 4359 4360func (s *DeleteDimensionRequest) MarshalJSON() ([]byte, error) { 4361 type NoMethod DeleteDimensionRequest 4362 raw := NoMethod(*s) 4363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4364} 4365 4366// DeleteDuplicatesRequest: Removes rows within this range that contain 4367// values in the specified columns 4368// that are duplicates of values in any previous row. Rows with 4369// identical values 4370// but different letter cases, formatting, or formulas are considered to 4371// be 4372// duplicates. 4373// 4374// This request also removes duplicate rows hidden from view (for 4375// example, due 4376// to a filter). When removing duplicates, the first instance of each 4377// duplicate 4378// row scanning from the top downwards is kept in the resulting range. 4379// Content 4380// outside of the specified range isn't removed, and rows considered 4381// duplicates 4382// do not have to be adjacent to each other in the range. 4383type DeleteDuplicatesRequest struct { 4384 // ComparisonColumns: The columns in the range to analyze for duplicate 4385 // values. If no columns are 4386 // selected then all columns are analyzed for duplicates. 4387 ComparisonColumns []*DimensionRange `json:"comparisonColumns,omitempty"` 4388 4389 // Range: The range to remove duplicates rows from. 4390 Range *GridRange `json:"range,omitempty"` 4391 4392 // ForceSendFields is a list of field names (e.g. "ComparisonColumns") 4393 // to unconditionally include in API requests. By default, fields with 4394 // empty values are omitted from API requests. However, any non-pointer, 4395 // non-interface field appearing in ForceSendFields will be sent to the 4396 // server regardless of whether the field is empty or not. This may be 4397 // used to include empty fields in Patch requests. 4398 ForceSendFields []string `json:"-"` 4399 4400 // NullFields is a list of field names (e.g. "ComparisonColumns") to 4401 // include in API requests with the JSON null value. By default, fields 4402 // with empty values are omitted from API requests. However, any field 4403 // with an empty value appearing in NullFields will be sent to the 4404 // server as null. It is an error if a field in this list has a 4405 // non-empty value. This may be used to include null fields in Patch 4406 // requests. 4407 NullFields []string `json:"-"` 4408} 4409 4410func (s *DeleteDuplicatesRequest) MarshalJSON() ([]byte, error) { 4411 type NoMethod DeleteDuplicatesRequest 4412 raw := NoMethod(*s) 4413 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4414} 4415 4416// DeleteDuplicatesResponse: The result of removing duplicates in a 4417// range. 4418type DeleteDuplicatesResponse struct { 4419 // DuplicatesRemovedCount: The number of duplicate rows removed. 4420 DuplicatesRemovedCount int64 `json:"duplicatesRemovedCount,omitempty"` 4421 4422 // ForceSendFields is a list of field names (e.g. 4423 // "DuplicatesRemovedCount") to unconditionally include in API requests. 4424 // By default, fields with empty values are omitted from API requests. 4425 // However, any non-pointer, non-interface field appearing in 4426 // ForceSendFields will be sent to the server regardless of whether the 4427 // field is empty or not. This may be used to include empty fields in 4428 // Patch requests. 4429 ForceSendFields []string `json:"-"` 4430 4431 // NullFields is a list of field names (e.g. "DuplicatesRemovedCount") 4432 // to include in API requests with the JSON null value. By default, 4433 // fields with empty values are omitted from API requests. However, any 4434 // field with an empty value appearing in NullFields will be sent to the 4435 // server as null. It is an error if a field in this list has a 4436 // non-empty value. This may be used to include null fields in Patch 4437 // requests. 4438 NullFields []string `json:"-"` 4439} 4440 4441func (s *DeleteDuplicatesResponse) MarshalJSON() ([]byte, error) { 4442 type NoMethod DeleteDuplicatesResponse 4443 raw := NoMethod(*s) 4444 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4445} 4446 4447// DeleteEmbeddedObjectRequest: Deletes the embedded object with the 4448// given ID. 4449type DeleteEmbeddedObjectRequest struct { 4450 // ObjectId: The ID of the embedded object to delete. 4451 ObjectId int64 `json:"objectId,omitempty"` 4452 4453 // ForceSendFields is a list of field names (e.g. "ObjectId") to 4454 // unconditionally include in API requests. By default, fields with 4455 // empty values are omitted from API requests. However, any non-pointer, 4456 // non-interface field appearing in ForceSendFields will be sent to the 4457 // server regardless of whether the field is empty or not. This may be 4458 // used to include empty fields in Patch requests. 4459 ForceSendFields []string `json:"-"` 4460 4461 // NullFields is a list of field names (e.g. "ObjectId") to include in 4462 // API requests with the JSON null value. By default, fields with empty 4463 // values are omitted from API requests. However, any field with an 4464 // empty value appearing in NullFields will be sent to the server as 4465 // null. It is an error if a field in this list has a non-empty value. 4466 // This may be used to include null fields in Patch requests. 4467 NullFields []string `json:"-"` 4468} 4469 4470func (s *DeleteEmbeddedObjectRequest) MarshalJSON() ([]byte, error) { 4471 type NoMethod DeleteEmbeddedObjectRequest 4472 raw := NoMethod(*s) 4473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4474} 4475 4476// DeleteFilterViewRequest: Deletes a particular filter view. 4477type DeleteFilterViewRequest struct { 4478 // FilterId: The ID of the filter to delete. 4479 FilterId int64 `json:"filterId,omitempty"` 4480 4481 // ForceSendFields is a list of field names (e.g. "FilterId") to 4482 // unconditionally include in API requests. By default, fields with 4483 // empty values are omitted from API requests. However, any non-pointer, 4484 // non-interface field appearing in ForceSendFields will be sent to the 4485 // server regardless of whether the field is empty or not. This may be 4486 // used to include empty fields in Patch requests. 4487 ForceSendFields []string `json:"-"` 4488 4489 // NullFields is a list of field names (e.g. "FilterId") to include in 4490 // API requests with the JSON null value. By default, fields with empty 4491 // values are omitted from API requests. However, any field with an 4492 // empty value appearing in NullFields will be sent to the server as 4493 // null. It is an error if a field in this list has a non-empty value. 4494 // This may be used to include null fields in Patch requests. 4495 NullFields []string `json:"-"` 4496} 4497 4498func (s *DeleteFilterViewRequest) MarshalJSON() ([]byte, error) { 4499 type NoMethod DeleteFilterViewRequest 4500 raw := NoMethod(*s) 4501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4502} 4503 4504// DeleteNamedRangeRequest: Removes the named range with the given ID 4505// from the spreadsheet. 4506type DeleteNamedRangeRequest struct { 4507 // NamedRangeId: The ID of the named range to delete. 4508 NamedRangeId string `json:"namedRangeId,omitempty"` 4509 4510 // ForceSendFields is a list of field names (e.g. "NamedRangeId") to 4511 // unconditionally include in API requests. By default, fields with 4512 // empty values are omitted from API requests. However, any non-pointer, 4513 // non-interface field appearing in ForceSendFields will be sent to the 4514 // server regardless of whether the field is empty or not. This may be 4515 // used to include empty fields in Patch requests. 4516 ForceSendFields []string `json:"-"` 4517 4518 // NullFields is a list of field names (e.g. "NamedRangeId") to include 4519 // in API requests with the JSON null value. By default, fields with 4520 // empty values are omitted from API requests. However, any field with 4521 // an empty value appearing in NullFields will be sent to the server as 4522 // null. It is an error if a field in this list has a non-empty value. 4523 // This may be used to include null fields in Patch requests. 4524 NullFields []string `json:"-"` 4525} 4526 4527func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) { 4528 type NoMethod DeleteNamedRangeRequest 4529 raw := NoMethod(*s) 4530 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4531} 4532 4533// DeleteProtectedRangeRequest: Deletes the protected range with the 4534// given ID. 4535type DeleteProtectedRangeRequest struct { 4536 // ProtectedRangeId: The ID of the protected range to delete. 4537 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 4538 4539 // ForceSendFields is a list of field names (e.g. "ProtectedRangeId") to 4540 // unconditionally include in API requests. By default, fields with 4541 // empty values are omitted from API requests. However, any non-pointer, 4542 // non-interface field appearing in ForceSendFields will be sent to the 4543 // server regardless of whether the field is empty or not. This may be 4544 // used to include empty fields in Patch requests. 4545 ForceSendFields []string `json:"-"` 4546 4547 // NullFields is a list of field names (e.g. "ProtectedRangeId") to 4548 // include in API requests with the JSON null value. By default, fields 4549 // with empty values are omitted from API requests. However, any field 4550 // with an empty value appearing in NullFields will be sent to the 4551 // server as null. It is an error if a field in this list has a 4552 // non-empty value. This may be used to include null fields in Patch 4553 // requests. 4554 NullFields []string `json:"-"` 4555} 4556 4557func (s *DeleteProtectedRangeRequest) MarshalJSON() ([]byte, error) { 4558 type NoMethod DeleteProtectedRangeRequest 4559 raw := NoMethod(*s) 4560 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4561} 4562 4563// DeleteRangeRequest: Deletes a range of cells, shifting other cells 4564// into the deleted area. 4565type DeleteRangeRequest struct { 4566 // Range: The range of cells to delete. 4567 Range *GridRange `json:"range,omitempty"` 4568 4569 // ShiftDimension: The dimension from which deleted cells will be 4570 // replaced with. 4571 // If ROWS, existing cells will be shifted upward to 4572 // replace the deleted cells. If COLUMNS, existing cells 4573 // will be shifted left to replace the deleted cells. 4574 // 4575 // Possible values: 4576 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 4577 // "ROWS" - Operates on the rows of a sheet. 4578 // "COLUMNS" - Operates on the columns of a sheet. 4579 ShiftDimension string `json:"shiftDimension,omitempty"` 4580 4581 // ForceSendFields is a list of field names (e.g. "Range") to 4582 // unconditionally include in API requests. By default, fields with 4583 // empty values are omitted from API requests. However, any non-pointer, 4584 // non-interface field appearing in ForceSendFields will be sent to the 4585 // server regardless of whether the field is empty or not. This may be 4586 // used to include empty fields in Patch requests. 4587 ForceSendFields []string `json:"-"` 4588 4589 // NullFields is a list of field names (e.g. "Range") to include in API 4590 // requests with the JSON null value. By default, fields with empty 4591 // values are omitted from API requests. However, any field with an 4592 // empty value appearing in NullFields will be sent to the server as 4593 // null. It is an error if a field in this list has a non-empty value. 4594 // This may be used to include null fields in Patch requests. 4595 NullFields []string `json:"-"` 4596} 4597 4598func (s *DeleteRangeRequest) MarshalJSON() ([]byte, error) { 4599 type NoMethod DeleteRangeRequest 4600 raw := NoMethod(*s) 4601 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4602} 4603 4604// DeleteSheetRequest: Deletes the requested sheet. 4605type DeleteSheetRequest struct { 4606 // SheetId: The ID of the sheet to delete. 4607 SheetId int64 `json:"sheetId,omitempty"` 4608 4609 // ForceSendFields is a list of field names (e.g. "SheetId") to 4610 // unconditionally include in API requests. By default, fields with 4611 // empty values are omitted from API requests. However, any non-pointer, 4612 // non-interface field appearing in ForceSendFields will be sent to the 4613 // server regardless of whether the field is empty or not. This may be 4614 // used to include empty fields in Patch requests. 4615 ForceSendFields []string `json:"-"` 4616 4617 // NullFields is a list of field names (e.g. "SheetId") to include in 4618 // API requests with the JSON null value. By default, fields with empty 4619 // values are omitted from API requests. However, any field with an 4620 // empty value appearing in NullFields will be sent to the server as 4621 // null. It is an error if a field in this list has a non-empty value. 4622 // This may be used to include null fields in Patch requests. 4623 NullFields []string `json:"-"` 4624} 4625 4626func (s *DeleteSheetRequest) MarshalJSON() ([]byte, error) { 4627 type NoMethod DeleteSheetRequest 4628 raw := NoMethod(*s) 4629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4630} 4631 4632// DeveloperMetadata: Developer metadata associated with a location or 4633// object in a spreadsheet. 4634// Developer metadata may be used to associate arbitrary data with 4635// various 4636// parts of a spreadsheet and will remain associated at those locations 4637// as they 4638// move around and the spreadsheet is edited. For example, if 4639// developer 4640// metadata is associated with row 5 and another row is then 4641// subsequently 4642// inserted above row 5, that original metadata will still be associated 4643// with 4644// the row it was first associated with (what is now row 6). If the 4645// associated 4646// object is deleted its metadata is deleted too. 4647type DeveloperMetadata struct { 4648 // Location: The location where the metadata is associated. 4649 Location *DeveloperMetadataLocation `json:"location,omitempty"` 4650 4651 // MetadataId: The spreadsheet-scoped unique ID that identifies the 4652 // metadata. IDs may be 4653 // specified when metadata is created, otherwise one will be 4654 // randomly 4655 // generated and assigned. Must be positive. 4656 MetadataId int64 `json:"metadataId,omitempty"` 4657 4658 // MetadataKey: The metadata key. There may be multiple metadata in a 4659 // spreadsheet with the 4660 // same key. Developer metadata must always have a key specified. 4661 MetadataKey string `json:"metadataKey,omitempty"` 4662 4663 // MetadataValue: Data associated with the metadata's key. 4664 MetadataValue string `json:"metadataValue,omitempty"` 4665 4666 // Visibility: The metadata visibility. Developer metadata must always 4667 // have a visibility 4668 // specified. 4669 // 4670 // Possible values: 4671 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 4672 // "DOCUMENT" - Document-visible metadata is accessible from any 4673 // developer project with 4674 // access to the document. 4675 // "PROJECT" - Project-visible metadata is only visible to and 4676 // accessible by the developer 4677 // project that created the metadata. 4678 Visibility string `json:"visibility,omitempty"` 4679 4680 // ServerResponse contains the HTTP response code and headers from the 4681 // server. 4682 googleapi.ServerResponse `json:"-"` 4683 4684 // ForceSendFields is a list of field names (e.g. "Location") to 4685 // unconditionally include in API requests. By default, fields with 4686 // empty values are omitted from API requests. However, any non-pointer, 4687 // non-interface field appearing in ForceSendFields will be sent to the 4688 // server regardless of whether the field is empty or not. This may be 4689 // used to include empty fields in Patch requests. 4690 ForceSendFields []string `json:"-"` 4691 4692 // NullFields is a list of field names (e.g. "Location") to include in 4693 // API requests with the JSON null value. By default, fields with empty 4694 // values are omitted from API requests. However, any field with an 4695 // empty value appearing in NullFields will be sent to the server as 4696 // null. It is an error if a field in this list has a non-empty value. 4697 // This may be used to include null fields in Patch requests. 4698 NullFields []string `json:"-"` 4699} 4700 4701func (s *DeveloperMetadata) MarshalJSON() ([]byte, error) { 4702 type NoMethod DeveloperMetadata 4703 raw := NoMethod(*s) 4704 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4705} 4706 4707// DeveloperMetadataLocation: A location where metadata may be 4708// associated in a spreadsheet. 4709type DeveloperMetadataLocation struct { 4710 // DimensionRange: Represents the row or column when metadata is 4711 // associated with 4712 // a dimension. The specified DimensionRange must represent a single 4713 // row 4714 // or column; it cannot be unbounded or span multiple rows or columns. 4715 DimensionRange *DimensionRange `json:"dimensionRange,omitempty"` 4716 4717 // LocationType: The type of location this object represents. This 4718 // field is read-only. 4719 // 4720 // Possible values: 4721 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 4722 // "ROW" - Developer metadata associated on an entire row dimension. 4723 // "COLUMN" - Developer metadata associated on an entire column 4724 // dimension. 4725 // "SHEET" - Developer metadata associated on an entire sheet. 4726 // "SPREADSHEET" - Developer metadata associated on the entire 4727 // spreadsheet. 4728 LocationType string `json:"locationType,omitempty"` 4729 4730 // SheetId: The ID of the sheet when metadata is associated with an 4731 // entire sheet. 4732 SheetId int64 `json:"sheetId,omitempty"` 4733 4734 // Spreadsheet: True when metadata is associated with an entire 4735 // spreadsheet. 4736 Spreadsheet bool `json:"spreadsheet,omitempty"` 4737 4738 // ForceSendFields is a list of field names (e.g. "DimensionRange") to 4739 // unconditionally include in API requests. By default, fields with 4740 // empty values are omitted from API requests. However, any non-pointer, 4741 // non-interface field appearing in ForceSendFields will be sent to the 4742 // server regardless of whether the field is empty or not. This may be 4743 // used to include empty fields in Patch requests. 4744 ForceSendFields []string `json:"-"` 4745 4746 // NullFields is a list of field names (e.g. "DimensionRange") to 4747 // include in API requests with the JSON null value. By default, fields 4748 // with empty values are omitted from API requests. However, any field 4749 // with an empty value appearing in NullFields will be sent to the 4750 // server as null. It is an error if a field in this list has a 4751 // non-empty value. This may be used to include null fields in Patch 4752 // requests. 4753 NullFields []string `json:"-"` 4754} 4755 4756func (s *DeveloperMetadataLocation) MarshalJSON() ([]byte, error) { 4757 type NoMethod DeveloperMetadataLocation 4758 raw := NoMethod(*s) 4759 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4760} 4761 4762// DeveloperMetadataLookup: Selects DeveloperMetadata that matches all 4763// of the specified fields. For 4764// example, if only a metadata ID is specified this considers 4765// the 4766// DeveloperMetadata with that particular unique ID. If a metadata key 4767// is 4768// specified, this considers all developer metadata with that key. If 4769// a 4770// key, visibility, and location type are all specified, this considers 4771// all 4772// developer metadata with that key and visibility that are associated 4773// with a 4774// location of that type. In general, this 4775// selects all DeveloperMetadata that matches the intersection of all 4776// the 4777// specified fields; any field or combination of fields may be 4778// specified. 4779type DeveloperMetadataLookup struct { 4780 // LocationMatchingStrategy: Determines how this lookup matches the 4781 // location. If this field is 4782 // specified as EXACT, only developer metadata associated on the 4783 // exact 4784 // location specified is matched. If this field is specified to 4785 // INTERSECTING, 4786 // developer metadata associated on intersecting locations is 4787 // also 4788 // matched. If left unspecified, this field assumes a default value 4789 // of 4790 // INTERSECTING. 4791 // If this field is specified, a metadataLocation 4792 // must also be specified. 4793 // 4794 // Possible values: 4795 // "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" - 4796 // Default value. This value must not be used. 4797 // "EXACT_LOCATION" - Indicates that a specified location should be 4798 // matched exactly. For 4799 // example, if row three were specified as a location this matching 4800 // strategy 4801 // would only match developer metadata also associated on row three. 4802 // Metadata 4803 // associated on other locations would not be considered. 4804 // "INTERSECTING_LOCATION" - Indicates that a specified location 4805 // should match that exact location as 4806 // well as any intersecting locations. For example, if row three 4807 // were 4808 // specified as a location this matching strategy would match 4809 // developer 4810 // metadata associated on row three as well as metadata associated 4811 // on 4812 // locations that intersect row three. If, for instance, there was 4813 // developer 4814 // metadata associated on column B, this matching strategy would also 4815 // match 4816 // that location because column B intersects row three. 4817 LocationMatchingStrategy string `json:"locationMatchingStrategy,omitempty"` 4818 4819 // LocationType: Limits the selected developer metadata to those entries 4820 // which are 4821 // associated with locations of the specified type. For example, when 4822 // this 4823 // field is specified as ROW this lookup 4824 // only considers developer metadata associated on rows. If the field 4825 // is left 4826 // unspecified, all location types are considered. This field cannot 4827 // be 4828 // specified as SPREADSHEET when 4829 // the locationMatchingStrategy 4830 // is specified as INTERSECTING or when the 4831 // metadataLocation is specified as a 4832 // non-spreadsheet location: spreadsheet metadata cannot intersect any 4833 // other 4834 // developer metadata location. This field also must be left 4835 // unspecified when 4836 // the locationMatchingStrategy 4837 // is specified as EXACT. 4838 // 4839 // Possible values: 4840 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 4841 // "ROW" - Developer metadata associated on an entire row dimension. 4842 // "COLUMN" - Developer metadata associated on an entire column 4843 // dimension. 4844 // "SHEET" - Developer metadata associated on an entire sheet. 4845 // "SPREADSHEET" - Developer metadata associated on the entire 4846 // spreadsheet. 4847 LocationType string `json:"locationType,omitempty"` 4848 4849 // MetadataId: Limits the selected developer metadata to that which has 4850 // a matching 4851 // DeveloperMetadata.metadata_id. 4852 MetadataId int64 `json:"metadataId,omitempty"` 4853 4854 // MetadataKey: Limits the selected developer metadata to that which has 4855 // a matching 4856 // DeveloperMetadata.metadata_key. 4857 MetadataKey string `json:"metadataKey,omitempty"` 4858 4859 // MetadataLocation: Limits the selected developer metadata to those 4860 // entries associated with 4861 // the specified location. This field either matches exact locations or 4862 // all 4863 // intersecting locations according the 4864 // specified 4865 // locationMatchingStrategy. 4866 MetadataLocation *DeveloperMetadataLocation `json:"metadataLocation,omitempty"` 4867 4868 // MetadataValue: Limits the selected developer metadata to that which 4869 // has a matching 4870 // DeveloperMetadata.metadata_value. 4871 MetadataValue string `json:"metadataValue,omitempty"` 4872 4873 // Visibility: Limits the selected developer metadata to that which has 4874 // a matching 4875 // DeveloperMetadata.visibility. If left unspecified, all 4876 // developer 4877 // metadata visibile to the requesting project is considered. 4878 // 4879 // Possible values: 4880 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 4881 // "DOCUMENT" - Document-visible metadata is accessible from any 4882 // developer project with 4883 // access to the document. 4884 // "PROJECT" - Project-visible metadata is only visible to and 4885 // accessible by the developer 4886 // project that created the metadata. 4887 Visibility string `json:"visibility,omitempty"` 4888 4889 // ForceSendFields is a list of field names (e.g. 4890 // "LocationMatchingStrategy") to unconditionally include in API 4891 // requests. By default, fields with empty values are omitted from API 4892 // requests. However, any non-pointer, non-interface field appearing in 4893 // ForceSendFields will be sent to the server regardless of whether the 4894 // field is empty or not. This may be used to include empty fields in 4895 // Patch requests. 4896 ForceSendFields []string `json:"-"` 4897 4898 // NullFields is a list of field names (e.g. "LocationMatchingStrategy") 4899 // to include in API requests with the JSON null value. By default, 4900 // fields with empty values are omitted from API requests. However, any 4901 // field with an empty value appearing in NullFields will be sent to the 4902 // server as null. It is an error if a field in this list has a 4903 // non-empty value. This may be used to include null fields in Patch 4904 // requests. 4905 NullFields []string `json:"-"` 4906} 4907 4908func (s *DeveloperMetadataLookup) MarshalJSON() ([]byte, error) { 4909 type NoMethod DeveloperMetadataLookup 4910 raw := NoMethod(*s) 4911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4912} 4913 4914// DimensionGroup: A group over an interval of rows or columns on a 4915// sheet, which can contain or 4916// be contained within other groups. A group can be collapsed or 4917// expanded as a 4918// unit on the sheet. 4919type DimensionGroup struct { 4920 // Collapsed: This field is true if this group is collapsed. A collapsed 4921 // group remains 4922 // collapsed if an overlapping group at a shallower depth is 4923 // expanded. 4924 // 4925 // A true value does not imply that all dimensions within the group 4926 // are 4927 // hidden, since a dimension's visibility can change independently from 4928 // this 4929 // group property. However, when this property is updated, all 4930 // dimensions 4931 // within it are set to hidden if this field is true, or set to visible 4932 // if 4933 // this field is false. 4934 Collapsed bool `json:"collapsed,omitempty"` 4935 4936 // Depth: The depth of the group, representing how many groups have a 4937 // range that 4938 // wholly contains the range of this group. 4939 Depth int64 `json:"depth,omitempty"` 4940 4941 // Range: The range over which this group exists. 4942 Range *DimensionRange `json:"range,omitempty"` 4943 4944 // ForceSendFields is a list of field names (e.g. "Collapsed") to 4945 // unconditionally include in API requests. By default, fields with 4946 // empty values are omitted from API requests. However, any non-pointer, 4947 // non-interface field appearing in ForceSendFields will be sent to the 4948 // server regardless of whether the field is empty or not. This may be 4949 // used to include empty fields in Patch requests. 4950 ForceSendFields []string `json:"-"` 4951 4952 // NullFields is a list of field names (e.g. "Collapsed") to include in 4953 // API requests with the JSON null value. By default, fields with empty 4954 // values are omitted from API requests. However, any field with an 4955 // empty value appearing in NullFields will be sent to the server as 4956 // null. It is an error if a field in this list has a non-empty value. 4957 // This may be used to include null fields in Patch requests. 4958 NullFields []string `json:"-"` 4959} 4960 4961func (s *DimensionGroup) MarshalJSON() ([]byte, error) { 4962 type NoMethod DimensionGroup 4963 raw := NoMethod(*s) 4964 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4965} 4966 4967// DimensionProperties: Properties about a dimension. 4968type DimensionProperties struct { 4969 // DeveloperMetadata: The developer metadata associated with a single 4970 // row or column. 4971 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 4972 4973 // HiddenByFilter: True if this dimension is being filtered. 4974 // This field is read-only. 4975 HiddenByFilter bool `json:"hiddenByFilter,omitempty"` 4976 4977 // HiddenByUser: True if this dimension is explicitly hidden. 4978 HiddenByUser bool `json:"hiddenByUser,omitempty"` 4979 4980 // PixelSize: The height (if a row) or width (if a column) of the 4981 // dimension in pixels. 4982 PixelSize int64 `json:"pixelSize,omitempty"` 4983 4984 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 4985 // to unconditionally include in API requests. By default, fields with 4986 // empty values are omitted from API requests. However, any non-pointer, 4987 // non-interface field appearing in ForceSendFields will be sent to the 4988 // server regardless of whether the field is empty or not. This may be 4989 // used to include empty fields in Patch requests. 4990 ForceSendFields []string `json:"-"` 4991 4992 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 4993 // include in API requests with the JSON null value. By default, fields 4994 // with empty values are omitted from API requests. However, any field 4995 // with an empty value appearing in NullFields will be sent to the 4996 // server as null. It is an error if a field in this list has a 4997 // non-empty value. This may be used to include null fields in Patch 4998 // requests. 4999 NullFields []string `json:"-"` 5000} 5001 5002func (s *DimensionProperties) MarshalJSON() ([]byte, error) { 5003 type NoMethod DimensionProperties 5004 raw := NoMethod(*s) 5005 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5006} 5007 5008// DimensionRange: A range along a single dimension on a sheet. 5009// All indexes are zero-based. 5010// Indexes are half open: the start index is inclusive 5011// and the end index is exclusive. 5012// Missing indexes indicate the range is unbounded on that side. 5013type DimensionRange struct { 5014 // Dimension: The dimension of the span. 5015 // 5016 // Possible values: 5017 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 5018 // "ROWS" - Operates on the rows of a sheet. 5019 // "COLUMNS" - Operates on the columns of a sheet. 5020 Dimension string `json:"dimension,omitempty"` 5021 5022 // EndIndex: The end (exclusive) of the span, or not set if unbounded. 5023 EndIndex int64 `json:"endIndex,omitempty"` 5024 5025 // SheetId: The sheet this span is on. 5026 SheetId int64 `json:"sheetId,omitempty"` 5027 5028 // StartIndex: The start (inclusive) of the span, or not set if 5029 // unbounded. 5030 StartIndex int64 `json:"startIndex,omitempty"` 5031 5032 // ForceSendFields is a list of field names (e.g. "Dimension") to 5033 // unconditionally include in API requests. By default, fields with 5034 // empty values are omitted from API requests. However, any non-pointer, 5035 // non-interface field appearing in ForceSendFields will be sent to the 5036 // server regardless of whether the field is empty or not. This may be 5037 // used to include empty fields in Patch requests. 5038 ForceSendFields []string `json:"-"` 5039 5040 // NullFields is a list of field names (e.g. "Dimension") to include in 5041 // API requests with the JSON null value. By default, fields with empty 5042 // values are omitted from API requests. However, any field with an 5043 // empty value appearing in NullFields will be sent to the server as 5044 // null. It is an error if a field in this list has a non-empty value. 5045 // This may be used to include null fields in Patch requests. 5046 NullFields []string `json:"-"` 5047} 5048 5049func (s *DimensionRange) MarshalJSON() ([]byte, error) { 5050 type NoMethod DimensionRange 5051 raw := NoMethod(*s) 5052 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5053} 5054 5055// DuplicateFilterViewRequest: Duplicates a particular filter view. 5056type DuplicateFilterViewRequest struct { 5057 // FilterId: The ID of the filter being duplicated. 5058 FilterId int64 `json:"filterId,omitempty"` 5059 5060 // ForceSendFields is a list of field names (e.g. "FilterId") to 5061 // unconditionally include in API requests. By default, fields with 5062 // empty values are omitted from API requests. However, any non-pointer, 5063 // non-interface field appearing in ForceSendFields will be sent to the 5064 // server regardless of whether the field is empty or not. This may be 5065 // used to include empty fields in Patch requests. 5066 ForceSendFields []string `json:"-"` 5067 5068 // NullFields is a list of field names (e.g. "FilterId") to include in 5069 // API requests with the JSON null value. By default, fields with empty 5070 // values are omitted from API requests. However, any field with an 5071 // empty value appearing in NullFields will be sent to the server as 5072 // null. It is an error if a field in this list has a non-empty value. 5073 // This may be used to include null fields in Patch requests. 5074 NullFields []string `json:"-"` 5075} 5076 5077func (s *DuplicateFilterViewRequest) MarshalJSON() ([]byte, error) { 5078 type NoMethod DuplicateFilterViewRequest 5079 raw := NoMethod(*s) 5080 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5081} 5082 5083// DuplicateFilterViewResponse: The result of a filter view being 5084// duplicated. 5085type DuplicateFilterViewResponse struct { 5086 // Filter: The newly created filter. 5087 Filter *FilterView `json:"filter,omitempty"` 5088 5089 // ForceSendFields is a list of field names (e.g. "Filter") to 5090 // unconditionally include in API requests. By default, fields with 5091 // empty values are omitted from API requests. However, any non-pointer, 5092 // non-interface field appearing in ForceSendFields will be sent to the 5093 // server regardless of whether the field is empty or not. This may be 5094 // used to include empty fields in Patch requests. 5095 ForceSendFields []string `json:"-"` 5096 5097 // NullFields is a list of field names (e.g. "Filter") to include in API 5098 // requests with the JSON null value. By default, fields with empty 5099 // values are omitted from API requests. However, any field with an 5100 // empty value appearing in NullFields will be sent to the server as 5101 // null. It is an error if a field in this list has a non-empty value. 5102 // This may be used to include null fields in Patch requests. 5103 NullFields []string `json:"-"` 5104} 5105 5106func (s *DuplicateFilterViewResponse) MarshalJSON() ([]byte, error) { 5107 type NoMethod DuplicateFilterViewResponse 5108 raw := NoMethod(*s) 5109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5110} 5111 5112// DuplicateSheetRequest: Duplicates the contents of a sheet. 5113type DuplicateSheetRequest struct { 5114 // InsertSheetIndex: The zero-based index where the new sheet should be 5115 // inserted. 5116 // The index of all sheets after this are incremented. 5117 InsertSheetIndex int64 `json:"insertSheetIndex,omitempty"` 5118 5119 // NewSheetId: If set, the ID of the new sheet. If not set, an ID is 5120 // chosen. 5121 // If set, the ID must not conflict with any existing sheet ID. 5122 // If set, it must be non-negative. 5123 NewSheetId int64 `json:"newSheetId,omitempty"` 5124 5125 // NewSheetName: The name of the new sheet. If empty, a new name is 5126 // chosen for you. 5127 NewSheetName string `json:"newSheetName,omitempty"` 5128 5129 // SourceSheetId: The sheet to duplicate. 5130 SourceSheetId int64 `json:"sourceSheetId,omitempty"` 5131 5132 // ForceSendFields is a list of field names (e.g. "InsertSheetIndex") to 5133 // unconditionally include in API requests. By default, fields with 5134 // empty values are omitted from API requests. However, any non-pointer, 5135 // non-interface field appearing in ForceSendFields will be sent to the 5136 // server regardless of whether the field is empty or not. This may be 5137 // used to include empty fields in Patch requests. 5138 ForceSendFields []string `json:"-"` 5139 5140 // NullFields is a list of field names (e.g. "InsertSheetIndex") to 5141 // include in API requests with the JSON null value. By default, fields 5142 // with empty values are omitted from API requests. However, any field 5143 // with an empty value appearing in NullFields will be sent to the 5144 // server as null. It is an error if a field in this list has a 5145 // non-empty value. This may be used to include null fields in Patch 5146 // requests. 5147 NullFields []string `json:"-"` 5148} 5149 5150func (s *DuplicateSheetRequest) MarshalJSON() ([]byte, error) { 5151 type NoMethod DuplicateSheetRequest 5152 raw := NoMethod(*s) 5153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5154} 5155 5156// DuplicateSheetResponse: The result of duplicating a sheet. 5157type DuplicateSheetResponse struct { 5158 // Properties: The properties of the duplicate sheet. 5159 Properties *SheetProperties `json:"properties,omitempty"` 5160 5161 // ForceSendFields is a list of field names (e.g. "Properties") to 5162 // unconditionally include in API requests. By default, fields with 5163 // empty values are omitted from API requests. However, any non-pointer, 5164 // non-interface field appearing in ForceSendFields will be sent to the 5165 // server regardless of whether the field is empty or not. This may be 5166 // used to include empty fields in Patch requests. 5167 ForceSendFields []string `json:"-"` 5168 5169 // NullFields is a list of field names (e.g. "Properties") to include in 5170 // API requests with the JSON null value. By default, fields with empty 5171 // values are omitted from API requests. However, any field with an 5172 // empty value appearing in NullFields will be sent to the server as 5173 // null. It is an error if a field in this list has a non-empty value. 5174 // This may be used to include null fields in Patch requests. 5175 NullFields []string `json:"-"` 5176} 5177 5178func (s *DuplicateSheetResponse) MarshalJSON() ([]byte, error) { 5179 type NoMethod DuplicateSheetResponse 5180 raw := NoMethod(*s) 5181 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5182} 5183 5184// Editors: The editors of a protected range. 5185type Editors struct { 5186 // DomainUsersCanEdit: True if anyone in the document's domain has edit 5187 // access to the protected 5188 // range. Domain protection is only supported on documents within a 5189 // domain. 5190 DomainUsersCanEdit bool `json:"domainUsersCanEdit,omitempty"` 5191 5192 // Groups: The email addresses of groups with edit access to the 5193 // protected range. 5194 Groups []string `json:"groups,omitempty"` 5195 5196 // Users: The email addresses of users with edit access to the protected 5197 // range. 5198 Users []string `json:"users,omitempty"` 5199 5200 // ForceSendFields is a list of field names (e.g. "DomainUsersCanEdit") 5201 // to unconditionally include in API requests. By default, fields with 5202 // empty values are omitted from API requests. However, any non-pointer, 5203 // non-interface field appearing in ForceSendFields will be sent to the 5204 // server regardless of whether the field is empty or not. This may be 5205 // used to include empty fields in Patch requests. 5206 ForceSendFields []string `json:"-"` 5207 5208 // NullFields is a list of field names (e.g. "DomainUsersCanEdit") to 5209 // include in API requests with the JSON null value. By default, fields 5210 // with empty values are omitted from API requests. However, any field 5211 // with an empty value appearing in NullFields will be sent to the 5212 // server as null. It is an error if a field in this list has a 5213 // non-empty value. This may be used to include null fields in Patch 5214 // requests. 5215 NullFields []string `json:"-"` 5216} 5217 5218func (s *Editors) MarshalJSON() ([]byte, error) { 5219 type NoMethod Editors 5220 raw := NoMethod(*s) 5221 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5222} 5223 5224// EmbeddedChart: A chart embedded in a sheet. 5225type EmbeddedChart struct { 5226 // ChartId: The ID of the chart. 5227 ChartId int64 `json:"chartId,omitempty"` 5228 5229 // Position: The position of the chart. 5230 Position *EmbeddedObjectPosition `json:"position,omitempty"` 5231 5232 // Spec: The specification of the chart. 5233 Spec *ChartSpec `json:"spec,omitempty"` 5234 5235 // ForceSendFields is a list of field names (e.g. "ChartId") to 5236 // unconditionally include in API requests. By default, fields with 5237 // empty values are omitted from API requests. However, any non-pointer, 5238 // non-interface field appearing in ForceSendFields will be sent to the 5239 // server regardless of whether the field is empty or not. This may be 5240 // used to include empty fields in Patch requests. 5241 ForceSendFields []string `json:"-"` 5242 5243 // NullFields is a list of field names (e.g. "ChartId") to include in 5244 // API requests with the JSON null value. By default, fields with empty 5245 // values are omitted from API requests. However, any field with an 5246 // empty value appearing in NullFields will be sent to the server as 5247 // null. It is an error if a field in this list has a non-empty value. 5248 // This may be used to include null fields in Patch requests. 5249 NullFields []string `json:"-"` 5250} 5251 5252func (s *EmbeddedChart) MarshalJSON() ([]byte, error) { 5253 type NoMethod EmbeddedChart 5254 raw := NoMethod(*s) 5255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5256} 5257 5258// EmbeddedObjectPosition: The position of an embedded object such as a 5259// chart. 5260type EmbeddedObjectPosition struct { 5261 // NewSheet: If true, the embedded object is put on a new sheet whose 5262 // ID 5263 // is chosen for you. Used only when writing. 5264 NewSheet bool `json:"newSheet,omitempty"` 5265 5266 // OverlayPosition: The position at which the object is overlaid on top 5267 // of a grid. 5268 OverlayPosition *OverlayPosition `json:"overlayPosition,omitempty"` 5269 5270 // SheetId: The sheet this is on. Set only if the embedded object 5271 // is on its own sheet. Must be non-negative. 5272 SheetId int64 `json:"sheetId,omitempty"` 5273 5274 // ForceSendFields is a list of field names (e.g. "NewSheet") to 5275 // unconditionally include in API requests. By default, fields with 5276 // empty values are omitted from API requests. However, any non-pointer, 5277 // non-interface field appearing in ForceSendFields will be sent to the 5278 // server regardless of whether the field is empty or not. This may be 5279 // used to include empty fields in Patch requests. 5280 ForceSendFields []string `json:"-"` 5281 5282 // NullFields is a list of field names (e.g. "NewSheet") to include in 5283 // API requests with the JSON null value. By default, fields with empty 5284 // values are omitted from API requests. However, any field with an 5285 // empty value appearing in NullFields will be sent to the server as 5286 // null. It is an error if a field in this list has a non-empty value. 5287 // This may be used to include null fields in Patch requests. 5288 NullFields []string `json:"-"` 5289} 5290 5291func (s *EmbeddedObjectPosition) MarshalJSON() ([]byte, error) { 5292 type NoMethod EmbeddedObjectPosition 5293 raw := NoMethod(*s) 5294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5295} 5296 5297// ErrorValue: An error in a cell. 5298type ErrorValue struct { 5299 // Message: A message with more information about the error 5300 // (in the spreadsheet's locale). 5301 Message string `json:"message,omitempty"` 5302 5303 // Type: The type of error. 5304 // 5305 // Possible values: 5306 // "ERROR_TYPE_UNSPECIFIED" - The default error type, do not use this. 5307 // "ERROR" - Corresponds to the `#ERROR!` error. 5308 // "NULL_VALUE" - Corresponds to the `#NULL!` error. 5309 // "DIVIDE_BY_ZERO" - Corresponds to the `#DIV/0` error. 5310 // "VALUE" - Corresponds to the `#VALUE!` error. 5311 // "REF" - Corresponds to the `#REF!` error. 5312 // "NAME" - Corresponds to the `#NAME?` error. 5313 // "NUM" - Corresponds to the `#NUM`! error. 5314 // "N_A" - Corresponds to the `#N/A` error. 5315 // "LOADING" - Corresponds to the `Loading...` state. 5316 Type string `json:"type,omitempty"` 5317 5318 // ForceSendFields is a list of field names (e.g. "Message") to 5319 // unconditionally include in API requests. By default, fields with 5320 // empty values are omitted from API requests. However, any non-pointer, 5321 // non-interface field appearing in ForceSendFields will be sent to the 5322 // server regardless of whether the field is empty or not. This may be 5323 // used to include empty fields in Patch requests. 5324 ForceSendFields []string `json:"-"` 5325 5326 // NullFields is a list of field names (e.g. "Message") to include in 5327 // API requests with the JSON null value. By default, fields with empty 5328 // values are omitted from API requests. However, any field with an 5329 // empty value appearing in NullFields will be sent to the server as 5330 // null. It is an error if a field in this list has a non-empty value. 5331 // This may be used to include null fields in Patch requests. 5332 NullFields []string `json:"-"` 5333} 5334 5335func (s *ErrorValue) MarshalJSON() ([]byte, error) { 5336 type NoMethod ErrorValue 5337 raw := NoMethod(*s) 5338 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5339} 5340 5341// ExtendedValue: The kinds of value that a cell in a spreadsheet can 5342// have. 5343type ExtendedValue struct { 5344 // BoolValue: Represents a boolean value. 5345 BoolValue bool `json:"boolValue,omitempty"` 5346 5347 // ErrorValue: Represents an error. 5348 // This field is read-only. 5349 ErrorValue *ErrorValue `json:"errorValue,omitempty"` 5350 5351 // FormulaValue: Represents a formula. 5352 FormulaValue string `json:"formulaValue,omitempty"` 5353 5354 // NumberValue: Represents a double value. 5355 // Note: Dates, Times and DateTimes are represented as doubles 5356 // in 5357 // "serial number" format. 5358 NumberValue float64 `json:"numberValue,omitempty"` 5359 5360 // StringValue: Represents a string value. 5361 // Leading single quotes are not included. For example, if the user 5362 // typed 5363 // `'123` into the UI, this would be represented as a `stringValue` 5364 // of 5365 // "123". 5366 StringValue string `json:"stringValue,omitempty"` 5367 5368 // ForceSendFields is a list of field names (e.g. "BoolValue") to 5369 // unconditionally include in API requests. By default, fields with 5370 // empty values are omitted from API requests. However, any non-pointer, 5371 // non-interface field appearing in ForceSendFields will be sent to the 5372 // server regardless of whether the field is empty or not. This may be 5373 // used to include empty fields in Patch requests. 5374 ForceSendFields []string `json:"-"` 5375 5376 // NullFields is a list of field names (e.g. "BoolValue") to include in 5377 // API requests with the JSON null value. By default, fields with empty 5378 // values are omitted from API requests. However, any field with an 5379 // empty value appearing in NullFields will be sent to the server as 5380 // null. It is an error if a field in this list has a non-empty value. 5381 // This may be used to include null fields in Patch requests. 5382 NullFields []string `json:"-"` 5383} 5384 5385func (s *ExtendedValue) MarshalJSON() ([]byte, error) { 5386 type NoMethod ExtendedValue 5387 raw := NoMethod(*s) 5388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5389} 5390 5391func (s *ExtendedValue) UnmarshalJSON(data []byte) error { 5392 type NoMethod ExtendedValue 5393 var s1 struct { 5394 NumberValue gensupport.JSONFloat64 `json:"numberValue"` 5395 *NoMethod 5396 } 5397 s1.NoMethod = (*NoMethod)(s) 5398 if err := json.Unmarshal(data, &s1); err != nil { 5399 return err 5400 } 5401 s.NumberValue = float64(s1.NumberValue) 5402 return nil 5403} 5404 5405// FilterCriteria: Criteria for showing/hiding rows in a filter or 5406// filter view. 5407type FilterCriteria struct { 5408 // Condition: A condition that must be true for values to be 5409 // shown. 5410 // (This does not override hiddenValues -- if a value is listed there, 5411 // it will still be hidden.) 5412 Condition *BooleanCondition `json:"condition,omitempty"` 5413 5414 // HiddenValues: Values that should be hidden. 5415 HiddenValues []string `json:"hiddenValues,omitempty"` 5416 5417 // VisibleBackgroundColor: The background fill color to filter by; only 5418 // cells with this fill color are 5419 // shown. Mutually exclusive with all other filter criteria. Requests to 5420 // set 5421 // this field will fail with a 400 error if any other filter criteria 5422 // field is 5423 // set. 5424 VisibleBackgroundColor *Color `json:"visibleBackgroundColor,omitempty"` 5425 5426 // VisibleForegroundColor: The text color to filter by; only cells with 5427 // this text color are shown. 5428 // Mutually exclusive with all other filter criteria. Requests to set 5429 // this 5430 // field will fail with a 400 error if any other filter criteria field 5431 // is set. 5432 VisibleForegroundColor *Color `json:"visibleForegroundColor,omitempty"` 5433 5434 // ForceSendFields is a list of field names (e.g. "Condition") to 5435 // unconditionally include in API requests. By default, fields with 5436 // empty values are omitted from API requests. However, any non-pointer, 5437 // non-interface field appearing in ForceSendFields will be sent to the 5438 // server regardless of whether the field is empty or not. This may be 5439 // used to include empty fields in Patch requests. 5440 ForceSendFields []string `json:"-"` 5441 5442 // NullFields is a list of field names (e.g. "Condition") to include in 5443 // API requests with the JSON null value. By default, fields with empty 5444 // values are omitted from API requests. However, any field with an 5445 // empty value appearing in NullFields will be sent to the server as 5446 // null. It is an error if a field in this list has a non-empty value. 5447 // This may be used to include null fields in Patch requests. 5448 NullFields []string `json:"-"` 5449} 5450 5451func (s *FilterCriteria) MarshalJSON() ([]byte, error) { 5452 type NoMethod FilterCriteria 5453 raw := NoMethod(*s) 5454 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5455} 5456 5457// FilterView: A filter view. 5458type FilterView struct { 5459 // Criteria: The criteria for showing/hiding values per column. 5460 // The map's key is the column index, and the value is the criteria 5461 // for 5462 // that column. 5463 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 5464 5465 // FilterViewId: The ID of the filter view. 5466 FilterViewId int64 `json:"filterViewId,omitempty"` 5467 5468 // NamedRangeId: The named range this filter view is backed by, if 5469 // any. 5470 // 5471 // When writing, only one of range or named_range_id 5472 // may be set. 5473 NamedRangeId string `json:"namedRangeId,omitempty"` 5474 5475 // Range: The range this filter view covers. 5476 // 5477 // When writing, only one of range or named_range_id 5478 // may be set. 5479 Range *GridRange `json:"range,omitempty"` 5480 5481 // SortSpecs: The sort order per column. Later specifications are used 5482 // when values 5483 // are equal in the earlier specifications. 5484 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 5485 5486 // Title: The name of the filter view. 5487 Title string `json:"title,omitempty"` 5488 5489 // ForceSendFields is a list of field names (e.g. "Criteria") to 5490 // unconditionally include in API requests. By default, fields with 5491 // empty values are omitted from API requests. However, any non-pointer, 5492 // non-interface field appearing in ForceSendFields will be sent to the 5493 // server regardless of whether the field is empty or not. This may be 5494 // used to include empty fields in Patch requests. 5495 ForceSendFields []string `json:"-"` 5496 5497 // NullFields is a list of field names (e.g. "Criteria") to include in 5498 // API requests with the JSON null value. By default, fields with empty 5499 // values are omitted from API requests. However, any field with an 5500 // empty value appearing in NullFields will be sent to the server as 5501 // null. It is an error if a field in this list has a non-empty value. 5502 // This may be used to include null fields in Patch requests. 5503 NullFields []string `json:"-"` 5504} 5505 5506func (s *FilterView) MarshalJSON() ([]byte, error) { 5507 type NoMethod FilterView 5508 raw := NoMethod(*s) 5509 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5510} 5511 5512// FindReplaceRequest: Finds and replaces data in cells over a range, 5513// sheet, or all sheets. 5514type FindReplaceRequest struct { 5515 // AllSheets: True to find/replace over all sheets. 5516 AllSheets bool `json:"allSheets,omitempty"` 5517 5518 // Find: The value to search. 5519 Find string `json:"find,omitempty"` 5520 5521 // IncludeFormulas: True if the search should include cells with 5522 // formulas. 5523 // False to skip cells with formulas. 5524 IncludeFormulas bool `json:"includeFormulas,omitempty"` 5525 5526 // MatchCase: True if the search is case sensitive. 5527 MatchCase bool `json:"matchCase,omitempty"` 5528 5529 // MatchEntireCell: True if the find value should match the entire cell. 5530 MatchEntireCell bool `json:"matchEntireCell,omitempty"` 5531 5532 // Range: The range to find/replace over. 5533 Range *GridRange `json:"range,omitempty"` 5534 5535 // Replacement: The value to use as the replacement. 5536 Replacement string `json:"replacement,omitempty"` 5537 5538 // SearchByRegex: True if the find value is a regex. 5539 // The regular expression and replacement should follow Java regex 5540 // rules 5541 // at 5542 // https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. 5543 // The replacement string is allowed to refer to capturing groups. 5544 // For example, if one cell has the contents "Google Sheets" and 5545 // another 5546 // has "Google Docs", then searching for "o.* (.*)" with a 5547 // replacement of 5548 // "$1 Rocks" would change the contents of the cells to 5549 // "GSheets Rocks" and "GDocs Rocks" respectively. 5550 SearchByRegex bool `json:"searchByRegex,omitempty"` 5551 5552 // SheetId: The sheet to find/replace over. 5553 SheetId int64 `json:"sheetId,omitempty"` 5554 5555 // ForceSendFields is a list of field names (e.g. "AllSheets") to 5556 // unconditionally include in API requests. By default, fields with 5557 // empty values are omitted from API requests. However, any non-pointer, 5558 // non-interface field appearing in ForceSendFields will be sent to the 5559 // server regardless of whether the field is empty or not. This may be 5560 // used to include empty fields in Patch requests. 5561 ForceSendFields []string `json:"-"` 5562 5563 // NullFields is a list of field names (e.g. "AllSheets") to include in 5564 // API requests with the JSON null value. By default, fields with empty 5565 // values are omitted from API requests. However, any field with an 5566 // empty value appearing in NullFields will be sent to the server as 5567 // null. It is an error if a field in this list has a non-empty value. 5568 // This may be used to include null fields in Patch requests. 5569 NullFields []string `json:"-"` 5570} 5571 5572func (s *FindReplaceRequest) MarshalJSON() ([]byte, error) { 5573 type NoMethod FindReplaceRequest 5574 raw := NoMethod(*s) 5575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5576} 5577 5578// FindReplaceResponse: The result of the find/replace. 5579type FindReplaceResponse struct { 5580 // FormulasChanged: The number of formula cells changed. 5581 FormulasChanged int64 `json:"formulasChanged,omitempty"` 5582 5583 // OccurrencesChanged: The number of occurrences (possibly multiple 5584 // within a cell) changed. 5585 // For example, if replacing "e" with "o" in "Google Sheets", this 5586 // would 5587 // be "3" because "Google Sheets" -> "Googlo Shoots". 5588 OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"` 5589 5590 // RowsChanged: The number of rows changed. 5591 RowsChanged int64 `json:"rowsChanged,omitempty"` 5592 5593 // SheetsChanged: The number of sheets changed. 5594 SheetsChanged int64 `json:"sheetsChanged,omitempty"` 5595 5596 // ValuesChanged: The number of non-formula cells changed. 5597 ValuesChanged int64 `json:"valuesChanged,omitempty"` 5598 5599 // ForceSendFields is a list of field names (e.g. "FormulasChanged") to 5600 // unconditionally include in API requests. By default, fields with 5601 // empty values are omitted from API requests. However, any non-pointer, 5602 // non-interface field appearing in ForceSendFields will be sent to the 5603 // server regardless of whether the field is empty or not. This may be 5604 // used to include empty fields in Patch requests. 5605 ForceSendFields []string `json:"-"` 5606 5607 // NullFields is a list of field names (e.g. "FormulasChanged") to 5608 // include in API requests with the JSON null value. By default, fields 5609 // with empty values are omitted from API requests. However, any field 5610 // with an empty value appearing in NullFields will be sent to the 5611 // server as null. It is an error if a field in this list has a 5612 // non-empty value. This may be used to include null fields in Patch 5613 // requests. 5614 NullFields []string `json:"-"` 5615} 5616 5617func (s *FindReplaceResponse) MarshalJSON() ([]byte, error) { 5618 type NoMethod FindReplaceResponse 5619 raw := NoMethod(*s) 5620 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5621} 5622 5623// GetSpreadsheetByDataFilterRequest: The request for retrieving a 5624// Spreadsheet. 5625type GetSpreadsheetByDataFilterRequest struct { 5626 // DataFilters: The DataFilters used to select which ranges to retrieve 5627 // from 5628 // the spreadsheet. 5629 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 5630 5631 // IncludeGridData: True if grid data should be returned. 5632 // This parameter is ignored if a field mask was set in the request. 5633 IncludeGridData bool `json:"includeGridData,omitempty"` 5634 5635 // ForceSendFields is a list of field names (e.g. "DataFilters") to 5636 // unconditionally include in API requests. By default, fields with 5637 // empty values are omitted from API requests. However, any non-pointer, 5638 // non-interface field appearing in ForceSendFields will be sent to the 5639 // server regardless of whether the field is empty or not. This may be 5640 // used to include empty fields in Patch requests. 5641 ForceSendFields []string `json:"-"` 5642 5643 // NullFields is a list of field names (e.g. "DataFilters") to include 5644 // in API requests with the JSON null value. By default, fields with 5645 // empty values are omitted from API requests. However, any field with 5646 // an empty value appearing in NullFields will be sent to the server as 5647 // null. It is an error if a field in this list has a non-empty value. 5648 // This may be used to include null fields in Patch requests. 5649 NullFields []string `json:"-"` 5650} 5651 5652func (s *GetSpreadsheetByDataFilterRequest) MarshalJSON() ([]byte, error) { 5653 type NoMethod GetSpreadsheetByDataFilterRequest 5654 raw := NoMethod(*s) 5655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5656} 5657 5658// GradientRule: A rule that applies a gradient color scale format, 5659// based on 5660// the interpolation points listed. The format of a cell will vary 5661// based on its contents as compared to the values of the 5662// interpolation 5663// points. 5664type GradientRule struct { 5665 // Maxpoint: The final interpolation point. 5666 Maxpoint *InterpolationPoint `json:"maxpoint,omitempty"` 5667 5668 // Midpoint: An optional midway interpolation point. 5669 Midpoint *InterpolationPoint `json:"midpoint,omitempty"` 5670 5671 // Minpoint: The starting interpolation point. 5672 Minpoint *InterpolationPoint `json:"minpoint,omitempty"` 5673 5674 // ForceSendFields is a list of field names (e.g. "Maxpoint") to 5675 // unconditionally include in API requests. By default, fields with 5676 // empty values are omitted from API requests. However, any non-pointer, 5677 // non-interface field appearing in ForceSendFields will be sent to the 5678 // server regardless of whether the field is empty or not. This may be 5679 // used to include empty fields in Patch requests. 5680 ForceSendFields []string `json:"-"` 5681 5682 // NullFields is a list of field names (e.g. "Maxpoint") to include in 5683 // API requests with the JSON null value. By default, fields with empty 5684 // values are omitted from API requests. However, any field with an 5685 // empty value appearing in NullFields will be sent to the server as 5686 // null. It is an error if a field in this list has a non-empty value. 5687 // This may be used to include null fields in Patch requests. 5688 NullFields []string `json:"-"` 5689} 5690 5691func (s *GradientRule) MarshalJSON() ([]byte, error) { 5692 type NoMethod GradientRule 5693 raw := NoMethod(*s) 5694 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5695} 5696 5697// GridCoordinate: A coordinate in a sheet. 5698// All indexes are zero-based. 5699type GridCoordinate struct { 5700 // ColumnIndex: The column index of the coordinate. 5701 ColumnIndex int64 `json:"columnIndex,omitempty"` 5702 5703 // RowIndex: The row index of the coordinate. 5704 RowIndex int64 `json:"rowIndex,omitempty"` 5705 5706 // SheetId: The sheet this coordinate is on. 5707 SheetId int64 `json:"sheetId,omitempty"` 5708 5709 // ForceSendFields is a list of field names (e.g. "ColumnIndex") to 5710 // unconditionally include in API requests. By default, fields with 5711 // empty values are omitted from API requests. However, any non-pointer, 5712 // non-interface field appearing in ForceSendFields will be sent to the 5713 // server regardless of whether the field is empty or not. This may be 5714 // used to include empty fields in Patch requests. 5715 ForceSendFields []string `json:"-"` 5716 5717 // NullFields is a list of field names (e.g. "ColumnIndex") to include 5718 // in API requests with the JSON null value. By default, fields with 5719 // empty values are omitted from API requests. However, any field with 5720 // an empty value appearing in NullFields will be sent to the server as 5721 // null. It is an error if a field in this list has a non-empty value. 5722 // This may be used to include null fields in Patch requests. 5723 NullFields []string `json:"-"` 5724} 5725 5726func (s *GridCoordinate) MarshalJSON() ([]byte, error) { 5727 type NoMethod GridCoordinate 5728 raw := NoMethod(*s) 5729 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5730} 5731 5732// GridData: Data in the grid, as well as metadata about the dimensions. 5733type GridData struct { 5734 // ColumnMetadata: Metadata about the requested columns in the grid, 5735 // starting with the column 5736 // in start_column. 5737 ColumnMetadata []*DimensionProperties `json:"columnMetadata,omitempty"` 5738 5739 // RowData: The data in the grid, one entry per row, 5740 // starting with the row in startRow. 5741 // The values in RowData will correspond to columns starting 5742 // at start_column. 5743 RowData []*RowData `json:"rowData,omitempty"` 5744 5745 // RowMetadata: Metadata about the requested rows in the grid, starting 5746 // with the row 5747 // in start_row. 5748 RowMetadata []*DimensionProperties `json:"rowMetadata,omitempty"` 5749 5750 // StartColumn: The first column this GridData refers to, zero-based. 5751 StartColumn int64 `json:"startColumn,omitempty"` 5752 5753 // StartRow: The first row this GridData refers to, zero-based. 5754 StartRow int64 `json:"startRow,omitempty"` 5755 5756 // ForceSendFields is a list of field names (e.g. "ColumnMetadata") to 5757 // unconditionally include in API requests. By default, fields with 5758 // empty values are omitted from API requests. However, any non-pointer, 5759 // non-interface field appearing in ForceSendFields will be sent to the 5760 // server regardless of whether the field is empty or not. This may be 5761 // used to include empty fields in Patch requests. 5762 ForceSendFields []string `json:"-"` 5763 5764 // NullFields is a list of field names (e.g. "ColumnMetadata") to 5765 // include in API requests with the JSON null value. By default, fields 5766 // with empty values are omitted from API requests. However, any field 5767 // with an empty value appearing in NullFields will be sent to the 5768 // server as null. It is an error if a field in this list has a 5769 // non-empty value. This may be used to include null fields in Patch 5770 // requests. 5771 NullFields []string `json:"-"` 5772} 5773 5774func (s *GridData) MarshalJSON() ([]byte, error) { 5775 type NoMethod GridData 5776 raw := NoMethod(*s) 5777 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5778} 5779 5780// GridProperties: Properties of a grid. 5781type GridProperties struct { 5782 // ColumnCount: The number of columns in the grid. 5783 ColumnCount int64 `json:"columnCount,omitempty"` 5784 5785 // ColumnGroupControlAfter: True if the column grouping control toggle 5786 // is shown after the group. 5787 ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"` 5788 5789 // FrozenColumnCount: The number of columns that are frozen in the grid. 5790 FrozenColumnCount int64 `json:"frozenColumnCount,omitempty"` 5791 5792 // FrozenRowCount: The number of rows that are frozen in the grid. 5793 FrozenRowCount int64 `json:"frozenRowCount,omitempty"` 5794 5795 // HideGridlines: True if the grid isn't showing gridlines in the UI. 5796 HideGridlines bool `json:"hideGridlines,omitempty"` 5797 5798 // RowCount: The number of rows in the grid. 5799 RowCount int64 `json:"rowCount,omitempty"` 5800 5801 // RowGroupControlAfter: True if the row grouping control toggle is 5802 // shown after the group. 5803 RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"` 5804 5805 // ForceSendFields is a list of field names (e.g. "ColumnCount") to 5806 // unconditionally include in API requests. By default, fields with 5807 // empty values are omitted from API requests. However, any non-pointer, 5808 // non-interface field appearing in ForceSendFields will be sent to the 5809 // server regardless of whether the field is empty or not. This may be 5810 // used to include empty fields in Patch requests. 5811 ForceSendFields []string `json:"-"` 5812 5813 // NullFields is a list of field names (e.g. "ColumnCount") to include 5814 // in API requests with the JSON null value. By default, fields with 5815 // empty values are omitted from API requests. However, any field with 5816 // an empty value appearing in NullFields will be sent to the server as 5817 // null. It is an error if a field in this list has a non-empty value. 5818 // This may be used to include null fields in Patch requests. 5819 NullFields []string `json:"-"` 5820} 5821 5822func (s *GridProperties) MarshalJSON() ([]byte, error) { 5823 type NoMethod GridProperties 5824 raw := NoMethod(*s) 5825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5826} 5827 5828// GridRange: A range on a sheet. 5829// All indexes are zero-based. 5830// Indexes are half open, e.g the start index is inclusive 5831// and the end index is exclusive -- [start_index, end_index). 5832// Missing indexes indicate the range is unbounded on that side. 5833// 5834// For example, if "Sheet1" is sheet ID 0, then: 5835// 5836// `Sheet1!A1:A1 == sheet_id: 0, 5837// start_row_index: 0, end_row_index: 1, 5838// start_column_index: 0, end_column_index: 1` 5839// 5840// `Sheet1!A3:B4 == sheet_id: 0, 5841// start_row_index: 2, end_row_index: 4, 5842// start_column_index: 0, end_column_index: 2` 5843// 5844// `Sheet1!A:B == sheet_id: 0, 5845// start_column_index: 0, end_column_index: 2` 5846// 5847// `Sheet1!A5:B == sheet_id: 0, 5848// start_row_index: 4, 5849// start_column_index: 0, end_column_index: 2` 5850// 5851// `Sheet1 == sheet_id:0` 5852// 5853// The start index must always be less than or equal to the end 5854// index. 5855// If the start index equals the end index, then the range is 5856// empty. 5857// Empty ranges are typically not meaningful and are usually rendered in 5858// the 5859// UI as `#REF!`. 5860type GridRange struct { 5861 // EndColumnIndex: The end column (exclusive) of the range, or not set 5862 // if unbounded. 5863 EndColumnIndex int64 `json:"endColumnIndex,omitempty"` 5864 5865 // EndRowIndex: The end row (exclusive) of the range, or not set if 5866 // unbounded. 5867 EndRowIndex int64 `json:"endRowIndex,omitempty"` 5868 5869 // SheetId: The sheet this range is on. 5870 SheetId int64 `json:"sheetId,omitempty"` 5871 5872 // StartColumnIndex: The start column (inclusive) of the range, or not 5873 // set if unbounded. 5874 StartColumnIndex int64 `json:"startColumnIndex,omitempty"` 5875 5876 // StartRowIndex: The start row (inclusive) of the range, or not set if 5877 // unbounded. 5878 StartRowIndex int64 `json:"startRowIndex,omitempty"` 5879 5880 // ForceSendFields is a list of field names (e.g. "EndColumnIndex") to 5881 // unconditionally include in API requests. By default, fields with 5882 // empty values are omitted from API requests. However, any non-pointer, 5883 // non-interface field appearing in ForceSendFields will be sent to the 5884 // server regardless of whether the field is empty or not. This may be 5885 // used to include empty fields in Patch requests. 5886 ForceSendFields []string `json:"-"` 5887 5888 // NullFields is a list of field names (e.g. "EndColumnIndex") to 5889 // include in API requests with the JSON null value. By default, fields 5890 // with empty values are omitted from API requests. However, any field 5891 // with an empty value appearing in NullFields will be sent to the 5892 // server as null. It is an error if a field in this list has a 5893 // non-empty value. This may be used to include null fields in Patch 5894 // requests. 5895 NullFields []string `json:"-"` 5896} 5897 5898func (s *GridRange) MarshalJSON() ([]byte, error) { 5899 type NoMethod GridRange 5900 raw := NoMethod(*s) 5901 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5902} 5903 5904// HistogramChartSpec: A <a 5905// href="/chart/interactive/docs/gallery/histogram">histogram 5906// chart</a>. 5907// A histogram chart groups data items into bins, displaying each bin as 5908// a 5909// column of stacked items. Histograms are used to display the 5910// distribution 5911// of a dataset. Each column of items represents a range into which 5912// those 5913// items fall. The number of bins can be chosen automatically or 5914// specified 5915// explicitly. 5916type HistogramChartSpec struct { 5917 // BucketSize: By default the bucket size (the range of values stacked 5918 // in a single 5919 // column) is chosen automatically, but it may be overridden here. 5920 // E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 5921 // 3.0, etc. 5922 // Cannot be negative. 5923 // This field is optional. 5924 BucketSize float64 `json:"bucketSize,omitempty"` 5925 5926 // LegendPosition: The position of the chart legend. 5927 // 5928 // Possible values: 5929 // "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do 5930 // not use. 5931 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 5932 // chart. 5933 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 5934 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 5935 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 5936 // "NO_LEGEND" - No legend is rendered. 5937 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 5938 LegendPosition string `json:"legendPosition,omitempty"` 5939 5940 // OutlierPercentile: The outlier percentile is used to ensure that 5941 // outliers do not adversely 5942 // affect the calculation of bucket sizes. For example, setting an 5943 // outlier 5944 // percentile of 0.05 indicates that the top and bottom 5% of values 5945 // when 5946 // calculating buckets. The values are still included in the chart, 5947 // they will 5948 // be added to the first or last buckets instead of their own 5949 // buckets. 5950 // Must be between 0.0 and 0.5. 5951 OutlierPercentile float64 `json:"outlierPercentile,omitempty"` 5952 5953 // Series: The series for a histogram may be either a single series of 5954 // values to be 5955 // bucketed or multiple series, each of the same length, containing the 5956 // name 5957 // of the series followed by the values to be bucketed for that series. 5958 Series []*HistogramSeries `json:"series,omitempty"` 5959 5960 // ShowItemDividers: Whether horizontal divider lines should be 5961 // displayed between items in each 5962 // column. 5963 ShowItemDividers bool `json:"showItemDividers,omitempty"` 5964 5965 // ForceSendFields is a list of field names (e.g. "BucketSize") to 5966 // unconditionally include in API requests. By default, fields with 5967 // empty values are omitted from API requests. However, any non-pointer, 5968 // non-interface field appearing in ForceSendFields will be sent to the 5969 // server regardless of whether the field is empty or not. This may be 5970 // used to include empty fields in Patch requests. 5971 ForceSendFields []string `json:"-"` 5972 5973 // NullFields is a list of field names (e.g. "BucketSize") to include in 5974 // API requests with the JSON null value. By default, fields with empty 5975 // values are omitted from API requests. However, any field with an 5976 // empty value appearing in NullFields will be sent to the server as 5977 // null. It is an error if a field in this list has a non-empty value. 5978 // This may be used to include null fields in Patch requests. 5979 NullFields []string `json:"-"` 5980} 5981 5982func (s *HistogramChartSpec) MarshalJSON() ([]byte, error) { 5983 type NoMethod HistogramChartSpec 5984 raw := NoMethod(*s) 5985 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5986} 5987 5988func (s *HistogramChartSpec) UnmarshalJSON(data []byte) error { 5989 type NoMethod HistogramChartSpec 5990 var s1 struct { 5991 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 5992 OutlierPercentile gensupport.JSONFloat64 `json:"outlierPercentile"` 5993 *NoMethod 5994 } 5995 s1.NoMethod = (*NoMethod)(s) 5996 if err := json.Unmarshal(data, &s1); err != nil { 5997 return err 5998 } 5999 s.BucketSize = float64(s1.BucketSize) 6000 s.OutlierPercentile = float64(s1.OutlierPercentile) 6001 return nil 6002} 6003 6004// HistogramRule: Allows you to organize the numeric values in a source 6005// data column into 6006// buckets of a constant size. All values from HistogramRule.start 6007// to 6008// HistogramRule.end are placed into groups of 6009// size 6010// HistogramRule.interval. In addition, all values 6011// below 6012// HistogramRule.start are placed in one group, and all values 6013// above 6014// HistogramRule.end are placed in another. Only 6015// HistogramRule.interval is required, though if HistogramRule.start 6016// and HistogramRule.end are both provided, HistogramRule.start must 6017// be less than HistogramRule.end. For example, a pivot table 6018// showing 6019// average purchase amount by age that has 50+ rows: 6020// 6021// +-----+-------------------+ 6022// | Age | AVERAGE of Amount | 6023// +-----+-------------------+ 6024// | 16 | $27.13 | 6025// | 17 | $5.24 | 6026// | 18 | $20.15 | 6027// ... 6028// +-----+-------------------+ 6029// could be turned into a pivot table that looks like the one below 6030// by 6031// applying a histogram group rule with a HistogramRule.start of 25, 6032// an HistogramRule.interval of 20, and an HistogramRule.end 6033// of 65. 6034// 6035// +-------------+-------------------+ 6036// | Grouped Age | AVERAGE of Amount | 6037// +-------------+-------------------+ 6038// | < 25 | $19.34 | 6039// | 25-45 | $31.43 | 6040// | 45-65 | $35.87 | 6041// | > 65 | $27.55 | 6042// +-------------+-------------------+ 6043// | Grand Total | $29.12 | 6044// +-------------+-------------------+ 6045type HistogramRule struct { 6046 // End: The maximum value at which items are placed into buckets 6047 // of constant size. Values above end are lumped into a single 6048 // bucket. 6049 // This field is optional. 6050 End float64 `json:"end,omitempty"` 6051 6052 // Interval: The size of the buckets that are created. Must be positive. 6053 Interval float64 `json:"interval,omitempty"` 6054 6055 // Start: The minimum value at which items are placed into buckets 6056 // of constant size. Values below start are lumped into a single 6057 // bucket. 6058 // This field is optional. 6059 Start float64 `json:"start,omitempty"` 6060 6061 // ForceSendFields is a list of field names (e.g. "End") to 6062 // unconditionally include in API requests. By default, fields with 6063 // empty values are omitted from API requests. However, any non-pointer, 6064 // non-interface field appearing in ForceSendFields will be sent to the 6065 // server regardless of whether the field is empty or not. This may be 6066 // used to include empty fields in Patch requests. 6067 ForceSendFields []string `json:"-"` 6068 6069 // NullFields is a list of field names (e.g. "End") to include in API 6070 // requests with the JSON null value. By default, fields with empty 6071 // values are omitted from API requests. However, any field with an 6072 // empty value appearing in NullFields will be sent to the server as 6073 // null. It is an error if a field in this list has a non-empty value. 6074 // This may be used to include null fields in Patch requests. 6075 NullFields []string `json:"-"` 6076} 6077 6078func (s *HistogramRule) MarshalJSON() ([]byte, error) { 6079 type NoMethod HistogramRule 6080 raw := NoMethod(*s) 6081 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6082} 6083 6084func (s *HistogramRule) UnmarshalJSON(data []byte) error { 6085 type NoMethod HistogramRule 6086 var s1 struct { 6087 End gensupport.JSONFloat64 `json:"end"` 6088 Interval gensupport.JSONFloat64 `json:"interval"` 6089 Start gensupport.JSONFloat64 `json:"start"` 6090 *NoMethod 6091 } 6092 s1.NoMethod = (*NoMethod)(s) 6093 if err := json.Unmarshal(data, &s1); err != nil { 6094 return err 6095 } 6096 s.End = float64(s1.End) 6097 s.Interval = float64(s1.Interval) 6098 s.Start = float64(s1.Start) 6099 return nil 6100} 6101 6102// HistogramSeries: A histogram series containing the series color and 6103// data. 6104type HistogramSeries struct { 6105 // BarColor: The color of the column representing this series in each 6106 // bucket. 6107 // This field is optional. 6108 BarColor *Color `json:"barColor,omitempty"` 6109 6110 // Data: The data for this histogram series. 6111 Data *ChartData `json:"data,omitempty"` 6112 6113 // ForceSendFields is a list of field names (e.g. "BarColor") to 6114 // unconditionally include in API requests. By default, fields with 6115 // empty values are omitted from API requests. However, any non-pointer, 6116 // non-interface field appearing in ForceSendFields will be sent to the 6117 // server regardless of whether the field is empty or not. This may be 6118 // used to include empty fields in Patch requests. 6119 ForceSendFields []string `json:"-"` 6120 6121 // NullFields is a list of field names (e.g. "BarColor") to include in 6122 // API requests with the JSON null value. By default, fields with empty 6123 // values are omitted from API requests. However, any field with an 6124 // empty value appearing in NullFields will be sent to the server as 6125 // null. It is an error if a field in this list has a non-empty value. 6126 // This may be used to include null fields in Patch requests. 6127 NullFields []string `json:"-"` 6128} 6129 6130func (s *HistogramSeries) MarshalJSON() ([]byte, error) { 6131 type NoMethod HistogramSeries 6132 raw := NoMethod(*s) 6133 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6134} 6135 6136// InsertDimensionRequest: Inserts rows or columns in a sheet at a 6137// particular index. 6138type InsertDimensionRequest struct { 6139 // InheritFromBefore: Whether dimension properties should be extended 6140 // from the dimensions 6141 // before or after the newly inserted dimensions. 6142 // True to inherit from the dimensions before (in which case the 6143 // start 6144 // index must be greater than 0), and false to inherit from the 6145 // dimensions 6146 // after. 6147 // 6148 // For example, if row index 0 has red background and row index 1 6149 // has a green background, then inserting 2 rows at index 1 can 6150 // inherit 6151 // either the green or red background. If `inheritFromBefore` is 6152 // true, 6153 // the two new rows will be red (because the row before the insertion 6154 // point 6155 // was red), whereas if `inheritFromBefore` is false, the two new rows 6156 // will 6157 // be green (because the row after the insertion point was green). 6158 InheritFromBefore bool `json:"inheritFromBefore,omitempty"` 6159 6160 // Range: The dimensions to insert. Both the start and end indexes must 6161 // be bounded. 6162 Range *DimensionRange `json:"range,omitempty"` 6163 6164 // ForceSendFields is a list of field names (e.g. "InheritFromBefore") 6165 // to unconditionally include in API requests. By default, fields with 6166 // empty values are omitted from API requests. However, any non-pointer, 6167 // non-interface field appearing in ForceSendFields will be sent to the 6168 // server regardless of whether the field is empty or not. This may be 6169 // used to include empty fields in Patch requests. 6170 ForceSendFields []string `json:"-"` 6171 6172 // NullFields is a list of field names (e.g. "InheritFromBefore") to 6173 // include in API requests with the JSON null value. By default, fields 6174 // with empty values are omitted from API requests. However, any field 6175 // with an empty value appearing in NullFields will be sent to the 6176 // server as null. It is an error if a field in this list has a 6177 // non-empty value. This may be used to include null fields in Patch 6178 // requests. 6179 NullFields []string `json:"-"` 6180} 6181 6182func (s *InsertDimensionRequest) MarshalJSON() ([]byte, error) { 6183 type NoMethod InsertDimensionRequest 6184 raw := NoMethod(*s) 6185 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6186} 6187 6188// InsertRangeRequest: Inserts cells into a range, shifting the existing 6189// cells over or down. 6190type InsertRangeRequest struct { 6191 // Range: The range to insert new cells into. 6192 Range *GridRange `json:"range,omitempty"` 6193 6194 // ShiftDimension: The dimension which will be shifted when inserting 6195 // cells. 6196 // If ROWS, existing cells will be shifted down. 6197 // If COLUMNS, existing cells will be shifted right. 6198 // 6199 // Possible values: 6200 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 6201 // "ROWS" - Operates on the rows of a sheet. 6202 // "COLUMNS" - Operates on the columns of a sheet. 6203 ShiftDimension string `json:"shiftDimension,omitempty"` 6204 6205 // ForceSendFields is a list of field names (e.g. "Range") to 6206 // unconditionally include in API requests. By default, fields with 6207 // empty values are omitted from API requests. However, any non-pointer, 6208 // non-interface field appearing in ForceSendFields will be sent to the 6209 // server regardless of whether the field is empty or not. This may be 6210 // used to include empty fields in Patch requests. 6211 ForceSendFields []string `json:"-"` 6212 6213 // NullFields is a list of field names (e.g. "Range") to include in API 6214 // requests with the JSON null value. By default, fields with empty 6215 // values are omitted from API requests. However, any field with an 6216 // empty value appearing in NullFields will be sent to the server as 6217 // null. It is an error if a field in this list has a non-empty value. 6218 // This may be used to include null fields in Patch requests. 6219 NullFields []string `json:"-"` 6220} 6221 6222func (s *InsertRangeRequest) MarshalJSON() ([]byte, error) { 6223 type NoMethod InsertRangeRequest 6224 raw := NoMethod(*s) 6225 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6226} 6227 6228// InterpolationPoint: A single interpolation point on a gradient 6229// conditional format. 6230// These pin the gradient color scale according to the color, 6231// type and value chosen. 6232type InterpolationPoint struct { 6233 // Color: The color this interpolation point should use. 6234 Color *Color `json:"color,omitempty"` 6235 6236 // Type: How the value should be interpreted. 6237 // 6238 // Possible values: 6239 // "INTERPOLATION_POINT_TYPE_UNSPECIFIED" - The default value, do not 6240 // use. 6241 // "MIN" - The interpolation point uses the minimum value in the 6242 // cells over the range of the conditional format. 6243 // "MAX" - The interpolation point uses the maximum value in the 6244 // cells over the range of the conditional format. 6245 // "NUMBER" - The interpolation point uses exactly the value 6246 // in 6247 // InterpolationPoint.value. 6248 // "PERCENT" - The interpolation point is the given percentage 6249 // over 6250 // all the cells in the range of the conditional format. 6251 // This is equivalent to NUMBER if the value was: 6252 // `=(MAX(FLATTEN(range)) * (value / 100)) 6253 // + (MIN(FLATTEN(range)) * (1 - (value / 100)))` 6254 // (where errors in the range are ignored when flattening). 6255 // "PERCENTILE" - The interpolation point is the given percentile 6256 // over all the cells in the range of the conditional format. 6257 // This is equivalent to NUMBER if the value 6258 // was: 6259 // `=PERCENTILE(FLATTEN(range), value / 100)` 6260 // (where errors in the range are ignored when flattening). 6261 Type string `json:"type,omitempty"` 6262 6263 // Value: The value this interpolation point uses. May be a 6264 // formula. 6265 // Unused if type is MIN or 6266 // MAX. 6267 Value string `json:"value,omitempty"` 6268 6269 // ForceSendFields is a list of field names (e.g. "Color") to 6270 // unconditionally include in API requests. By default, fields with 6271 // empty values are omitted from API requests. However, any non-pointer, 6272 // non-interface field appearing in ForceSendFields will be sent to the 6273 // server regardless of whether the field is empty or not. This may be 6274 // used to include empty fields in Patch requests. 6275 ForceSendFields []string `json:"-"` 6276 6277 // NullFields is a list of field names (e.g. "Color") to include in API 6278 // requests with the JSON null value. By default, fields with empty 6279 // values are omitted from API requests. However, any field with an 6280 // empty value appearing in NullFields will be sent to the server as 6281 // null. It is an error if a field in this list has a non-empty value. 6282 // This may be used to include null fields in Patch requests. 6283 NullFields []string `json:"-"` 6284} 6285 6286func (s *InterpolationPoint) MarshalJSON() ([]byte, error) { 6287 type NoMethod InterpolationPoint 6288 raw := NoMethod(*s) 6289 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6290} 6291 6292// IterativeCalculationSettings: Settings to control how circular 6293// dependencies are resolved with iterative 6294// calculation. 6295type IterativeCalculationSettings struct { 6296 // ConvergenceThreshold: When iterative calculation is enabled and 6297 // successive results differ by 6298 // less than this threshold value, the calculation rounds stop. 6299 ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"` 6300 6301 // MaxIterations: When iterative calculation is enabled, the maximum 6302 // number of calculation 6303 // rounds to perform. 6304 MaxIterations int64 `json:"maxIterations,omitempty"` 6305 6306 // ForceSendFields is a list of field names (e.g. 6307 // "ConvergenceThreshold") to unconditionally include in API requests. 6308 // By default, fields with empty values are omitted from API requests. 6309 // However, any non-pointer, non-interface field appearing in 6310 // ForceSendFields will be sent to the server regardless of whether the 6311 // field is empty or not. This may be used to include empty fields in 6312 // Patch requests. 6313 ForceSendFields []string `json:"-"` 6314 6315 // NullFields is a list of field names (e.g. "ConvergenceThreshold") to 6316 // include in API requests with the JSON null value. By default, fields 6317 // with empty values are omitted from API requests. However, any field 6318 // with an empty value appearing in NullFields will be sent to the 6319 // server as null. It is an error if a field in this list has a 6320 // non-empty value. This may be used to include null fields in Patch 6321 // requests. 6322 NullFields []string `json:"-"` 6323} 6324 6325func (s *IterativeCalculationSettings) MarshalJSON() ([]byte, error) { 6326 type NoMethod IterativeCalculationSettings 6327 raw := NoMethod(*s) 6328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6329} 6330 6331func (s *IterativeCalculationSettings) UnmarshalJSON(data []byte) error { 6332 type NoMethod IterativeCalculationSettings 6333 var s1 struct { 6334 ConvergenceThreshold gensupport.JSONFloat64 `json:"convergenceThreshold"` 6335 *NoMethod 6336 } 6337 s1.NoMethod = (*NoMethod)(s) 6338 if err := json.Unmarshal(data, &s1); err != nil { 6339 return err 6340 } 6341 s.ConvergenceThreshold = float64(s1.ConvergenceThreshold) 6342 return nil 6343} 6344 6345// KeyValueFormat: Formatting options for key value. 6346type KeyValueFormat struct { 6347 // Position: Specifies the horizontal text positioning of key 6348 // value. 6349 // This field is optional. If not specified, default positioning is 6350 // used. 6351 Position *TextPosition `json:"position,omitempty"` 6352 6353 // TextFormat: Text formatting options for key value. 6354 TextFormat *TextFormat `json:"textFormat,omitempty"` 6355 6356 // ForceSendFields is a list of field names (e.g. "Position") to 6357 // unconditionally include in API requests. By default, fields with 6358 // empty values are omitted from API requests. However, any non-pointer, 6359 // non-interface field appearing in ForceSendFields will be sent to the 6360 // server regardless of whether the field is empty or not. This may be 6361 // used to include empty fields in Patch requests. 6362 ForceSendFields []string `json:"-"` 6363 6364 // NullFields is a list of field names (e.g. "Position") to include in 6365 // API requests with the JSON null value. By default, fields with empty 6366 // values are omitted from API requests. However, any field with an 6367 // empty value appearing in NullFields will be sent to the server as 6368 // null. It is an error if a field in this list has a non-empty value. 6369 // This may be used to include null fields in Patch requests. 6370 NullFields []string `json:"-"` 6371} 6372 6373func (s *KeyValueFormat) MarshalJSON() ([]byte, error) { 6374 type NoMethod KeyValueFormat 6375 raw := NoMethod(*s) 6376 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6377} 6378 6379// LineStyle: Properties that describe the style of a line. 6380type LineStyle struct { 6381 // Type: The dash type of the line. 6382 // 6383 // Possible values: 6384 // "LINE_DASH_TYPE_UNSPECIFIED" - Default value, do not use. 6385 // "INVISIBLE" - No dash type, which is equivalent to a non-visible 6386 // line. 6387 // "CUSTOM" - A custom dash for a line. Modifying the exact custom 6388 // dash style is 6389 // currently unsupported. 6390 // "SOLID" - A solid line. 6391 // "DOTTED" - A dotted line. 6392 // "MEDIUM_DASHED" - A dashed line where the dashes have "medium" 6393 // length. 6394 // "MEDIUM_DASHED_DOTTED" - A line that alternates between a "medium" 6395 // dash and a dot. 6396 // "LONG_DASHED" - A dashed line where the dashes have "long" length. 6397 // "LONG_DASHED_DOTTED" - A line that alternates between a "long" dash 6398 // and a dot. 6399 Type string `json:"type,omitempty"` 6400 6401 // Width: The thickness of the line, in px. 6402 Width int64 `json:"width,omitempty"` 6403 6404 // ForceSendFields is a list of field names (e.g. "Type") to 6405 // unconditionally include in API requests. By default, fields with 6406 // empty values are omitted from API requests. However, any non-pointer, 6407 // non-interface field appearing in ForceSendFields will be sent to the 6408 // server regardless of whether the field is empty or not. This may be 6409 // used to include empty fields in Patch requests. 6410 ForceSendFields []string `json:"-"` 6411 6412 // NullFields is a list of field names (e.g. "Type") to include in API 6413 // requests with the JSON null value. By default, fields with empty 6414 // values are omitted from API requests. However, any field with an 6415 // empty value appearing in NullFields will be sent to the server as 6416 // null. It is an error if a field in this list has a non-empty value. 6417 // This may be used to include null fields in Patch requests. 6418 NullFields []string `json:"-"` 6419} 6420 6421func (s *LineStyle) MarshalJSON() ([]byte, error) { 6422 type NoMethod LineStyle 6423 raw := NoMethod(*s) 6424 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6425} 6426 6427// ManualRule: Allows you to manually organize the values in a source 6428// data column into 6429// buckets with names of your choosing. For example, a pivot table 6430// that 6431// aggregates population by state: 6432// 6433// +-------+-------------------+ 6434// | State | SUM of Population | 6435// +-------+-------------------+ 6436// | AK | 0.7 | 6437// | AL | 4.8 | 6438// | AR | 2.9 | 6439// ... 6440// +-------+-------------------+ 6441// could be turned into a pivot table that aggregates population by time 6442// zone 6443// by providing a list of groups (for example, groupName = 6444// 'Central', 6445// items = ['AL', 'AR', 'IA', ...]) to a manual group rule. 6446// Note that a similar effect could be achieved by adding a time zone 6447// column 6448// to the source data and adjusting the pivot table. 6449// 6450// +-----------+-------------------+ 6451// | Time Zone | SUM of Population | 6452// +-----------+-------------------+ 6453// | Central | 106.3 | 6454// | Eastern | 151.9 | 6455// | Mountain | 17.4 | 6456// ... 6457// +-----------+-------------------+ 6458type ManualRule struct { 6459 // Groups: The list of group names and the corresponding items from the 6460 // source data 6461 // that map to each group name. 6462 Groups []*ManualRuleGroup `json:"groups,omitempty"` 6463 6464 // ForceSendFields is a list of field names (e.g. "Groups") to 6465 // unconditionally include in API requests. By default, fields with 6466 // empty values are omitted from API requests. However, any non-pointer, 6467 // non-interface field appearing in ForceSendFields will be sent to the 6468 // server regardless of whether the field is empty or not. This may be 6469 // used to include empty fields in Patch requests. 6470 ForceSendFields []string `json:"-"` 6471 6472 // NullFields is a list of field names (e.g. "Groups") to include in API 6473 // requests with the JSON null value. By default, fields with empty 6474 // values are omitted from API requests. However, any field with an 6475 // empty value appearing in NullFields will be sent to the server as 6476 // null. It is an error if a field in this list has a non-empty value. 6477 // This may be used to include null fields in Patch requests. 6478 NullFields []string `json:"-"` 6479} 6480 6481func (s *ManualRule) MarshalJSON() ([]byte, error) { 6482 type NoMethod ManualRule 6483 raw := NoMethod(*s) 6484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6485} 6486 6487// ManualRuleGroup: A group name and a list of items from the source 6488// data that should be placed 6489// in the group with this name. 6490type ManualRuleGroup struct { 6491 // GroupName: The group name, which must be a string. Each group in a 6492 // given 6493 // ManualRule must have a unique group name. 6494 GroupName *ExtendedValue `json:"groupName,omitempty"` 6495 6496 // Items: The items in the source data that should be placed into this 6497 // group. Each 6498 // item may be a string, number, or boolean. Items may appear in at most 6499 // one 6500 // group within a given ManualRule. Items that do not appear in 6501 // any 6502 // group will appear on their own. 6503 Items []*ExtendedValue `json:"items,omitempty"` 6504 6505 // ForceSendFields is a list of field names (e.g. "GroupName") to 6506 // unconditionally include in API requests. By default, fields with 6507 // empty values are omitted from API requests. However, any non-pointer, 6508 // non-interface field appearing in ForceSendFields will be sent to the 6509 // server regardless of whether the field is empty or not. This may be 6510 // used to include empty fields in Patch requests. 6511 ForceSendFields []string `json:"-"` 6512 6513 // NullFields is a list of field names (e.g. "GroupName") to include in 6514 // API requests with the JSON null value. By default, fields with empty 6515 // values are omitted from API requests. However, any field with an 6516 // empty value appearing in NullFields will be sent to the server as 6517 // null. It is an error if a field in this list has a non-empty value. 6518 // This may be used to include null fields in Patch requests. 6519 NullFields []string `json:"-"` 6520} 6521 6522func (s *ManualRuleGroup) MarshalJSON() ([]byte, error) { 6523 type NoMethod ManualRuleGroup 6524 raw := NoMethod(*s) 6525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6526} 6527 6528// MatchedDeveloperMetadata: A developer metadata entry and the data 6529// filters specified in the original 6530// request that matched it. 6531type MatchedDeveloperMetadata struct { 6532 // DataFilters: All filters matching the returned developer metadata. 6533 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6534 6535 // DeveloperMetadata: The developer metadata matching the specified 6536 // filters. 6537 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 6538 6539 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6540 // unconditionally include in API requests. By default, fields with 6541 // empty values are omitted from API requests. However, any non-pointer, 6542 // non-interface field appearing in ForceSendFields will be sent to the 6543 // server regardless of whether the field is empty or not. This may be 6544 // used to include empty fields in Patch requests. 6545 ForceSendFields []string `json:"-"` 6546 6547 // NullFields is a list of field names (e.g. "DataFilters") to include 6548 // in API requests with the JSON null value. By default, fields with 6549 // empty values are omitted from API requests. However, any field with 6550 // an empty value appearing in NullFields will be sent to the server as 6551 // null. It is an error if a field in this list has a non-empty value. 6552 // This may be used to include null fields in Patch requests. 6553 NullFields []string `json:"-"` 6554} 6555 6556func (s *MatchedDeveloperMetadata) MarshalJSON() ([]byte, error) { 6557 type NoMethod MatchedDeveloperMetadata 6558 raw := NoMethod(*s) 6559 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6560} 6561 6562// MatchedValueRange: A value range that was matched by one or more data 6563// filers. 6564type MatchedValueRange struct { 6565 // DataFilters: The DataFilters from the request that matched the range 6566 // of 6567 // values. 6568 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6569 6570 // ValueRange: The values matched by the DataFilter. 6571 ValueRange *ValueRange `json:"valueRange,omitempty"` 6572 6573 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6574 // unconditionally include in API requests. By default, fields with 6575 // empty values are omitted from API requests. However, any non-pointer, 6576 // non-interface field appearing in ForceSendFields will be sent to the 6577 // server regardless of whether the field is empty or not. This may be 6578 // used to include empty fields in Patch requests. 6579 ForceSendFields []string `json:"-"` 6580 6581 // NullFields is a list of field names (e.g. "DataFilters") to include 6582 // in API requests with the JSON null value. By default, fields with 6583 // empty values are omitted from API requests. However, any field with 6584 // an empty value appearing in NullFields will be sent to the server as 6585 // null. It is an error if a field in this list has a non-empty value. 6586 // This may be used to include null fields in Patch requests. 6587 NullFields []string `json:"-"` 6588} 6589 6590func (s *MatchedValueRange) MarshalJSON() ([]byte, error) { 6591 type NoMethod MatchedValueRange 6592 raw := NoMethod(*s) 6593 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6594} 6595 6596// MergeCellsRequest: Merges all cells in the range. 6597type MergeCellsRequest struct { 6598 // MergeType: How the cells should be merged. 6599 // 6600 // Possible values: 6601 // "MERGE_ALL" - Create a single merge from the range 6602 // "MERGE_COLUMNS" - Create a merge for each column in the range 6603 // "MERGE_ROWS" - Create a merge for each row in the range 6604 MergeType string `json:"mergeType,omitempty"` 6605 6606 // Range: The range of cells to merge. 6607 Range *GridRange `json:"range,omitempty"` 6608 6609 // ForceSendFields is a list of field names (e.g. "MergeType") to 6610 // unconditionally include in API requests. By default, fields with 6611 // empty values are omitted from API requests. However, any non-pointer, 6612 // non-interface field appearing in ForceSendFields will be sent to the 6613 // server regardless of whether the field is empty or not. This may be 6614 // used to include empty fields in Patch requests. 6615 ForceSendFields []string `json:"-"` 6616 6617 // NullFields is a list of field names (e.g. "MergeType") to include in 6618 // API requests with the JSON null value. By default, fields with empty 6619 // values are omitted from API requests. However, any field with an 6620 // empty value appearing in NullFields will be sent to the server as 6621 // null. It is an error if a field in this list has a non-empty value. 6622 // This may be used to include null fields in Patch requests. 6623 NullFields []string `json:"-"` 6624} 6625 6626func (s *MergeCellsRequest) MarshalJSON() ([]byte, error) { 6627 type NoMethod MergeCellsRequest 6628 raw := NoMethod(*s) 6629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6630} 6631 6632// MoveDimensionRequest: Moves one or more rows or columns. 6633type MoveDimensionRequest struct { 6634 // DestinationIndex: The zero-based start index of where to move the 6635 // source data to, 6636 // based on the coordinates *before* the source data is removed 6637 // from the grid. Existing data will be shifted down or 6638 // right 6639 // (depending on the dimension) to make room for the moved 6640 // dimensions. 6641 // The source dimensions are removed from the grid, so the 6642 // the data may end up in a different index than specified. 6643 // 6644 // For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to 6645 // move 6646 // "1" and "2" to between "3" and "4", the source would be 6647 // `ROWS [1..3)`,and the destination index would be "4" 6648 // (the zero-based index of row 5). 6649 // The end result would be `A1..A5` of `0, 3, 1, 2, 4`. 6650 DestinationIndex int64 `json:"destinationIndex,omitempty"` 6651 6652 // Source: The source dimensions to move. 6653 Source *DimensionRange `json:"source,omitempty"` 6654 6655 // ForceSendFields is a list of field names (e.g. "DestinationIndex") to 6656 // unconditionally include in API requests. By default, fields with 6657 // empty values are omitted from API requests. However, any non-pointer, 6658 // non-interface field appearing in ForceSendFields will be sent to the 6659 // server regardless of whether the field is empty or not. This may be 6660 // used to include empty fields in Patch requests. 6661 ForceSendFields []string `json:"-"` 6662 6663 // NullFields is a list of field names (e.g. "DestinationIndex") to 6664 // include in API requests with the JSON null value. By default, fields 6665 // with empty values are omitted from API requests. However, any field 6666 // with an empty value appearing in NullFields will be sent to the 6667 // server as null. It is an error if a field in this list has a 6668 // non-empty value. This may be used to include null fields in Patch 6669 // requests. 6670 NullFields []string `json:"-"` 6671} 6672 6673func (s *MoveDimensionRequest) MarshalJSON() ([]byte, error) { 6674 type NoMethod MoveDimensionRequest 6675 raw := NoMethod(*s) 6676 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6677} 6678 6679// NamedRange: A named range. 6680type NamedRange struct { 6681 // Name: The name of the named range. 6682 Name string `json:"name,omitempty"` 6683 6684 // NamedRangeId: The ID of the named range. 6685 NamedRangeId string `json:"namedRangeId,omitempty"` 6686 6687 // Range: The range this represents. 6688 Range *GridRange `json:"range,omitempty"` 6689 6690 // ForceSendFields is a list of field names (e.g. "Name") to 6691 // unconditionally include in API requests. By default, fields with 6692 // empty values are omitted from API requests. However, any non-pointer, 6693 // non-interface field appearing in ForceSendFields will be sent to the 6694 // server regardless of whether the field is empty or not. This may be 6695 // used to include empty fields in Patch requests. 6696 ForceSendFields []string `json:"-"` 6697 6698 // NullFields is a list of field names (e.g. "Name") to include in API 6699 // requests with the JSON null value. By default, fields with empty 6700 // values are omitted from API requests. However, any field with an 6701 // empty value appearing in NullFields will be sent to the server as 6702 // null. It is an error if a field in this list has a non-empty value. 6703 // This may be used to include null fields in Patch requests. 6704 NullFields []string `json:"-"` 6705} 6706 6707func (s *NamedRange) MarshalJSON() ([]byte, error) { 6708 type NoMethod NamedRange 6709 raw := NoMethod(*s) 6710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6711} 6712 6713// NumberFormat: The number format of a cell. 6714type NumberFormat struct { 6715 // Pattern: Pattern string used for formatting. If not set, a default 6716 // pattern based on 6717 // the user's locale will be used if necessary for the given type. 6718 // See the [Date and Number Formats guide](/sheets/api/guides/formats) 6719 // for 6720 // more information about the supported patterns. 6721 Pattern string `json:"pattern,omitempty"` 6722 6723 // Type: The type of the number format. 6724 // When writing, this field must be set. 6725 // 6726 // Possible values: 6727 // "NUMBER_FORMAT_TYPE_UNSPECIFIED" - The number format is not 6728 // specified 6729 // and is based on the contents of the cell. 6730 // Do not explicitly use this. 6731 // "TEXT" - Text formatting, e.g `1000.12` 6732 // "NUMBER" - Number formatting, e.g, `1,000.12` 6733 // "PERCENT" - Percent formatting, e.g `10.12%` 6734 // "CURRENCY" - Currency formatting, e.g `$1,000.12` 6735 // "DATE" - Date formatting, e.g `9/26/2008` 6736 // "TIME" - Time formatting, e.g `3:59:00 PM` 6737 // "DATE_TIME" - Date+Time formatting, e.g `9/26/08 15:59:00` 6738 // "SCIENTIFIC" - Scientific number formatting, e.g `1.01E+03` 6739 Type string `json:"type,omitempty"` 6740 6741 // ForceSendFields is a list of field names (e.g. "Pattern") to 6742 // unconditionally include in API requests. By default, fields with 6743 // empty values are omitted from API requests. However, any non-pointer, 6744 // non-interface field appearing in ForceSendFields will be sent to the 6745 // server regardless of whether the field is empty or not. This may be 6746 // used to include empty fields in Patch requests. 6747 ForceSendFields []string `json:"-"` 6748 6749 // NullFields is a list of field names (e.g. "Pattern") to include in 6750 // API requests with the JSON null value. By default, fields with empty 6751 // values are omitted from API requests. However, any field with an 6752 // empty value appearing in NullFields will be sent to the server as 6753 // null. It is an error if a field in this list has a non-empty value. 6754 // This may be used to include null fields in Patch requests. 6755 NullFields []string `json:"-"` 6756} 6757 6758func (s *NumberFormat) MarshalJSON() ([]byte, error) { 6759 type NoMethod NumberFormat 6760 raw := NoMethod(*s) 6761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6762} 6763 6764// OrgChartSpec: An <a 6765// href="/chart/interactive/docs/gallery/orgchart">org chart</a>. 6766// Org charts require a unique set of labels in labels and 6767// may 6768// optionally include parent_labels and tooltips. 6769// parent_labels contain, for each node, the label identifying the 6770// parent 6771// node. tooltips contain, for each node, an optional tooltip. 6772// 6773// For example, to describe an OrgChart with Alice as the CEO, Bob as 6774// the 6775// President (reporting to Alice) and Cathy as VP of Sales (also 6776// reporting to 6777// Alice), have labels contain "Alice", "Bob", "Cathy", 6778// parent_labels contain "", "Alice", "Alice" and tooltips 6779// contain 6780// "CEO", "President", "VP Sales". 6781type OrgChartSpec struct { 6782 // Labels: The data containing the labels for all the nodes in the 6783 // chart. Labels 6784 // must be unique. 6785 Labels *ChartData `json:"labels,omitempty"` 6786 6787 // NodeColor: The color of the org chart nodes. 6788 NodeColor *Color `json:"nodeColor,omitempty"` 6789 6790 // NodeSize: The size of the org chart nodes. 6791 // 6792 // Possible values: 6793 // "ORG_CHART_LABEL_SIZE_UNSPECIFIED" - Default value, do not use. 6794 // "SMALL" - The small org chart node size. 6795 // "MEDIUM" - The medium org chart node size. 6796 // "LARGE" - The large org chart node size. 6797 NodeSize string `json:"nodeSize,omitempty"` 6798 6799 // ParentLabels: The data containing the label of the parent for the 6800 // corresponding node. 6801 // A blank value indicates that the node has no parent and is a 6802 // top-level 6803 // node. 6804 // This field is optional. 6805 ParentLabels *ChartData `json:"parentLabels,omitempty"` 6806 6807 // SelectedNodeColor: The color of the selected org chart nodes. 6808 SelectedNodeColor *Color `json:"selectedNodeColor,omitempty"` 6809 6810 // Tooltips: The data containing the tooltip for the corresponding node. 6811 // A blank value 6812 // results in no tooltip being displayed for the node. 6813 // This field is optional. 6814 Tooltips *ChartData `json:"tooltips,omitempty"` 6815 6816 // ForceSendFields is a list of field names (e.g. "Labels") to 6817 // unconditionally include in API requests. By default, fields with 6818 // empty values are omitted from API requests. However, any non-pointer, 6819 // non-interface field appearing in ForceSendFields will be sent to the 6820 // server regardless of whether the field is empty or not. This may be 6821 // used to include empty fields in Patch requests. 6822 ForceSendFields []string `json:"-"` 6823 6824 // NullFields is a list of field names (e.g. "Labels") to include in API 6825 // requests with the JSON null value. By default, fields with empty 6826 // values are omitted from API requests. However, any field with an 6827 // empty value appearing in NullFields will be sent to the server as 6828 // null. It is an error if a field in this list has a non-empty value. 6829 // This may be used to include null fields in Patch requests. 6830 NullFields []string `json:"-"` 6831} 6832 6833func (s *OrgChartSpec) MarshalJSON() ([]byte, error) { 6834 type NoMethod OrgChartSpec 6835 raw := NoMethod(*s) 6836 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6837} 6838 6839// OverlayPosition: The location an object is overlaid on top of a grid. 6840type OverlayPosition struct { 6841 // AnchorCell: The cell the object is anchored to. 6842 AnchorCell *GridCoordinate `json:"anchorCell,omitempty"` 6843 6844 // HeightPixels: The height of the object, in pixels. Defaults to 371. 6845 HeightPixels int64 `json:"heightPixels,omitempty"` 6846 6847 // OffsetXPixels: The horizontal offset, in pixels, that the object is 6848 // offset 6849 // from the anchor cell. 6850 OffsetXPixels int64 `json:"offsetXPixels,omitempty"` 6851 6852 // OffsetYPixels: The vertical offset, in pixels, that the object is 6853 // offset 6854 // from the anchor cell. 6855 OffsetYPixels int64 `json:"offsetYPixels,omitempty"` 6856 6857 // WidthPixels: The width of the object, in pixels. Defaults to 600. 6858 WidthPixels int64 `json:"widthPixels,omitempty"` 6859 6860 // ForceSendFields is a list of field names (e.g. "AnchorCell") to 6861 // unconditionally include in API requests. By default, fields with 6862 // empty values are omitted from API requests. However, any non-pointer, 6863 // non-interface field appearing in ForceSendFields will be sent to the 6864 // server regardless of whether the field is empty or not. This may be 6865 // used to include empty fields in Patch requests. 6866 ForceSendFields []string `json:"-"` 6867 6868 // NullFields is a list of field names (e.g. "AnchorCell") to include in 6869 // API requests with the JSON null value. By default, fields with empty 6870 // values are omitted from API requests. However, any field with an 6871 // empty value appearing in NullFields will be sent to the server as 6872 // null. It is an error if a field in this list has a non-empty value. 6873 // This may be used to include null fields in Patch requests. 6874 NullFields []string `json:"-"` 6875} 6876 6877func (s *OverlayPosition) MarshalJSON() ([]byte, error) { 6878 type NoMethod OverlayPosition 6879 raw := NoMethod(*s) 6880 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6881} 6882 6883// Padding: The amount of padding around the cell, in pixels. 6884// When updating padding, every field must be specified. 6885type Padding struct { 6886 // Bottom: The bottom padding of the cell. 6887 Bottom int64 `json:"bottom,omitempty"` 6888 6889 // Left: The left padding of the cell. 6890 Left int64 `json:"left,omitempty"` 6891 6892 // Right: The right padding of the cell. 6893 Right int64 `json:"right,omitempty"` 6894 6895 // Top: The top padding of the cell. 6896 Top int64 `json:"top,omitempty"` 6897 6898 // ForceSendFields is a list of field names (e.g. "Bottom") to 6899 // unconditionally include in API requests. By default, fields with 6900 // empty values are omitted from API requests. However, any non-pointer, 6901 // non-interface field appearing in ForceSendFields will be sent to the 6902 // server regardless of whether the field is empty or not. This may be 6903 // used to include empty fields in Patch requests. 6904 ForceSendFields []string `json:"-"` 6905 6906 // NullFields is a list of field names (e.g. "Bottom") to include in API 6907 // requests with the JSON null value. By default, fields with empty 6908 // values are omitted from API requests. However, any field with an 6909 // empty value appearing in NullFields will be sent to the server as 6910 // null. It is an error if a field in this list has a non-empty value. 6911 // This may be used to include null fields in Patch requests. 6912 NullFields []string `json:"-"` 6913} 6914 6915func (s *Padding) MarshalJSON() ([]byte, error) { 6916 type NoMethod Padding 6917 raw := NoMethod(*s) 6918 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6919} 6920 6921// PasteDataRequest: Inserts data into the spreadsheet starting at the 6922// specified coordinate. 6923type PasteDataRequest struct { 6924 // Coordinate: The coordinate at which the data should start being 6925 // inserted. 6926 Coordinate *GridCoordinate `json:"coordinate,omitempty"` 6927 6928 // Data: The data to insert. 6929 Data string `json:"data,omitempty"` 6930 6931 // Delimiter: The delimiter in the data. 6932 Delimiter string `json:"delimiter,omitempty"` 6933 6934 // Html: True if the data is HTML. 6935 Html bool `json:"html,omitempty"` 6936 6937 // Type: How the data should be pasted. 6938 // 6939 // Possible values: 6940 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 6941 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 6942 // or merges. 6943 // "PASTE_FORMAT" - Paste the format and data validation only. 6944 // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders. 6945 // "PASTE_FORMULA" - Paste the formulas only. 6946 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 6947 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 6948 // rules only. 6949 Type string `json:"type,omitempty"` 6950 6951 // ForceSendFields is a list of field names (e.g. "Coordinate") to 6952 // unconditionally include in API requests. By default, fields with 6953 // empty values are omitted from API requests. However, any non-pointer, 6954 // non-interface field appearing in ForceSendFields will be sent to the 6955 // server regardless of whether the field is empty or not. This may be 6956 // used to include empty fields in Patch requests. 6957 ForceSendFields []string `json:"-"` 6958 6959 // NullFields is a list of field names (e.g. "Coordinate") to include in 6960 // API requests with the JSON null value. By default, fields with empty 6961 // values are omitted from API requests. However, any field with an 6962 // empty value appearing in NullFields will be sent to the server as 6963 // null. It is an error if a field in this list has a non-empty value. 6964 // This may be used to include null fields in Patch requests. 6965 NullFields []string `json:"-"` 6966} 6967 6968func (s *PasteDataRequest) MarshalJSON() ([]byte, error) { 6969 type NoMethod PasteDataRequest 6970 raw := NoMethod(*s) 6971 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6972} 6973 6974// PieChartSpec: A <a 6975// href="/chart/interactive/docs/gallery/piechart">pie chart</a>. 6976type PieChartSpec struct { 6977 // Domain: The data that covers the domain of the pie chart. 6978 Domain *ChartData `json:"domain,omitempty"` 6979 6980 // LegendPosition: Where the legend of the pie chart should be drawn. 6981 // 6982 // Possible values: 6983 // "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 6984 // use. 6985 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 6986 // chart. 6987 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 6988 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 6989 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 6990 // "NO_LEGEND" - No legend is rendered. 6991 // "LABELED_LEGEND" - Each pie slice has a label attached to it. 6992 LegendPosition string `json:"legendPosition,omitempty"` 6993 6994 // PieHole: The size of the hole in the pie chart. 6995 PieHole float64 `json:"pieHole,omitempty"` 6996 6997 // Series: The data that covers the one and only series of the pie 6998 // chart. 6999 Series *ChartData `json:"series,omitempty"` 7000 7001 // ThreeDimensional: True if the pie is three dimensional. 7002 ThreeDimensional bool `json:"threeDimensional,omitempty"` 7003 7004 // ForceSendFields is a list of field names (e.g. "Domain") to 7005 // unconditionally include in API requests. By default, fields with 7006 // empty values are omitted from API requests. However, any non-pointer, 7007 // non-interface field appearing in ForceSendFields will be sent to the 7008 // server regardless of whether the field is empty or not. This may be 7009 // used to include empty fields in Patch requests. 7010 ForceSendFields []string `json:"-"` 7011 7012 // NullFields is a list of field names (e.g. "Domain") to include in API 7013 // requests with the JSON null value. By default, fields with empty 7014 // values are omitted from API requests. However, any field with an 7015 // empty value appearing in NullFields will be sent to the server as 7016 // null. It is an error if a field in this list has a non-empty value. 7017 // This may be used to include null fields in Patch requests. 7018 NullFields []string `json:"-"` 7019} 7020 7021func (s *PieChartSpec) MarshalJSON() ([]byte, error) { 7022 type NoMethod PieChartSpec 7023 raw := NoMethod(*s) 7024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7025} 7026 7027func (s *PieChartSpec) UnmarshalJSON(data []byte) error { 7028 type NoMethod PieChartSpec 7029 var s1 struct { 7030 PieHole gensupport.JSONFloat64 `json:"pieHole"` 7031 *NoMethod 7032 } 7033 s1.NoMethod = (*NoMethod)(s) 7034 if err := json.Unmarshal(data, &s1); err != nil { 7035 return err 7036 } 7037 s.PieHole = float64(s1.PieHole) 7038 return nil 7039} 7040 7041// PivotFilterCriteria: Criteria for showing/hiding rows in a pivot 7042// table. 7043type PivotFilterCriteria struct { 7044 // VisibleValues: Values that should be included. Values not listed 7045 // here are excluded. 7046 VisibleValues []string `json:"visibleValues,omitempty"` 7047 7048 // ForceSendFields is a list of field names (e.g. "VisibleValues") to 7049 // unconditionally include in API requests. By default, fields with 7050 // empty values are omitted from API requests. However, any non-pointer, 7051 // non-interface field appearing in ForceSendFields will be sent to the 7052 // server regardless of whether the field is empty or not. This may be 7053 // used to include empty fields in Patch requests. 7054 ForceSendFields []string `json:"-"` 7055 7056 // NullFields is a list of field names (e.g. "VisibleValues") to include 7057 // in API requests with the JSON null value. By default, fields with 7058 // empty values are omitted from API requests. However, any field with 7059 // an empty value appearing in NullFields will be sent to the server as 7060 // null. It is an error if a field in this list has a non-empty value. 7061 // This may be used to include null fields in Patch requests. 7062 NullFields []string `json:"-"` 7063} 7064 7065func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) { 7066 type NoMethod PivotFilterCriteria 7067 raw := NoMethod(*s) 7068 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7069} 7070 7071// PivotGroup: A single grouping (either row or column) in a pivot 7072// table. 7073type PivotGroup struct { 7074 // GroupRule: The group rule to apply to this row/column group. 7075 GroupRule *PivotGroupRule `json:"groupRule,omitempty"` 7076 7077 // Label: The labels to use for the row/column groups which can be 7078 // customized. For 7079 // example, in the following pivot table, the row label is `Region` 7080 // (which 7081 // could be renamed to `State`) and the column label is `Product` 7082 // (which 7083 // could be renamed `Item`). Pivot tables created before December 2017 7084 // do 7085 // not have header labels. If you'd like to add header labels to an 7086 // existing 7087 // pivot table, please delete the existing pivot table and then create a 7088 // new 7089 // pivot table with same parameters. 7090 // 7091 // +--------------+---------+-------+ 7092 // | SUM of Units | Product | | 7093 // | Region | Pen | Paper | 7094 // +--------------+---------+-------+ 7095 // | New York | 345 | 98 | 7096 // | Oregon | 234 | 123 | 7097 // | Tennessee | 531 | 415 | 7098 // +--------------+---------+-------+ 7099 // | Grand Total | 1110 | 636 | 7100 // +--------------+---------+-------+ 7101 Label string `json:"label,omitempty"` 7102 7103 // RepeatHeadings: True if the headings in this pivot group should be 7104 // repeated. 7105 // This is only valid for row groupings and is ignored by columns. 7106 // 7107 // By default, we minimize repitition of headings by not showing 7108 // higher 7109 // level headings where they are the same. For example, even though 7110 // the 7111 // third row below corresponds to "Q1 Mar", "Q1" is not shown because 7112 // it is redundant with previous rows. Setting repeat_headings to 7113 // true 7114 // would cause "Q1" to be repeated for "Feb" and "Mar". 7115 // 7116 // +--------------+ 7117 // | Q1 | Jan | 7118 // | | Feb | 7119 // | | Mar | 7120 // +--------+-----+ 7121 // | Q1 Total | 7122 // +--------------+ 7123 RepeatHeadings bool `json:"repeatHeadings,omitempty"` 7124 7125 // ShowTotals: True if the pivot table should include the totals for 7126 // this grouping. 7127 ShowTotals bool `json:"showTotals,omitempty"` 7128 7129 // SortOrder: The order the values in this group should be sorted. 7130 // 7131 // Possible values: 7132 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 7133 // "ASCENDING" - Sort ascending. 7134 // "DESCENDING" - Sort descending. 7135 SortOrder string `json:"sortOrder,omitempty"` 7136 7137 // SourceColumnOffset: The column offset of the source range that this 7138 // grouping is based on. 7139 // 7140 // For example, if the source was `C10:E15`, a `sourceColumnOffset` of 7141 // `0` 7142 // means this group refers to column `C`, whereas the offset `1` would 7143 // refer 7144 // to column `D`. 7145 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 7146 7147 // ValueBucket: The bucket of the opposite pivot group to sort by. 7148 // If not specified, sorting is alphabetical by this group's values. 7149 ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"` 7150 7151 // ValueMetadata: Metadata about values in the grouping. 7152 ValueMetadata []*PivotGroupValueMetadata `json:"valueMetadata,omitempty"` 7153 7154 // ForceSendFields is a list of field names (e.g. "GroupRule") to 7155 // unconditionally include in API requests. By default, fields with 7156 // empty values are omitted from API requests. However, any non-pointer, 7157 // non-interface field appearing in ForceSendFields will be sent to the 7158 // server regardless of whether the field is empty or not. This may be 7159 // used to include empty fields in Patch requests. 7160 ForceSendFields []string `json:"-"` 7161 7162 // NullFields is a list of field names (e.g. "GroupRule") to include in 7163 // API requests with the JSON null value. By default, fields with empty 7164 // values are omitted from API requests. However, any field with an 7165 // empty value appearing in NullFields will be sent to the server as 7166 // null. It is an error if a field in this list has a non-empty value. 7167 // This may be used to include null fields in Patch requests. 7168 NullFields []string `json:"-"` 7169} 7170 7171func (s *PivotGroup) MarshalJSON() ([]byte, error) { 7172 type NoMethod PivotGroup 7173 raw := NoMethod(*s) 7174 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7175} 7176 7177// PivotGroupRule: An optional setting on a PivotGroup that defines 7178// buckets for the values 7179// in the source data column rather than breaking out each individual 7180// value. 7181// Only one PivotGroup with a group rule may be added for each column 7182// in 7183// the source data, though on any given column you may add both 7184// a 7185// PivotGroup that has a rule and a PivotGroup that does not. 7186type PivotGroupRule struct { 7187 // DateTimeRule: A DateTimeRule. 7188 DateTimeRule *DateTimeRule `json:"dateTimeRule,omitempty"` 7189 7190 // HistogramRule: A HistogramRule. 7191 HistogramRule *HistogramRule `json:"histogramRule,omitempty"` 7192 7193 // ManualRule: A ManualRule. 7194 ManualRule *ManualRule `json:"manualRule,omitempty"` 7195 7196 // ForceSendFields is a list of field names (e.g. "DateTimeRule") to 7197 // unconditionally include in API requests. By default, fields with 7198 // empty values are omitted from API requests. However, any non-pointer, 7199 // non-interface field appearing in ForceSendFields will be sent to the 7200 // server regardless of whether the field is empty or not. This may be 7201 // used to include empty fields in Patch requests. 7202 ForceSendFields []string `json:"-"` 7203 7204 // NullFields is a list of field names (e.g. "DateTimeRule") to include 7205 // in API requests with the JSON null value. By default, fields with 7206 // empty values are omitted from API requests. However, any field with 7207 // an empty value appearing in NullFields will be sent to the server as 7208 // null. It is an error if a field in this list has a non-empty value. 7209 // This may be used to include null fields in Patch requests. 7210 NullFields []string `json:"-"` 7211} 7212 7213func (s *PivotGroupRule) MarshalJSON() ([]byte, error) { 7214 type NoMethod PivotGroupRule 7215 raw := NoMethod(*s) 7216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7217} 7218 7219// PivotGroupSortValueBucket: Information about which values in a pivot 7220// group should be used for sorting. 7221type PivotGroupSortValueBucket struct { 7222 // Buckets: Determines the bucket from which values are chosen to 7223 // sort. 7224 // 7225 // For example, in a pivot table with one row group & two column 7226 // groups, 7227 // the row group can list up to two values. The first value 7228 // corresponds 7229 // to a value within the first column group, and the second 7230 // value 7231 // corresponds to a value in the second column group. If no values 7232 // are listed, this would indicate that the row should be sorted 7233 // according 7234 // to the "Grand Total" over the column groups. If a single value is 7235 // listed, 7236 // this would correspond to using the "Total" of that bucket. 7237 Buckets []*ExtendedValue `json:"buckets,omitempty"` 7238 7239 // ValuesIndex: The offset in the PivotTable.values list which the 7240 // values in this 7241 // grouping should be sorted by. 7242 ValuesIndex int64 `json:"valuesIndex,omitempty"` 7243 7244 // ForceSendFields is a list of field names (e.g. "Buckets") to 7245 // unconditionally include in API requests. By default, fields with 7246 // empty values are omitted from API requests. However, any non-pointer, 7247 // non-interface field appearing in ForceSendFields will be sent to the 7248 // server regardless of whether the field is empty or not. This may be 7249 // used to include empty fields in Patch requests. 7250 ForceSendFields []string `json:"-"` 7251 7252 // NullFields is a list of field names (e.g. "Buckets") to include in 7253 // API requests with the JSON null value. By default, fields with empty 7254 // values are omitted from API requests. However, any field with an 7255 // empty value appearing in NullFields will be sent to the server as 7256 // null. It is an error if a field in this list has a non-empty value. 7257 // This may be used to include null fields in Patch requests. 7258 NullFields []string `json:"-"` 7259} 7260 7261func (s *PivotGroupSortValueBucket) MarshalJSON() ([]byte, error) { 7262 type NoMethod PivotGroupSortValueBucket 7263 raw := NoMethod(*s) 7264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7265} 7266 7267// PivotGroupValueMetadata: Metadata about a value in a pivot grouping. 7268type PivotGroupValueMetadata struct { 7269 // Collapsed: True if the data corresponding to the value is collapsed. 7270 Collapsed bool `json:"collapsed,omitempty"` 7271 7272 // Value: The calculated value the metadata corresponds to. 7273 // (Note that formulaValue is not valid, 7274 // because the values will be calculated.) 7275 Value *ExtendedValue `json:"value,omitempty"` 7276 7277 // ForceSendFields is a list of field names (e.g. "Collapsed") to 7278 // unconditionally include in API requests. By default, fields with 7279 // empty values are omitted from API requests. However, any non-pointer, 7280 // non-interface field appearing in ForceSendFields will be sent to the 7281 // server regardless of whether the field is empty or not. This may be 7282 // used to include empty fields in Patch requests. 7283 ForceSendFields []string `json:"-"` 7284 7285 // NullFields is a list of field names (e.g. "Collapsed") to include in 7286 // API requests with the JSON null value. By default, fields with empty 7287 // values are omitted from API requests. However, any field with an 7288 // empty value appearing in NullFields will be sent to the server as 7289 // null. It is an error if a field in this list has a non-empty value. 7290 // This may be used to include null fields in Patch requests. 7291 NullFields []string `json:"-"` 7292} 7293 7294func (s *PivotGroupValueMetadata) MarshalJSON() ([]byte, error) { 7295 type NoMethod PivotGroupValueMetadata 7296 raw := NoMethod(*s) 7297 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7298} 7299 7300// PivotTable: A pivot table. 7301type PivotTable struct { 7302 // Columns: Each column grouping in the pivot table. 7303 Columns []*PivotGroup `json:"columns,omitempty"` 7304 7305 // Criteria: An optional mapping of filters per source column 7306 // offset. 7307 // 7308 // The filters are applied before aggregating data into the pivot 7309 // table. 7310 // The map's key is the column offset of the source range that you want 7311 // to 7312 // filter, and the value is the criteria for that column. 7313 // 7314 // For example, if the source was `C10:E15`, a key of `0` will have the 7315 // filter 7316 // for column `C`, whereas the key `1` is for column `D`. 7317 Criteria map[string]PivotFilterCriteria `json:"criteria,omitempty"` 7318 7319 // Rows: Each row grouping in the pivot table. 7320 Rows []*PivotGroup `json:"rows,omitempty"` 7321 7322 // Source: The range the pivot table is reading data from. 7323 Source *GridRange `json:"source,omitempty"` 7324 7325 // ValueLayout: Whether values should be listed horizontally (as 7326 // columns) 7327 // or vertically (as rows). 7328 // 7329 // Possible values: 7330 // "HORIZONTAL" - Values are laid out horizontally (as columns). 7331 // "VERTICAL" - Values are laid out vertically (as rows). 7332 ValueLayout string `json:"valueLayout,omitempty"` 7333 7334 // Values: A list of values to include in the pivot table. 7335 Values []*PivotValue `json:"values,omitempty"` 7336 7337 // ForceSendFields is a list of field names (e.g. "Columns") to 7338 // unconditionally include in API requests. By default, fields with 7339 // empty values are omitted from API requests. However, any non-pointer, 7340 // non-interface field appearing in ForceSendFields will be sent to the 7341 // server regardless of whether the field is empty or not. This may be 7342 // used to include empty fields in Patch requests. 7343 ForceSendFields []string `json:"-"` 7344 7345 // NullFields is a list of field names (e.g. "Columns") to include in 7346 // API requests with the JSON null value. By default, fields with empty 7347 // values are omitted from API requests. However, any field with an 7348 // empty value appearing in NullFields will be sent to the server as 7349 // null. It is an error if a field in this list has a non-empty value. 7350 // This may be used to include null fields in Patch requests. 7351 NullFields []string `json:"-"` 7352} 7353 7354func (s *PivotTable) MarshalJSON() ([]byte, error) { 7355 type NoMethod PivotTable 7356 raw := NoMethod(*s) 7357 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7358} 7359 7360// PivotValue: The definition of how a value in a pivot table should be 7361// calculated. 7362type PivotValue struct { 7363 // CalculatedDisplayType: If specified, indicates that pivot values 7364 // should be displayed as 7365 // the result of a calculation with another pivot value. For example, 7366 // if 7367 // calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all 7368 // the 7369 // pivot values are displayed as the percentage of the grand total. 7370 // In 7371 // the Sheets UI, this is referred to as "Show As" in the value section 7372 // of a 7373 // pivot table. 7374 // 7375 // Possible values: 7376 // "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" - Default value, 7377 // do not use. 7378 // "PERCENT_OF_ROW_TOTAL" - Shows the pivot values as percentage of 7379 // the row total values. 7380 // "PERCENT_OF_COLUMN_TOTAL" - Shows the pivot values as percentage of 7381 // the column total values. 7382 // "PERCENT_OF_GRAND_TOTAL" - Shows the pivot values as percentage of 7383 // the grand total values. 7384 CalculatedDisplayType string `json:"calculatedDisplayType,omitempty"` 7385 7386 // Formula: A custom formula to calculate the value. The formula must 7387 // start 7388 // with an `=` character. 7389 Formula string `json:"formula,omitempty"` 7390 7391 // Name: A name to use for the value. 7392 Name string `json:"name,omitempty"` 7393 7394 // SourceColumnOffset: The column offset of the source range that this 7395 // value reads from. 7396 // 7397 // For example, if the source was `C10:E15`, a `sourceColumnOffset` of 7398 // `0` 7399 // means this value refers to column `C`, whereas the offset `1` 7400 // would 7401 // refer to column `D`. 7402 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 7403 7404 // SummarizeFunction: A function to summarize the value. 7405 // If formula is set, the only supported values are 7406 // SUM and 7407 // CUSTOM. 7408 // If sourceColumnOffset is set, then `CUSTOM` 7409 // is not supported. 7410 // 7411 // Possible values: 7412 // "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" - The default, do not 7413 // use. 7414 // "SUM" - Corresponds to the `SUM` function. 7415 // "COUNTA" - Corresponds to the `COUNTA` function. 7416 // "COUNT" - Corresponds to the `COUNT` function. 7417 // "COUNTUNIQUE" - Corresponds to the `COUNTUNIQUE` function. 7418 // "AVERAGE" - Corresponds to the `AVERAGE` function. 7419 // "MAX" - Corresponds to the `MAX` function. 7420 // "MIN" - Corresponds to the `MIN` function. 7421 // "MEDIAN" - Corresponds to the `MEDIAN` function. 7422 // "PRODUCT" - Corresponds to the `PRODUCT` function. 7423 // "STDEV" - Corresponds to the `STDEV` function. 7424 // "STDEVP" - Corresponds to the `STDEVP` function. 7425 // "VAR" - Corresponds to the `VAR` function. 7426 // "VARP" - Corresponds to the `VARP` function. 7427 // "CUSTOM" - Indicates the formula should be used as-is. 7428 // Only valid if PivotValue.formula was set. 7429 SummarizeFunction string `json:"summarizeFunction,omitempty"` 7430 7431 // ForceSendFields is a list of field names (e.g. 7432 // "CalculatedDisplayType") to unconditionally include in API requests. 7433 // By default, fields with empty values are omitted from API requests. 7434 // However, any non-pointer, non-interface field appearing in 7435 // ForceSendFields will be sent to the server regardless of whether the 7436 // field is empty or not. This may be used to include empty fields in 7437 // Patch requests. 7438 ForceSendFields []string `json:"-"` 7439 7440 // NullFields is a list of field names (e.g. "CalculatedDisplayType") to 7441 // include in API requests with the JSON null value. By default, fields 7442 // with empty values are omitted from API requests. However, any field 7443 // with an empty value appearing in NullFields will be sent to the 7444 // server as null. It is an error if a field in this list has a 7445 // non-empty value. This may be used to include null fields in Patch 7446 // requests. 7447 NullFields []string `json:"-"` 7448} 7449 7450func (s *PivotValue) MarshalJSON() ([]byte, error) { 7451 type NoMethod PivotValue 7452 raw := NoMethod(*s) 7453 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7454} 7455 7456// ProtectedRange: A protected range. 7457type ProtectedRange struct { 7458 // Description: The description of this protected range. 7459 Description string `json:"description,omitempty"` 7460 7461 // Editors: The users and groups with edit access to the protected 7462 // range. 7463 // This field is only visible to users with edit access to the 7464 // protected 7465 // range and the document. 7466 // Editors are not supported with warning_only protection. 7467 Editors *Editors `json:"editors,omitempty"` 7468 7469 // NamedRangeId: The named range this protected range is backed by, if 7470 // any. 7471 // 7472 // When writing, only one of range or named_range_id 7473 // may be set. 7474 NamedRangeId string `json:"namedRangeId,omitempty"` 7475 7476 // ProtectedRangeId: The ID of the protected range. 7477 // This field is read-only. 7478 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 7479 7480 // Range: The range that is being protected. 7481 // The range may be fully unbounded, in which case this is considered 7482 // a protected sheet. 7483 // 7484 // When writing, only one of range or named_range_id 7485 // may be set. 7486 Range *GridRange `json:"range,omitempty"` 7487 7488 // RequestingUserCanEdit: True if the user who requested this protected 7489 // range can edit the 7490 // protected area. 7491 // This field is read-only. 7492 RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"` 7493 7494 // UnprotectedRanges: The list of unprotected ranges within a protected 7495 // sheet. 7496 // Unprotected ranges are only supported on protected sheets. 7497 UnprotectedRanges []*GridRange `json:"unprotectedRanges,omitempty"` 7498 7499 // WarningOnly: True if this protected range will show a warning when 7500 // editing. 7501 // Warning-based protection means that every user can edit data in 7502 // the 7503 // protected range, except editing will prompt a warning asking the 7504 // user 7505 // to confirm the edit. 7506 // 7507 // When writing: if this field is true, then editors is 7508 // ignored. 7509 // Additionally, if this field is changed from true to false and 7510 // the 7511 // `editors` field is not set (nor included in the field mask), then 7512 // the editors will be set to all the editors in the document. 7513 WarningOnly bool `json:"warningOnly,omitempty"` 7514 7515 // ForceSendFields is a list of field names (e.g. "Description") to 7516 // unconditionally include in API requests. By default, fields with 7517 // empty values are omitted from API requests. However, any non-pointer, 7518 // non-interface field appearing in ForceSendFields will be sent to the 7519 // server regardless of whether the field is empty or not. This may be 7520 // used to include empty fields in Patch requests. 7521 ForceSendFields []string `json:"-"` 7522 7523 // NullFields is a list of field names (e.g. "Description") to include 7524 // in API requests with the JSON null value. By default, fields with 7525 // empty values are omitted from API requests. However, any field with 7526 // an empty value appearing in NullFields will be sent to the server as 7527 // null. It is an error if a field in this list has a non-empty value. 7528 // This may be used to include null fields in Patch requests. 7529 NullFields []string `json:"-"` 7530} 7531 7532func (s *ProtectedRange) MarshalJSON() ([]byte, error) { 7533 type NoMethod ProtectedRange 7534 raw := NoMethod(*s) 7535 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7536} 7537 7538// RandomizeRangeRequest: Randomizes the order of the rows in a range. 7539type RandomizeRangeRequest struct { 7540 // Range: The range to randomize. 7541 Range *GridRange `json:"range,omitempty"` 7542 7543 // ForceSendFields is a list of field names (e.g. "Range") to 7544 // unconditionally include in API requests. By default, fields with 7545 // empty values are omitted from API requests. However, any non-pointer, 7546 // non-interface field appearing in ForceSendFields will be sent to the 7547 // server regardless of whether the field is empty or not. This may be 7548 // used to include empty fields in Patch requests. 7549 ForceSendFields []string `json:"-"` 7550 7551 // NullFields is a list of field names (e.g. "Range") to include in API 7552 // requests with the JSON null value. By default, fields with empty 7553 // values are omitted from API requests. However, any field with an 7554 // empty value appearing in NullFields will be sent to the server as 7555 // null. It is an error if a field in this list has a non-empty value. 7556 // This may be used to include null fields in Patch requests. 7557 NullFields []string `json:"-"` 7558} 7559 7560func (s *RandomizeRangeRequest) MarshalJSON() ([]byte, error) { 7561 type NoMethod RandomizeRangeRequest 7562 raw := NoMethod(*s) 7563 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7564} 7565 7566// RepeatCellRequest: Updates all cells in the range to the values in 7567// the given Cell object. 7568// Only the fields listed in the fields field are updated; others 7569// are 7570// unchanged. 7571// 7572// If writing a cell with a formula, the formula's ranges will 7573// automatically 7574// increment for each field in the range. 7575// For example, if writing a cell with formula `=A1` into range 7576// B2:C4, 7577// B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, 7578// C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. 7579// 7580// To keep the formula's ranges static, use the `$` indicator. 7581// For example, use the formula `=$A$1` to prevent both the row and 7582// the 7583// column from incrementing. 7584type RepeatCellRequest struct { 7585 // Cell: The data to write. 7586 Cell *CellData `json:"cell,omitempty"` 7587 7588 // Fields: The fields that should be updated. At least one field must 7589 // be specified. 7590 // The root `cell` is implied and should not be specified. 7591 // A single "*" can be used as short-hand for listing every field. 7592 Fields string `json:"fields,omitempty"` 7593 7594 // Range: The range to repeat the cell in. 7595 Range *GridRange `json:"range,omitempty"` 7596 7597 // ForceSendFields is a list of field names (e.g. "Cell") to 7598 // unconditionally include in API requests. By default, fields with 7599 // empty values are omitted from API requests. However, any non-pointer, 7600 // non-interface field appearing in ForceSendFields will be sent to the 7601 // server regardless of whether the field is empty or not. This may be 7602 // used to include empty fields in Patch requests. 7603 ForceSendFields []string `json:"-"` 7604 7605 // NullFields is a list of field names (e.g. "Cell") to include in API 7606 // requests with the JSON null value. By default, fields with empty 7607 // values are omitted from API requests. However, any field with an 7608 // empty value appearing in NullFields will be sent to the server as 7609 // null. It is an error if a field in this list has a non-empty value. 7610 // This may be used to include null fields in Patch requests. 7611 NullFields []string `json:"-"` 7612} 7613 7614func (s *RepeatCellRequest) MarshalJSON() ([]byte, error) { 7615 type NoMethod RepeatCellRequest 7616 raw := NoMethod(*s) 7617 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7618} 7619 7620// Request: A single kind of update to apply to a spreadsheet. 7621type Request struct { 7622 // AddBanding: Adds a new banded range 7623 AddBanding *AddBandingRequest `json:"addBanding,omitempty"` 7624 7625 // AddChart: Adds a chart. 7626 AddChart *AddChartRequest `json:"addChart,omitempty"` 7627 7628 // AddConditionalFormatRule: Adds a new conditional format rule. 7629 AddConditionalFormatRule *AddConditionalFormatRuleRequest `json:"addConditionalFormatRule,omitempty"` 7630 7631 // AddDimensionGroup: Creates a group over the specified range. 7632 AddDimensionGroup *AddDimensionGroupRequest `json:"addDimensionGroup,omitempty"` 7633 7634 // AddFilterView: Adds a filter view. 7635 AddFilterView *AddFilterViewRequest `json:"addFilterView,omitempty"` 7636 7637 // AddNamedRange: Adds a named range. 7638 AddNamedRange *AddNamedRangeRequest `json:"addNamedRange,omitempty"` 7639 7640 // AddProtectedRange: Adds a protected range. 7641 AddProtectedRange *AddProtectedRangeRequest `json:"addProtectedRange,omitempty"` 7642 7643 // AddSheet: Adds a sheet. 7644 AddSheet *AddSheetRequest `json:"addSheet,omitempty"` 7645 7646 // AddSlicer: Adds a slicer. 7647 AddSlicer *AddSlicerRequest `json:"addSlicer,omitempty"` 7648 7649 // AppendCells: Appends cells after the last row with data in a sheet. 7650 AppendCells *AppendCellsRequest `json:"appendCells,omitempty"` 7651 7652 // AppendDimension: Appends dimensions to the end of a sheet. 7653 AppendDimension *AppendDimensionRequest `json:"appendDimension,omitempty"` 7654 7655 // AutoFill: Automatically fills in more data based on existing data. 7656 AutoFill *AutoFillRequest `json:"autoFill,omitempty"` 7657 7658 // AutoResizeDimensions: Automatically resizes one or more dimensions 7659 // based on the contents 7660 // of the cells in that dimension. 7661 AutoResizeDimensions *AutoResizeDimensionsRequest `json:"autoResizeDimensions,omitempty"` 7662 7663 // ClearBasicFilter: Clears the basic filter on a sheet. 7664 ClearBasicFilter *ClearBasicFilterRequest `json:"clearBasicFilter,omitempty"` 7665 7666 // CopyPaste: Copies data from one area and pastes it to another. 7667 CopyPaste *CopyPasteRequest `json:"copyPaste,omitempty"` 7668 7669 // CreateDeveloperMetadata: Creates new developer metadata 7670 CreateDeveloperMetadata *CreateDeveloperMetadataRequest `json:"createDeveloperMetadata,omitempty"` 7671 7672 // CutPaste: Cuts data from one area and pastes it to another. 7673 CutPaste *CutPasteRequest `json:"cutPaste,omitempty"` 7674 7675 // DeleteBanding: Removes a banded range 7676 DeleteBanding *DeleteBandingRequest `json:"deleteBanding,omitempty"` 7677 7678 // DeleteConditionalFormatRule: Deletes an existing conditional format 7679 // rule. 7680 DeleteConditionalFormatRule *DeleteConditionalFormatRuleRequest `json:"deleteConditionalFormatRule,omitempty"` 7681 7682 // DeleteDeveloperMetadata: Deletes developer metadata 7683 DeleteDeveloperMetadata *DeleteDeveloperMetadataRequest `json:"deleteDeveloperMetadata,omitempty"` 7684 7685 // DeleteDimension: Deletes rows or columns in a sheet. 7686 DeleteDimension *DeleteDimensionRequest `json:"deleteDimension,omitempty"` 7687 7688 // DeleteDimensionGroup: Deletes a group over the specified range. 7689 DeleteDimensionGroup *DeleteDimensionGroupRequest `json:"deleteDimensionGroup,omitempty"` 7690 7691 // DeleteDuplicates: Removes rows containing duplicate values in 7692 // specified columns of a cell 7693 // range. 7694 DeleteDuplicates *DeleteDuplicatesRequest `json:"deleteDuplicates,omitempty"` 7695 7696 // DeleteEmbeddedObject: Deletes an embedded object (e.g, chart, image) 7697 // in a sheet. 7698 DeleteEmbeddedObject *DeleteEmbeddedObjectRequest `json:"deleteEmbeddedObject,omitempty"` 7699 7700 // DeleteFilterView: Deletes a filter view from a sheet. 7701 DeleteFilterView *DeleteFilterViewRequest `json:"deleteFilterView,omitempty"` 7702 7703 // DeleteNamedRange: Deletes a named range. 7704 DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"` 7705 7706 // DeleteProtectedRange: Deletes a protected range. 7707 DeleteProtectedRange *DeleteProtectedRangeRequest `json:"deleteProtectedRange,omitempty"` 7708 7709 // DeleteRange: Deletes a range of cells from a sheet, shifting the 7710 // remaining cells. 7711 DeleteRange *DeleteRangeRequest `json:"deleteRange,omitempty"` 7712 7713 // DeleteSheet: Deletes a sheet. 7714 DeleteSheet *DeleteSheetRequest `json:"deleteSheet,omitempty"` 7715 7716 // DuplicateFilterView: Duplicates a filter view. 7717 DuplicateFilterView *DuplicateFilterViewRequest `json:"duplicateFilterView,omitempty"` 7718 7719 // DuplicateSheet: Duplicates a sheet. 7720 DuplicateSheet *DuplicateSheetRequest `json:"duplicateSheet,omitempty"` 7721 7722 // FindReplace: Finds and replaces occurrences of some text with other 7723 // text. 7724 FindReplace *FindReplaceRequest `json:"findReplace,omitempty"` 7725 7726 // InsertDimension: Inserts new rows or columns in a sheet. 7727 InsertDimension *InsertDimensionRequest `json:"insertDimension,omitempty"` 7728 7729 // InsertRange: Inserts new cells in a sheet, shifting the existing 7730 // cells. 7731 InsertRange *InsertRangeRequest `json:"insertRange,omitempty"` 7732 7733 // MergeCells: Merges cells together. 7734 MergeCells *MergeCellsRequest `json:"mergeCells,omitempty"` 7735 7736 // MoveDimension: Moves rows or columns to another location in a sheet. 7737 MoveDimension *MoveDimensionRequest `json:"moveDimension,omitempty"` 7738 7739 // PasteData: Pastes data (HTML or delimited) into a sheet. 7740 PasteData *PasteDataRequest `json:"pasteData,omitempty"` 7741 7742 // RandomizeRange: Randomizes the order of the rows in a range. 7743 RandomizeRange *RandomizeRangeRequest `json:"randomizeRange,omitempty"` 7744 7745 // RepeatCell: Repeats a single cell across a range. 7746 RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"` 7747 7748 // SetBasicFilter: Sets the basic filter on a sheet. 7749 SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"` 7750 7751 // SetDataValidation: Sets data validation for one or more cells. 7752 SetDataValidation *SetDataValidationRequest `json:"setDataValidation,omitempty"` 7753 7754 // SortRange: Sorts data in a range. 7755 SortRange *SortRangeRequest `json:"sortRange,omitempty"` 7756 7757 // TextToColumns: Converts a column of text into many columns of text. 7758 TextToColumns *TextToColumnsRequest `json:"textToColumns,omitempty"` 7759 7760 // TrimWhitespace: Trims cells of whitespace (such as spaces, tabs, or 7761 // new lines). 7762 TrimWhitespace *TrimWhitespaceRequest `json:"trimWhitespace,omitempty"` 7763 7764 // UnmergeCells: Unmerges merged cells. 7765 UnmergeCells *UnmergeCellsRequest `json:"unmergeCells,omitempty"` 7766 7767 // UpdateBanding: Updates a banded range 7768 UpdateBanding *UpdateBandingRequest `json:"updateBanding,omitempty"` 7769 7770 // UpdateBorders: Updates the borders in a range of cells. 7771 UpdateBorders *UpdateBordersRequest `json:"updateBorders,omitempty"` 7772 7773 // UpdateCells: Updates many cells at once. 7774 UpdateCells *UpdateCellsRequest `json:"updateCells,omitempty"` 7775 7776 // UpdateChartSpec: Updates a chart's specifications. 7777 UpdateChartSpec *UpdateChartSpecRequest `json:"updateChartSpec,omitempty"` 7778 7779 // UpdateConditionalFormatRule: Updates an existing conditional format 7780 // rule. 7781 UpdateConditionalFormatRule *UpdateConditionalFormatRuleRequest `json:"updateConditionalFormatRule,omitempty"` 7782 7783 // UpdateDeveloperMetadata: Updates an existing developer metadata entry 7784 UpdateDeveloperMetadata *UpdateDeveloperMetadataRequest `json:"updateDeveloperMetadata,omitempty"` 7785 7786 // UpdateDimensionGroup: Updates the state of the specified group. 7787 UpdateDimensionGroup *UpdateDimensionGroupRequest `json:"updateDimensionGroup,omitempty"` 7788 7789 // UpdateDimensionProperties: Updates dimensions' properties. 7790 UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"` 7791 7792 // UpdateEmbeddedObjectPosition: Updates an embedded object's (e.g. 7793 // chart, image) position. 7794 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionRequest `json:"updateEmbeddedObjectPosition,omitempty"` 7795 7796 // UpdateFilterView: Updates the properties of a filter view. 7797 UpdateFilterView *UpdateFilterViewRequest `json:"updateFilterView,omitempty"` 7798 7799 // UpdateNamedRange: Updates a named range. 7800 UpdateNamedRange *UpdateNamedRangeRequest `json:"updateNamedRange,omitempty"` 7801 7802 // UpdateProtectedRange: Updates a protected range. 7803 UpdateProtectedRange *UpdateProtectedRangeRequest `json:"updateProtectedRange,omitempty"` 7804 7805 // UpdateSheetProperties: Updates a sheet's properties. 7806 UpdateSheetProperties *UpdateSheetPropertiesRequest `json:"updateSheetProperties,omitempty"` 7807 7808 // UpdateSlicerSpec: Updates a slicer's specifications. 7809 UpdateSlicerSpec *UpdateSlicerSpecRequest `json:"updateSlicerSpec,omitempty"` 7810 7811 // UpdateSpreadsheetProperties: Updates the spreadsheet's properties. 7812 UpdateSpreadsheetProperties *UpdateSpreadsheetPropertiesRequest `json:"updateSpreadsheetProperties,omitempty"` 7813 7814 // ForceSendFields is a list of field names (e.g. "AddBanding") to 7815 // unconditionally include in API requests. By default, fields with 7816 // empty values are omitted from API requests. However, any non-pointer, 7817 // non-interface field appearing in ForceSendFields will be sent to the 7818 // server regardless of whether the field is empty or not. This may be 7819 // used to include empty fields in Patch requests. 7820 ForceSendFields []string `json:"-"` 7821 7822 // NullFields is a list of field names (e.g. "AddBanding") to include in 7823 // API requests with the JSON null value. By default, fields with empty 7824 // values are omitted from API requests. However, any field with an 7825 // empty value appearing in NullFields will be sent to the server as 7826 // null. It is an error if a field in this list has a non-empty value. 7827 // This may be used to include null fields in Patch requests. 7828 NullFields []string `json:"-"` 7829} 7830 7831func (s *Request) MarshalJSON() ([]byte, error) { 7832 type NoMethod Request 7833 raw := NoMethod(*s) 7834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7835} 7836 7837// Response: A single response from an update. 7838type Response struct { 7839 // AddBanding: A reply from adding a banded range. 7840 AddBanding *AddBandingResponse `json:"addBanding,omitempty"` 7841 7842 // AddChart: A reply from adding a chart. 7843 AddChart *AddChartResponse `json:"addChart,omitempty"` 7844 7845 // AddDimensionGroup: A reply from adding a dimension group. 7846 AddDimensionGroup *AddDimensionGroupResponse `json:"addDimensionGroup,omitempty"` 7847 7848 // AddFilterView: A reply from adding a filter view. 7849 AddFilterView *AddFilterViewResponse `json:"addFilterView,omitempty"` 7850 7851 // AddNamedRange: A reply from adding a named range. 7852 AddNamedRange *AddNamedRangeResponse `json:"addNamedRange,omitempty"` 7853 7854 // AddProtectedRange: A reply from adding a protected range. 7855 AddProtectedRange *AddProtectedRangeResponse `json:"addProtectedRange,omitempty"` 7856 7857 // AddSheet: A reply from adding a sheet. 7858 AddSheet *AddSheetResponse `json:"addSheet,omitempty"` 7859 7860 // AddSlicer: A reply from adding a slicer. 7861 AddSlicer *AddSlicerResponse `json:"addSlicer,omitempty"` 7862 7863 // CreateDeveloperMetadata: A reply from creating a developer metadata 7864 // entry. 7865 CreateDeveloperMetadata *CreateDeveloperMetadataResponse `json:"createDeveloperMetadata,omitempty"` 7866 7867 // DeleteConditionalFormatRule: A reply from deleting a conditional 7868 // format rule. 7869 DeleteConditionalFormatRule *DeleteConditionalFormatRuleResponse `json:"deleteConditionalFormatRule,omitempty"` 7870 7871 // DeleteDeveloperMetadata: A reply from deleting a developer metadata 7872 // entry. 7873 DeleteDeveloperMetadata *DeleteDeveloperMetadataResponse `json:"deleteDeveloperMetadata,omitempty"` 7874 7875 // DeleteDimensionGroup: A reply from deleting a dimension group. 7876 DeleteDimensionGroup *DeleteDimensionGroupResponse `json:"deleteDimensionGroup,omitempty"` 7877 7878 // DeleteDuplicates: A reply from removing rows containing duplicate 7879 // values. 7880 DeleteDuplicates *DeleteDuplicatesResponse `json:"deleteDuplicates,omitempty"` 7881 7882 // DuplicateFilterView: A reply from duplicating a filter view. 7883 DuplicateFilterView *DuplicateFilterViewResponse `json:"duplicateFilterView,omitempty"` 7884 7885 // DuplicateSheet: A reply from duplicating a sheet. 7886 DuplicateSheet *DuplicateSheetResponse `json:"duplicateSheet,omitempty"` 7887 7888 // FindReplace: A reply from doing a find/replace. 7889 FindReplace *FindReplaceResponse `json:"findReplace,omitempty"` 7890 7891 // TrimWhitespace: A reply from trimming whitespace. 7892 TrimWhitespace *TrimWhitespaceResponse `json:"trimWhitespace,omitempty"` 7893 7894 // UpdateConditionalFormatRule: A reply from updating a conditional 7895 // format rule. 7896 UpdateConditionalFormatRule *UpdateConditionalFormatRuleResponse `json:"updateConditionalFormatRule,omitempty"` 7897 7898 // UpdateDeveloperMetadata: A reply from updating a developer metadata 7899 // entry. 7900 UpdateDeveloperMetadata *UpdateDeveloperMetadataResponse `json:"updateDeveloperMetadata,omitempty"` 7901 7902 // UpdateEmbeddedObjectPosition: A reply from updating an embedded 7903 // object's position. 7904 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionResponse `json:"updateEmbeddedObjectPosition,omitempty"` 7905 7906 // ForceSendFields is a list of field names (e.g. "AddBanding") to 7907 // unconditionally include in API requests. By default, fields with 7908 // empty values are omitted from API requests. However, any non-pointer, 7909 // non-interface field appearing in ForceSendFields will be sent to the 7910 // server regardless of whether the field is empty or not. This may be 7911 // used to include empty fields in Patch requests. 7912 ForceSendFields []string `json:"-"` 7913 7914 // NullFields is a list of field names (e.g. "AddBanding") to include in 7915 // API requests with the JSON null value. By default, fields with empty 7916 // values are omitted from API requests. However, any field with an 7917 // empty value appearing in NullFields will be sent to the server as 7918 // null. It is an error if a field in this list has a non-empty value. 7919 // This may be used to include null fields in Patch requests. 7920 NullFields []string `json:"-"` 7921} 7922 7923func (s *Response) MarshalJSON() ([]byte, error) { 7924 type NoMethod Response 7925 raw := NoMethod(*s) 7926 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7927} 7928 7929// RowData: Data about each cell in a row. 7930type RowData struct { 7931 // Values: The values in the row, one per column. 7932 Values []*CellData `json:"values,omitempty"` 7933 7934 // ForceSendFields is a list of field names (e.g. "Values") to 7935 // unconditionally include in API requests. By default, fields with 7936 // empty values are omitted from API requests. However, any non-pointer, 7937 // non-interface field appearing in ForceSendFields will be sent to the 7938 // server regardless of whether the field is empty or not. This may be 7939 // used to include empty fields in Patch requests. 7940 ForceSendFields []string `json:"-"` 7941 7942 // NullFields is a list of field names (e.g. "Values") to include in API 7943 // requests with the JSON null value. By default, fields with empty 7944 // values are omitted from API requests. However, any field with an 7945 // empty value appearing in NullFields will be sent to the server as 7946 // null. It is an error if a field in this list has a non-empty value. 7947 // This may be used to include null fields in Patch requests. 7948 NullFields []string `json:"-"` 7949} 7950 7951func (s *RowData) MarshalJSON() ([]byte, error) { 7952 type NoMethod RowData 7953 raw := NoMethod(*s) 7954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7955} 7956 7957// ScorecardChartSpec: A scorecard chart. Scorecard charts are used to 7958// highlight key performance 7959// indicators, known as KPIs, on the spreadsheet. A scorecard chart 7960// can 7961// represent things like total sales, average cost, or a top selling 7962// item. You 7963// can specify a single data value, or aggregate over a range of 7964// data. 7965// Percentage or absolute difference from a baseline value can be 7966// highlighted, 7967// like changes over time. 7968type ScorecardChartSpec struct { 7969 // AggregateType: The aggregation type for key and baseline chart data 7970 // in scorecard chart. 7971 // This field is optional. 7972 // 7973 // Possible values: 7974 // "CHART_AGGREGATE_TYPE_UNSPECIFIED" - Default value, do not use. 7975 // "AVERAGE" - Average aggregate function. 7976 // "COUNT" - Count aggregate function. 7977 // "MAX" - Maximum aggregate function. 7978 // "MEDIAN" - Median aggregate function. 7979 // "MIN" - Minimum aggregate function. 7980 // "SUM" - Sum aggregate function. 7981 AggregateType string `json:"aggregateType,omitempty"` 7982 7983 // BaselineValueData: The data for scorecard baseline value. 7984 // This field is optional. 7985 BaselineValueData *ChartData `json:"baselineValueData,omitempty"` 7986 7987 // BaselineValueFormat: Formatting options for baseline value. 7988 // This field is needed only if baseline_value_data is specified. 7989 BaselineValueFormat *BaselineValueFormat `json:"baselineValueFormat,omitempty"` 7990 7991 // CustomFormatOptions: Custom formatting options for numeric 7992 // key/baseline values in scorecard 7993 // chart. This field is used only when number_format_source is set 7994 // to 7995 // CUSTOM. This field is optional. 7996 CustomFormatOptions *ChartCustomNumberFormatOptions `json:"customFormatOptions,omitempty"` 7997 7998 // KeyValueData: The data for scorecard key value. 7999 KeyValueData *ChartData `json:"keyValueData,omitempty"` 8000 8001 // KeyValueFormat: Formatting options for key value. 8002 KeyValueFormat *KeyValueFormat `json:"keyValueFormat,omitempty"` 8003 8004 // NumberFormatSource: The number format source used in the scorecard 8005 // chart. 8006 // This field is optional. 8007 // 8008 // Possible values: 8009 // "CHART_NUMBER_FORMAT_SOURCE_UNDEFINED" - Default value, do not use. 8010 // "FROM_DATA" - Inherit number formatting from data. 8011 // "CUSTOM" - Apply custom formatting as specified by 8012 // ChartCustomNumberFormatOptions. 8013 NumberFormatSource string `json:"numberFormatSource,omitempty"` 8014 8015 // ScaleFactor: Value to scale scorecard key and baseline value. For 8016 // example, a factor of 8017 // 10 can be used to divide all values in the chart by 10. 8018 // This field is optional. 8019 ScaleFactor float64 `json:"scaleFactor,omitempty"` 8020 8021 // ForceSendFields is a list of field names (e.g. "AggregateType") to 8022 // unconditionally include in API requests. By default, fields with 8023 // empty values are omitted from API requests. However, any non-pointer, 8024 // non-interface field appearing in ForceSendFields will be sent to the 8025 // server regardless of whether the field is empty or not. This may be 8026 // used to include empty fields in Patch requests. 8027 ForceSendFields []string `json:"-"` 8028 8029 // NullFields is a list of field names (e.g. "AggregateType") to include 8030 // in API requests with the JSON null value. By default, fields with 8031 // empty values are omitted from API requests. However, any field with 8032 // an empty value appearing in NullFields will be sent to the server as 8033 // null. It is an error if a field in this list has a non-empty value. 8034 // This may be used to include null fields in Patch requests. 8035 NullFields []string `json:"-"` 8036} 8037 8038func (s *ScorecardChartSpec) MarshalJSON() ([]byte, error) { 8039 type NoMethod ScorecardChartSpec 8040 raw := NoMethod(*s) 8041 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8042} 8043 8044func (s *ScorecardChartSpec) UnmarshalJSON(data []byte) error { 8045 type NoMethod ScorecardChartSpec 8046 var s1 struct { 8047 ScaleFactor gensupport.JSONFloat64 `json:"scaleFactor"` 8048 *NoMethod 8049 } 8050 s1.NoMethod = (*NoMethod)(s) 8051 if err := json.Unmarshal(data, &s1); err != nil { 8052 return err 8053 } 8054 s.ScaleFactor = float64(s1.ScaleFactor) 8055 return nil 8056} 8057 8058// SearchDeveloperMetadataRequest: A request to retrieve all developer 8059// metadata matching the set of specified 8060// criteria. 8061type SearchDeveloperMetadataRequest struct { 8062 // DataFilters: The data filters describing the criteria used to 8063 // determine which 8064 // DeveloperMetadata entries to return. DeveloperMetadata matching any 8065 // of the 8066 // specified filters will be included in the response. 8067 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 8068 8069 // ForceSendFields is a list of field names (e.g. "DataFilters") to 8070 // unconditionally include in API requests. By default, fields with 8071 // empty values are omitted from API requests. However, any non-pointer, 8072 // non-interface field appearing in ForceSendFields will be sent to the 8073 // server regardless of whether the field is empty or not. This may be 8074 // used to include empty fields in Patch requests. 8075 ForceSendFields []string `json:"-"` 8076 8077 // NullFields is a list of field names (e.g. "DataFilters") to include 8078 // in API requests with the JSON null value. By default, fields with 8079 // empty values are omitted from API requests. However, any field with 8080 // an empty value appearing in NullFields will be sent to the server as 8081 // null. It is an error if a field in this list has a non-empty value. 8082 // This may be used to include null fields in Patch requests. 8083 NullFields []string `json:"-"` 8084} 8085 8086func (s *SearchDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 8087 type NoMethod SearchDeveloperMetadataRequest 8088 raw := NoMethod(*s) 8089 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8090} 8091 8092// SearchDeveloperMetadataResponse: A reply to a developer metadata 8093// search request. 8094type SearchDeveloperMetadataResponse struct { 8095 // MatchedDeveloperMetadata: The metadata matching the criteria of the 8096 // search request. 8097 MatchedDeveloperMetadata []*MatchedDeveloperMetadata `json:"matchedDeveloperMetadata,omitempty"` 8098 8099 // ServerResponse contains the HTTP response code and headers from the 8100 // server. 8101 googleapi.ServerResponse `json:"-"` 8102 8103 // ForceSendFields is a list of field names (e.g. 8104 // "MatchedDeveloperMetadata") to unconditionally include in API 8105 // requests. By default, fields with empty values are omitted from API 8106 // requests. However, any non-pointer, non-interface field appearing in 8107 // ForceSendFields will be sent to the server regardless of whether the 8108 // field is empty or not. This may be used to include empty fields in 8109 // Patch requests. 8110 ForceSendFields []string `json:"-"` 8111 8112 // NullFields is a list of field names (e.g. "MatchedDeveloperMetadata") 8113 // to include in API requests with the JSON null value. By default, 8114 // fields with empty values are omitted from API requests. However, any 8115 // field with an empty value appearing in NullFields will be sent to the 8116 // server as null. It is an error if a field in this list has a 8117 // non-empty value. This may be used to include null fields in Patch 8118 // requests. 8119 NullFields []string `json:"-"` 8120} 8121 8122func (s *SearchDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 8123 type NoMethod SearchDeveloperMetadataResponse 8124 raw := NoMethod(*s) 8125 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8126} 8127 8128// SetBasicFilterRequest: Sets the basic filter associated with a sheet. 8129type SetBasicFilterRequest struct { 8130 // Filter: The filter to set. 8131 Filter *BasicFilter `json:"filter,omitempty"` 8132 8133 // ForceSendFields is a list of field names (e.g. "Filter") to 8134 // unconditionally include in API requests. By default, fields with 8135 // empty values are omitted from API requests. However, any non-pointer, 8136 // non-interface field appearing in ForceSendFields will be sent to the 8137 // server regardless of whether the field is empty or not. This may be 8138 // used to include empty fields in Patch requests. 8139 ForceSendFields []string `json:"-"` 8140 8141 // NullFields is a list of field names (e.g. "Filter") to include in API 8142 // requests with the JSON null value. By default, fields with empty 8143 // values are omitted from API requests. However, any field with an 8144 // empty value appearing in NullFields will be sent to the server as 8145 // null. It is an error if a field in this list has a non-empty value. 8146 // This may be used to include null fields in Patch requests. 8147 NullFields []string `json:"-"` 8148} 8149 8150func (s *SetBasicFilterRequest) MarshalJSON() ([]byte, error) { 8151 type NoMethod SetBasicFilterRequest 8152 raw := NoMethod(*s) 8153 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8154} 8155 8156// SetDataValidationRequest: Sets a data validation rule to every cell 8157// in the range. 8158// To clear validation in a range, call this with no rule specified. 8159type SetDataValidationRequest struct { 8160 // Range: The range the data validation rule should apply to. 8161 Range *GridRange `json:"range,omitempty"` 8162 8163 // Rule: The data validation rule to set on each cell in the range, 8164 // or empty to clear the data validation in the range. 8165 Rule *DataValidationRule `json:"rule,omitempty"` 8166 8167 // ForceSendFields is a list of field names (e.g. "Range") to 8168 // unconditionally include in API requests. By default, fields with 8169 // empty values are omitted from API requests. However, any non-pointer, 8170 // non-interface field appearing in ForceSendFields will be sent to the 8171 // server regardless of whether the field is empty or not. This may be 8172 // used to include empty fields in Patch requests. 8173 ForceSendFields []string `json:"-"` 8174 8175 // NullFields is a list of field names (e.g. "Range") to include in API 8176 // requests with the JSON null value. By default, fields with empty 8177 // values are omitted from API requests. However, any field with an 8178 // empty value appearing in NullFields will be sent to the server as 8179 // null. It is an error if a field in this list has a non-empty value. 8180 // This may be used to include null fields in Patch requests. 8181 NullFields []string `json:"-"` 8182} 8183 8184func (s *SetDataValidationRequest) MarshalJSON() ([]byte, error) { 8185 type NoMethod SetDataValidationRequest 8186 raw := NoMethod(*s) 8187 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8188} 8189 8190// Sheet: A sheet in a spreadsheet. 8191type Sheet struct { 8192 // BandedRanges: The banded (alternating colors) ranges on this sheet. 8193 BandedRanges []*BandedRange `json:"bandedRanges,omitempty"` 8194 8195 // BasicFilter: The filter on this sheet, if any. 8196 BasicFilter *BasicFilter `json:"basicFilter,omitempty"` 8197 8198 // Charts: The specifications of every chart on this sheet. 8199 Charts []*EmbeddedChart `json:"charts,omitempty"` 8200 8201 // ColumnGroups: All column groups on this sheet, ordered by increasing 8202 // range start index, 8203 // then by group depth. 8204 ColumnGroups []*DimensionGroup `json:"columnGroups,omitempty"` 8205 8206 // ConditionalFormats: The conditional format rules in this sheet. 8207 ConditionalFormats []*ConditionalFormatRule `json:"conditionalFormats,omitempty"` 8208 8209 // Data: Data in the grid, if this is a grid sheet. 8210 // The number of GridData objects returned is dependent on the number 8211 // of 8212 // ranges requested on this sheet. For example, if this is 8213 // representing 8214 // `Sheet1`, and the spreadsheet was requested with 8215 // ranges 8216 // `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will 8217 // have a 8218 // startRow/startColumn of `0`, 8219 // while the second one will have `startRow 14` (zero-based row 15), 8220 // and `startColumn 3` (zero-based column D). 8221 Data []*GridData `json:"data,omitempty"` 8222 8223 // DeveloperMetadata: The developer metadata associated with a sheet. 8224 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 8225 8226 // FilterViews: The filter views in this sheet. 8227 FilterViews []*FilterView `json:"filterViews,omitempty"` 8228 8229 // Merges: The ranges that are merged together. 8230 Merges []*GridRange `json:"merges,omitempty"` 8231 8232 // Properties: The properties of the sheet. 8233 Properties *SheetProperties `json:"properties,omitempty"` 8234 8235 // ProtectedRanges: The protected ranges in this sheet. 8236 ProtectedRanges []*ProtectedRange `json:"protectedRanges,omitempty"` 8237 8238 // RowGroups: All row groups on this sheet, ordered by increasing range 8239 // start index, then 8240 // by group depth. 8241 RowGroups []*DimensionGroup `json:"rowGroups,omitempty"` 8242 8243 // Slicers: The slicers on this sheet. 8244 Slicers []*Slicer `json:"slicers,omitempty"` 8245 8246 // ForceSendFields is a list of field names (e.g. "BandedRanges") 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. "BandedRanges") to include 8255 // in API requests with the JSON null value. By default, fields with 8256 // empty values are omitted from API requests. However, any field with 8257 // an 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 *Sheet) MarshalJSON() ([]byte, error) { 8264 type NoMethod Sheet 8265 raw := NoMethod(*s) 8266 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8267} 8268 8269// SheetProperties: Properties of a sheet. 8270type SheetProperties struct { 8271 // GridProperties: Additional properties of the sheet if this sheet is a 8272 // grid. 8273 // (If the sheet is an object sheet, containing a chart or image, 8274 // then 8275 // this field will be absent.) 8276 // When writing it is an error to set any grid properties on non-grid 8277 // sheets. 8278 GridProperties *GridProperties `json:"gridProperties,omitempty"` 8279 8280 // Hidden: True if the sheet is hidden in the UI, false if it's visible. 8281 Hidden bool `json:"hidden,omitempty"` 8282 8283 // Index: The index of the sheet within the spreadsheet. 8284 // When adding or updating sheet properties, if this field 8285 // is excluded then the sheet is added or moved to the end 8286 // of the sheet list. When updating sheet indices or inserting 8287 // sheets, movement is considered in "before the move" indexes. 8288 // For example, if there were 3 sheets (S1, S2, S3) in order to 8289 // move S1 ahead of S2 the index would have to be set to 2. A 8290 // sheet 8291 // index update request is ignored if the requested index is 8292 // identical to the sheets current index or if the requested new 8293 // index is equal to the current sheet index + 1. 8294 Index int64 `json:"index,omitempty"` 8295 8296 // RightToLeft: True if the sheet is an RTL sheet instead of an LTR 8297 // sheet. 8298 RightToLeft bool `json:"rightToLeft,omitempty"` 8299 8300 // SheetId: The ID of the sheet. Must be non-negative. 8301 // This field cannot be changed once set. 8302 SheetId int64 `json:"sheetId,omitempty"` 8303 8304 // SheetType: The type of sheet. Defaults to GRID. 8305 // This field cannot be changed once set. 8306 // 8307 // Possible values: 8308 // "SHEET_TYPE_UNSPECIFIED" - Default value, do not use. 8309 // "GRID" - The sheet is a grid. 8310 // "OBJECT" - The sheet has no grid and instead has an object like a 8311 // chart or image. 8312 SheetType string `json:"sheetType,omitempty"` 8313 8314 // TabColor: The color of the tab in the UI. 8315 TabColor *Color `json:"tabColor,omitempty"` 8316 8317 // Title: The name of the sheet. 8318 Title string `json:"title,omitempty"` 8319 8320 // ServerResponse contains the HTTP response code and headers from the 8321 // server. 8322 googleapi.ServerResponse `json:"-"` 8323 8324 // ForceSendFields is a list of field names (e.g. "GridProperties") to 8325 // unconditionally include in API requests. By default, fields with 8326 // empty values are omitted from API requests. However, any non-pointer, 8327 // non-interface field appearing in ForceSendFields will be sent to the 8328 // server regardless of whether the field is empty or not. This may be 8329 // used to include empty fields in Patch requests. 8330 ForceSendFields []string `json:"-"` 8331 8332 // NullFields is a list of field names (e.g. "GridProperties") to 8333 // include in API requests with the JSON null value. By default, fields 8334 // with empty values are omitted from API requests. However, any field 8335 // with an empty value appearing in NullFields will be sent to the 8336 // server as null. It is an error if a field in this list has a 8337 // non-empty value. This may be used to include null fields in Patch 8338 // requests. 8339 NullFields []string `json:"-"` 8340} 8341 8342func (s *SheetProperties) MarshalJSON() ([]byte, error) { 8343 type NoMethod SheetProperties 8344 raw := NoMethod(*s) 8345 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8346} 8347 8348// Slicer: A slicer in a sheet. 8349type Slicer struct { 8350 // Position: The position of the slicer. Note that slicer can be 8351 // positioned only on 8352 // existing sheet. Also, width and height of slicer can be 8353 // automatically 8354 // adjusted to keep it within permitted limits. 8355 Position *EmbeddedObjectPosition `json:"position,omitempty"` 8356 8357 // SlicerId: The ID of the slicer. 8358 SlicerId int64 `json:"slicerId,omitempty"` 8359 8360 // Spec: The specification of the slicer. 8361 Spec *SlicerSpec `json:"spec,omitempty"` 8362 8363 // ForceSendFields is a list of field names (e.g. "Position") to 8364 // unconditionally include in API requests. By default, fields with 8365 // empty values are omitted from API requests. However, any non-pointer, 8366 // non-interface field appearing in ForceSendFields will be sent to the 8367 // server regardless of whether the field is empty or not. This may be 8368 // used to include empty fields in Patch requests. 8369 ForceSendFields []string `json:"-"` 8370 8371 // NullFields is a list of field names (e.g. "Position") to include in 8372 // API requests with the JSON null value. By default, fields with empty 8373 // values are omitted from API requests. However, any field with an 8374 // empty value appearing in NullFields will be sent to the server as 8375 // null. It is an error if a field in this list has a non-empty value. 8376 // This may be used to include null fields in Patch requests. 8377 NullFields []string `json:"-"` 8378} 8379 8380func (s *Slicer) MarshalJSON() ([]byte, error) { 8381 type NoMethod Slicer 8382 raw := NoMethod(*s) 8383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8384} 8385 8386// SlicerSpec: The specifications of a slicer. 8387type SlicerSpec struct { 8388 // ApplyToPivotTables: True if the filter should apply to pivot 8389 // tables. 8390 // If not set, default to `True`. 8391 ApplyToPivotTables bool `json:"applyToPivotTables,omitempty"` 8392 8393 // BackgroundColor: The background color of the slicer. 8394 BackgroundColor *Color `json:"backgroundColor,omitempty"` 8395 8396 // ColumnIndex: The column index in the data table on which the filter 8397 // is applied to. 8398 ColumnIndex int64 `json:"columnIndex,omitempty"` 8399 8400 // DataRange: The data range of the slicer. 8401 DataRange *GridRange `json:"dataRange,omitempty"` 8402 8403 // FilterCriteria: The filtering criteria of the slicer. 8404 FilterCriteria *FilterCriteria `json:"filterCriteria,omitempty"` 8405 8406 // HorizontalAlignment: The horizontal alignment of title in the 8407 // slicer. 8408 // If unspecified, defaults to `LEFT` 8409 // 8410 // Possible values: 8411 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 8412 // specified. Do not use this. 8413 // "LEFT" - The text is explicitly aligned to the left of the cell. 8414 // "CENTER" - The text is explicitly aligned to the center of the 8415 // cell. 8416 // "RIGHT" - The text is explicitly aligned to the right of the cell. 8417 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 8418 8419 // TextFormat: The text format of title in the slicer. 8420 TextFormat *TextFormat `json:"textFormat,omitempty"` 8421 8422 // Title: The title of the slicer. 8423 Title string `json:"title,omitempty"` 8424 8425 // ForceSendFields is a list of field names (e.g. "ApplyToPivotTables") 8426 // to unconditionally include in API requests. By default, fields with 8427 // empty values are omitted from API requests. However, any non-pointer, 8428 // non-interface field appearing in ForceSendFields will be sent to the 8429 // server regardless of whether the field is empty or not. This may be 8430 // used to include empty fields in Patch requests. 8431 ForceSendFields []string `json:"-"` 8432 8433 // NullFields is a list of field names (e.g. "ApplyToPivotTables") to 8434 // include in API requests with the JSON null value. By default, fields 8435 // with empty values are omitted from API requests. However, any field 8436 // with an empty value appearing in NullFields will be sent to the 8437 // server as null. It is an error if a field in this list has a 8438 // non-empty value. This may be used to include null fields in Patch 8439 // requests. 8440 NullFields []string `json:"-"` 8441} 8442 8443func (s *SlicerSpec) MarshalJSON() ([]byte, error) { 8444 type NoMethod SlicerSpec 8445 raw := NoMethod(*s) 8446 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8447} 8448 8449// SortRangeRequest: Sorts data in rows based on a sort order per 8450// column. 8451type SortRangeRequest struct { 8452 // Range: The range to sort. 8453 Range *GridRange `json:"range,omitempty"` 8454 8455 // SortSpecs: The sort order per column. Later specifications are used 8456 // when values 8457 // are equal in the earlier specifications. 8458 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 8459 8460 // ForceSendFields is a list of field names (e.g. "Range") to 8461 // unconditionally include in API requests. By default, fields with 8462 // empty values are omitted from API requests. However, any non-pointer, 8463 // non-interface field appearing in ForceSendFields will be sent to the 8464 // server regardless of whether the field is empty or not. This may be 8465 // used to include empty fields in Patch requests. 8466 ForceSendFields []string `json:"-"` 8467 8468 // NullFields is a list of field names (e.g. "Range") to include in API 8469 // requests with the JSON null value. By default, fields with empty 8470 // values are omitted from API requests. However, any field with an 8471 // empty value appearing in NullFields will be sent to the server as 8472 // null. It is an error if a field in this list has a non-empty value. 8473 // This may be used to include null fields in Patch requests. 8474 NullFields []string `json:"-"` 8475} 8476 8477func (s *SortRangeRequest) MarshalJSON() ([]byte, error) { 8478 type NoMethod SortRangeRequest 8479 raw := NoMethod(*s) 8480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8481} 8482 8483// SortSpec: A sort order associated with a specific column or row. 8484type SortSpec struct { 8485 // BackgroundColor: The background fill color to sort by. Mutually 8486 // exclusive with sorting by 8487 // text color. Requests to set this field will fail with a 400 error 8488 // if 8489 // foreground color is also set. 8490 BackgroundColor *Color `json:"backgroundColor,omitempty"` 8491 8492 // DimensionIndex: The dimension the sort should be applied to. 8493 DimensionIndex int64 `json:"dimensionIndex,omitempty"` 8494 8495 // ForegroundColor: The text color to sort by. Mutually exclusive with 8496 // sorting by background 8497 // fill color. Requests to set this field will fail with a 400 error 8498 // if 8499 // background color is also set. 8500 ForegroundColor *Color `json:"foregroundColor,omitempty"` 8501 8502 // SortOrder: The order data should be sorted. 8503 // 8504 // Possible values: 8505 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 8506 // "ASCENDING" - Sort ascending. 8507 // "DESCENDING" - Sort descending. 8508 SortOrder string `json:"sortOrder,omitempty"` 8509 8510 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 8511 // unconditionally include in API requests. By default, fields with 8512 // empty values are omitted from API requests. However, any non-pointer, 8513 // non-interface field appearing in ForceSendFields will be sent to the 8514 // server regardless of whether the field is empty or not. This may be 8515 // used to include empty fields in Patch requests. 8516 ForceSendFields []string `json:"-"` 8517 8518 // NullFields is a list of field names (e.g. "BackgroundColor") to 8519 // include in API requests with the JSON null value. By default, fields 8520 // with empty values are omitted from API requests. However, any field 8521 // with an empty value appearing in NullFields will be sent to the 8522 // server as null. It is an error if a field in this list has a 8523 // non-empty value. This may be used to include null fields in Patch 8524 // requests. 8525 NullFields []string `json:"-"` 8526} 8527 8528func (s *SortSpec) MarshalJSON() ([]byte, error) { 8529 type NoMethod SortSpec 8530 raw := NoMethod(*s) 8531 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8532} 8533 8534// SourceAndDestination: A combination of a source range and how to 8535// extend that source. 8536type SourceAndDestination struct { 8537 // Dimension: The dimension that data should be filled into. 8538 // 8539 // Possible values: 8540 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 8541 // "ROWS" - Operates on the rows of a sheet. 8542 // "COLUMNS" - Operates on the columns of a sheet. 8543 Dimension string `json:"dimension,omitempty"` 8544 8545 // FillLength: The number of rows or columns that data should be filled 8546 // into. 8547 // Positive numbers expand beyond the last row or last column 8548 // of the source. Negative numbers expand before the first row 8549 // or first column of the source. 8550 FillLength int64 `json:"fillLength,omitempty"` 8551 8552 // Source: The location of the data to use as the source of the 8553 // autofill. 8554 Source *GridRange `json:"source,omitempty"` 8555 8556 // ForceSendFields is a list of field names (e.g. "Dimension") to 8557 // unconditionally include in API requests. By default, fields with 8558 // empty values are omitted from API requests. However, any non-pointer, 8559 // non-interface field appearing in ForceSendFields will be sent to the 8560 // server regardless of whether the field is empty or not. This may be 8561 // used to include empty fields in Patch requests. 8562 ForceSendFields []string `json:"-"` 8563 8564 // NullFields is a list of field names (e.g. "Dimension") to include in 8565 // API requests with the JSON null value. By default, fields with empty 8566 // values are omitted from API requests. However, any field with an 8567 // empty value appearing in NullFields will be sent to the server as 8568 // null. It is an error if a field in this list has a non-empty value. 8569 // This may be used to include null fields in Patch requests. 8570 NullFields []string `json:"-"` 8571} 8572 8573func (s *SourceAndDestination) MarshalJSON() ([]byte, error) { 8574 type NoMethod SourceAndDestination 8575 raw := NoMethod(*s) 8576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8577} 8578 8579// Spreadsheet: Resource that represents a spreadsheet. 8580type Spreadsheet struct { 8581 // DeveloperMetadata: The developer metadata associated with a 8582 // spreadsheet. 8583 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 8584 8585 // NamedRanges: The named ranges defined in a spreadsheet. 8586 NamedRanges []*NamedRange `json:"namedRanges,omitempty"` 8587 8588 // Properties: Overall properties of a spreadsheet. 8589 Properties *SpreadsheetProperties `json:"properties,omitempty"` 8590 8591 // Sheets: The sheets that are part of a spreadsheet. 8592 Sheets []*Sheet `json:"sheets,omitempty"` 8593 8594 // SpreadsheetId: The ID of the spreadsheet. 8595 // This field is read-only. 8596 SpreadsheetId string `json:"spreadsheetId,omitempty"` 8597 8598 // SpreadsheetUrl: The url of the spreadsheet. 8599 // This field is read-only. 8600 SpreadsheetUrl string `json:"spreadsheetUrl,omitempty"` 8601 8602 // ServerResponse contains the HTTP response code and headers from the 8603 // server. 8604 googleapi.ServerResponse `json:"-"` 8605 8606 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 8607 // to unconditionally include in API requests. By default, fields with 8608 // empty values are omitted from API requests. However, any non-pointer, 8609 // non-interface field appearing in ForceSendFields will be sent to the 8610 // server regardless of whether the field is empty or not. This may be 8611 // used to include empty fields in Patch requests. 8612 ForceSendFields []string `json:"-"` 8613 8614 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 8615 // include in API requests with the JSON null value. By default, fields 8616 // with empty values are omitted from API requests. However, any field 8617 // with an empty value appearing in NullFields will be sent to the 8618 // server as null. It is an error if a field in this list has a 8619 // non-empty value. This may be used to include null fields in Patch 8620 // requests. 8621 NullFields []string `json:"-"` 8622} 8623 8624func (s *Spreadsheet) MarshalJSON() ([]byte, error) { 8625 type NoMethod Spreadsheet 8626 raw := NoMethod(*s) 8627 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8628} 8629 8630// SpreadsheetProperties: Properties of a spreadsheet. 8631type SpreadsheetProperties struct { 8632 // AutoRecalc: The amount of time to wait before volatile functions are 8633 // recalculated. 8634 // 8635 // Possible values: 8636 // "RECALCULATION_INTERVAL_UNSPECIFIED" - Default value. This value 8637 // must not be used. 8638 // "ON_CHANGE" - Volatile functions are updated on every change. 8639 // "MINUTE" - Volatile functions are updated on every change and every 8640 // minute. 8641 // "HOUR" - Volatile functions are updated on every change and hourly. 8642 AutoRecalc string `json:"autoRecalc,omitempty"` 8643 8644 // DefaultFormat: The default format of all cells in the 8645 // spreadsheet. 8646 // CellData.effectiveFormat will not be set if 8647 // the cell's format is equal to this default format. This field is 8648 // read-only. 8649 DefaultFormat *CellFormat `json:"defaultFormat,omitempty"` 8650 8651 // IterativeCalculationSettings: Determines whether and how circular 8652 // references are resolved with iterative 8653 // calculation. Absence of this field means that circular references 8654 // will 8655 // result in calculation errors. 8656 IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"` 8657 8658 // Locale: The locale of the spreadsheet in one of the following 8659 // formats: 8660 // 8661 // * an ISO 639-1 language code such as `en` 8662 // 8663 // * an ISO 639-2 language code such as `fil`, if no 639-1 code 8664 // exists 8665 // 8666 // * a combination of the ISO language code and country code, such as 8667 // `en_US` 8668 // 8669 // Note: when updating this field, not all locales/languages are 8670 // supported. 8671 Locale string `json:"locale,omitempty"` 8672 8673 // TimeZone: The time zone of the spreadsheet, in CLDR format such 8674 // as 8675 // `America/New_York`. If the time zone isn't recognized, this may 8676 // be a custom time zone such as `GMT-07:00`. 8677 TimeZone string `json:"timeZone,omitempty"` 8678 8679 // Title: The title of the spreadsheet. 8680 Title string `json:"title,omitempty"` 8681 8682 // ForceSendFields is a list of field names (e.g. "AutoRecalc") to 8683 // unconditionally include in API requests. By default, fields with 8684 // empty values are omitted from API requests. However, any non-pointer, 8685 // non-interface field appearing in ForceSendFields will be sent to the 8686 // server regardless of whether the field is empty or not. This may be 8687 // used to include empty fields in Patch requests. 8688 ForceSendFields []string `json:"-"` 8689 8690 // NullFields is a list of field names (e.g. "AutoRecalc") to include in 8691 // API requests with the JSON null value. By default, fields with empty 8692 // values are omitted from API requests. However, any field with an 8693 // empty value appearing in NullFields will be sent to the server as 8694 // null. It is an error if a field in this list has a non-empty value. 8695 // This may be used to include null fields in Patch requests. 8696 NullFields []string `json:"-"` 8697} 8698 8699func (s *SpreadsheetProperties) MarshalJSON() ([]byte, error) { 8700 type NoMethod SpreadsheetProperties 8701 raw := NoMethod(*s) 8702 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8703} 8704 8705// TextFormat: The format of a run of text in a cell. 8706// Absent values indicate that the field isn't specified. 8707type TextFormat struct { 8708 // Bold: True if the text is bold. 8709 Bold bool `json:"bold,omitempty"` 8710 8711 // FontFamily: The font family. 8712 FontFamily string `json:"fontFamily,omitempty"` 8713 8714 // FontSize: The size of the font. 8715 FontSize int64 `json:"fontSize,omitempty"` 8716 8717 // ForegroundColor: The foreground color of the text. 8718 ForegroundColor *Color `json:"foregroundColor,omitempty"` 8719 8720 // Italic: True if the text is italicized. 8721 Italic bool `json:"italic,omitempty"` 8722 8723 // Strikethrough: True if the text has a strikethrough. 8724 Strikethrough bool `json:"strikethrough,omitempty"` 8725 8726 // Underline: True if the text is underlined. 8727 Underline bool `json:"underline,omitempty"` 8728 8729 // ForceSendFields is a list of field names (e.g. "Bold") to 8730 // unconditionally include in API requests. By default, fields with 8731 // empty values are omitted from API requests. However, any non-pointer, 8732 // non-interface field appearing in ForceSendFields will be sent to the 8733 // server regardless of whether the field is empty or not. This may be 8734 // used to include empty fields in Patch requests. 8735 ForceSendFields []string `json:"-"` 8736 8737 // NullFields is a list of field names (e.g. "Bold") to include in API 8738 // requests with the JSON null value. By default, fields with empty 8739 // values are omitted from API requests. However, any field with an 8740 // empty value appearing in NullFields will be sent to the server as 8741 // null. It is an error if a field in this list has a non-empty value. 8742 // This may be used to include null fields in Patch requests. 8743 NullFields []string `json:"-"` 8744} 8745 8746func (s *TextFormat) MarshalJSON() ([]byte, error) { 8747 type NoMethod TextFormat 8748 raw := NoMethod(*s) 8749 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8750} 8751 8752// TextFormatRun: A run of a text format. The format of this run 8753// continues until the start 8754// index of the next run. 8755// When updating, all fields must be set. 8756type TextFormatRun struct { 8757 // Format: The format of this run. Absent values inherit the cell's 8758 // format. 8759 Format *TextFormat `json:"format,omitempty"` 8760 8761 // StartIndex: The character index where this run starts. 8762 StartIndex int64 `json:"startIndex,omitempty"` 8763 8764 // ForceSendFields is a list of field names (e.g. "Format") to 8765 // unconditionally include in API requests. By default, fields with 8766 // empty values are omitted from API requests. However, any non-pointer, 8767 // non-interface field appearing in ForceSendFields will be sent to the 8768 // server regardless of whether the field is empty or not. This may be 8769 // used to include empty fields in Patch requests. 8770 ForceSendFields []string `json:"-"` 8771 8772 // NullFields is a list of field names (e.g. "Format") to include in API 8773 // requests with the JSON null value. By default, fields with empty 8774 // values are omitted from API requests. However, any field with an 8775 // empty value appearing in NullFields will be sent to the server as 8776 // null. It is an error if a field in this list has a non-empty value. 8777 // This may be used to include null fields in Patch requests. 8778 NullFields []string `json:"-"` 8779} 8780 8781func (s *TextFormatRun) MarshalJSON() ([]byte, error) { 8782 type NoMethod TextFormatRun 8783 raw := NoMethod(*s) 8784 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8785} 8786 8787// TextPosition: Position settings for text. 8788type TextPosition struct { 8789 // HorizontalAlignment: Horizontal alignment setting for the piece of 8790 // text. 8791 // 8792 // Possible values: 8793 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 8794 // specified. Do not use this. 8795 // "LEFT" - The text is explicitly aligned to the left of the cell. 8796 // "CENTER" - The text is explicitly aligned to the center of the 8797 // cell. 8798 // "RIGHT" - The text is explicitly aligned to the right of the cell. 8799 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 8800 8801 // ForceSendFields is a list of field names (e.g. "HorizontalAlignment") 8802 // to unconditionally include in API requests. By default, fields with 8803 // empty values are omitted from API requests. However, any non-pointer, 8804 // non-interface field appearing in ForceSendFields will be sent to the 8805 // server regardless of whether the field is empty or not. This may be 8806 // used to include empty fields in Patch requests. 8807 ForceSendFields []string `json:"-"` 8808 8809 // NullFields is a list of field names (e.g. "HorizontalAlignment") to 8810 // include in API requests with the JSON null value. By default, fields 8811 // with empty values are omitted from API requests. However, any field 8812 // with an empty value appearing in NullFields will be sent to the 8813 // server as null. It is an error if a field in this list has a 8814 // non-empty value. This may be used to include null fields in Patch 8815 // requests. 8816 NullFields []string `json:"-"` 8817} 8818 8819func (s *TextPosition) MarshalJSON() ([]byte, error) { 8820 type NoMethod TextPosition 8821 raw := NoMethod(*s) 8822 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8823} 8824 8825// TextRotation: The rotation applied to text in a cell. 8826type TextRotation struct { 8827 // Angle: The angle between the standard orientation and the desired 8828 // orientation. 8829 // Measured in degrees. Valid values are between -90 and 90. 8830 // Positive 8831 // angles are angled upwards, negative are angled downwards. 8832 // 8833 // Note: For LTR text direction positive angles are in 8834 // the 8835 // counterclockwise direction, whereas for RTL they are in the 8836 // clockwise 8837 // direction 8838 Angle int64 `json:"angle,omitempty"` 8839 8840 // Vertical: If true, text reads top to bottom, but the orientation of 8841 // individual 8842 // characters is unchanged. 8843 // For example: 8844 // 8845 // | V | 8846 // | e | 8847 // | r | 8848 // | t | 8849 // | i | 8850 // | c | 8851 // | a | 8852 // | l | 8853 Vertical bool `json:"vertical,omitempty"` 8854 8855 // ForceSendFields is a list of field names (e.g. "Angle") to 8856 // unconditionally include in API requests. By default, fields with 8857 // empty values are omitted from API requests. However, any non-pointer, 8858 // non-interface field appearing in ForceSendFields will be sent to the 8859 // server regardless of whether the field is empty or not. This may be 8860 // used to include empty fields in Patch requests. 8861 ForceSendFields []string `json:"-"` 8862 8863 // NullFields is a list of field names (e.g. "Angle") to include in API 8864 // requests with the JSON null value. By default, fields with empty 8865 // values are omitted from API requests. However, any field with an 8866 // empty value appearing in NullFields will be sent to the server as 8867 // null. It is an error if a field in this list has a non-empty value. 8868 // This may be used to include null fields in Patch requests. 8869 NullFields []string `json:"-"` 8870} 8871 8872func (s *TextRotation) MarshalJSON() ([]byte, error) { 8873 type NoMethod TextRotation 8874 raw := NoMethod(*s) 8875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8876} 8877 8878// TextToColumnsRequest: Splits a column of text into multiple 8879// columns, 8880// based on a delimiter in each cell. 8881type TextToColumnsRequest struct { 8882 // Delimiter: The delimiter to use. Used only if delimiterType 8883 // is 8884 // CUSTOM. 8885 Delimiter string `json:"delimiter,omitempty"` 8886 8887 // DelimiterType: The delimiter type to use. 8888 // 8889 // Possible values: 8890 // "DELIMITER_TYPE_UNSPECIFIED" - Default value. This value must not 8891 // be used. 8892 // "COMMA" - "," 8893 // "SEMICOLON" - ";" 8894 // "PERIOD" - "." 8895 // "SPACE" - " " 8896 // "CUSTOM" - A custom value as defined in delimiter. 8897 // "AUTODETECT" - Automatically detect columns. 8898 DelimiterType string `json:"delimiterType,omitempty"` 8899 8900 // Source: The source data range. This must span exactly one column. 8901 Source *GridRange `json:"source,omitempty"` 8902 8903 // ForceSendFields is a list of field names (e.g. "Delimiter") to 8904 // unconditionally include in API requests. By default, fields with 8905 // empty values are omitted from API requests. However, any non-pointer, 8906 // non-interface field appearing in ForceSendFields will be sent to the 8907 // server regardless of whether the field is empty or not. This may be 8908 // used to include empty fields in Patch requests. 8909 ForceSendFields []string `json:"-"` 8910 8911 // NullFields is a list of field names (e.g. "Delimiter") to include in 8912 // API requests with the JSON null value. By default, fields with empty 8913 // values are omitted from API requests. However, any field with an 8914 // empty value appearing in NullFields will be sent to the server as 8915 // null. It is an error if a field in this list has a non-empty value. 8916 // This may be used to include null fields in Patch requests. 8917 NullFields []string `json:"-"` 8918} 8919 8920func (s *TextToColumnsRequest) MarshalJSON() ([]byte, error) { 8921 type NoMethod TextToColumnsRequest 8922 raw := NoMethod(*s) 8923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8924} 8925 8926// TreemapChartColorScale: A color scale for a treemap chart. 8927type TreemapChartColorScale struct { 8928 // MaxValueColor: The background color for cells with a color value 8929 // greater than or equal 8930 // to maxValue. Defaults to #109618 if not 8931 // specified. 8932 MaxValueColor *Color `json:"maxValueColor,omitempty"` 8933 8934 // MidValueColor: The background color for cells with a color value at 8935 // the midpoint between 8936 // minValue and 8937 // maxValue. Defaults to #efe6dc if not 8938 // specified. 8939 MidValueColor *Color `json:"midValueColor,omitempty"` 8940 8941 // MinValueColor: The background color for cells with a color value less 8942 // than or equal to 8943 // minValue. Defaults to #dc3912 if not 8944 // specified. 8945 MinValueColor *Color `json:"minValueColor,omitempty"` 8946 8947 // NoDataColor: The background color for cells that have no color data 8948 // associated with 8949 // them. Defaults to #000000 if not specified. 8950 NoDataColor *Color `json:"noDataColor,omitempty"` 8951 8952 // ForceSendFields is a list of field names (e.g. "MaxValueColor") to 8953 // unconditionally include in API requests. By default, fields with 8954 // empty values are omitted from API requests. However, any non-pointer, 8955 // non-interface field appearing in ForceSendFields will be sent to the 8956 // server regardless of whether the field is empty or not. This may be 8957 // used to include empty fields in Patch requests. 8958 ForceSendFields []string `json:"-"` 8959 8960 // NullFields is a list of field names (e.g. "MaxValueColor") to include 8961 // in API requests with the JSON null value. By default, fields with 8962 // empty values are omitted from API requests. However, any field with 8963 // an empty value appearing in NullFields will be sent to the server as 8964 // null. It is an error if a field in this list has a non-empty value. 8965 // This may be used to include null fields in Patch requests. 8966 NullFields []string `json:"-"` 8967} 8968 8969func (s *TreemapChartColorScale) MarshalJSON() ([]byte, error) { 8970 type NoMethod TreemapChartColorScale 8971 raw := NoMethod(*s) 8972 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8973} 8974 8975// TreemapChartSpec: A <a 8976// href="/chart/interactive/docs/gallery/treemap">Treemap chart</a>. 8977type TreemapChartSpec struct { 8978 // ColorData: The data that determines the background color of each 8979 // treemap data cell. 8980 // This field is optional. If not specified, size_data is used 8981 // to 8982 // determine background colors. If specified, the data is expected to 8983 // be 8984 // numeric. color_scale will determine how the values in this data map 8985 // to 8986 // data cell background colors. 8987 ColorData *ChartData `json:"colorData,omitempty"` 8988 8989 // ColorScale: The color scale for data cells in the treemap chart. Data 8990 // cells are 8991 // assigned colors based on their color values. These color values come 8992 // from 8993 // color_data, or from size_data if color_data is not specified. 8994 // Cells with color values less than or equal to min_value will 8995 // have minValueColor as their 8996 // background color. Cells with color values greater than or equal 8997 // to 8998 // max_value will have 8999 // maxValueColor as their background 9000 // color. Cells with color values between min_value and max_value 9001 // will 9002 // have background colors on a gradient between 9003 // minValueColor and 9004 // maxValueColor, the midpoint of 9005 // the gradient being midValueColor. 9006 // Cells with missing or non-numeric color values will have 9007 // noDataColor as their background 9008 // color. 9009 ColorScale *TreemapChartColorScale `json:"colorScale,omitempty"` 9010 9011 // HeaderColor: The background color for header cells. 9012 HeaderColor *Color `json:"headerColor,omitempty"` 9013 9014 // HideTooltips: True to hide tooltips. 9015 HideTooltips bool `json:"hideTooltips,omitempty"` 9016 9017 // HintedLevels: The number of additional data levels beyond the labeled 9018 // levels to be shown 9019 // on the treemap chart. These levels are not interactive and are 9020 // shown 9021 // without their labels. Defaults to 0 if not specified. 9022 HintedLevels int64 `json:"hintedLevels,omitempty"` 9023 9024 // Labels: The data that contains the treemap cell labels. 9025 Labels *ChartData `json:"labels,omitempty"` 9026 9027 // Levels: The number of data levels to show on the treemap chart. These 9028 // levels are 9029 // interactive and are shown with their labels. Defaults to 2 if 9030 // not 9031 // specified. 9032 Levels int64 `json:"levels,omitempty"` 9033 9034 // MaxValue: The maximum possible data value. Cells with values greater 9035 // than this will 9036 // have the same color as cells with this value. If not specified, 9037 // defaults 9038 // to the actual maximum value from color_data, or the maximum value 9039 // from 9040 // size_data if color_data is not specified. 9041 MaxValue float64 `json:"maxValue,omitempty"` 9042 9043 // MinValue: The minimum possible data value. Cells with values less 9044 // than this will 9045 // have the same color as cells with this value. If not specified, 9046 // defaults 9047 // to the actual minimum value from color_data, or the minimum value 9048 // from 9049 // size_data if color_data is not specified. 9050 MinValue float64 `json:"minValue,omitempty"` 9051 9052 // ParentLabels: The data the contains the treemap cells' parent labels. 9053 ParentLabels *ChartData `json:"parentLabels,omitempty"` 9054 9055 // SizeData: The data that determines the size of each treemap data 9056 // cell. This data is 9057 // expected to be numeric. The cells corresponding to non-numeric or 9058 // missing 9059 // data will not be rendered. If color_data is not specified, this 9060 // data 9061 // is used to determine data cell background colors as well. 9062 SizeData *ChartData `json:"sizeData,omitempty"` 9063 9064 // TextFormat: The text format for all labels on the chart. 9065 TextFormat *TextFormat `json:"textFormat,omitempty"` 9066 9067 // ForceSendFields is a list of field names (e.g. "ColorData") to 9068 // unconditionally include in API requests. By default, fields with 9069 // empty values are omitted from API requests. However, any non-pointer, 9070 // non-interface field appearing in ForceSendFields will be sent to the 9071 // server regardless of whether the field is empty or not. This may be 9072 // used to include empty fields in Patch requests. 9073 ForceSendFields []string `json:"-"` 9074 9075 // NullFields is a list of field names (e.g. "ColorData") to include in 9076 // API requests with the JSON null value. By default, fields with empty 9077 // values are omitted from API requests. However, any field with an 9078 // empty value appearing in NullFields will be sent to the server as 9079 // null. It is an error if a field in this list has a non-empty value. 9080 // This may be used to include null fields in Patch requests. 9081 NullFields []string `json:"-"` 9082} 9083 9084func (s *TreemapChartSpec) MarshalJSON() ([]byte, error) { 9085 type NoMethod TreemapChartSpec 9086 raw := NoMethod(*s) 9087 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9088} 9089 9090func (s *TreemapChartSpec) UnmarshalJSON(data []byte) error { 9091 type NoMethod TreemapChartSpec 9092 var s1 struct { 9093 MaxValue gensupport.JSONFloat64 `json:"maxValue"` 9094 MinValue gensupport.JSONFloat64 `json:"minValue"` 9095 *NoMethod 9096 } 9097 s1.NoMethod = (*NoMethod)(s) 9098 if err := json.Unmarshal(data, &s1); err != nil { 9099 return err 9100 } 9101 s.MaxValue = float64(s1.MaxValue) 9102 s.MinValue = float64(s1.MinValue) 9103 return nil 9104} 9105 9106// TrimWhitespaceRequest: Trims the whitespace (such as spaces, tabs, or 9107// new lines) in every cell in 9108// the specified range. This request removes all whitespace from the 9109// start and 9110// end of each cell's text, and reduces any subsequence of remaining 9111// whitespace 9112// characters to a single space. If the resulting trimmed text starts 9113// with a '+' 9114// or '=' character, the text remains as a string value and isn't 9115// interpreted 9116// as a formula. 9117type TrimWhitespaceRequest struct { 9118 // Range: The range whose cells to trim. 9119 Range *GridRange `json:"range,omitempty"` 9120 9121 // ForceSendFields is a list of field names (e.g. "Range") to 9122 // unconditionally include in API requests. By default, fields with 9123 // empty values are omitted from API requests. However, any non-pointer, 9124 // non-interface field appearing in ForceSendFields will be sent to the 9125 // server regardless of whether the field is empty or not. This may be 9126 // used to include empty fields in Patch requests. 9127 ForceSendFields []string `json:"-"` 9128 9129 // NullFields is a list of field names (e.g. "Range") to include in API 9130 // requests with the JSON null value. By default, fields with empty 9131 // values are omitted from API requests. However, any field with an 9132 // empty value appearing in NullFields will be sent to the server as 9133 // null. It is an error if a field in this list has a non-empty value. 9134 // This may be used to include null fields in Patch requests. 9135 NullFields []string `json:"-"` 9136} 9137 9138func (s *TrimWhitespaceRequest) MarshalJSON() ([]byte, error) { 9139 type NoMethod TrimWhitespaceRequest 9140 raw := NoMethod(*s) 9141 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9142} 9143 9144// TrimWhitespaceResponse: The result of trimming whitespace in cells. 9145type TrimWhitespaceResponse struct { 9146 // CellsChangedCount: The number of cells that were trimmed of 9147 // whitespace. 9148 CellsChangedCount int64 `json:"cellsChangedCount,omitempty"` 9149 9150 // ForceSendFields is a list of field names (e.g. "CellsChangedCount") 9151 // to unconditionally include in API requests. By default, fields with 9152 // empty values are omitted from API requests. However, any non-pointer, 9153 // non-interface field appearing in ForceSendFields will be sent to the 9154 // server regardless of whether the field is empty or not. This may be 9155 // used to include empty fields in Patch requests. 9156 ForceSendFields []string `json:"-"` 9157 9158 // NullFields is a list of field names (e.g. "CellsChangedCount") to 9159 // include in API requests with the JSON null value. By default, fields 9160 // with empty values are omitted from API requests. However, any field 9161 // with an empty value appearing in NullFields will be sent to the 9162 // server as null. It is an error if a field in this list has a 9163 // non-empty value. This may be used to include null fields in Patch 9164 // requests. 9165 NullFields []string `json:"-"` 9166} 9167 9168func (s *TrimWhitespaceResponse) MarshalJSON() ([]byte, error) { 9169 type NoMethod TrimWhitespaceResponse 9170 raw := NoMethod(*s) 9171 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9172} 9173 9174// UnmergeCellsRequest: Unmerges cells in the given range. 9175type UnmergeCellsRequest struct { 9176 // Range: The range within which all cells should be unmerged. 9177 // If the range spans multiple merges, all will be unmerged. 9178 // The range must not partially span any merge. 9179 Range *GridRange `json:"range,omitempty"` 9180 9181 // ForceSendFields is a list of field names (e.g. "Range") to 9182 // unconditionally include in API requests. By default, fields with 9183 // empty values are omitted from API requests. However, any non-pointer, 9184 // non-interface field appearing in ForceSendFields will be sent to the 9185 // server regardless of whether the field is empty or not. This may be 9186 // used to include empty fields in Patch requests. 9187 ForceSendFields []string `json:"-"` 9188 9189 // NullFields is a list of field names (e.g. "Range") to include in API 9190 // requests with the JSON null value. By default, fields with empty 9191 // values are omitted from API requests. However, any field with an 9192 // empty value appearing in NullFields will be sent to the server as 9193 // null. It is an error if a field in this list has a non-empty value. 9194 // This may be used to include null fields in Patch requests. 9195 NullFields []string `json:"-"` 9196} 9197 9198func (s *UnmergeCellsRequest) MarshalJSON() ([]byte, error) { 9199 type NoMethod UnmergeCellsRequest 9200 raw := NoMethod(*s) 9201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9202} 9203 9204// UpdateBandingRequest: Updates properties of the supplied banded 9205// range. 9206type UpdateBandingRequest struct { 9207 // BandedRange: The banded range to update with the new properties. 9208 BandedRange *BandedRange `json:"bandedRange,omitempty"` 9209 9210 // Fields: The fields that should be updated. At least one field must 9211 // be specified. 9212 // The root `bandedRange` is implied and should not be specified. 9213 // A single "*" can be used as short-hand for listing every field. 9214 Fields string `json:"fields,omitempty"` 9215 9216 // ForceSendFields is a list of field names (e.g. "BandedRange") to 9217 // unconditionally include in API requests. By default, fields with 9218 // empty values are omitted from API requests. However, any non-pointer, 9219 // non-interface field appearing in ForceSendFields will be sent to the 9220 // server regardless of whether the field is empty or not. This may be 9221 // used to include empty fields in Patch requests. 9222 ForceSendFields []string `json:"-"` 9223 9224 // NullFields is a list of field names (e.g. "BandedRange") to include 9225 // in API requests with the JSON null value. By default, fields with 9226 // empty values are omitted from API requests. However, any field with 9227 // an empty value appearing in NullFields will be sent to the server as 9228 // null. It is an error if a field in this list has a non-empty value. 9229 // This may be used to include null fields in Patch requests. 9230 NullFields []string `json:"-"` 9231} 9232 9233func (s *UpdateBandingRequest) MarshalJSON() ([]byte, error) { 9234 type NoMethod UpdateBandingRequest 9235 raw := NoMethod(*s) 9236 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9237} 9238 9239// UpdateBordersRequest: Updates the borders of a range. 9240// If a field is not set in the request, that means the border remains 9241// as-is. 9242// For example, with two subsequent UpdateBordersRequest: 9243// 9244// 1. range: A1:A5 `{ top: RED, bottom: WHITE }` 9245// 2. range: A1:A5 `{ left: BLUE }` 9246// 9247// That would result in A1:A5 having a borders of 9248// `{ top: RED, bottom: WHITE, left: BLUE }`. 9249// If you want to clear a border, explicitly set the style to 9250// NONE. 9251type UpdateBordersRequest struct { 9252 // Bottom: The border to put at the bottom of the range. 9253 Bottom *Border `json:"bottom,omitempty"` 9254 9255 // InnerHorizontal: The horizontal border to put within the range. 9256 InnerHorizontal *Border `json:"innerHorizontal,omitempty"` 9257 9258 // InnerVertical: The vertical border to put within the range. 9259 InnerVertical *Border `json:"innerVertical,omitempty"` 9260 9261 // Left: The border to put at the left of the range. 9262 Left *Border `json:"left,omitempty"` 9263 9264 // Range: The range whose borders should be updated. 9265 Range *GridRange `json:"range,omitempty"` 9266 9267 // Right: The border to put at the right of the range. 9268 Right *Border `json:"right,omitempty"` 9269 9270 // Top: The border to put at the top of the range. 9271 Top *Border `json:"top,omitempty"` 9272 9273 // ForceSendFields is a list of field names (e.g. "Bottom") to 9274 // unconditionally include in API requests. By default, fields with 9275 // empty values are omitted from API requests. However, any non-pointer, 9276 // non-interface field appearing in ForceSendFields will be sent to the 9277 // server regardless of whether the field is empty or not. This may be 9278 // used to include empty fields in Patch requests. 9279 ForceSendFields []string `json:"-"` 9280 9281 // NullFields is a list of field names (e.g. "Bottom") to include in API 9282 // requests with the JSON null value. By default, fields with empty 9283 // values are omitted from API requests. However, any field with an 9284 // empty value appearing in NullFields will be sent to the server as 9285 // null. It is an error if a field in this list has a non-empty value. 9286 // This may be used to include null fields in Patch requests. 9287 NullFields []string `json:"-"` 9288} 9289 9290func (s *UpdateBordersRequest) MarshalJSON() ([]byte, error) { 9291 type NoMethod UpdateBordersRequest 9292 raw := NoMethod(*s) 9293 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9294} 9295 9296// UpdateCellsRequest: Updates all cells in a range with new data. 9297type UpdateCellsRequest struct { 9298 // Fields: The fields of CellData that should be updated. 9299 // At least one field must be specified. 9300 // The root is the CellData; 'row.values.' should not be specified. 9301 // A single "*" can be used as short-hand for listing every field. 9302 Fields string `json:"fields,omitempty"` 9303 9304 // Range: The range to write data to. 9305 // 9306 // If the data in rows does not cover the entire requested range, 9307 // the fields matching those set in fields will be cleared. 9308 Range *GridRange `json:"range,omitempty"` 9309 9310 // Rows: The data to write. 9311 Rows []*RowData `json:"rows,omitempty"` 9312 9313 // Start: The coordinate to start writing data at. 9314 // Any number of rows and columns (including a different number 9315 // of 9316 // columns per row) may be written. 9317 Start *GridCoordinate `json:"start,omitempty"` 9318 9319 // ForceSendFields is a list of field names (e.g. "Fields") to 9320 // unconditionally include in API requests. By default, fields with 9321 // empty values are omitted from API requests. However, any non-pointer, 9322 // non-interface field appearing in ForceSendFields will be sent to the 9323 // server regardless of whether the field is empty or not. This may be 9324 // used to include empty fields in Patch requests. 9325 ForceSendFields []string `json:"-"` 9326 9327 // NullFields is a list of field names (e.g. "Fields") to include in API 9328 // requests with the JSON null value. By default, fields with empty 9329 // values are omitted from API requests. However, any field with an 9330 // empty value appearing in NullFields will be sent to the server as 9331 // null. It is an error if a field in this list has a non-empty value. 9332 // This may be used to include null fields in Patch requests. 9333 NullFields []string `json:"-"` 9334} 9335 9336func (s *UpdateCellsRequest) MarshalJSON() ([]byte, error) { 9337 type NoMethod UpdateCellsRequest 9338 raw := NoMethod(*s) 9339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9340} 9341 9342// UpdateChartSpecRequest: Updates a chart's specifications. 9343// (This does not move or resize a chart. To move or resize a chart, 9344// use 9345// UpdateEmbeddedObjectPositionRequest.) 9346type UpdateChartSpecRequest struct { 9347 // ChartId: The ID of the chart to update. 9348 ChartId int64 `json:"chartId,omitempty"` 9349 9350 // Spec: The specification to apply to the chart. 9351 Spec *ChartSpec `json:"spec,omitempty"` 9352 9353 // ForceSendFields is a list of field names (e.g. "ChartId") to 9354 // unconditionally include in API requests. By default, fields with 9355 // empty values are omitted from API requests. However, any non-pointer, 9356 // non-interface field appearing in ForceSendFields will be sent to the 9357 // server regardless of whether the field is empty or not. This may be 9358 // used to include empty fields in Patch requests. 9359 ForceSendFields []string `json:"-"` 9360 9361 // NullFields is a list of field names (e.g. "ChartId") to include in 9362 // API requests with the JSON null value. By default, fields with empty 9363 // values are omitted from API requests. However, any field with an 9364 // empty value appearing in NullFields will be sent to the server as 9365 // null. It is an error if a field in this list has a non-empty value. 9366 // This may be used to include null fields in Patch requests. 9367 NullFields []string `json:"-"` 9368} 9369 9370func (s *UpdateChartSpecRequest) MarshalJSON() ([]byte, error) { 9371 type NoMethod UpdateChartSpecRequest 9372 raw := NoMethod(*s) 9373 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9374} 9375 9376// UpdateConditionalFormatRuleRequest: Updates a conditional format rule 9377// at the given index, 9378// or moves a conditional format rule to another index. 9379type UpdateConditionalFormatRuleRequest struct { 9380 // Index: The zero-based index of the rule that should be replaced or 9381 // moved. 9382 Index int64 `json:"index,omitempty"` 9383 9384 // NewIndex: The zero-based new index the rule should end up at. 9385 NewIndex int64 `json:"newIndex,omitempty"` 9386 9387 // Rule: The rule that should replace the rule at the given index. 9388 Rule *ConditionalFormatRule `json:"rule,omitempty"` 9389 9390 // SheetId: The sheet of the rule to move. Required if new_index is 9391 // set, 9392 // unused otherwise. 9393 SheetId int64 `json:"sheetId,omitempty"` 9394 9395 // ForceSendFields is a list of field names (e.g. "Index") to 9396 // unconditionally include in API requests. By default, fields with 9397 // empty values are omitted from API requests. However, any non-pointer, 9398 // non-interface field appearing in ForceSendFields will be sent to the 9399 // server regardless of whether the field is empty or not. This may be 9400 // used to include empty fields in Patch requests. 9401 ForceSendFields []string `json:"-"` 9402 9403 // NullFields is a list of field names (e.g. "Index") to include in API 9404 // requests with the JSON null value. By default, fields with empty 9405 // values are omitted from API requests. However, any field with an 9406 // empty value appearing in NullFields will be sent to the server as 9407 // null. It is an error if a field in this list has a non-empty value. 9408 // This may be used to include null fields in Patch requests. 9409 NullFields []string `json:"-"` 9410} 9411 9412func (s *UpdateConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 9413 type NoMethod UpdateConditionalFormatRuleRequest 9414 raw := NoMethod(*s) 9415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9416} 9417 9418// UpdateConditionalFormatRuleResponse: The result of updating a 9419// conditional format rule. 9420type UpdateConditionalFormatRuleResponse struct { 9421 // NewIndex: The index of the new rule. 9422 NewIndex int64 `json:"newIndex,omitempty"` 9423 9424 // NewRule: The new rule that replaced the old rule (if replacing), 9425 // or the rule that was moved (if moved) 9426 NewRule *ConditionalFormatRule `json:"newRule,omitempty"` 9427 9428 // OldIndex: The old index of the rule. Not set if a rule was 9429 // replaced 9430 // (because it is the same as new_index). 9431 OldIndex int64 `json:"oldIndex,omitempty"` 9432 9433 // OldRule: The old (deleted) rule. Not set if a rule was moved 9434 // (because it is the same as new_rule). 9435 OldRule *ConditionalFormatRule `json:"oldRule,omitempty"` 9436 9437 // ForceSendFields is a list of field names (e.g. "NewIndex") to 9438 // unconditionally include in API requests. By default, fields with 9439 // empty values are omitted from API requests. However, any non-pointer, 9440 // non-interface field appearing in ForceSendFields will be sent to the 9441 // server regardless of whether the field is empty or not. This may be 9442 // used to include empty fields in Patch requests. 9443 ForceSendFields []string `json:"-"` 9444 9445 // NullFields is a list of field names (e.g. "NewIndex") to include in 9446 // API requests with the JSON null value. By default, fields with empty 9447 // values are omitted from API requests. However, any field with an 9448 // empty value appearing in NullFields will be sent to the server as 9449 // null. It is an error if a field in this list has a non-empty value. 9450 // This may be used to include null fields in Patch requests. 9451 NullFields []string `json:"-"` 9452} 9453 9454func (s *UpdateConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 9455 type NoMethod UpdateConditionalFormatRuleResponse 9456 raw := NoMethod(*s) 9457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9458} 9459 9460// UpdateDeveloperMetadataRequest: A request to update properties of 9461// developer metadata. 9462// Updates the properties of the developer metadata selected by the 9463// filters to 9464// the values provided in the DeveloperMetadata resource. Callers 9465// must 9466// specify the properties they wish to update in the fields parameter, 9467// as well 9468// as specify at least one DataFilter matching the metadata they wish 9469// to 9470// update. 9471type UpdateDeveloperMetadataRequest struct { 9472 // DataFilters: The filters matching the developer metadata entries to 9473 // update. 9474 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 9475 9476 // DeveloperMetadata: The value that all metadata matched by the data 9477 // filters will be updated to. 9478 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 9479 9480 // Fields: The fields that should be updated. At least one field must 9481 // be specified. 9482 // The root `developerMetadata` is implied and should not be 9483 // specified. 9484 // A single "*" can be used as short-hand for listing every field. 9485 Fields string `json:"fields,omitempty"` 9486 9487 // ForceSendFields is a list of field names (e.g. "DataFilters") to 9488 // unconditionally include in API requests. By default, fields with 9489 // empty values are omitted from API requests. However, any non-pointer, 9490 // non-interface field appearing in ForceSendFields will be sent to the 9491 // server regardless of whether the field is empty or not. This may be 9492 // used to include empty fields in Patch requests. 9493 ForceSendFields []string `json:"-"` 9494 9495 // NullFields is a list of field names (e.g. "DataFilters") to include 9496 // in API requests with the JSON null value. By default, fields with 9497 // empty values are omitted from API requests. However, any field with 9498 // an empty value appearing in NullFields will be sent to the server as 9499 // null. It is an error if a field in this list has a non-empty value. 9500 // This may be used to include null fields in Patch requests. 9501 NullFields []string `json:"-"` 9502} 9503 9504func (s *UpdateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 9505 type NoMethod UpdateDeveloperMetadataRequest 9506 raw := NoMethod(*s) 9507 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9508} 9509 9510// UpdateDeveloperMetadataResponse: The response from updating developer 9511// metadata. 9512type UpdateDeveloperMetadataResponse struct { 9513 // DeveloperMetadata: The updated developer metadata. 9514 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 9515 9516 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 9517 // to unconditionally include in API requests. By default, fields with 9518 // empty values are omitted from API requests. However, any non-pointer, 9519 // non-interface field appearing in ForceSendFields will be sent to the 9520 // server regardless of whether the field is empty or not. This may be 9521 // used to include empty fields in Patch requests. 9522 ForceSendFields []string `json:"-"` 9523 9524 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 9525 // include in API requests with the JSON null value. By default, fields 9526 // with empty values are omitted from API requests. However, any field 9527 // with an empty value appearing in NullFields will be sent to the 9528 // server as null. It is an error if a field in this list has a 9529 // non-empty value. This may be used to include null fields in Patch 9530 // requests. 9531 NullFields []string `json:"-"` 9532} 9533 9534func (s *UpdateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 9535 type NoMethod UpdateDeveloperMetadataResponse 9536 raw := NoMethod(*s) 9537 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9538} 9539 9540// UpdateDimensionGroupRequest: Updates the state of the specified 9541// group. 9542type UpdateDimensionGroupRequest struct { 9543 // DimensionGroup: The group whose state should be updated. The range 9544 // and depth of the group 9545 // should specify a valid group on the sheet, and all other fields 9546 // updated. 9547 DimensionGroup *DimensionGroup `json:"dimensionGroup,omitempty"` 9548 9549 // Fields: The fields that should be updated. At least one field must 9550 // be specified. 9551 // The root `dimensionGroup` is implied and should not be specified. 9552 // A single "*" can be used as short-hand for listing every field. 9553 Fields string `json:"fields,omitempty"` 9554 9555 // ForceSendFields is a list of field names (e.g. "DimensionGroup") to 9556 // unconditionally include in API requests. By default, fields with 9557 // empty values are omitted from API requests. However, any non-pointer, 9558 // non-interface field appearing in ForceSendFields will be sent to the 9559 // server regardless of whether the field is empty or not. This may be 9560 // used to include empty fields in Patch requests. 9561 ForceSendFields []string `json:"-"` 9562 9563 // NullFields is a list of field names (e.g. "DimensionGroup") to 9564 // include in API requests with the JSON null value. By default, fields 9565 // with empty values are omitted from API requests. However, any field 9566 // with an empty value appearing in NullFields will be sent to the 9567 // server as null. It is an error if a field in this list has a 9568 // non-empty value. This may be used to include null fields in Patch 9569 // requests. 9570 NullFields []string `json:"-"` 9571} 9572 9573func (s *UpdateDimensionGroupRequest) MarshalJSON() ([]byte, error) { 9574 type NoMethod UpdateDimensionGroupRequest 9575 raw := NoMethod(*s) 9576 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9577} 9578 9579// UpdateDimensionPropertiesRequest: Updates properties of dimensions 9580// within the specified range. 9581type UpdateDimensionPropertiesRequest struct { 9582 // Fields: The fields that should be updated. At least one field must 9583 // be specified. 9584 // The root `properties` is implied and should not be specified. 9585 // A single "*" can be used as short-hand for listing every field. 9586 Fields string `json:"fields,omitempty"` 9587 9588 // Properties: Properties to update. 9589 Properties *DimensionProperties `json:"properties,omitempty"` 9590 9591 // Range: The rows or columns to update. 9592 Range *DimensionRange `json:"range,omitempty"` 9593 9594 // ForceSendFields is a list of field names (e.g. "Fields") to 9595 // unconditionally include in API requests. By default, fields with 9596 // empty values are omitted from API requests. However, any non-pointer, 9597 // non-interface field appearing in ForceSendFields will be sent to the 9598 // server regardless of whether the field is empty or not. This may be 9599 // used to include empty fields in Patch requests. 9600 ForceSendFields []string `json:"-"` 9601 9602 // NullFields is a list of field names (e.g. "Fields") to include in API 9603 // requests with the JSON null value. By default, fields with empty 9604 // values are omitted from API requests. However, any field with an 9605 // empty value appearing in NullFields will be sent to the server as 9606 // null. It is an error if a field in this list has a non-empty value. 9607 // This may be used to include null fields in Patch requests. 9608 NullFields []string `json:"-"` 9609} 9610 9611func (s *UpdateDimensionPropertiesRequest) MarshalJSON() ([]byte, error) { 9612 type NoMethod UpdateDimensionPropertiesRequest 9613 raw := NoMethod(*s) 9614 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9615} 9616 9617// UpdateEmbeddedObjectPositionRequest: Update an embedded object's 9618// position (such as a moving or resizing a 9619// chart or image). 9620type UpdateEmbeddedObjectPositionRequest struct { 9621 // Fields: The fields of OverlayPosition 9622 // that should be updated when setting a new position. Used only 9623 // if 9624 // newPosition.overlayPosition 9625 // is set, in which case at least one field must 9626 // be specified. The root `newPosition.overlayPosition` is implied 9627 // and 9628 // should not be specified. 9629 // A single "*" can be used as short-hand for listing every field. 9630 Fields string `json:"fields,omitempty"` 9631 9632 // NewPosition: An explicit position to move the embedded object to. 9633 // If newPosition.sheetId is set, 9634 // a new sheet with that ID will be created. 9635 // If newPosition.newSheet is set to true, 9636 // a new sheet will be created with an ID that will be chosen for you. 9637 NewPosition *EmbeddedObjectPosition `json:"newPosition,omitempty"` 9638 9639 // ObjectId: The ID of the object to moved. 9640 ObjectId int64 `json:"objectId,omitempty"` 9641 9642 // ForceSendFields is a list of field names (e.g. "Fields") to 9643 // unconditionally include in API requests. By default, fields with 9644 // empty values are omitted from API requests. However, any non-pointer, 9645 // non-interface field appearing in ForceSendFields will be sent to the 9646 // server regardless of whether the field is empty or not. This may be 9647 // used to include empty fields in Patch requests. 9648 ForceSendFields []string `json:"-"` 9649 9650 // NullFields is a list of field names (e.g. "Fields") to include in API 9651 // requests with the JSON null value. By default, fields with empty 9652 // values are omitted from API requests. However, any field with an 9653 // empty value appearing in NullFields will be sent to the server as 9654 // null. It is an error if a field in this list has a non-empty value. 9655 // This may be used to include null fields in Patch requests. 9656 NullFields []string `json:"-"` 9657} 9658 9659func (s *UpdateEmbeddedObjectPositionRequest) MarshalJSON() ([]byte, error) { 9660 type NoMethod UpdateEmbeddedObjectPositionRequest 9661 raw := NoMethod(*s) 9662 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9663} 9664 9665// UpdateEmbeddedObjectPositionResponse: The result of updating an 9666// embedded object's position. 9667type UpdateEmbeddedObjectPositionResponse struct { 9668 // Position: The new position of the embedded object. 9669 Position *EmbeddedObjectPosition `json:"position,omitempty"` 9670 9671 // ForceSendFields is a list of field names (e.g. "Position") to 9672 // unconditionally include in API requests. By default, fields with 9673 // empty values are omitted from API requests. However, any non-pointer, 9674 // non-interface field appearing in ForceSendFields will be sent to the 9675 // server regardless of whether the field is empty or not. This may be 9676 // used to include empty fields in Patch requests. 9677 ForceSendFields []string `json:"-"` 9678 9679 // NullFields is a list of field names (e.g. "Position") to include in 9680 // API requests with the JSON null value. By default, fields with empty 9681 // values are omitted from API requests. However, any field with an 9682 // empty value appearing in NullFields will be sent to the server as 9683 // null. It is an error if a field in this list has a non-empty value. 9684 // This may be used to include null fields in Patch requests. 9685 NullFields []string `json:"-"` 9686} 9687 9688func (s *UpdateEmbeddedObjectPositionResponse) MarshalJSON() ([]byte, error) { 9689 type NoMethod UpdateEmbeddedObjectPositionResponse 9690 raw := NoMethod(*s) 9691 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9692} 9693 9694// UpdateFilterViewRequest: Updates properties of the filter view. 9695type UpdateFilterViewRequest struct { 9696 // Fields: The fields that should be updated. At least one field must 9697 // be specified. 9698 // The root `filter` is implied and should not be specified. 9699 // A single "*" can be used as short-hand for listing every field. 9700 Fields string `json:"fields,omitempty"` 9701 9702 // Filter: The new properties of the filter view. 9703 Filter *FilterView `json:"filter,omitempty"` 9704 9705 // ForceSendFields is a list of field names (e.g. "Fields") to 9706 // unconditionally include in API requests. By default, fields with 9707 // empty values are omitted from API requests. However, any non-pointer, 9708 // non-interface field appearing in ForceSendFields will be sent to the 9709 // server regardless of whether the field is empty or not. This may be 9710 // used to include empty fields in Patch requests. 9711 ForceSendFields []string `json:"-"` 9712 9713 // NullFields is a list of field names (e.g. "Fields") to include in API 9714 // requests with the JSON null value. By default, fields with empty 9715 // values are omitted from API requests. However, any field with an 9716 // empty value appearing in NullFields will be sent to the server as 9717 // null. It is an error if a field in this list has a non-empty value. 9718 // This may be used to include null fields in Patch requests. 9719 NullFields []string `json:"-"` 9720} 9721 9722func (s *UpdateFilterViewRequest) MarshalJSON() ([]byte, error) { 9723 type NoMethod UpdateFilterViewRequest 9724 raw := NoMethod(*s) 9725 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9726} 9727 9728// UpdateNamedRangeRequest: Updates properties of the named range with 9729// the specified 9730// namedRangeId. 9731type UpdateNamedRangeRequest struct { 9732 // Fields: The fields that should be updated. At least one field must 9733 // be specified. 9734 // The root `namedRange` is implied and should not be specified. 9735 // A single "*" can be used as short-hand for listing every field. 9736 Fields string `json:"fields,omitempty"` 9737 9738 // NamedRange: The named range to update with the new properties. 9739 NamedRange *NamedRange `json:"namedRange,omitempty"` 9740 9741 // ForceSendFields is a list of field names (e.g. "Fields") to 9742 // unconditionally include in API requests. By default, fields with 9743 // empty values are omitted from API requests. However, any non-pointer, 9744 // non-interface field appearing in ForceSendFields will be sent to the 9745 // server regardless of whether the field is empty or not. This may be 9746 // used to include empty fields in Patch requests. 9747 ForceSendFields []string `json:"-"` 9748 9749 // NullFields is a list of field names (e.g. "Fields") to include in API 9750 // requests with the JSON null value. By default, fields with empty 9751 // values are omitted from API requests. However, any field with an 9752 // empty value appearing in NullFields will be sent to the server as 9753 // null. It is an error if a field in this list has a non-empty value. 9754 // This may be used to include null fields in Patch requests. 9755 NullFields []string `json:"-"` 9756} 9757 9758func (s *UpdateNamedRangeRequest) MarshalJSON() ([]byte, error) { 9759 type NoMethod UpdateNamedRangeRequest 9760 raw := NoMethod(*s) 9761 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9762} 9763 9764// UpdateProtectedRangeRequest: Updates an existing protected range with 9765// the specified 9766// protectedRangeId. 9767type UpdateProtectedRangeRequest struct { 9768 // Fields: The fields that should be updated. At least one field must 9769 // be specified. 9770 // The root `protectedRange` is implied and should not be specified. 9771 // A single "*" can be used as short-hand for listing every field. 9772 Fields string `json:"fields,omitempty"` 9773 9774 // ProtectedRange: The protected range to update with the new 9775 // properties. 9776 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 9777 9778 // ForceSendFields is a list of field names (e.g. "Fields") to 9779 // unconditionally include in API requests. By default, fields with 9780 // empty values are omitted from API requests. However, any non-pointer, 9781 // non-interface field appearing in ForceSendFields will be sent to the 9782 // server regardless of whether the field is empty or not. This may be 9783 // used to include empty fields in Patch requests. 9784 ForceSendFields []string `json:"-"` 9785 9786 // NullFields is a list of field names (e.g. "Fields") to include in API 9787 // requests with the JSON null value. By default, fields with empty 9788 // values are omitted from API requests. However, any field with an 9789 // empty value appearing in NullFields will be sent to the server as 9790 // null. It is an error if a field in this list has a non-empty value. 9791 // This may be used to include null fields in Patch requests. 9792 NullFields []string `json:"-"` 9793} 9794 9795func (s *UpdateProtectedRangeRequest) MarshalJSON() ([]byte, error) { 9796 type NoMethod UpdateProtectedRangeRequest 9797 raw := NoMethod(*s) 9798 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9799} 9800 9801// UpdateSheetPropertiesRequest: Updates properties of the sheet with 9802// the specified 9803// sheetId. 9804type UpdateSheetPropertiesRequest struct { 9805 // Fields: The fields that should be updated. At least one field must 9806 // be specified. 9807 // The root `properties` is implied and should not be specified. 9808 // A single "*" can be used as short-hand for listing every field. 9809 Fields string `json:"fields,omitempty"` 9810 9811 // Properties: The properties to update. 9812 Properties *SheetProperties `json:"properties,omitempty"` 9813 9814 // ForceSendFields is a list of field names (e.g. "Fields") to 9815 // unconditionally include in API requests. By default, fields with 9816 // empty values are omitted from API requests. However, any non-pointer, 9817 // non-interface field appearing in ForceSendFields will be sent to the 9818 // server regardless of whether the field is empty or not. This may be 9819 // used to include empty fields in Patch requests. 9820 ForceSendFields []string `json:"-"` 9821 9822 // NullFields is a list of field names (e.g. "Fields") to include in API 9823 // requests with the JSON null value. By default, fields with empty 9824 // values are omitted from API requests. However, any field with an 9825 // empty value appearing in NullFields will be sent to the server as 9826 // null. It is an error if a field in this list has a non-empty value. 9827 // This may be used to include null fields in Patch requests. 9828 NullFields []string `json:"-"` 9829} 9830 9831func (s *UpdateSheetPropertiesRequest) MarshalJSON() ([]byte, error) { 9832 type NoMethod UpdateSheetPropertiesRequest 9833 raw := NoMethod(*s) 9834 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9835} 9836 9837// UpdateSlicerSpecRequest: Updates a slicer’s specifications. 9838// (This does not move or resize a slicer. To move or resize a slicer 9839// use 9840// UpdateEmbeddedObjectPositionRequest. 9841type UpdateSlicerSpecRequest struct { 9842 // Fields: The fields that should be updated. At least one field must 9843 // be specified. 9844 // The root `SlicerSpec` is implied and should not be specified. A 9845 // single "*" 9846 // can be used as short-hand for listing every field. 9847 Fields string `json:"fields,omitempty"` 9848 9849 // SlicerId: The id of the slicer to update. 9850 SlicerId int64 `json:"slicerId,omitempty"` 9851 9852 // Spec: The specification to apply to the slicer. 9853 Spec *SlicerSpec `json:"spec,omitempty"` 9854 9855 // ForceSendFields is a list of field names (e.g. "Fields") to 9856 // unconditionally include in API requests. By default, fields with 9857 // empty values are omitted from API requests. However, any non-pointer, 9858 // non-interface field appearing in ForceSendFields will be sent to the 9859 // server regardless of whether the field is empty or not. This may be 9860 // used to include empty fields in Patch requests. 9861 ForceSendFields []string `json:"-"` 9862 9863 // NullFields is a list of field names (e.g. "Fields") to include in API 9864 // requests with the JSON null value. By default, fields with empty 9865 // values are omitted from API requests. However, any field with an 9866 // empty value appearing in NullFields will be sent to the server as 9867 // null. It is an error if a field in this list has a non-empty value. 9868 // This may be used to include null fields in Patch requests. 9869 NullFields []string `json:"-"` 9870} 9871 9872func (s *UpdateSlicerSpecRequest) MarshalJSON() ([]byte, error) { 9873 type NoMethod UpdateSlicerSpecRequest 9874 raw := NoMethod(*s) 9875 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9876} 9877 9878// UpdateSpreadsheetPropertiesRequest: Updates properties of a 9879// spreadsheet. 9880type UpdateSpreadsheetPropertiesRequest struct { 9881 // Fields: The fields that should be updated. At least one field must 9882 // be specified. 9883 // The root 'properties' is implied and should not be specified. 9884 // A single "*" can be used as short-hand for listing every field. 9885 Fields string `json:"fields,omitempty"` 9886 9887 // Properties: The properties to update. 9888 Properties *SpreadsheetProperties `json:"properties,omitempty"` 9889 9890 // ForceSendFields is a list of field names (e.g. "Fields") to 9891 // unconditionally include in API requests. By default, fields with 9892 // empty values are omitted from API requests. However, any non-pointer, 9893 // non-interface field appearing in ForceSendFields will be sent to the 9894 // server regardless of whether the field is empty or not. This may be 9895 // used to include empty fields in Patch requests. 9896 ForceSendFields []string `json:"-"` 9897 9898 // NullFields is a list of field names (e.g. "Fields") to include in API 9899 // requests with the JSON null value. By default, fields with empty 9900 // values are omitted from API requests. However, any field with an 9901 // empty value appearing in NullFields will be sent to the server as 9902 // null. It is an error if a field in this list has a non-empty value. 9903 // This may be used to include null fields in Patch requests. 9904 NullFields []string `json:"-"` 9905} 9906 9907func (s *UpdateSpreadsheetPropertiesRequest) MarshalJSON() ([]byte, error) { 9908 type NoMethod UpdateSpreadsheetPropertiesRequest 9909 raw := NoMethod(*s) 9910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9911} 9912 9913// UpdateValuesByDataFilterResponse: The response when updating a range 9914// of values by a data filter in a 9915// spreadsheet. 9916type UpdateValuesByDataFilterResponse struct { 9917 // DataFilter: The data filter that selected the range that was updated. 9918 DataFilter *DataFilter `json:"dataFilter,omitempty"` 9919 9920 // UpdatedCells: The number of cells updated. 9921 UpdatedCells int64 `json:"updatedCells,omitempty"` 9922 9923 // UpdatedColumns: The number of columns where at least one cell in the 9924 // column was updated. 9925 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 9926 9927 // UpdatedData: The values of the cells in the range matched by the 9928 // dataFilter after all 9929 // updates were applied. This is only included if the 9930 // request's 9931 // `includeValuesInResponse` field was `true`. 9932 UpdatedData *ValueRange `json:"updatedData,omitempty"` 9933 9934 // UpdatedRange: The range (in A1 notation) that updates were applied 9935 // to. 9936 UpdatedRange string `json:"updatedRange,omitempty"` 9937 9938 // UpdatedRows: The number of rows where at least one cell in the row 9939 // was updated. 9940 UpdatedRows int64 `json:"updatedRows,omitempty"` 9941 9942 // ForceSendFields is a list of field names (e.g. "DataFilter") to 9943 // unconditionally include in API requests. By default, fields with 9944 // empty values are omitted from API requests. However, any non-pointer, 9945 // non-interface field appearing in ForceSendFields will be sent to the 9946 // server regardless of whether the field is empty or not. This may be 9947 // used to include empty fields in Patch requests. 9948 ForceSendFields []string `json:"-"` 9949 9950 // NullFields is a list of field names (e.g. "DataFilter") to include in 9951 // API requests with the JSON null value. By default, fields with empty 9952 // values are omitted from API requests. However, any field with an 9953 // empty value appearing in NullFields will be sent to the server as 9954 // null. It is an error if a field in this list has a non-empty value. 9955 // This may be used to include null fields in Patch requests. 9956 NullFields []string `json:"-"` 9957} 9958 9959func (s *UpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 9960 type NoMethod UpdateValuesByDataFilterResponse 9961 raw := NoMethod(*s) 9962 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9963} 9964 9965// UpdateValuesResponse: The response when updating a range of values in 9966// a spreadsheet. 9967type UpdateValuesResponse struct { 9968 // SpreadsheetId: The spreadsheet the updates were applied to. 9969 SpreadsheetId string `json:"spreadsheetId,omitempty"` 9970 9971 // UpdatedCells: The number of cells updated. 9972 UpdatedCells int64 `json:"updatedCells,omitempty"` 9973 9974 // UpdatedColumns: The number of columns where at least one cell in the 9975 // column was updated. 9976 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 9977 9978 // UpdatedData: The values of the cells after updates were applied. 9979 // This is only included if the request's `includeValuesInResponse` 9980 // field 9981 // was `true`. 9982 UpdatedData *ValueRange `json:"updatedData,omitempty"` 9983 9984 // UpdatedRange: The range (in A1 notation) that updates were applied 9985 // to. 9986 UpdatedRange string `json:"updatedRange,omitempty"` 9987 9988 // UpdatedRows: The number of rows where at least one cell in the row 9989 // was updated. 9990 UpdatedRows int64 `json:"updatedRows,omitempty"` 9991 9992 // ServerResponse contains the HTTP response code and headers from the 9993 // server. 9994 googleapi.ServerResponse `json:"-"` 9995 9996 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 9997 // unconditionally include in API requests. By default, fields with 9998 // empty values are omitted from API requests. However, any non-pointer, 9999 // non-interface field appearing in ForceSendFields will be sent to the 10000 // server regardless of whether the field is empty or not. This may be 10001 // used to include empty fields in Patch requests. 10002 ForceSendFields []string `json:"-"` 10003 10004 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 10005 // in API requests with the JSON null value. By default, fields with 10006 // empty values are omitted from API requests. However, any field with 10007 // an empty value appearing in NullFields will be sent to the server as 10008 // null. It is an error if a field in this list has a non-empty value. 10009 // This may be used to include null fields in Patch requests. 10010 NullFields []string `json:"-"` 10011} 10012 10013func (s *UpdateValuesResponse) MarshalJSON() ([]byte, error) { 10014 type NoMethod UpdateValuesResponse 10015 raw := NoMethod(*s) 10016 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10017} 10018 10019// ValueRange: Data within a range of the spreadsheet. 10020type ValueRange struct { 10021 // MajorDimension: The major dimension of the values. 10022 // 10023 // For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 10024 // then requesting `range=A1:B2,majorDimension=ROWS` will 10025 // return 10026 // `[[1,2],[3,4]]`, 10027 // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 10028 // return 10029 // `[[1,3],[2,4]]`. 10030 // 10031 // For input, with `range=A1:B2,majorDimension=ROWS` then 10032 // `[[1,2],[3,4]]` 10033 // will set `A1=1,B1=2,A2=3,B2=4`. With 10034 // `range=A1:B2,majorDimension=COLUMNS` 10035 // then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. 10036 // 10037 // When writing, if this field is not set, it defaults to ROWS. 10038 // 10039 // Possible values: 10040 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 10041 // "ROWS" - Operates on the rows of a sheet. 10042 // "COLUMNS" - Operates on the columns of a sheet. 10043 MajorDimension string `json:"majorDimension,omitempty"` 10044 10045 // Range: The range the values cover, in A1 notation. 10046 // For output, this range indicates the entire requested range, 10047 // even though the values will exclude trailing rows and columns. 10048 // When appending values, this field represents the range to search for 10049 // a 10050 // table, after which values will be appended. 10051 Range string `json:"range,omitempty"` 10052 10053 // Values: The data that was read or to be written. This is an array of 10054 // arrays, 10055 // the outer array representing all the data and each inner 10056 // array 10057 // representing a major dimension. Each item in the inner 10058 // array 10059 // corresponds with one cell. 10060 // 10061 // For output, empty trailing rows and columns will not be 10062 // included. 10063 // 10064 // For input, supported value types are: bool, string, and double. 10065 // Null values will be skipped. 10066 // To set a cell to an empty value, set the string value to an empty 10067 // string. 10068 Values [][]interface{} `json:"values,omitempty"` 10069 10070 // ServerResponse contains the HTTP response code and headers from the 10071 // server. 10072 googleapi.ServerResponse `json:"-"` 10073 10074 // ForceSendFields is a list of field names (e.g. "MajorDimension") to 10075 // unconditionally include in API requests. By default, fields with 10076 // empty values are omitted from API requests. However, any non-pointer, 10077 // non-interface field appearing in ForceSendFields will be sent to the 10078 // server regardless of whether the field is empty or not. This may be 10079 // used to include empty fields in Patch requests. 10080 ForceSendFields []string `json:"-"` 10081 10082 // NullFields is a list of field names (e.g. "MajorDimension") to 10083 // include in API requests with the JSON null value. By default, fields 10084 // with empty values are omitted from API requests. However, any field 10085 // with an empty value appearing in NullFields will be sent to the 10086 // server as null. It is an error if a field in this list has a 10087 // non-empty value. This may be used to include null fields in Patch 10088 // requests. 10089 NullFields []string `json:"-"` 10090} 10091 10092func (s *ValueRange) MarshalJSON() ([]byte, error) { 10093 type NoMethod ValueRange 10094 raw := NoMethod(*s) 10095 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10096} 10097 10098// WaterfallChartColumnStyle: Styles for a waterfall chart column. 10099type WaterfallChartColumnStyle struct { 10100 // Color: The color of the column. 10101 Color *Color `json:"color,omitempty"` 10102 10103 // Label: The label of the column's legend. 10104 Label string `json:"label,omitempty"` 10105 10106 // ForceSendFields is a list of field names (e.g. "Color") to 10107 // unconditionally include in API requests. By default, fields with 10108 // empty values are omitted from API requests. However, any non-pointer, 10109 // non-interface field appearing in ForceSendFields will be sent to the 10110 // server regardless of whether the field is empty or not. This may be 10111 // used to include empty fields in Patch requests. 10112 ForceSendFields []string `json:"-"` 10113 10114 // NullFields is a list of field names (e.g. "Color") to include in API 10115 // requests with the JSON null value. By default, fields with empty 10116 // values are omitted from API requests. However, any field with an 10117 // empty value appearing in NullFields will be sent to the server as 10118 // null. It is an error if a field in this list has a non-empty value. 10119 // This may be used to include null fields in Patch requests. 10120 NullFields []string `json:"-"` 10121} 10122 10123func (s *WaterfallChartColumnStyle) MarshalJSON() ([]byte, error) { 10124 type NoMethod WaterfallChartColumnStyle 10125 raw := NoMethod(*s) 10126 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10127} 10128 10129// WaterfallChartCustomSubtotal: A custom subtotal column for a 10130// waterfall chart series. 10131type WaterfallChartCustomSubtotal struct { 10132 // DataIsSubtotal: True if the data point at subtotal_index is the 10133 // subtotal. If false, 10134 // the subtotal will be computed and appear after the data point. 10135 DataIsSubtotal bool `json:"dataIsSubtotal,omitempty"` 10136 10137 // Label: A label for the subtotal column. 10138 Label string `json:"label,omitempty"` 10139 10140 // SubtotalIndex: The 0-based index of a data point within the series. 10141 // If 10142 // data_is_subtotal is true, the data point at this index is 10143 // the 10144 // subtotal. Otherwise, the subtotal appears after the data point 10145 // with 10146 // this index. A series can have multiple subtotals at arbitrary 10147 // indices, 10148 // but subtotals do not affect the indices of the data points. 10149 // For 10150 // example, if a series has three data points, their indices will 10151 // always 10152 // be 0, 1, and 2, regardless of how many subtotals exist on the series 10153 // or 10154 // what data points they are associated with. 10155 SubtotalIndex int64 `json:"subtotalIndex,omitempty"` 10156 10157 // ForceSendFields is a list of field names (e.g. "DataIsSubtotal") to 10158 // unconditionally include in API requests. By default, fields with 10159 // empty values are omitted from API requests. However, any non-pointer, 10160 // non-interface field appearing in ForceSendFields will be sent to the 10161 // server regardless of whether the field is empty or not. This may be 10162 // used to include empty fields in Patch requests. 10163 ForceSendFields []string `json:"-"` 10164 10165 // NullFields is a list of field names (e.g. "DataIsSubtotal") to 10166 // include in API requests with the JSON null value. By default, fields 10167 // with empty values are omitted from API requests. However, any field 10168 // with an empty value appearing in NullFields will be sent to the 10169 // server as null. It is an error if a field in this list has a 10170 // non-empty value. This may be used to include null fields in Patch 10171 // requests. 10172 NullFields []string `json:"-"` 10173} 10174 10175func (s *WaterfallChartCustomSubtotal) MarshalJSON() ([]byte, error) { 10176 type NoMethod WaterfallChartCustomSubtotal 10177 raw := NoMethod(*s) 10178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10179} 10180 10181// WaterfallChartDomain: The domain of a waterfall chart. 10182type WaterfallChartDomain struct { 10183 // Data: The data of the WaterfallChartDomain. 10184 Data *ChartData `json:"data,omitempty"` 10185 10186 // Reversed: True to reverse the order of the domain values (horizontal 10187 // axis). 10188 Reversed bool `json:"reversed,omitempty"` 10189 10190 // ForceSendFields is a list of field names (e.g. "Data") to 10191 // unconditionally include in API requests. By default, fields with 10192 // empty values are omitted from API requests. However, any non-pointer, 10193 // non-interface field appearing in ForceSendFields will be sent to the 10194 // server regardless of whether the field is empty or not. This may be 10195 // used to include empty fields in Patch requests. 10196 ForceSendFields []string `json:"-"` 10197 10198 // NullFields is a list of field names (e.g. "Data") to include in API 10199 // requests with the JSON null value. By default, fields with empty 10200 // values are omitted from API requests. However, any field with an 10201 // empty value appearing in NullFields will be sent to the server as 10202 // null. It is an error if a field in this list has a non-empty value. 10203 // This may be used to include null fields in Patch requests. 10204 NullFields []string `json:"-"` 10205} 10206 10207func (s *WaterfallChartDomain) MarshalJSON() ([]byte, error) { 10208 type NoMethod WaterfallChartDomain 10209 raw := NoMethod(*s) 10210 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10211} 10212 10213// WaterfallChartSeries: A single series of data for a waterfall chart. 10214type WaterfallChartSeries struct { 10215 // CustomSubtotals: Custom subtotal columns appearing in this series. 10216 // The order in which 10217 // subtotals are defined is not significant. Only one subtotal may 10218 // be 10219 // defined for each data point. 10220 CustomSubtotals []*WaterfallChartCustomSubtotal `json:"customSubtotals,omitempty"` 10221 10222 // Data: The data being visualized in this series. 10223 Data *ChartData `json:"data,omitempty"` 10224 10225 // HideTrailingSubtotal: True to hide the subtotal column from the end 10226 // of the series. By default, 10227 // a subtotal column will appear at the end of each series. Setting 10228 // this 10229 // field to true will hide that subtotal column for this series. 10230 HideTrailingSubtotal bool `json:"hideTrailingSubtotal,omitempty"` 10231 10232 // NegativeColumnsStyle: Styles for all columns in this series with 10233 // negative values. 10234 NegativeColumnsStyle *WaterfallChartColumnStyle `json:"negativeColumnsStyle,omitempty"` 10235 10236 // PositiveColumnsStyle: Styles for all columns in this series with 10237 // positive values. 10238 PositiveColumnsStyle *WaterfallChartColumnStyle `json:"positiveColumnsStyle,omitempty"` 10239 10240 // SubtotalColumnsStyle: Styles for all subtotal columns in this series. 10241 SubtotalColumnsStyle *WaterfallChartColumnStyle `json:"subtotalColumnsStyle,omitempty"` 10242 10243 // ForceSendFields is a list of field names (e.g. "CustomSubtotals") to 10244 // unconditionally include in API requests. By default, fields with 10245 // empty values are omitted from API requests. However, any non-pointer, 10246 // non-interface field appearing in ForceSendFields will be sent to the 10247 // server regardless of whether the field is empty or not. This may be 10248 // used to include empty fields in Patch requests. 10249 ForceSendFields []string `json:"-"` 10250 10251 // NullFields is a list of field names (e.g. "CustomSubtotals") to 10252 // include in API requests with the JSON null value. By default, fields 10253 // with empty values are omitted from API requests. However, any field 10254 // with an empty value appearing in NullFields will be sent to the 10255 // server as null. It is an error if a field in this list has a 10256 // non-empty value. This may be used to include null fields in Patch 10257 // requests. 10258 NullFields []string `json:"-"` 10259} 10260 10261func (s *WaterfallChartSeries) MarshalJSON() ([]byte, error) { 10262 type NoMethod WaterfallChartSeries 10263 raw := NoMethod(*s) 10264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10265} 10266 10267// WaterfallChartSpec: A waterfall chart. 10268type WaterfallChartSpec struct { 10269 // ConnectorLineStyle: The line style for the connector lines. 10270 ConnectorLineStyle *LineStyle `json:"connectorLineStyle,omitempty"` 10271 10272 // Domain: The domain data (horizontal axis) for the waterfall chart. 10273 Domain *WaterfallChartDomain `json:"domain,omitempty"` 10274 10275 // FirstValueIsTotal: True to interpret the first value as a total. 10276 FirstValueIsTotal bool `json:"firstValueIsTotal,omitempty"` 10277 10278 // HideConnectorLines: True to hide connector lines between columns. 10279 HideConnectorLines bool `json:"hideConnectorLines,omitempty"` 10280 10281 // Series: The data this waterfall chart is visualizing. 10282 Series []*WaterfallChartSeries `json:"series,omitempty"` 10283 10284 // StackedType: The stacked type. 10285 // 10286 // Possible values: 10287 // "WATERFALL_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 10288 // "STACKED" - Values corresponding to the same domain (horizontal 10289 // axis) value will be 10290 // stacked vertically. 10291 // "SEQUENTIAL" - Series will spread out along the horizontal axis. 10292 StackedType string `json:"stackedType,omitempty"` 10293 10294 // ForceSendFields is a list of field names (e.g. "ConnectorLineStyle") 10295 // to unconditionally include in API requests. By default, fields with 10296 // empty values are omitted from API requests. However, any non-pointer, 10297 // non-interface field appearing in ForceSendFields will be sent to the 10298 // server regardless of whether the field is empty or not. This may be 10299 // used to include empty fields in Patch requests. 10300 ForceSendFields []string `json:"-"` 10301 10302 // NullFields is a list of field names (e.g. "ConnectorLineStyle") to 10303 // include in API requests with the JSON null value. By default, fields 10304 // with empty values are omitted from API requests. However, any field 10305 // with an empty value appearing in NullFields will be sent to the 10306 // server as null. It is an error if a field in this list has a 10307 // non-empty value. This may be used to include null fields in Patch 10308 // requests. 10309 NullFields []string `json:"-"` 10310} 10311 10312func (s *WaterfallChartSpec) MarshalJSON() ([]byte, error) { 10313 type NoMethod WaterfallChartSpec 10314 raw := NoMethod(*s) 10315 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10316} 10317 10318// method id "sheets.spreadsheets.batchUpdate": 10319 10320type SpreadsheetsBatchUpdateCall struct { 10321 s *Service 10322 spreadsheetId string 10323 batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest 10324 urlParams_ gensupport.URLParams 10325 ctx_ context.Context 10326 header_ http.Header 10327} 10328 10329// BatchUpdate: Applies one or more updates to the spreadsheet. 10330// 10331// Each request is validated before 10332// being applied. If any request is not valid then the entire request 10333// will 10334// fail and nothing will be applied. 10335// 10336// Some requests have replies to 10337// give you some information about how 10338// they are applied. The replies will mirror the requests. For 10339// example, 10340// if you applied 4 updates and the 3rd one had a reply, then 10341// the 10342// response will have 2 empty replies, the actual reply, and another 10343// empty 10344// reply, in that order. 10345// 10346// Due to the collaborative nature of spreadsheets, it is not guaranteed 10347// that 10348// the spreadsheet will reflect exactly your changes after this 10349// completes, 10350// however it is guaranteed that the updates in the request will 10351// be 10352// applied together atomically. Your changes may be altered with respect 10353// to 10354// collaborator changes. If there are no collaborators, the 10355// spreadsheet 10356// should reflect your changes. 10357func (r *SpreadsheetsService) BatchUpdate(spreadsheetId string, batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest) *SpreadsheetsBatchUpdateCall { 10358 c := &SpreadsheetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10359 c.spreadsheetId = spreadsheetId 10360 c.batchupdatespreadsheetrequest = batchupdatespreadsheetrequest 10361 return c 10362} 10363 10364// Fields allows partial responses to be retrieved. See 10365// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10366// for more information. 10367func (c *SpreadsheetsBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsBatchUpdateCall { 10368 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10369 return c 10370} 10371 10372// Context sets the context to be used in this call's Do method. Any 10373// pending HTTP request will be aborted if the provided context is 10374// canceled. 10375func (c *SpreadsheetsBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsBatchUpdateCall { 10376 c.ctx_ = ctx 10377 return c 10378} 10379 10380// Header returns an http.Header that can be modified by the caller to 10381// add HTTP headers to the request. 10382func (c *SpreadsheetsBatchUpdateCall) Header() http.Header { 10383 if c.header_ == nil { 10384 c.header_ = make(http.Header) 10385 } 10386 return c.header_ 10387} 10388 10389func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 10390 reqHeaders := make(http.Header) 10391 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10392 for k, v := range c.header_ { 10393 reqHeaders[k] = v 10394 } 10395 reqHeaders.Set("User-Agent", c.s.userAgent()) 10396 var body io.Reader = nil 10397 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatespreadsheetrequest) 10398 if err != nil { 10399 return nil, err 10400 } 10401 reqHeaders.Set("Content-Type", "application/json") 10402 c.urlParams_.Set("alt", alt) 10403 c.urlParams_.Set("prettyPrint", "false") 10404 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate") 10405 urls += "?" + c.urlParams_.Encode() 10406 req, err := http.NewRequest("POST", urls, body) 10407 if err != nil { 10408 return nil, err 10409 } 10410 req.Header = reqHeaders 10411 googleapi.Expand(req.URL, map[string]string{ 10412 "spreadsheetId": c.spreadsheetId, 10413 }) 10414 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10415} 10416 10417// Do executes the "sheets.spreadsheets.batchUpdate" call. 10418// Exactly one of *BatchUpdateSpreadsheetResponse or error will be 10419// non-nil. Any non-2xx status code is an error. Response headers are in 10420// either *BatchUpdateSpreadsheetResponse.ServerResponse.Header or (if a 10421// response was returned at all) in error.(*googleapi.Error).Header. Use 10422// googleapi.IsNotModified to check whether the returned error was 10423// because http.StatusNotModified was returned. 10424func (c *SpreadsheetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateSpreadsheetResponse, error) { 10425 gensupport.SetOptions(c.urlParams_, opts...) 10426 res, err := c.doRequest("json") 10427 if res != nil && res.StatusCode == http.StatusNotModified { 10428 if res.Body != nil { 10429 res.Body.Close() 10430 } 10431 return nil, &googleapi.Error{ 10432 Code: res.StatusCode, 10433 Header: res.Header, 10434 } 10435 } 10436 if err != nil { 10437 return nil, err 10438 } 10439 defer googleapi.CloseBody(res) 10440 if err := googleapi.CheckResponse(res); err != nil { 10441 return nil, err 10442 } 10443 ret := &BatchUpdateSpreadsheetResponse{ 10444 ServerResponse: googleapi.ServerResponse{ 10445 Header: res.Header, 10446 HTTPStatusCode: res.StatusCode, 10447 }, 10448 } 10449 target := &ret 10450 if err := gensupport.DecodeResponse(target, res); err != nil { 10451 return nil, err 10452 } 10453 return ret, nil 10454 // { 10455 // "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.", 10456 // "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 10457 // "httpMethod": "POST", 10458 // "id": "sheets.spreadsheets.batchUpdate", 10459 // "parameterOrder": [ 10460 // "spreadsheetId" 10461 // ], 10462 // "parameters": { 10463 // "spreadsheetId": { 10464 // "description": "The spreadsheet to apply the updates to.", 10465 // "location": "path", 10466 // "required": true, 10467 // "type": "string" 10468 // } 10469 // }, 10470 // "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 10471 // "request": { 10472 // "$ref": "BatchUpdateSpreadsheetRequest" 10473 // }, 10474 // "response": { 10475 // "$ref": "BatchUpdateSpreadsheetResponse" 10476 // }, 10477 // "scopes": [ 10478 // "https://www.googleapis.com/auth/drive", 10479 // "https://www.googleapis.com/auth/drive.file", 10480 // "https://www.googleapis.com/auth/spreadsheets" 10481 // ] 10482 // } 10483 10484} 10485 10486// method id "sheets.spreadsheets.create": 10487 10488type SpreadsheetsCreateCall struct { 10489 s *Service 10490 spreadsheet *Spreadsheet 10491 urlParams_ gensupport.URLParams 10492 ctx_ context.Context 10493 header_ http.Header 10494} 10495 10496// Create: Creates a spreadsheet, returning the newly created 10497// spreadsheet. 10498func (r *SpreadsheetsService) Create(spreadsheet *Spreadsheet) *SpreadsheetsCreateCall { 10499 c := &SpreadsheetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10500 c.spreadsheet = spreadsheet 10501 return c 10502} 10503 10504// Fields allows partial responses to be retrieved. See 10505// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10506// for more information. 10507func (c *SpreadsheetsCreateCall) Fields(s ...googleapi.Field) *SpreadsheetsCreateCall { 10508 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10509 return c 10510} 10511 10512// Context sets the context to be used in this call's Do method. Any 10513// pending HTTP request will be aborted if the provided context is 10514// canceled. 10515func (c *SpreadsheetsCreateCall) Context(ctx context.Context) *SpreadsheetsCreateCall { 10516 c.ctx_ = ctx 10517 return c 10518} 10519 10520// Header returns an http.Header that can be modified by the caller to 10521// add HTTP headers to the request. 10522func (c *SpreadsheetsCreateCall) Header() http.Header { 10523 if c.header_ == nil { 10524 c.header_ = make(http.Header) 10525 } 10526 return c.header_ 10527} 10528 10529func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) { 10530 reqHeaders := make(http.Header) 10531 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10532 for k, v := range c.header_ { 10533 reqHeaders[k] = v 10534 } 10535 reqHeaders.Set("User-Agent", c.s.userAgent()) 10536 var body io.Reader = nil 10537 body, err := googleapi.WithoutDataWrapper.JSONReader(c.spreadsheet) 10538 if err != nil { 10539 return nil, err 10540 } 10541 reqHeaders.Set("Content-Type", "application/json") 10542 c.urlParams_.Set("alt", alt) 10543 c.urlParams_.Set("prettyPrint", "false") 10544 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets") 10545 urls += "?" + c.urlParams_.Encode() 10546 req, err := http.NewRequest("POST", urls, body) 10547 if err != nil { 10548 return nil, err 10549 } 10550 req.Header = reqHeaders 10551 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10552} 10553 10554// Do executes the "sheets.spreadsheets.create" call. 10555// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10556// status code is an error. Response headers are in either 10557// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10558// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10559// to check whether the returned error was because 10560// http.StatusNotModified was returned. 10561func (c *SpreadsheetsCreateCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10562 gensupport.SetOptions(c.urlParams_, opts...) 10563 res, err := c.doRequest("json") 10564 if res != nil && res.StatusCode == http.StatusNotModified { 10565 if res.Body != nil { 10566 res.Body.Close() 10567 } 10568 return nil, &googleapi.Error{ 10569 Code: res.StatusCode, 10570 Header: res.Header, 10571 } 10572 } 10573 if err != nil { 10574 return nil, err 10575 } 10576 defer googleapi.CloseBody(res) 10577 if err := googleapi.CheckResponse(res); err != nil { 10578 return nil, err 10579 } 10580 ret := &Spreadsheet{ 10581 ServerResponse: googleapi.ServerResponse{ 10582 Header: res.Header, 10583 HTTPStatusCode: res.StatusCode, 10584 }, 10585 } 10586 target := &ret 10587 if err := gensupport.DecodeResponse(target, res); err != nil { 10588 return nil, err 10589 } 10590 return ret, nil 10591 // { 10592 // "description": "Creates a spreadsheet, returning the newly created spreadsheet.", 10593 // "flatPath": "v4/spreadsheets", 10594 // "httpMethod": "POST", 10595 // "id": "sheets.spreadsheets.create", 10596 // "parameterOrder": [], 10597 // "parameters": {}, 10598 // "path": "v4/spreadsheets", 10599 // "request": { 10600 // "$ref": "Spreadsheet" 10601 // }, 10602 // "response": { 10603 // "$ref": "Spreadsheet" 10604 // }, 10605 // "scopes": [ 10606 // "https://www.googleapis.com/auth/drive", 10607 // "https://www.googleapis.com/auth/drive.file", 10608 // "https://www.googleapis.com/auth/spreadsheets" 10609 // ] 10610 // } 10611 10612} 10613 10614// method id "sheets.spreadsheets.get": 10615 10616type SpreadsheetsGetCall struct { 10617 s *Service 10618 spreadsheetId string 10619 urlParams_ gensupport.URLParams 10620 ifNoneMatch_ string 10621 ctx_ context.Context 10622 header_ http.Header 10623} 10624 10625// Get: Returns the spreadsheet at the given ID. 10626// The caller must specify the spreadsheet ID. 10627// 10628// By default, data within grids will not be returned. 10629// You can include grid data one of two ways: 10630// 10631// * Specify a field mask listing your desired fields using the `fields` 10632// URL 10633// parameter in HTTP 10634// 10635// * Set the includeGridData 10636// URL parameter to true. If a field mask is set, the 10637// `includeGridData` 10638// parameter is ignored 10639// 10640// For large spreadsheets, it is recommended to retrieve only the 10641// specific 10642// fields of the spreadsheet that you want. 10643// 10644// To retrieve only subsets of the spreadsheet, use the 10645// ranges URL parameter. 10646// Multiple ranges can be specified. Limiting the range will 10647// return only the portions of the spreadsheet that intersect the 10648// requested 10649// ranges. Ranges are specified using A1 notation. 10650func (r *SpreadsheetsService) Get(spreadsheetId string) *SpreadsheetsGetCall { 10651 c := &SpreadsheetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10652 c.spreadsheetId = spreadsheetId 10653 return c 10654} 10655 10656// IncludeGridData sets the optional parameter "includeGridData": True 10657// if grid data should be returned. 10658// This parameter is ignored if a field mask was set in the request. 10659func (c *SpreadsheetsGetCall) IncludeGridData(includeGridData bool) *SpreadsheetsGetCall { 10660 c.urlParams_.Set("includeGridData", fmt.Sprint(includeGridData)) 10661 return c 10662} 10663 10664// Ranges sets the optional parameter "ranges": The ranges to retrieve 10665// from the spreadsheet. 10666func (c *SpreadsheetsGetCall) Ranges(ranges ...string) *SpreadsheetsGetCall { 10667 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 10668 return c 10669} 10670 10671// Fields allows partial responses to be retrieved. See 10672// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10673// for more information. 10674func (c *SpreadsheetsGetCall) Fields(s ...googleapi.Field) *SpreadsheetsGetCall { 10675 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10676 return c 10677} 10678 10679// IfNoneMatch sets the optional parameter which makes the operation 10680// fail if the object's ETag matches the given value. This is useful for 10681// getting updates only after the object has changed since the last 10682// request. Use googleapi.IsNotModified to check whether the response 10683// error from Do is the result of In-None-Match. 10684func (c *SpreadsheetsGetCall) IfNoneMatch(entityTag string) *SpreadsheetsGetCall { 10685 c.ifNoneMatch_ = entityTag 10686 return c 10687} 10688 10689// Context sets the context to be used in this call's Do method. Any 10690// pending HTTP request will be aborted if the provided context is 10691// canceled. 10692func (c *SpreadsheetsGetCall) Context(ctx context.Context) *SpreadsheetsGetCall { 10693 c.ctx_ = ctx 10694 return c 10695} 10696 10697// Header returns an http.Header that can be modified by the caller to 10698// add HTTP headers to the request. 10699func (c *SpreadsheetsGetCall) Header() http.Header { 10700 if c.header_ == nil { 10701 c.header_ = make(http.Header) 10702 } 10703 return c.header_ 10704} 10705 10706func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) { 10707 reqHeaders := make(http.Header) 10708 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10709 for k, v := range c.header_ { 10710 reqHeaders[k] = v 10711 } 10712 reqHeaders.Set("User-Agent", c.s.userAgent()) 10713 if c.ifNoneMatch_ != "" { 10714 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 10715 } 10716 var body io.Reader = nil 10717 c.urlParams_.Set("alt", alt) 10718 c.urlParams_.Set("prettyPrint", "false") 10719 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}") 10720 urls += "?" + c.urlParams_.Encode() 10721 req, err := http.NewRequest("GET", urls, body) 10722 if err != nil { 10723 return nil, err 10724 } 10725 req.Header = reqHeaders 10726 googleapi.Expand(req.URL, map[string]string{ 10727 "spreadsheetId": c.spreadsheetId, 10728 }) 10729 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10730} 10731 10732// Do executes the "sheets.spreadsheets.get" call. 10733// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10734// status code is an error. Response headers are in either 10735// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10736// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10737// to check whether the returned error was because 10738// http.StatusNotModified was returned. 10739func (c *SpreadsheetsGetCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10740 gensupport.SetOptions(c.urlParams_, opts...) 10741 res, err := c.doRequest("json") 10742 if res != nil && res.StatusCode == http.StatusNotModified { 10743 if res.Body != nil { 10744 res.Body.Close() 10745 } 10746 return nil, &googleapi.Error{ 10747 Code: res.StatusCode, 10748 Header: res.Header, 10749 } 10750 } 10751 if err != nil { 10752 return nil, err 10753 } 10754 defer googleapi.CloseBody(res) 10755 if err := googleapi.CheckResponse(res); err != nil { 10756 return nil, err 10757 } 10758 ret := &Spreadsheet{ 10759 ServerResponse: googleapi.ServerResponse{ 10760 Header: res.Header, 10761 HTTPStatusCode: res.StatusCode, 10762 }, 10763 } 10764 target := &ret 10765 if err := gensupport.DecodeResponse(target, res); err != nil { 10766 return nil, err 10767 } 10768 return ret, nil 10769 // { 10770 // "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.", 10771 // "flatPath": "v4/spreadsheets/{spreadsheetId}", 10772 // "httpMethod": "GET", 10773 // "id": "sheets.spreadsheets.get", 10774 // "parameterOrder": [ 10775 // "spreadsheetId" 10776 // ], 10777 // "parameters": { 10778 // "includeGridData": { 10779 // "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.", 10780 // "location": "query", 10781 // "type": "boolean" 10782 // }, 10783 // "ranges": { 10784 // "description": "The ranges to retrieve from the spreadsheet.", 10785 // "location": "query", 10786 // "repeated": true, 10787 // "type": "string" 10788 // }, 10789 // "spreadsheetId": { 10790 // "description": "The spreadsheet to request.", 10791 // "location": "path", 10792 // "required": true, 10793 // "type": "string" 10794 // } 10795 // }, 10796 // "path": "v4/spreadsheets/{spreadsheetId}", 10797 // "response": { 10798 // "$ref": "Spreadsheet" 10799 // }, 10800 // "scopes": [ 10801 // "https://www.googleapis.com/auth/drive", 10802 // "https://www.googleapis.com/auth/drive.file", 10803 // "https://www.googleapis.com/auth/drive.readonly", 10804 // "https://www.googleapis.com/auth/spreadsheets", 10805 // "https://www.googleapis.com/auth/spreadsheets.readonly" 10806 // ] 10807 // } 10808 10809} 10810 10811// method id "sheets.spreadsheets.getByDataFilter": 10812 10813type SpreadsheetsGetByDataFilterCall struct { 10814 s *Service 10815 spreadsheetId string 10816 getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest 10817 urlParams_ gensupport.URLParams 10818 ctx_ context.Context 10819 header_ http.Header 10820} 10821 10822// GetByDataFilter: Returns the spreadsheet at the given ID. 10823// The caller must specify the spreadsheet ID. 10824// 10825// This method differs from GetSpreadsheet in that it allows 10826// selecting 10827// which subsets of spreadsheet data to return by specifying 10828// a 10829// dataFilters parameter. 10830// Multiple DataFilters can be specified. Specifying one or 10831// more data filters will return the portions of the spreadsheet 10832// that 10833// intersect ranges matched by any of the filters. 10834// 10835// By default, data within grids will not be returned. 10836// You can include grid data one of two ways: 10837// 10838// * Specify a field mask listing your desired fields using the `fields` 10839// URL 10840// parameter in HTTP 10841// 10842// * Set the includeGridData 10843// parameter to true. If a field mask is set, the 10844// `includeGridData` 10845// parameter is ignored 10846// 10847// For large spreadsheets, it is recommended to retrieve only the 10848// specific 10849// fields of the spreadsheet that you want. 10850func (r *SpreadsheetsService) GetByDataFilter(spreadsheetId string, getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest) *SpreadsheetsGetByDataFilterCall { 10851 c := &SpreadsheetsGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10852 c.spreadsheetId = spreadsheetId 10853 c.getspreadsheetbydatafilterrequest = getspreadsheetbydatafilterrequest 10854 return c 10855} 10856 10857// Fields allows partial responses to be retrieved. See 10858// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 10859// for more information. 10860func (c *SpreadsheetsGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsGetByDataFilterCall { 10861 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 10862 return c 10863} 10864 10865// Context sets the context to be used in this call's Do method. Any 10866// pending HTTP request will be aborted if the provided context is 10867// canceled. 10868func (c *SpreadsheetsGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsGetByDataFilterCall { 10869 c.ctx_ = ctx 10870 return c 10871} 10872 10873// Header returns an http.Header that can be modified by the caller to 10874// add HTTP headers to the request. 10875func (c *SpreadsheetsGetByDataFilterCall) Header() http.Header { 10876 if c.header_ == nil { 10877 c.header_ = make(http.Header) 10878 } 10879 return c.header_ 10880} 10881 10882func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 10883 reqHeaders := make(http.Header) 10884 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 10885 for k, v := range c.header_ { 10886 reqHeaders[k] = v 10887 } 10888 reqHeaders.Set("User-Agent", c.s.userAgent()) 10889 var body io.Reader = nil 10890 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getspreadsheetbydatafilterrequest) 10891 if err != nil { 10892 return nil, err 10893 } 10894 reqHeaders.Set("Content-Type", "application/json") 10895 c.urlParams_.Set("alt", alt) 10896 c.urlParams_.Set("prettyPrint", "false") 10897 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter") 10898 urls += "?" + c.urlParams_.Encode() 10899 req, err := http.NewRequest("POST", urls, body) 10900 if err != nil { 10901 return nil, err 10902 } 10903 req.Header = reqHeaders 10904 googleapi.Expand(req.URL, map[string]string{ 10905 "spreadsheetId": c.spreadsheetId, 10906 }) 10907 return gensupport.SendRequest(c.ctx_, c.s.client, req) 10908} 10909 10910// Do executes the "sheets.spreadsheets.getByDataFilter" call. 10911// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 10912// status code is an error. Response headers are in either 10913// *Spreadsheet.ServerResponse.Header or (if a response was returned at 10914// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 10915// to check whether the returned error was because 10916// http.StatusNotModified was returned. 10917func (c *SpreadsheetsGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 10918 gensupport.SetOptions(c.urlParams_, opts...) 10919 res, err := c.doRequest("json") 10920 if res != nil && res.StatusCode == http.StatusNotModified { 10921 if res.Body != nil { 10922 res.Body.Close() 10923 } 10924 return nil, &googleapi.Error{ 10925 Code: res.StatusCode, 10926 Header: res.Header, 10927 } 10928 } 10929 if err != nil { 10930 return nil, err 10931 } 10932 defer googleapi.CloseBody(res) 10933 if err := googleapi.CheckResponse(res); err != nil { 10934 return nil, err 10935 } 10936 ret := &Spreadsheet{ 10937 ServerResponse: googleapi.ServerResponse{ 10938 Header: res.Header, 10939 HTTPStatusCode: res.StatusCode, 10940 }, 10941 } 10942 target := &ret 10943 if err := gensupport.DecodeResponse(target, res); err != nil { 10944 return nil, err 10945 } 10946 return ret, nil 10947 // { 10948 // "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.", 10949 // "flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 10950 // "httpMethod": "POST", 10951 // "id": "sheets.spreadsheets.getByDataFilter", 10952 // "parameterOrder": [ 10953 // "spreadsheetId" 10954 // ], 10955 // "parameters": { 10956 // "spreadsheetId": { 10957 // "description": "The spreadsheet to request.", 10958 // "location": "path", 10959 // "required": true, 10960 // "type": "string" 10961 // } 10962 // }, 10963 // "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 10964 // "request": { 10965 // "$ref": "GetSpreadsheetByDataFilterRequest" 10966 // }, 10967 // "response": { 10968 // "$ref": "Spreadsheet" 10969 // }, 10970 // "scopes": [ 10971 // "https://www.googleapis.com/auth/drive", 10972 // "https://www.googleapis.com/auth/drive.file", 10973 // "https://www.googleapis.com/auth/spreadsheets" 10974 // ] 10975 // } 10976 10977} 10978 10979// method id "sheets.spreadsheets.developerMetadata.get": 10980 10981type SpreadsheetsDeveloperMetadataGetCall struct { 10982 s *Service 10983 spreadsheetId string 10984 metadataId int64 10985 urlParams_ gensupport.URLParams 10986 ifNoneMatch_ string 10987 ctx_ context.Context 10988 header_ http.Header 10989} 10990 10991// Get: Returns the developer metadata with the specified ID. 10992// The caller must specify the spreadsheet ID and the developer 10993// metadata's 10994// unique metadataId. 10995func (r *SpreadsheetsDeveloperMetadataService) Get(spreadsheetId string, metadataId int64) *SpreadsheetsDeveloperMetadataGetCall { 10996 c := &SpreadsheetsDeveloperMetadataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 10997 c.spreadsheetId = spreadsheetId 10998 c.metadataId = metadataId 10999 return c 11000} 11001 11002// Fields allows partial responses to be retrieved. See 11003// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11004// for more information. 11005func (c *SpreadsheetsDeveloperMetadataGetCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataGetCall { 11006 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11007 return c 11008} 11009 11010// IfNoneMatch sets the optional parameter which makes the operation 11011// fail if the object's ETag matches the given value. This is useful for 11012// getting updates only after the object has changed since the last 11013// request. Use googleapi.IsNotModified to check whether the response 11014// error from Do is the result of In-None-Match. 11015func (c *SpreadsheetsDeveloperMetadataGetCall) IfNoneMatch(entityTag string) *SpreadsheetsDeveloperMetadataGetCall { 11016 c.ifNoneMatch_ = entityTag 11017 return c 11018} 11019 11020// Context sets the context to be used in this call's Do method. Any 11021// pending HTTP request will be aborted if the provided context is 11022// canceled. 11023func (c *SpreadsheetsDeveloperMetadataGetCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataGetCall { 11024 c.ctx_ = ctx 11025 return c 11026} 11027 11028// Header returns an http.Header that can be modified by the caller to 11029// add HTTP headers to the request. 11030func (c *SpreadsheetsDeveloperMetadataGetCall) Header() http.Header { 11031 if c.header_ == nil { 11032 c.header_ = make(http.Header) 11033 } 11034 return c.header_ 11035} 11036 11037func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Response, error) { 11038 reqHeaders := make(http.Header) 11039 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11040 for k, v := range c.header_ { 11041 reqHeaders[k] = v 11042 } 11043 reqHeaders.Set("User-Agent", c.s.userAgent()) 11044 if c.ifNoneMatch_ != "" { 11045 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11046 } 11047 var body io.Reader = nil 11048 c.urlParams_.Set("alt", alt) 11049 c.urlParams_.Set("prettyPrint", "false") 11050 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}") 11051 urls += "?" + c.urlParams_.Encode() 11052 req, err := http.NewRequest("GET", urls, body) 11053 if err != nil { 11054 return nil, err 11055 } 11056 req.Header = reqHeaders 11057 googleapi.Expand(req.URL, map[string]string{ 11058 "spreadsheetId": c.spreadsheetId, 11059 "metadataId": strconv.FormatInt(c.metadataId, 10), 11060 }) 11061 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11062} 11063 11064// Do executes the "sheets.spreadsheets.developerMetadata.get" call. 11065// Exactly one of *DeveloperMetadata or error will be non-nil. Any 11066// non-2xx status code is an error. Response headers are in either 11067// *DeveloperMetadata.ServerResponse.Header or (if a response was 11068// returned at all) in error.(*googleapi.Error).Header. Use 11069// googleapi.IsNotModified to check whether the returned error was 11070// because http.StatusNotModified was returned. 11071func (c *SpreadsheetsDeveloperMetadataGetCall) Do(opts ...googleapi.CallOption) (*DeveloperMetadata, error) { 11072 gensupport.SetOptions(c.urlParams_, opts...) 11073 res, err := c.doRequest("json") 11074 if res != nil && res.StatusCode == http.StatusNotModified { 11075 if res.Body != nil { 11076 res.Body.Close() 11077 } 11078 return nil, &googleapi.Error{ 11079 Code: res.StatusCode, 11080 Header: res.Header, 11081 } 11082 } 11083 if err != nil { 11084 return nil, err 11085 } 11086 defer googleapi.CloseBody(res) 11087 if err := googleapi.CheckResponse(res); err != nil { 11088 return nil, err 11089 } 11090 ret := &DeveloperMetadata{ 11091 ServerResponse: googleapi.ServerResponse{ 11092 Header: res.Header, 11093 HTTPStatusCode: res.StatusCode, 11094 }, 11095 } 11096 target := &ret 11097 if err := gensupport.DecodeResponse(target, res); err != nil { 11098 return nil, err 11099 } 11100 return ret, nil 11101 // { 11102 // "description": "Returns the developer metadata with the specified ID.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId.", 11103 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 11104 // "httpMethod": "GET", 11105 // "id": "sheets.spreadsheets.developerMetadata.get", 11106 // "parameterOrder": [ 11107 // "spreadsheetId", 11108 // "metadataId" 11109 // ], 11110 // "parameters": { 11111 // "metadataId": { 11112 // "description": "The ID of the developer metadata to retrieve.", 11113 // "format": "int32", 11114 // "location": "path", 11115 // "required": true, 11116 // "type": "integer" 11117 // }, 11118 // "spreadsheetId": { 11119 // "description": "The ID of the spreadsheet to retrieve metadata from.", 11120 // "location": "path", 11121 // "required": true, 11122 // "type": "string" 11123 // } 11124 // }, 11125 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 11126 // "response": { 11127 // "$ref": "DeveloperMetadata" 11128 // }, 11129 // "scopes": [ 11130 // "https://www.googleapis.com/auth/drive", 11131 // "https://www.googleapis.com/auth/drive.file", 11132 // "https://www.googleapis.com/auth/spreadsheets" 11133 // ] 11134 // } 11135 11136} 11137 11138// method id "sheets.spreadsheets.developerMetadata.search": 11139 11140type SpreadsheetsDeveloperMetadataSearchCall struct { 11141 s *Service 11142 spreadsheetId string 11143 searchdevelopermetadatarequest *SearchDeveloperMetadataRequest 11144 urlParams_ gensupport.URLParams 11145 ctx_ context.Context 11146 header_ http.Header 11147} 11148 11149// Search: Returns all developer metadata matching the specified 11150// DataFilter. 11151// If the provided DataFilter represents a DeveloperMetadataLookup 11152// object, 11153// this will return all DeveloperMetadata entries selected by it. If 11154// the 11155// DataFilter represents a location in a spreadsheet, this will return 11156// all 11157// developer metadata associated with locations intersecting that 11158// region. 11159func (r *SpreadsheetsDeveloperMetadataService) Search(spreadsheetId string, searchdevelopermetadatarequest *SearchDeveloperMetadataRequest) *SpreadsheetsDeveloperMetadataSearchCall { 11160 c := &SpreadsheetsDeveloperMetadataSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11161 c.spreadsheetId = spreadsheetId 11162 c.searchdevelopermetadatarequest = searchdevelopermetadatarequest 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 *SpreadsheetsDeveloperMetadataSearchCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataSearchCall { 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 *SpreadsheetsDeveloperMetadataSearchCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataSearchCall { 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 *SpreadsheetsDeveloperMetadataSearchCall) Header() http.Header { 11185 if c.header_ == nil { 11186 c.header_ = make(http.Header) 11187 } 11188 return c.header_ 11189} 11190 11191func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.Response, error) { 11192 reqHeaders := make(http.Header) 11193 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11194 for k, v := range c.header_ { 11195 reqHeaders[k] = v 11196 } 11197 reqHeaders.Set("User-Agent", c.s.userAgent()) 11198 var body io.Reader = nil 11199 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchdevelopermetadatarequest) 11200 if err != nil { 11201 return nil, err 11202 } 11203 reqHeaders.Set("Content-Type", "application/json") 11204 c.urlParams_.Set("alt", alt) 11205 c.urlParams_.Set("prettyPrint", "false") 11206 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search") 11207 urls += "?" + c.urlParams_.Encode() 11208 req, err := http.NewRequest("POST", urls, body) 11209 if err != nil { 11210 return nil, err 11211 } 11212 req.Header = reqHeaders 11213 googleapi.Expand(req.URL, map[string]string{ 11214 "spreadsheetId": c.spreadsheetId, 11215 }) 11216 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11217} 11218 11219// Do executes the "sheets.spreadsheets.developerMetadata.search" call. 11220// Exactly one of *SearchDeveloperMetadataResponse or error will be 11221// non-nil. Any non-2xx status code is an error. Response headers are in 11222// either *SearchDeveloperMetadataResponse.ServerResponse.Header or (if 11223// a response was returned at all) in error.(*googleapi.Error).Header. 11224// Use googleapi.IsNotModified to check whether the returned error was 11225// because http.StatusNotModified was returned. 11226func (c *SpreadsheetsDeveloperMetadataSearchCall) Do(opts ...googleapi.CallOption) (*SearchDeveloperMetadataResponse, 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 := &SearchDeveloperMetadataResponse{ 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": "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.", 11258 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 11259 // "httpMethod": "POST", 11260 // "id": "sheets.spreadsheets.developerMetadata.search", 11261 // "parameterOrder": [ 11262 // "spreadsheetId" 11263 // ], 11264 // "parameters": { 11265 // "spreadsheetId": { 11266 // "description": "The ID of the spreadsheet to retrieve metadata from.", 11267 // "location": "path", 11268 // "required": true, 11269 // "type": "string" 11270 // } 11271 // }, 11272 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 11273 // "request": { 11274 // "$ref": "SearchDeveloperMetadataRequest" 11275 // }, 11276 // "response": { 11277 // "$ref": "SearchDeveloperMetadataResponse" 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.sheets.copyTo": 11289 11290type SpreadsheetsSheetsCopyToCall struct { 11291 s *Service 11292 spreadsheetId string 11293 sheetId int64 11294 copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest 11295 urlParams_ gensupport.URLParams 11296 ctx_ context.Context 11297 header_ http.Header 11298} 11299 11300// CopyTo: Copies a single sheet from a spreadsheet to another 11301// spreadsheet. 11302// Returns the properties of the newly created sheet. 11303func (r *SpreadsheetsSheetsService) CopyTo(spreadsheetId string, sheetId int64, copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest) *SpreadsheetsSheetsCopyToCall { 11304 c := &SpreadsheetsSheetsCopyToCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11305 c.spreadsheetId = spreadsheetId 11306 c.sheetId = sheetId 11307 c.copysheettoanotherspreadsheetrequest = copysheettoanotherspreadsheetrequest 11308 return c 11309} 11310 11311// Fields allows partial responses to be retrieved. See 11312// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11313// for more information. 11314func (c *SpreadsheetsSheetsCopyToCall) Fields(s ...googleapi.Field) *SpreadsheetsSheetsCopyToCall { 11315 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11316 return c 11317} 11318 11319// Context sets the context to be used in this call's Do method. Any 11320// pending HTTP request will be aborted if the provided context is 11321// canceled. 11322func (c *SpreadsheetsSheetsCopyToCall) Context(ctx context.Context) *SpreadsheetsSheetsCopyToCall { 11323 c.ctx_ = ctx 11324 return c 11325} 11326 11327// Header returns an http.Header that can be modified by the caller to 11328// add HTTP headers to the request. 11329func (c *SpreadsheetsSheetsCopyToCall) Header() http.Header { 11330 if c.header_ == nil { 11331 c.header_ = make(http.Header) 11332 } 11333 return c.header_ 11334} 11335 11336func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, error) { 11337 reqHeaders := make(http.Header) 11338 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11339 for k, v := range c.header_ { 11340 reqHeaders[k] = v 11341 } 11342 reqHeaders.Set("User-Agent", c.s.userAgent()) 11343 var body io.Reader = nil 11344 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copysheettoanotherspreadsheetrequest) 11345 if err != nil { 11346 return nil, err 11347 } 11348 reqHeaders.Set("Content-Type", "application/json") 11349 c.urlParams_.Set("alt", alt) 11350 c.urlParams_.Set("prettyPrint", "false") 11351 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo") 11352 urls += "?" + c.urlParams_.Encode() 11353 req, err := http.NewRequest("POST", urls, body) 11354 if err != nil { 11355 return nil, err 11356 } 11357 req.Header = reqHeaders 11358 googleapi.Expand(req.URL, map[string]string{ 11359 "spreadsheetId": c.spreadsheetId, 11360 "sheetId": strconv.FormatInt(c.sheetId, 10), 11361 }) 11362 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11363} 11364 11365// Do executes the "sheets.spreadsheets.sheets.copyTo" call. 11366// Exactly one of *SheetProperties or error will be non-nil. Any non-2xx 11367// status code is an error. Response headers are in either 11368// *SheetProperties.ServerResponse.Header or (if a response was returned 11369// at all) in error.(*googleapi.Error).Header. Use 11370// googleapi.IsNotModified to check whether the returned error was 11371// because http.StatusNotModified was returned. 11372func (c *SpreadsheetsSheetsCopyToCall) Do(opts ...googleapi.CallOption) (*SheetProperties, error) { 11373 gensupport.SetOptions(c.urlParams_, opts...) 11374 res, err := c.doRequest("json") 11375 if res != nil && res.StatusCode == http.StatusNotModified { 11376 if res.Body != nil { 11377 res.Body.Close() 11378 } 11379 return nil, &googleapi.Error{ 11380 Code: res.StatusCode, 11381 Header: res.Header, 11382 } 11383 } 11384 if err != nil { 11385 return nil, err 11386 } 11387 defer googleapi.CloseBody(res) 11388 if err := googleapi.CheckResponse(res); err != nil { 11389 return nil, err 11390 } 11391 ret := &SheetProperties{ 11392 ServerResponse: googleapi.ServerResponse{ 11393 Header: res.Header, 11394 HTTPStatusCode: res.StatusCode, 11395 }, 11396 } 11397 target := &ret 11398 if err := gensupport.DecodeResponse(target, res); err != nil { 11399 return nil, err 11400 } 11401 return ret, nil 11402 // { 11403 // "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.", 11404 // "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 11405 // "httpMethod": "POST", 11406 // "id": "sheets.spreadsheets.sheets.copyTo", 11407 // "parameterOrder": [ 11408 // "spreadsheetId", 11409 // "sheetId" 11410 // ], 11411 // "parameters": { 11412 // "sheetId": { 11413 // "description": "The ID of the sheet to copy.", 11414 // "format": "int32", 11415 // "location": "path", 11416 // "required": true, 11417 // "type": "integer" 11418 // }, 11419 // "spreadsheetId": { 11420 // "description": "The ID of the spreadsheet containing the sheet to copy.", 11421 // "location": "path", 11422 // "required": true, 11423 // "type": "string" 11424 // } 11425 // }, 11426 // "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 11427 // "request": { 11428 // "$ref": "CopySheetToAnotherSpreadsheetRequest" 11429 // }, 11430 // "response": { 11431 // "$ref": "SheetProperties" 11432 // }, 11433 // "scopes": [ 11434 // "https://www.googleapis.com/auth/drive", 11435 // "https://www.googleapis.com/auth/drive.file", 11436 // "https://www.googleapis.com/auth/spreadsheets" 11437 // ] 11438 // } 11439 11440} 11441 11442// method id "sheets.spreadsheets.values.append": 11443 11444type SpreadsheetsValuesAppendCall struct { 11445 s *Service 11446 spreadsheetId string 11447 range_ string 11448 valuerange *ValueRange 11449 urlParams_ gensupport.URLParams 11450 ctx_ context.Context 11451 header_ http.Header 11452} 11453 11454// Append: Appends values to a spreadsheet. The input range is used to 11455// search for 11456// existing data and find a "table" within that range. Values will 11457// be 11458// appended to the next row of the table, starting with the first column 11459// of 11460// the table. See 11461// the 11462// [guide](/sheets/api/guides/values#appending_values) 11463// and 11464// [sample code](/sheets/api/samples/writing#append_values) 11465// for specific details of how tables are detected and data is 11466// appended. 11467// 11468// The caller must specify the spreadsheet ID, range, and 11469// a valueInputOption. The `valueInputOption` only 11470// controls how the input data will be added to the sheet (column-wise 11471// or 11472// row-wise), it does not influence what cell the data starts being 11473// written 11474// to. 11475func (r *SpreadsheetsValuesService) Append(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesAppendCall { 11476 c := &SpreadsheetsValuesAppendCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11477 c.spreadsheetId = spreadsheetId 11478 c.range_ = range_ 11479 c.valuerange = valuerange 11480 return c 11481} 11482 11483// IncludeValuesInResponse sets the optional parameter 11484// "includeValuesInResponse": Determines if the update response should 11485// include the values 11486// of the cells that were appended. By default, responses 11487// do not include the updated values. 11488func (c *SpreadsheetsValuesAppendCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesAppendCall { 11489 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 11490 return c 11491} 11492 11493// InsertDataOption sets the optional parameter "insertDataOption": How 11494// the input data should be inserted. 11495// 11496// Possible values: 11497// "OVERWRITE" 11498// "INSERT_ROWS" 11499func (c *SpreadsheetsValuesAppendCall) InsertDataOption(insertDataOption string) *SpreadsheetsValuesAppendCall { 11500 c.urlParams_.Set("insertDataOption", insertDataOption) 11501 return c 11502} 11503 11504// ResponseDateTimeRenderOption sets the optional parameter 11505// "responseDateTimeRenderOption": Determines how dates, times, and 11506// durations in the response should be 11507// rendered. This is ignored if response_value_render_option 11508// is 11509// FORMATTED_VALUE. 11510// The default dateTime render option is 11511// [DateTimeRenderOption.SERIAL_NUMBER]. 11512// 11513// Possible values: 11514// "SERIAL_NUMBER" 11515// "FORMATTED_STRING" 11516func (c *SpreadsheetsValuesAppendCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesAppendCall { 11517 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 11518 return c 11519} 11520 11521// ResponseValueRenderOption sets the optional parameter 11522// "responseValueRenderOption": Determines how values in the response 11523// should be rendered. 11524// The default render option is ValueRenderOption.FORMATTED_VALUE. 11525// 11526// Possible values: 11527// "FORMATTED_VALUE" 11528// "UNFORMATTED_VALUE" 11529// "FORMULA" 11530func (c *SpreadsheetsValuesAppendCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesAppendCall { 11531 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 11532 return c 11533} 11534 11535// ValueInputOption sets the optional parameter "valueInputOption": How 11536// the input data should be interpreted. 11537// 11538// Possible values: 11539// "INPUT_VALUE_OPTION_UNSPECIFIED" 11540// "RAW" 11541// "USER_ENTERED" 11542func (c *SpreadsheetsValuesAppendCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesAppendCall { 11543 c.urlParams_.Set("valueInputOption", valueInputOption) 11544 return c 11545} 11546 11547// Fields allows partial responses to be retrieved. See 11548// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11549// for more information. 11550func (c *SpreadsheetsValuesAppendCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesAppendCall { 11551 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11552 return c 11553} 11554 11555// Context sets the context to be used in this call's Do method. Any 11556// pending HTTP request will be aborted if the provided context is 11557// canceled. 11558func (c *SpreadsheetsValuesAppendCall) Context(ctx context.Context) *SpreadsheetsValuesAppendCall { 11559 c.ctx_ = ctx 11560 return c 11561} 11562 11563// Header returns an http.Header that can be modified by the caller to 11564// add HTTP headers to the request. 11565func (c *SpreadsheetsValuesAppendCall) Header() http.Header { 11566 if c.header_ == nil { 11567 c.header_ = make(http.Header) 11568 } 11569 return c.header_ 11570} 11571 11572func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, error) { 11573 reqHeaders := make(http.Header) 11574 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11575 for k, v := range c.header_ { 11576 reqHeaders[k] = v 11577 } 11578 reqHeaders.Set("User-Agent", c.s.userAgent()) 11579 var body io.Reader = nil 11580 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 11581 if err != nil { 11582 return nil, err 11583 } 11584 reqHeaders.Set("Content-Type", "application/json") 11585 c.urlParams_.Set("alt", alt) 11586 c.urlParams_.Set("prettyPrint", "false") 11587 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append") 11588 urls += "?" + c.urlParams_.Encode() 11589 req, err := http.NewRequest("POST", urls, body) 11590 if err != nil { 11591 return nil, err 11592 } 11593 req.Header = reqHeaders 11594 googleapi.Expand(req.URL, map[string]string{ 11595 "spreadsheetId": c.spreadsheetId, 11596 "range": c.range_, 11597 }) 11598 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11599} 11600 11601// Do executes the "sheets.spreadsheets.values.append" call. 11602// Exactly one of *AppendValuesResponse or error will be non-nil. Any 11603// non-2xx status code is an error. Response headers are in either 11604// *AppendValuesResponse.ServerResponse.Header or (if a response was 11605// returned at all) in error.(*googleapi.Error).Header. Use 11606// googleapi.IsNotModified to check whether the returned error was 11607// because http.StatusNotModified was returned. 11608func (c *SpreadsheetsValuesAppendCall) Do(opts ...googleapi.CallOption) (*AppendValuesResponse, error) { 11609 gensupport.SetOptions(c.urlParams_, opts...) 11610 res, err := c.doRequest("json") 11611 if res != nil && res.StatusCode == http.StatusNotModified { 11612 if res.Body != nil { 11613 res.Body.Close() 11614 } 11615 return nil, &googleapi.Error{ 11616 Code: res.StatusCode, 11617 Header: res.Header, 11618 } 11619 } 11620 if err != nil { 11621 return nil, err 11622 } 11623 defer googleapi.CloseBody(res) 11624 if err := googleapi.CheckResponse(res); err != nil { 11625 return nil, err 11626 } 11627 ret := &AppendValuesResponse{ 11628 ServerResponse: googleapi.ServerResponse{ 11629 Header: res.Header, 11630 HTTPStatusCode: res.StatusCode, 11631 }, 11632 } 11633 target := &ret 11634 if err := gensupport.DecodeResponse(target, res); err != nil { 11635 return nil, err 11636 } 11637 return ret, nil 11638 // { 11639 // "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.", 11640 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 11641 // "httpMethod": "POST", 11642 // "id": "sheets.spreadsheets.values.append", 11643 // "parameterOrder": [ 11644 // "spreadsheetId", 11645 // "range" 11646 // ], 11647 // "parameters": { 11648 // "includeValuesInResponse": { 11649 // "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.", 11650 // "location": "query", 11651 // "type": "boolean" 11652 // }, 11653 // "insertDataOption": { 11654 // "description": "How the input data should be inserted.", 11655 // "enum": [ 11656 // "OVERWRITE", 11657 // "INSERT_ROWS" 11658 // ], 11659 // "location": "query", 11660 // "type": "string" 11661 // }, 11662 // "range": { 11663 // "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.", 11664 // "location": "path", 11665 // "required": true, 11666 // "type": "string" 11667 // }, 11668 // "responseDateTimeRenderOption": { 11669 // "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].", 11670 // "enum": [ 11671 // "SERIAL_NUMBER", 11672 // "FORMATTED_STRING" 11673 // ], 11674 // "location": "query", 11675 // "type": "string" 11676 // }, 11677 // "responseValueRenderOption": { 11678 // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 11679 // "enum": [ 11680 // "FORMATTED_VALUE", 11681 // "UNFORMATTED_VALUE", 11682 // "FORMULA" 11683 // ], 11684 // "location": "query", 11685 // "type": "string" 11686 // }, 11687 // "spreadsheetId": { 11688 // "description": "The ID of the spreadsheet to update.", 11689 // "location": "path", 11690 // "required": true, 11691 // "type": "string" 11692 // }, 11693 // "valueInputOption": { 11694 // "description": "How the input data should be interpreted.", 11695 // "enum": [ 11696 // "INPUT_VALUE_OPTION_UNSPECIFIED", 11697 // "RAW", 11698 // "USER_ENTERED" 11699 // ], 11700 // "location": "query", 11701 // "type": "string" 11702 // } 11703 // }, 11704 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 11705 // "request": { 11706 // "$ref": "ValueRange" 11707 // }, 11708 // "response": { 11709 // "$ref": "AppendValuesResponse" 11710 // }, 11711 // "scopes": [ 11712 // "https://www.googleapis.com/auth/drive", 11713 // "https://www.googleapis.com/auth/drive.file", 11714 // "https://www.googleapis.com/auth/spreadsheets" 11715 // ] 11716 // } 11717 11718} 11719 11720// method id "sheets.spreadsheets.values.batchClear": 11721 11722type SpreadsheetsValuesBatchClearCall struct { 11723 s *Service 11724 spreadsheetId string 11725 batchclearvaluesrequest *BatchClearValuesRequest 11726 urlParams_ gensupport.URLParams 11727 ctx_ context.Context 11728 header_ http.Header 11729} 11730 11731// BatchClear: Clears one or more ranges of values from a 11732// spreadsheet. 11733// The caller must specify the spreadsheet ID and one or more 11734// ranges. 11735// Only values are cleared -- all other properties of the cell (such 11736// as 11737// formatting, data validation, etc..) are kept. 11738func (r *SpreadsheetsValuesService) BatchClear(spreadsheetId string, batchclearvaluesrequest *BatchClearValuesRequest) *SpreadsheetsValuesBatchClearCall { 11739 c := &SpreadsheetsValuesBatchClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11740 c.spreadsheetId = spreadsheetId 11741 c.batchclearvaluesrequest = batchclearvaluesrequest 11742 return c 11743} 11744 11745// Fields allows partial responses to be retrieved. See 11746// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11747// for more information. 11748func (c *SpreadsheetsValuesBatchClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearCall { 11749 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11750 return c 11751} 11752 11753// Context sets the context to be used in this call's Do method. Any 11754// pending HTTP request will be aborted if the provided context is 11755// canceled. 11756func (c *SpreadsheetsValuesBatchClearCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearCall { 11757 c.ctx_ = ctx 11758 return c 11759} 11760 11761// Header returns an http.Header that can be modified by the caller to 11762// add HTTP headers to the request. 11763func (c *SpreadsheetsValuesBatchClearCall) Header() http.Header { 11764 if c.header_ == nil { 11765 c.header_ = make(http.Header) 11766 } 11767 return c.header_ 11768} 11769 11770func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response, error) { 11771 reqHeaders := make(http.Header) 11772 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11773 for k, v := range c.header_ { 11774 reqHeaders[k] = v 11775 } 11776 reqHeaders.Set("User-Agent", c.s.userAgent()) 11777 var body io.Reader = nil 11778 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesrequest) 11779 if err != nil { 11780 return nil, err 11781 } 11782 reqHeaders.Set("Content-Type", "application/json") 11783 c.urlParams_.Set("alt", alt) 11784 c.urlParams_.Set("prettyPrint", "false") 11785 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear") 11786 urls += "?" + c.urlParams_.Encode() 11787 req, err := http.NewRequest("POST", urls, body) 11788 if err != nil { 11789 return nil, err 11790 } 11791 req.Header = reqHeaders 11792 googleapi.Expand(req.URL, map[string]string{ 11793 "spreadsheetId": c.spreadsheetId, 11794 }) 11795 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11796} 11797 11798// Do executes the "sheets.spreadsheets.values.batchClear" call. 11799// Exactly one of *BatchClearValuesResponse or error will be non-nil. 11800// Any non-2xx status code is an error. Response headers are in either 11801// *BatchClearValuesResponse.ServerResponse.Header or (if a response was 11802// returned at all) in error.(*googleapi.Error).Header. Use 11803// googleapi.IsNotModified to check whether the returned error was 11804// because http.StatusNotModified was returned. 11805func (c *SpreadsheetsValuesBatchClearCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesResponse, error) { 11806 gensupport.SetOptions(c.urlParams_, opts...) 11807 res, err := c.doRequest("json") 11808 if res != nil && res.StatusCode == http.StatusNotModified { 11809 if res.Body != nil { 11810 res.Body.Close() 11811 } 11812 return nil, &googleapi.Error{ 11813 Code: res.StatusCode, 11814 Header: res.Header, 11815 } 11816 } 11817 if err != nil { 11818 return nil, err 11819 } 11820 defer googleapi.CloseBody(res) 11821 if err := googleapi.CheckResponse(res); err != nil { 11822 return nil, err 11823 } 11824 ret := &BatchClearValuesResponse{ 11825 ServerResponse: googleapi.ServerResponse{ 11826 Header: res.Header, 11827 HTTPStatusCode: res.StatusCode, 11828 }, 11829 } 11830 target := &ret 11831 if err := gensupport.DecodeResponse(target, res); err != nil { 11832 return nil, err 11833 } 11834 return ret, nil 11835 // { 11836 // "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.", 11837 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 11838 // "httpMethod": "POST", 11839 // "id": "sheets.spreadsheets.values.batchClear", 11840 // "parameterOrder": [ 11841 // "spreadsheetId" 11842 // ], 11843 // "parameters": { 11844 // "spreadsheetId": { 11845 // "description": "The ID of the spreadsheet to update.", 11846 // "location": "path", 11847 // "required": true, 11848 // "type": "string" 11849 // } 11850 // }, 11851 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 11852 // "request": { 11853 // "$ref": "BatchClearValuesRequest" 11854 // }, 11855 // "response": { 11856 // "$ref": "BatchClearValuesResponse" 11857 // }, 11858 // "scopes": [ 11859 // "https://www.googleapis.com/auth/drive", 11860 // "https://www.googleapis.com/auth/drive.file", 11861 // "https://www.googleapis.com/auth/spreadsheets" 11862 // ] 11863 // } 11864 11865} 11866 11867// method id "sheets.spreadsheets.values.batchClearByDataFilter": 11868 11869type SpreadsheetsValuesBatchClearByDataFilterCall struct { 11870 s *Service 11871 spreadsheetId string 11872 batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest 11873 urlParams_ gensupport.URLParams 11874 ctx_ context.Context 11875 header_ http.Header 11876} 11877 11878// BatchClearByDataFilter: Clears one or more ranges of values from a 11879// spreadsheet. 11880// The caller must specify the spreadsheet ID and one or 11881// more 11882// DataFilters. Ranges matching any of the specified data 11883// filters will be cleared. Only values are cleared -- all other 11884// properties 11885// of the cell (such as formatting, data validation, etc..) are kept. 11886func (r *SpreadsheetsValuesService) BatchClearByDataFilter(spreadsheetId string, batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest) *SpreadsheetsValuesBatchClearByDataFilterCall { 11887 c := &SpreadsheetsValuesBatchClearByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11888 c.spreadsheetId = spreadsheetId 11889 c.batchclearvaluesbydatafilterrequest = batchclearvaluesbydatafilterrequest 11890 return c 11891} 11892 11893// Fields allows partial responses to be retrieved. See 11894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11895// for more information. 11896func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearByDataFilterCall { 11897 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11898 return c 11899} 11900 11901// Context sets the context to be used in this call's Do method. Any 11902// pending HTTP request will be aborted if the provided context is 11903// canceled. 11904func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearByDataFilterCall { 11905 c.ctx_ = ctx 11906 return c 11907} 11908 11909// Header returns an http.Header that can be modified by the caller to 11910// add HTTP headers to the request. 11911func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Header() http.Header { 11912 if c.header_ == nil { 11913 c.header_ = make(http.Header) 11914 } 11915 return c.header_ 11916} 11917 11918func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*http.Response, error) { 11919 reqHeaders := make(http.Header) 11920 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 11921 for k, v := range c.header_ { 11922 reqHeaders[k] = v 11923 } 11924 reqHeaders.Set("User-Agent", c.s.userAgent()) 11925 var body io.Reader = nil 11926 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesbydatafilterrequest) 11927 if err != nil { 11928 return nil, err 11929 } 11930 reqHeaders.Set("Content-Type", "application/json") 11931 c.urlParams_.Set("alt", alt) 11932 c.urlParams_.Set("prettyPrint", "false") 11933 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter") 11934 urls += "?" + c.urlParams_.Encode() 11935 req, err := http.NewRequest("POST", urls, body) 11936 if err != nil { 11937 return nil, err 11938 } 11939 req.Header = reqHeaders 11940 googleapi.Expand(req.URL, map[string]string{ 11941 "spreadsheetId": c.spreadsheetId, 11942 }) 11943 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11944} 11945 11946// Do executes the "sheets.spreadsheets.values.batchClearByDataFilter" call. 11947// Exactly one of *BatchClearValuesByDataFilterResponse or error will be 11948// non-nil. Any non-2xx status code is an error. Response headers are in 11949// either *BatchClearValuesByDataFilterResponse.ServerResponse.Header or 11950// (if a response was returned at all) in 11951// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 11952// whether the returned error was because http.StatusNotModified was 11953// returned. 11954func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesByDataFilterResponse, error) { 11955 gensupport.SetOptions(c.urlParams_, opts...) 11956 res, err := c.doRequest("json") 11957 if res != nil && res.StatusCode == http.StatusNotModified { 11958 if res.Body != nil { 11959 res.Body.Close() 11960 } 11961 return nil, &googleapi.Error{ 11962 Code: res.StatusCode, 11963 Header: res.Header, 11964 } 11965 } 11966 if err != nil { 11967 return nil, err 11968 } 11969 defer googleapi.CloseBody(res) 11970 if err := googleapi.CheckResponse(res); err != nil { 11971 return nil, err 11972 } 11973 ret := &BatchClearValuesByDataFilterResponse{ 11974 ServerResponse: googleapi.ServerResponse{ 11975 Header: res.Header, 11976 HTTPStatusCode: res.StatusCode, 11977 }, 11978 } 11979 target := &ret 11980 if err := gensupport.DecodeResponse(target, res); err != nil { 11981 return nil, err 11982 } 11983 return ret, nil 11984 // { 11985 // "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.", 11986 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 11987 // "httpMethod": "POST", 11988 // "id": "sheets.spreadsheets.values.batchClearByDataFilter", 11989 // "parameterOrder": [ 11990 // "spreadsheetId" 11991 // ], 11992 // "parameters": { 11993 // "spreadsheetId": { 11994 // "description": "The ID of the spreadsheet to update.", 11995 // "location": "path", 11996 // "required": true, 11997 // "type": "string" 11998 // } 11999 // }, 12000 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 12001 // "request": { 12002 // "$ref": "BatchClearValuesByDataFilterRequest" 12003 // }, 12004 // "response": { 12005 // "$ref": "BatchClearValuesByDataFilterResponse" 12006 // }, 12007 // "scopes": [ 12008 // "https://www.googleapis.com/auth/drive", 12009 // "https://www.googleapis.com/auth/drive.file", 12010 // "https://www.googleapis.com/auth/spreadsheets" 12011 // ] 12012 // } 12013 12014} 12015 12016// method id "sheets.spreadsheets.values.batchGet": 12017 12018type SpreadsheetsValuesBatchGetCall struct { 12019 s *Service 12020 spreadsheetId string 12021 urlParams_ gensupport.URLParams 12022 ifNoneMatch_ string 12023 ctx_ context.Context 12024 header_ http.Header 12025} 12026 12027// BatchGet: Returns one or more ranges of values from a 12028// spreadsheet. 12029// The caller must specify the spreadsheet ID and one or more ranges. 12030func (r *SpreadsheetsValuesService) BatchGet(spreadsheetId string) *SpreadsheetsValuesBatchGetCall { 12031 c := &SpreadsheetsValuesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12032 c.spreadsheetId = spreadsheetId 12033 return c 12034} 12035 12036// DateTimeRenderOption sets the optional parameter 12037// "dateTimeRenderOption": How dates, times, and durations should be 12038// represented in the output. 12039// This is ignored if value_render_option is 12040// FORMATTED_VALUE. 12041// The default dateTime render option is 12042// [DateTimeRenderOption.SERIAL_NUMBER]. 12043// 12044// Possible values: 12045// "SERIAL_NUMBER" 12046// "FORMATTED_STRING" 12047func (c *SpreadsheetsValuesBatchGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesBatchGetCall { 12048 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 12049 return c 12050} 12051 12052// MajorDimension sets the optional parameter "majorDimension": The 12053// major dimension that results should use. 12054// 12055// For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 12056// then requesting `range=A1:B2,majorDimension=ROWS` will 12057// return 12058// `[[1,2],[3,4]]`, 12059// whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 12060// return 12061// `[[1,3],[2,4]]`. 12062// 12063// Possible values: 12064// "DIMENSION_UNSPECIFIED" 12065// "ROWS" 12066// "COLUMNS" 12067func (c *SpreadsheetsValuesBatchGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesBatchGetCall { 12068 c.urlParams_.Set("majorDimension", majorDimension) 12069 return c 12070} 12071 12072// Ranges sets the optional parameter "ranges": The A1 notation of the 12073// values to retrieve. 12074func (c *SpreadsheetsValuesBatchGetCall) Ranges(ranges ...string) *SpreadsheetsValuesBatchGetCall { 12075 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 12076 return c 12077} 12078 12079// ValueRenderOption sets the optional parameter "valueRenderOption": 12080// How values should be represented in the output. 12081// The default render option is ValueRenderOption.FORMATTED_VALUE. 12082// 12083// Possible values: 12084// "FORMATTED_VALUE" 12085// "UNFORMATTED_VALUE" 12086// "FORMULA" 12087func (c *SpreadsheetsValuesBatchGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesBatchGetCall { 12088 c.urlParams_.Set("valueRenderOption", valueRenderOption) 12089 return c 12090} 12091 12092// Fields allows partial responses to be retrieved. See 12093// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12094// for more information. 12095func (c *SpreadsheetsValuesBatchGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetCall { 12096 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12097 return c 12098} 12099 12100// IfNoneMatch sets the optional parameter which makes the operation 12101// fail if the object's ETag matches the given value. This is useful for 12102// getting updates only after the object has changed since the last 12103// request. Use googleapi.IsNotModified to check whether the response 12104// error from Do is the result of In-None-Match. 12105func (c *SpreadsheetsValuesBatchGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesBatchGetCall { 12106 c.ifNoneMatch_ = entityTag 12107 return c 12108} 12109 12110// Context sets the context to be used in this call's Do method. Any 12111// pending HTTP request will be aborted if the provided context is 12112// canceled. 12113func (c *SpreadsheetsValuesBatchGetCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetCall { 12114 c.ctx_ = ctx 12115 return c 12116} 12117 12118// Header returns an http.Header that can be modified by the caller to 12119// add HTTP headers to the request. 12120func (c *SpreadsheetsValuesBatchGetCall) Header() http.Header { 12121 if c.header_ == nil { 12122 c.header_ = make(http.Header) 12123 } 12124 return c.header_ 12125} 12126 12127func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, error) { 12128 reqHeaders := make(http.Header) 12129 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12130 for k, v := range c.header_ { 12131 reqHeaders[k] = v 12132 } 12133 reqHeaders.Set("User-Agent", c.s.userAgent()) 12134 if c.ifNoneMatch_ != "" { 12135 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12136 } 12137 var body io.Reader = nil 12138 c.urlParams_.Set("alt", alt) 12139 c.urlParams_.Set("prettyPrint", "false") 12140 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet") 12141 urls += "?" + c.urlParams_.Encode() 12142 req, err := http.NewRequest("GET", urls, body) 12143 if err != nil { 12144 return nil, err 12145 } 12146 req.Header = reqHeaders 12147 googleapi.Expand(req.URL, map[string]string{ 12148 "spreadsheetId": c.spreadsheetId, 12149 }) 12150 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12151} 12152 12153// Do executes the "sheets.spreadsheets.values.batchGet" call. 12154// Exactly one of *BatchGetValuesResponse or error will be non-nil. Any 12155// non-2xx status code is an error. Response headers are in either 12156// *BatchGetValuesResponse.ServerResponse.Header or (if a response was 12157// returned at all) in error.(*googleapi.Error).Header. Use 12158// googleapi.IsNotModified to check whether the returned error was 12159// because http.StatusNotModified was returned. 12160func (c *SpreadsheetsValuesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesResponse, error) { 12161 gensupport.SetOptions(c.urlParams_, opts...) 12162 res, err := c.doRequest("json") 12163 if res != nil && res.StatusCode == http.StatusNotModified { 12164 if res.Body != nil { 12165 res.Body.Close() 12166 } 12167 return nil, &googleapi.Error{ 12168 Code: res.StatusCode, 12169 Header: res.Header, 12170 } 12171 } 12172 if err != nil { 12173 return nil, err 12174 } 12175 defer googleapi.CloseBody(res) 12176 if err := googleapi.CheckResponse(res); err != nil { 12177 return nil, err 12178 } 12179 ret := &BatchGetValuesResponse{ 12180 ServerResponse: googleapi.ServerResponse{ 12181 Header: res.Header, 12182 HTTPStatusCode: res.StatusCode, 12183 }, 12184 } 12185 target := &ret 12186 if err := gensupport.DecodeResponse(target, res); err != nil { 12187 return nil, err 12188 } 12189 return ret, nil 12190 // { 12191 // "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.", 12192 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 12193 // "httpMethod": "GET", 12194 // "id": "sheets.spreadsheets.values.batchGet", 12195 // "parameterOrder": [ 12196 // "spreadsheetId" 12197 // ], 12198 // "parameters": { 12199 // "dateTimeRenderOption": { 12200 // "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].", 12201 // "enum": [ 12202 // "SERIAL_NUMBER", 12203 // "FORMATTED_STRING" 12204 // ], 12205 // "location": "query", 12206 // "type": "string" 12207 // }, 12208 // "majorDimension": { 12209 // "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]]`.", 12210 // "enum": [ 12211 // "DIMENSION_UNSPECIFIED", 12212 // "ROWS", 12213 // "COLUMNS" 12214 // ], 12215 // "location": "query", 12216 // "type": "string" 12217 // }, 12218 // "ranges": { 12219 // "description": "The A1 notation of the values to retrieve.", 12220 // "location": "query", 12221 // "repeated": true, 12222 // "type": "string" 12223 // }, 12224 // "spreadsheetId": { 12225 // "description": "The ID of the spreadsheet to retrieve data from.", 12226 // "location": "path", 12227 // "required": true, 12228 // "type": "string" 12229 // }, 12230 // "valueRenderOption": { 12231 // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 12232 // "enum": [ 12233 // "FORMATTED_VALUE", 12234 // "UNFORMATTED_VALUE", 12235 // "FORMULA" 12236 // ], 12237 // "location": "query", 12238 // "type": "string" 12239 // } 12240 // }, 12241 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 12242 // "response": { 12243 // "$ref": "BatchGetValuesResponse" 12244 // }, 12245 // "scopes": [ 12246 // "https://www.googleapis.com/auth/drive", 12247 // "https://www.googleapis.com/auth/drive.file", 12248 // "https://www.googleapis.com/auth/drive.readonly", 12249 // "https://www.googleapis.com/auth/spreadsheets", 12250 // "https://www.googleapis.com/auth/spreadsheets.readonly" 12251 // ] 12252 // } 12253 12254} 12255 12256// method id "sheets.spreadsheets.values.batchGetByDataFilter": 12257 12258type SpreadsheetsValuesBatchGetByDataFilterCall struct { 12259 s *Service 12260 spreadsheetId string 12261 batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest 12262 urlParams_ gensupport.URLParams 12263 ctx_ context.Context 12264 header_ http.Header 12265} 12266 12267// BatchGetByDataFilter: Returns one or more ranges of values that match 12268// the specified data filters. 12269// The caller must specify the spreadsheet ID and one or 12270// more 12271// DataFilters. Ranges that match any of the data filters in 12272// the request will be returned. 12273func (r *SpreadsheetsValuesService) BatchGetByDataFilter(spreadsheetId string, batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest) *SpreadsheetsValuesBatchGetByDataFilterCall { 12274 c := &SpreadsheetsValuesBatchGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12275 c.spreadsheetId = spreadsheetId 12276 c.batchgetvaluesbydatafilterrequest = batchgetvaluesbydatafilterrequest 12277 return c 12278} 12279 12280// Fields allows partial responses to be retrieved. See 12281// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12282// for more information. 12283func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetByDataFilterCall { 12284 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12285 return c 12286} 12287 12288// Context sets the context to be used in this call's Do method. Any 12289// pending HTTP request will be aborted if the provided context is 12290// canceled. 12291func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetByDataFilterCall { 12292 c.ctx_ = ctx 12293 return c 12294} 12295 12296// Header returns an http.Header that can be modified by the caller to 12297// add HTTP headers to the request. 12298func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Header() http.Header { 12299 if c.header_ == nil { 12300 c.header_ = make(http.Header) 12301 } 12302 return c.header_ 12303} 12304 12305func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 12306 reqHeaders := make(http.Header) 12307 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12308 for k, v := range c.header_ { 12309 reqHeaders[k] = v 12310 } 12311 reqHeaders.Set("User-Agent", c.s.userAgent()) 12312 var body io.Reader = nil 12313 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetvaluesbydatafilterrequest) 12314 if err != nil { 12315 return nil, err 12316 } 12317 reqHeaders.Set("Content-Type", "application/json") 12318 c.urlParams_.Set("alt", alt) 12319 c.urlParams_.Set("prettyPrint", "false") 12320 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter") 12321 urls += "?" + c.urlParams_.Encode() 12322 req, err := http.NewRequest("POST", urls, body) 12323 if err != nil { 12324 return nil, err 12325 } 12326 req.Header = reqHeaders 12327 googleapi.Expand(req.URL, map[string]string{ 12328 "spreadsheetId": c.spreadsheetId, 12329 }) 12330 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12331} 12332 12333// Do executes the "sheets.spreadsheets.values.batchGetByDataFilter" call. 12334// Exactly one of *BatchGetValuesByDataFilterResponse or error will be 12335// non-nil. Any non-2xx status code is an error. Response headers are in 12336// either *BatchGetValuesByDataFilterResponse.ServerResponse.Header or 12337// (if a response was returned at all) in 12338// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 12339// whether the returned error was because http.StatusNotModified was 12340// returned. 12341func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesByDataFilterResponse, error) { 12342 gensupport.SetOptions(c.urlParams_, opts...) 12343 res, err := c.doRequest("json") 12344 if res != nil && res.StatusCode == http.StatusNotModified { 12345 if res.Body != nil { 12346 res.Body.Close() 12347 } 12348 return nil, &googleapi.Error{ 12349 Code: res.StatusCode, 12350 Header: res.Header, 12351 } 12352 } 12353 if err != nil { 12354 return nil, err 12355 } 12356 defer googleapi.CloseBody(res) 12357 if err := googleapi.CheckResponse(res); err != nil { 12358 return nil, err 12359 } 12360 ret := &BatchGetValuesByDataFilterResponse{ 12361 ServerResponse: googleapi.ServerResponse{ 12362 Header: res.Header, 12363 HTTPStatusCode: res.StatusCode, 12364 }, 12365 } 12366 target := &ret 12367 if err := gensupport.DecodeResponse(target, res); err != nil { 12368 return nil, err 12369 } 12370 return ret, nil 12371 // { 12372 // "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.", 12373 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 12374 // "httpMethod": "POST", 12375 // "id": "sheets.spreadsheets.values.batchGetByDataFilter", 12376 // "parameterOrder": [ 12377 // "spreadsheetId" 12378 // ], 12379 // "parameters": { 12380 // "spreadsheetId": { 12381 // "description": "The ID of the spreadsheet to retrieve data from.", 12382 // "location": "path", 12383 // "required": true, 12384 // "type": "string" 12385 // } 12386 // }, 12387 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 12388 // "request": { 12389 // "$ref": "BatchGetValuesByDataFilterRequest" 12390 // }, 12391 // "response": { 12392 // "$ref": "BatchGetValuesByDataFilterResponse" 12393 // }, 12394 // "scopes": [ 12395 // "https://www.googleapis.com/auth/drive", 12396 // "https://www.googleapis.com/auth/drive.file", 12397 // "https://www.googleapis.com/auth/spreadsheets" 12398 // ] 12399 // } 12400 12401} 12402 12403// method id "sheets.spreadsheets.values.batchUpdate": 12404 12405type SpreadsheetsValuesBatchUpdateCall struct { 12406 s *Service 12407 spreadsheetId string 12408 batchupdatevaluesrequest *BatchUpdateValuesRequest 12409 urlParams_ gensupport.URLParams 12410 ctx_ context.Context 12411 header_ http.Header 12412} 12413 12414// BatchUpdate: Sets values in one or more ranges of a spreadsheet. 12415// The caller must specify the spreadsheet ID, 12416// a valueInputOption, and one or more 12417// ValueRanges. 12418func (r *SpreadsheetsValuesService) BatchUpdate(spreadsheetId string, batchupdatevaluesrequest *BatchUpdateValuesRequest) *SpreadsheetsValuesBatchUpdateCall { 12419 c := &SpreadsheetsValuesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12420 c.spreadsheetId = spreadsheetId 12421 c.batchupdatevaluesrequest = batchupdatevaluesrequest 12422 return c 12423} 12424 12425// Fields allows partial responses to be retrieved. See 12426// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12427// for more information. 12428func (c *SpreadsheetsValuesBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateCall { 12429 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12430 return c 12431} 12432 12433// Context sets the context to be used in this call's Do method. Any 12434// pending HTTP request will be aborted if the provided context is 12435// canceled. 12436func (c *SpreadsheetsValuesBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateCall { 12437 c.ctx_ = ctx 12438 return c 12439} 12440 12441// Header returns an http.Header that can be modified by the caller to 12442// add HTTP headers to the request. 12443func (c *SpreadsheetsValuesBatchUpdateCall) Header() http.Header { 12444 if c.header_ == nil { 12445 c.header_ = make(http.Header) 12446 } 12447 return c.header_ 12448} 12449 12450func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 12451 reqHeaders := make(http.Header) 12452 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12453 for k, v := range c.header_ { 12454 reqHeaders[k] = v 12455 } 12456 reqHeaders.Set("User-Agent", c.s.userAgent()) 12457 var body io.Reader = nil 12458 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesrequest) 12459 if err != nil { 12460 return nil, err 12461 } 12462 reqHeaders.Set("Content-Type", "application/json") 12463 c.urlParams_.Set("alt", alt) 12464 c.urlParams_.Set("prettyPrint", "false") 12465 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate") 12466 urls += "?" + c.urlParams_.Encode() 12467 req, err := http.NewRequest("POST", urls, body) 12468 if err != nil { 12469 return nil, err 12470 } 12471 req.Header = reqHeaders 12472 googleapi.Expand(req.URL, map[string]string{ 12473 "spreadsheetId": c.spreadsheetId, 12474 }) 12475 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12476} 12477 12478// Do executes the "sheets.spreadsheets.values.batchUpdate" call. 12479// Exactly one of *BatchUpdateValuesResponse or error will be non-nil. 12480// Any non-2xx status code is an error. Response headers are in either 12481// *BatchUpdateValuesResponse.ServerResponse.Header or (if a response 12482// was returned at all) in error.(*googleapi.Error).Header. Use 12483// googleapi.IsNotModified to check whether the returned error was 12484// because http.StatusNotModified was returned. 12485func (c *SpreadsheetsValuesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesResponse, error) { 12486 gensupport.SetOptions(c.urlParams_, opts...) 12487 res, err := c.doRequest("json") 12488 if res != nil && res.StatusCode == http.StatusNotModified { 12489 if res.Body != nil { 12490 res.Body.Close() 12491 } 12492 return nil, &googleapi.Error{ 12493 Code: res.StatusCode, 12494 Header: res.Header, 12495 } 12496 } 12497 if err != nil { 12498 return nil, err 12499 } 12500 defer googleapi.CloseBody(res) 12501 if err := googleapi.CheckResponse(res); err != nil { 12502 return nil, err 12503 } 12504 ret := &BatchUpdateValuesResponse{ 12505 ServerResponse: googleapi.ServerResponse{ 12506 Header: res.Header, 12507 HTTPStatusCode: res.StatusCode, 12508 }, 12509 } 12510 target := &ret 12511 if err := gensupport.DecodeResponse(target, res); err != nil { 12512 return nil, err 12513 } 12514 return ret, nil 12515 // { 12516 // "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.", 12517 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 12518 // "httpMethod": "POST", 12519 // "id": "sheets.spreadsheets.values.batchUpdate", 12520 // "parameterOrder": [ 12521 // "spreadsheetId" 12522 // ], 12523 // "parameters": { 12524 // "spreadsheetId": { 12525 // "description": "The ID of the spreadsheet to update.", 12526 // "location": "path", 12527 // "required": true, 12528 // "type": "string" 12529 // } 12530 // }, 12531 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 12532 // "request": { 12533 // "$ref": "BatchUpdateValuesRequest" 12534 // }, 12535 // "response": { 12536 // "$ref": "BatchUpdateValuesResponse" 12537 // }, 12538 // "scopes": [ 12539 // "https://www.googleapis.com/auth/drive", 12540 // "https://www.googleapis.com/auth/drive.file", 12541 // "https://www.googleapis.com/auth/spreadsheets" 12542 // ] 12543 // } 12544 12545} 12546 12547// method id "sheets.spreadsheets.values.batchUpdateByDataFilter": 12548 12549type SpreadsheetsValuesBatchUpdateByDataFilterCall struct { 12550 s *Service 12551 spreadsheetId string 12552 batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest 12553 urlParams_ gensupport.URLParams 12554 ctx_ context.Context 12555 header_ http.Header 12556} 12557 12558// BatchUpdateByDataFilter: Sets values in one or more ranges of a 12559// spreadsheet. 12560// The caller must specify the spreadsheet ID, 12561// a valueInputOption, and one or more 12562// DataFilterValueRanges. 12563func (r *SpreadsheetsValuesService) BatchUpdateByDataFilter(spreadsheetId string, batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 12564 c := &SpreadsheetsValuesBatchUpdateByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12565 c.spreadsheetId = spreadsheetId 12566 c.batchupdatevaluesbydatafilterrequest = batchupdatevaluesbydatafilterrequest 12567 return c 12568} 12569 12570// Fields allows partial responses to be retrieved. See 12571// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12572// for more information. 12573func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 12574 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12575 return c 12576} 12577 12578// Context sets the context to be used in this call's Do method. Any 12579// pending HTTP request will be aborted if the provided context is 12580// canceled. 12581func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 12582 c.ctx_ = ctx 12583 return c 12584} 12585 12586// Header returns an http.Header that can be modified by the caller to 12587// add HTTP headers to the request. 12588func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Header() http.Header { 12589 if c.header_ == nil { 12590 c.header_ = make(http.Header) 12591 } 12592 return c.header_ 12593} 12594 12595func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (*http.Response, error) { 12596 reqHeaders := make(http.Header) 12597 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12598 for k, v := range c.header_ { 12599 reqHeaders[k] = v 12600 } 12601 reqHeaders.Set("User-Agent", c.s.userAgent()) 12602 var body io.Reader = nil 12603 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesbydatafilterrequest) 12604 if err != nil { 12605 return nil, err 12606 } 12607 reqHeaders.Set("Content-Type", "application/json") 12608 c.urlParams_.Set("alt", alt) 12609 c.urlParams_.Set("prettyPrint", "false") 12610 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter") 12611 urls += "?" + c.urlParams_.Encode() 12612 req, err := http.NewRequest("POST", urls, body) 12613 if err != nil { 12614 return nil, err 12615 } 12616 req.Header = reqHeaders 12617 googleapi.Expand(req.URL, map[string]string{ 12618 "spreadsheetId": c.spreadsheetId, 12619 }) 12620 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12621} 12622 12623// Do executes the "sheets.spreadsheets.values.batchUpdateByDataFilter" call. 12624// Exactly one of *BatchUpdateValuesByDataFilterResponse or error will 12625// be non-nil. Any non-2xx status code is an error. Response headers are 12626// in either 12627// *BatchUpdateValuesByDataFilterResponse.ServerResponse.Header or (if a 12628// response was returned at all) in error.(*googleapi.Error).Header. Use 12629// googleapi.IsNotModified to check whether the returned error was 12630// because http.StatusNotModified was returned. 12631func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesByDataFilterResponse, error) { 12632 gensupport.SetOptions(c.urlParams_, opts...) 12633 res, err := c.doRequest("json") 12634 if res != nil && res.StatusCode == http.StatusNotModified { 12635 if res.Body != nil { 12636 res.Body.Close() 12637 } 12638 return nil, &googleapi.Error{ 12639 Code: res.StatusCode, 12640 Header: res.Header, 12641 } 12642 } 12643 if err != nil { 12644 return nil, err 12645 } 12646 defer googleapi.CloseBody(res) 12647 if err := googleapi.CheckResponse(res); err != nil { 12648 return nil, err 12649 } 12650 ret := &BatchUpdateValuesByDataFilterResponse{ 12651 ServerResponse: googleapi.ServerResponse{ 12652 Header: res.Header, 12653 HTTPStatusCode: res.StatusCode, 12654 }, 12655 } 12656 target := &ret 12657 if err := gensupport.DecodeResponse(target, res); err != nil { 12658 return nil, err 12659 } 12660 return ret, nil 12661 // { 12662 // "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.", 12663 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 12664 // "httpMethod": "POST", 12665 // "id": "sheets.spreadsheets.values.batchUpdateByDataFilter", 12666 // "parameterOrder": [ 12667 // "spreadsheetId" 12668 // ], 12669 // "parameters": { 12670 // "spreadsheetId": { 12671 // "description": "The ID of the spreadsheet to update.", 12672 // "location": "path", 12673 // "required": true, 12674 // "type": "string" 12675 // } 12676 // }, 12677 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 12678 // "request": { 12679 // "$ref": "BatchUpdateValuesByDataFilterRequest" 12680 // }, 12681 // "response": { 12682 // "$ref": "BatchUpdateValuesByDataFilterResponse" 12683 // }, 12684 // "scopes": [ 12685 // "https://www.googleapis.com/auth/drive", 12686 // "https://www.googleapis.com/auth/drive.file", 12687 // "https://www.googleapis.com/auth/spreadsheets" 12688 // ] 12689 // } 12690 12691} 12692 12693// method id "sheets.spreadsheets.values.clear": 12694 12695type SpreadsheetsValuesClearCall struct { 12696 s *Service 12697 spreadsheetId string 12698 range_ string 12699 clearvaluesrequest *ClearValuesRequest 12700 urlParams_ gensupport.URLParams 12701 ctx_ context.Context 12702 header_ http.Header 12703} 12704 12705// Clear: Clears values from a spreadsheet. 12706// The caller must specify the spreadsheet ID and range. 12707// Only values are cleared -- all other properties of the cell (such 12708// as 12709// formatting, data validation, etc..) are kept. 12710func (r *SpreadsheetsValuesService) Clear(spreadsheetId string, range_ string, clearvaluesrequest *ClearValuesRequest) *SpreadsheetsValuesClearCall { 12711 c := &SpreadsheetsValuesClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12712 c.spreadsheetId = spreadsheetId 12713 c.range_ = range_ 12714 c.clearvaluesrequest = clearvaluesrequest 12715 return c 12716} 12717 12718// Fields allows partial responses to be retrieved. See 12719// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12720// for more information. 12721func (c *SpreadsheetsValuesClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesClearCall { 12722 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12723 return c 12724} 12725 12726// Context sets the context to be used in this call's Do method. Any 12727// pending HTTP request will be aborted if the provided context is 12728// canceled. 12729func (c *SpreadsheetsValuesClearCall) Context(ctx context.Context) *SpreadsheetsValuesClearCall { 12730 c.ctx_ = ctx 12731 return c 12732} 12733 12734// Header returns an http.Header that can be modified by the caller to 12735// add HTTP headers to the request. 12736func (c *SpreadsheetsValuesClearCall) Header() http.Header { 12737 if c.header_ == nil { 12738 c.header_ = make(http.Header) 12739 } 12740 return c.header_ 12741} 12742 12743func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, error) { 12744 reqHeaders := make(http.Header) 12745 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12746 for k, v := range c.header_ { 12747 reqHeaders[k] = v 12748 } 12749 reqHeaders.Set("User-Agent", c.s.userAgent()) 12750 var body io.Reader = nil 12751 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearvaluesrequest) 12752 if err != nil { 12753 return nil, err 12754 } 12755 reqHeaders.Set("Content-Type", "application/json") 12756 c.urlParams_.Set("alt", alt) 12757 c.urlParams_.Set("prettyPrint", "false") 12758 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear") 12759 urls += "?" + c.urlParams_.Encode() 12760 req, err := http.NewRequest("POST", urls, body) 12761 if err != nil { 12762 return nil, err 12763 } 12764 req.Header = reqHeaders 12765 googleapi.Expand(req.URL, map[string]string{ 12766 "spreadsheetId": c.spreadsheetId, 12767 "range": c.range_, 12768 }) 12769 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12770} 12771 12772// Do executes the "sheets.spreadsheets.values.clear" call. 12773// Exactly one of *ClearValuesResponse or error will be non-nil. Any 12774// non-2xx status code is an error. Response headers are in either 12775// *ClearValuesResponse.ServerResponse.Header or (if a response was 12776// returned at all) in error.(*googleapi.Error).Header. Use 12777// googleapi.IsNotModified to check whether the returned error was 12778// because http.StatusNotModified was returned. 12779func (c *SpreadsheetsValuesClearCall) Do(opts ...googleapi.CallOption) (*ClearValuesResponse, error) { 12780 gensupport.SetOptions(c.urlParams_, opts...) 12781 res, err := c.doRequest("json") 12782 if res != nil && res.StatusCode == http.StatusNotModified { 12783 if res.Body != nil { 12784 res.Body.Close() 12785 } 12786 return nil, &googleapi.Error{ 12787 Code: res.StatusCode, 12788 Header: res.Header, 12789 } 12790 } 12791 if err != nil { 12792 return nil, err 12793 } 12794 defer googleapi.CloseBody(res) 12795 if err := googleapi.CheckResponse(res); err != nil { 12796 return nil, err 12797 } 12798 ret := &ClearValuesResponse{ 12799 ServerResponse: googleapi.ServerResponse{ 12800 Header: res.Header, 12801 HTTPStatusCode: res.StatusCode, 12802 }, 12803 } 12804 target := &ret 12805 if err := gensupport.DecodeResponse(target, res); err != nil { 12806 return nil, err 12807 } 12808 return ret, nil 12809 // { 12810 // "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.", 12811 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 12812 // "httpMethod": "POST", 12813 // "id": "sheets.spreadsheets.values.clear", 12814 // "parameterOrder": [ 12815 // "spreadsheetId", 12816 // "range" 12817 // ], 12818 // "parameters": { 12819 // "range": { 12820 // "description": "The A1 notation of the values to clear.", 12821 // "location": "path", 12822 // "required": true, 12823 // "type": "string" 12824 // }, 12825 // "spreadsheetId": { 12826 // "description": "The ID of the spreadsheet to update.", 12827 // "location": "path", 12828 // "required": true, 12829 // "type": "string" 12830 // } 12831 // }, 12832 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 12833 // "request": { 12834 // "$ref": "ClearValuesRequest" 12835 // }, 12836 // "response": { 12837 // "$ref": "ClearValuesResponse" 12838 // }, 12839 // "scopes": [ 12840 // "https://www.googleapis.com/auth/drive", 12841 // "https://www.googleapis.com/auth/drive.file", 12842 // "https://www.googleapis.com/auth/spreadsheets" 12843 // ] 12844 // } 12845 12846} 12847 12848// method id "sheets.spreadsheets.values.get": 12849 12850type SpreadsheetsValuesGetCall struct { 12851 s *Service 12852 spreadsheetId string 12853 range_ string 12854 urlParams_ gensupport.URLParams 12855 ifNoneMatch_ string 12856 ctx_ context.Context 12857 header_ http.Header 12858} 12859 12860// Get: Returns a range of values from a spreadsheet. 12861// The caller must specify the spreadsheet ID and a range. 12862func (r *SpreadsheetsValuesService) Get(spreadsheetId string, range_ string) *SpreadsheetsValuesGetCall { 12863 c := &SpreadsheetsValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12864 c.spreadsheetId = spreadsheetId 12865 c.range_ = range_ 12866 return c 12867} 12868 12869// DateTimeRenderOption sets the optional parameter 12870// "dateTimeRenderOption": How dates, times, and durations should be 12871// represented in the output. 12872// This is ignored if value_render_option is 12873// FORMATTED_VALUE. 12874// The default dateTime render option is 12875// [DateTimeRenderOption.SERIAL_NUMBER]. 12876// 12877// Possible values: 12878// "SERIAL_NUMBER" 12879// "FORMATTED_STRING" 12880func (c *SpreadsheetsValuesGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesGetCall { 12881 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 12882 return c 12883} 12884 12885// MajorDimension sets the optional parameter "majorDimension": The 12886// major dimension that results should use. 12887// 12888// For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, 12889// then requesting `range=A1:B2,majorDimension=ROWS` will 12890// return 12891// `[[1,2],[3,4]]`, 12892// whereas requesting `range=A1:B2,majorDimension=COLUMNS` will 12893// return 12894// `[[1,3],[2,4]]`. 12895// 12896// Possible values: 12897// "DIMENSION_UNSPECIFIED" 12898// "ROWS" 12899// "COLUMNS" 12900func (c *SpreadsheetsValuesGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesGetCall { 12901 c.urlParams_.Set("majorDimension", majorDimension) 12902 return c 12903} 12904 12905// ValueRenderOption sets the optional parameter "valueRenderOption": 12906// How values should be represented in the output. 12907// The default render option is ValueRenderOption.FORMATTED_VALUE. 12908// 12909// Possible values: 12910// "FORMATTED_VALUE" 12911// "UNFORMATTED_VALUE" 12912// "FORMULA" 12913func (c *SpreadsheetsValuesGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesGetCall { 12914 c.urlParams_.Set("valueRenderOption", valueRenderOption) 12915 return c 12916} 12917 12918// Fields allows partial responses to be retrieved. See 12919// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12920// for more information. 12921func (c *SpreadsheetsValuesGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesGetCall { 12922 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12923 return c 12924} 12925 12926// IfNoneMatch sets the optional parameter which makes the operation 12927// fail if the object's ETag matches the given value. This is useful for 12928// getting updates only after the object has changed since the last 12929// request. Use googleapi.IsNotModified to check whether the response 12930// error from Do is the result of In-None-Match. 12931func (c *SpreadsheetsValuesGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesGetCall { 12932 c.ifNoneMatch_ = entityTag 12933 return c 12934} 12935 12936// Context sets the context to be used in this call's Do method. Any 12937// pending HTTP request will be aborted if the provided context is 12938// canceled. 12939func (c *SpreadsheetsValuesGetCall) Context(ctx context.Context) *SpreadsheetsValuesGetCall { 12940 c.ctx_ = ctx 12941 return c 12942} 12943 12944// Header returns an http.Header that can be modified by the caller to 12945// add HTTP headers to the request. 12946func (c *SpreadsheetsValuesGetCall) Header() http.Header { 12947 if c.header_ == nil { 12948 c.header_ = make(http.Header) 12949 } 12950 return c.header_ 12951} 12952 12953func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error) { 12954 reqHeaders := make(http.Header) 12955 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 12956 for k, v := range c.header_ { 12957 reqHeaders[k] = v 12958 } 12959 reqHeaders.Set("User-Agent", c.s.userAgent()) 12960 if c.ifNoneMatch_ != "" { 12961 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12962 } 12963 var body io.Reader = nil 12964 c.urlParams_.Set("alt", alt) 12965 c.urlParams_.Set("prettyPrint", "false") 12966 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 12967 urls += "?" + c.urlParams_.Encode() 12968 req, err := http.NewRequest("GET", urls, body) 12969 if err != nil { 12970 return nil, err 12971 } 12972 req.Header = reqHeaders 12973 googleapi.Expand(req.URL, map[string]string{ 12974 "spreadsheetId": c.spreadsheetId, 12975 "range": c.range_, 12976 }) 12977 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12978} 12979 12980// Do executes the "sheets.spreadsheets.values.get" call. 12981// Exactly one of *ValueRange or error will be non-nil. Any non-2xx 12982// status code is an error. Response headers are in either 12983// *ValueRange.ServerResponse.Header or (if a response was returned at 12984// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12985// to check whether the returned error was because 12986// http.StatusNotModified was returned. 12987func (c *SpreadsheetsValuesGetCall) Do(opts ...googleapi.CallOption) (*ValueRange, error) { 12988 gensupport.SetOptions(c.urlParams_, opts...) 12989 res, err := c.doRequest("json") 12990 if res != nil && res.StatusCode == http.StatusNotModified { 12991 if res.Body != nil { 12992 res.Body.Close() 12993 } 12994 return nil, &googleapi.Error{ 12995 Code: res.StatusCode, 12996 Header: res.Header, 12997 } 12998 } 12999 if err != nil { 13000 return nil, err 13001 } 13002 defer googleapi.CloseBody(res) 13003 if err := googleapi.CheckResponse(res); err != nil { 13004 return nil, err 13005 } 13006 ret := &ValueRange{ 13007 ServerResponse: googleapi.ServerResponse{ 13008 Header: res.Header, 13009 HTTPStatusCode: res.StatusCode, 13010 }, 13011 } 13012 target := &ret 13013 if err := gensupport.DecodeResponse(target, res); err != nil { 13014 return nil, err 13015 } 13016 return ret, nil 13017 // { 13018 // "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.", 13019 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 13020 // "httpMethod": "GET", 13021 // "id": "sheets.spreadsheets.values.get", 13022 // "parameterOrder": [ 13023 // "spreadsheetId", 13024 // "range" 13025 // ], 13026 // "parameters": { 13027 // "dateTimeRenderOption": { 13028 // "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].", 13029 // "enum": [ 13030 // "SERIAL_NUMBER", 13031 // "FORMATTED_STRING" 13032 // ], 13033 // "location": "query", 13034 // "type": "string" 13035 // }, 13036 // "majorDimension": { 13037 // "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]]`.", 13038 // "enum": [ 13039 // "DIMENSION_UNSPECIFIED", 13040 // "ROWS", 13041 // "COLUMNS" 13042 // ], 13043 // "location": "query", 13044 // "type": "string" 13045 // }, 13046 // "range": { 13047 // "description": "The A1 notation of the values to retrieve.", 13048 // "location": "path", 13049 // "required": true, 13050 // "type": "string" 13051 // }, 13052 // "spreadsheetId": { 13053 // "description": "The ID of the spreadsheet to retrieve data from.", 13054 // "location": "path", 13055 // "required": true, 13056 // "type": "string" 13057 // }, 13058 // "valueRenderOption": { 13059 // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 13060 // "enum": [ 13061 // "FORMATTED_VALUE", 13062 // "UNFORMATTED_VALUE", 13063 // "FORMULA" 13064 // ], 13065 // "location": "query", 13066 // "type": "string" 13067 // } 13068 // }, 13069 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 13070 // "response": { 13071 // "$ref": "ValueRange" 13072 // }, 13073 // "scopes": [ 13074 // "https://www.googleapis.com/auth/drive", 13075 // "https://www.googleapis.com/auth/drive.file", 13076 // "https://www.googleapis.com/auth/drive.readonly", 13077 // "https://www.googleapis.com/auth/spreadsheets", 13078 // "https://www.googleapis.com/auth/spreadsheets.readonly" 13079 // ] 13080 // } 13081 13082} 13083 13084// method id "sheets.spreadsheets.values.update": 13085 13086type SpreadsheetsValuesUpdateCall struct { 13087 s *Service 13088 spreadsheetId string 13089 range_ string 13090 valuerange *ValueRange 13091 urlParams_ gensupport.URLParams 13092 ctx_ context.Context 13093 header_ http.Header 13094} 13095 13096// Update: Sets values in a range of a spreadsheet. 13097// The caller must specify the spreadsheet ID, range, and 13098// a valueInputOption. 13099func (r *SpreadsheetsValuesService) Update(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesUpdateCall { 13100 c := &SpreadsheetsValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13101 c.spreadsheetId = spreadsheetId 13102 c.range_ = range_ 13103 c.valuerange = valuerange 13104 return c 13105} 13106 13107// IncludeValuesInResponse sets the optional parameter 13108// "includeValuesInResponse": Determines if the update response should 13109// include the values 13110// of the cells that were updated. By default, responses 13111// do not include the updated values. 13112// If the range to write was larger than than the range actually 13113// written, 13114// the response will include all values in the requested range 13115// (excluding 13116// trailing empty rows and columns). 13117func (c *SpreadsheetsValuesUpdateCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesUpdateCall { 13118 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 13119 return c 13120} 13121 13122// ResponseDateTimeRenderOption sets the optional parameter 13123// "responseDateTimeRenderOption": Determines how dates, times, and 13124// durations in the response should be 13125// rendered. This is ignored if response_value_render_option 13126// is 13127// FORMATTED_VALUE. 13128// The default dateTime render option 13129// is 13130// DateTimeRenderOption.SERIAL_NUMBER. 13131// 13132// Possible values: 13133// "SERIAL_NUMBER" 13134// "FORMATTED_STRING" 13135func (c *SpreadsheetsValuesUpdateCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesUpdateCall { 13136 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 13137 return c 13138} 13139 13140// ResponseValueRenderOption sets the optional parameter 13141// "responseValueRenderOption": Determines how values in the response 13142// should be rendered. 13143// The default render option is ValueRenderOption.FORMATTED_VALUE. 13144// 13145// Possible values: 13146// "FORMATTED_VALUE" 13147// "UNFORMATTED_VALUE" 13148// "FORMULA" 13149func (c *SpreadsheetsValuesUpdateCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesUpdateCall { 13150 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 13151 return c 13152} 13153 13154// ValueInputOption sets the optional parameter "valueInputOption": How 13155// the input data should be interpreted. 13156// 13157// Possible values: 13158// "INPUT_VALUE_OPTION_UNSPECIFIED" 13159// "RAW" 13160// "USER_ENTERED" 13161func (c *SpreadsheetsValuesUpdateCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesUpdateCall { 13162 c.urlParams_.Set("valueInputOption", valueInputOption) 13163 return c 13164} 13165 13166// Fields allows partial responses to be retrieved. See 13167// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13168// for more information. 13169func (c *SpreadsheetsValuesUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesUpdateCall { 13170 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13171 return c 13172} 13173 13174// Context sets the context to be used in this call's Do method. Any 13175// pending HTTP request will be aborted if the provided context is 13176// canceled. 13177func (c *SpreadsheetsValuesUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesUpdateCall { 13178 c.ctx_ = ctx 13179 return c 13180} 13181 13182// Header returns an http.Header that can be modified by the caller to 13183// add HTTP headers to the request. 13184func (c *SpreadsheetsValuesUpdateCall) Header() http.Header { 13185 if c.header_ == nil { 13186 c.header_ = make(http.Header) 13187 } 13188 return c.header_ 13189} 13190 13191func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, error) { 13192 reqHeaders := make(http.Header) 13193 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 13194 for k, v := range c.header_ { 13195 reqHeaders[k] = v 13196 } 13197 reqHeaders.Set("User-Agent", c.s.userAgent()) 13198 var body io.Reader = nil 13199 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 13200 if err != nil { 13201 return nil, err 13202 } 13203 reqHeaders.Set("Content-Type", "application/json") 13204 c.urlParams_.Set("alt", alt) 13205 c.urlParams_.Set("prettyPrint", "false") 13206 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 13207 urls += "?" + c.urlParams_.Encode() 13208 req, err := http.NewRequest("PUT", urls, body) 13209 if err != nil { 13210 return nil, err 13211 } 13212 req.Header = reqHeaders 13213 googleapi.Expand(req.URL, map[string]string{ 13214 "spreadsheetId": c.spreadsheetId, 13215 "range": c.range_, 13216 }) 13217 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13218} 13219 13220// Do executes the "sheets.spreadsheets.values.update" call. 13221// Exactly one of *UpdateValuesResponse or error will be non-nil. Any 13222// non-2xx status code is an error. Response headers are in either 13223// *UpdateValuesResponse.ServerResponse.Header or (if a response was 13224// returned at all) in error.(*googleapi.Error).Header. Use 13225// googleapi.IsNotModified to check whether the returned error was 13226// because http.StatusNotModified was returned. 13227func (c *SpreadsheetsValuesUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateValuesResponse, error) { 13228 gensupport.SetOptions(c.urlParams_, opts...) 13229 res, err := c.doRequest("json") 13230 if res != nil && res.StatusCode == http.StatusNotModified { 13231 if res.Body != nil { 13232 res.Body.Close() 13233 } 13234 return nil, &googleapi.Error{ 13235 Code: res.StatusCode, 13236 Header: res.Header, 13237 } 13238 } 13239 if err != nil { 13240 return nil, err 13241 } 13242 defer googleapi.CloseBody(res) 13243 if err := googleapi.CheckResponse(res); err != nil { 13244 return nil, err 13245 } 13246 ret := &UpdateValuesResponse{ 13247 ServerResponse: googleapi.ServerResponse{ 13248 Header: res.Header, 13249 HTTPStatusCode: res.StatusCode, 13250 }, 13251 } 13252 target := &ret 13253 if err := gensupport.DecodeResponse(target, res); err != nil { 13254 return nil, err 13255 } 13256 return ret, nil 13257 // { 13258 // "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.", 13259 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 13260 // "httpMethod": "PUT", 13261 // "id": "sheets.spreadsheets.values.update", 13262 // "parameterOrder": [ 13263 // "spreadsheetId", 13264 // "range" 13265 // ], 13266 // "parameters": { 13267 // "includeValuesInResponse": { 13268 // "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).", 13269 // "location": "query", 13270 // "type": "boolean" 13271 // }, 13272 // "range": { 13273 // "description": "The A1 notation of the values to update.", 13274 // "location": "path", 13275 // "required": true, 13276 // "type": "string" 13277 // }, 13278 // "responseDateTimeRenderOption": { 13279 // "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.", 13280 // "enum": [ 13281 // "SERIAL_NUMBER", 13282 // "FORMATTED_STRING" 13283 // ], 13284 // "location": "query", 13285 // "type": "string" 13286 // }, 13287 // "responseValueRenderOption": { 13288 // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.", 13289 // "enum": [ 13290 // "FORMATTED_VALUE", 13291 // "UNFORMATTED_VALUE", 13292 // "FORMULA" 13293 // ], 13294 // "location": "query", 13295 // "type": "string" 13296 // }, 13297 // "spreadsheetId": { 13298 // "description": "The ID of the spreadsheet to update.", 13299 // "location": "path", 13300 // "required": true, 13301 // "type": "string" 13302 // }, 13303 // "valueInputOption": { 13304 // "description": "How the input data should be interpreted.", 13305 // "enum": [ 13306 // "INPUT_VALUE_OPTION_UNSPECIFIED", 13307 // "RAW", 13308 // "USER_ENTERED" 13309 // ], 13310 // "location": "query", 13311 // "type": "string" 13312 // } 13313 // }, 13314 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 13315 // "request": { 13316 // "$ref": "ValueRange" 13317 // }, 13318 // "response": { 13319 // "$ref": "UpdateValuesResponse" 13320 // }, 13321 // "scopes": [ 13322 // "https://www.googleapis.com/auth/drive", 13323 // "https://www.googleapis.com/auth/drive.file", 13324 // "https://www.googleapis.com/auth/spreadsheets" 13325 // ] 13326 // } 13327 13328} 13329