1// Copyright 2021 Google LLC. 2// Use of this source code is governed by a BSD-style 3// license that can be found in the LICENSE file. 4 5// Code generated file. DO NOT EDIT. 6 7// Package 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 internaloption "google.golang.org/api/option/internaloption" 60 htransport "google.golang.org/api/transport/http" 61) 62 63// Always reference these packages, just in case the auto-generated code 64// below doesn't. 65var _ = bytes.NewBuffer 66var _ = strconv.Itoa 67var _ = fmt.Sprintf 68var _ = json.NewDecoder 69var _ = io.Copy 70var _ = url.Parse 71var _ = gensupport.MarshalJSON 72var _ = googleapi.Version 73var _ = errors.New 74var _ = strings.Replace 75var _ = context.Canceled 76var _ = internaloption.WithDefaultEndpoint 77 78const apiId = "sheets:v4" 79const apiName = "sheets" 80const apiVersion = "v4" 81const basePath = "https://sheets.googleapis.com/" 82const mtlsBasePath = "https://sheets.mtls.googleapis.com/" 83 84// OAuth2 scopes used by this API. 85const ( 86 // See, edit, create, and delete all of your Google Drive files 87 DriveScope = "https://www.googleapis.com/auth/drive" 88 89 // See, edit, create, and delete only the specific Google Drive files 90 // you use with this app 91 DriveFileScope = "https://www.googleapis.com/auth/drive.file" 92 93 // See and download all your Google Drive files 94 DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly" 95 96 // See, edit, create, and delete all your Google Sheets spreadsheets 97 SpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets" 98 99 // See all your Google Sheets spreadsheets 100 SpreadsheetsReadonlyScope = "https://www.googleapis.com/auth/spreadsheets.readonly" 101) 102 103// NewService creates a new Service. 104func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := option.WithScopes( 106 "https://www.googleapis.com/auth/drive", 107 "https://www.googleapis.com/auth/drive.file", 108 "https://www.googleapis.com/auth/drive.readonly", 109 "https://www.googleapis.com/auth/spreadsheets", 110 "https://www.googleapis.com/auth/spreadsheets.readonly", 111 ) 112 // NOTE: prepend, so we don't override user-specified scopes. 113 opts = append([]option.ClientOption{scopesOption}, opts...) 114 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 116 client, endpoint, err := htransport.NewClient(ctx, opts...) 117 if err != nil { 118 return nil, err 119 } 120 s, err := New(client) 121 if err != nil { 122 return nil, err 123 } 124 if endpoint != "" { 125 s.BasePath = endpoint 126 } 127 return s, nil 128} 129 130// New creates a new Service. It uses the provided http.Client for requests. 131// 132// Deprecated: please use NewService instead. 133// To provide a custom HTTP client, use option.WithHTTPClient. 134// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 135func New(client *http.Client) (*Service, error) { 136 if client == nil { 137 return nil, errors.New("client is nil") 138 } 139 s := &Service{client: client, BasePath: basePath} 140 s.Spreadsheets = NewSpreadsheetsService(s) 141 return s, nil 142} 143 144type Service struct { 145 client *http.Client 146 BasePath string // API endpoint base URL 147 UserAgent string // optional additional User-Agent fragment 148 149 Spreadsheets *SpreadsheetsService 150} 151 152func (s *Service) userAgent() string { 153 if s.UserAgent == "" { 154 return googleapi.UserAgent 155 } 156 return googleapi.UserAgent + " " + s.UserAgent 157} 158 159func NewSpreadsheetsService(s *Service) *SpreadsheetsService { 160 rs := &SpreadsheetsService{s: s} 161 rs.DeveloperMetadata = NewSpreadsheetsDeveloperMetadataService(s) 162 rs.Sheets = NewSpreadsheetsSheetsService(s) 163 rs.Values = NewSpreadsheetsValuesService(s) 164 return rs 165} 166 167type SpreadsheetsService struct { 168 s *Service 169 170 DeveloperMetadata *SpreadsheetsDeveloperMetadataService 171 172 Sheets *SpreadsheetsSheetsService 173 174 Values *SpreadsheetsValuesService 175} 176 177func NewSpreadsheetsDeveloperMetadataService(s *Service) *SpreadsheetsDeveloperMetadataService { 178 rs := &SpreadsheetsDeveloperMetadataService{s: s} 179 return rs 180} 181 182type SpreadsheetsDeveloperMetadataService struct { 183 s *Service 184} 185 186func NewSpreadsheetsSheetsService(s *Service) *SpreadsheetsSheetsService { 187 rs := &SpreadsheetsSheetsService{s: s} 188 return rs 189} 190 191type SpreadsheetsSheetsService struct { 192 s *Service 193} 194 195func NewSpreadsheetsValuesService(s *Service) *SpreadsheetsValuesService { 196 rs := &SpreadsheetsValuesService{s: s} 197 return rs 198} 199 200type SpreadsheetsValuesService struct { 201 s *Service 202} 203 204// AddBandingRequest: Adds a new banded range to the spreadsheet. 205type AddBandingRequest struct { 206 // BandedRange: The banded range to add. The bandedRangeId field is 207 // optional; if one is not set, an id will be randomly generated. (It is 208 // an error to specify the ID of a range that already exists.) 209 BandedRange *BandedRange `json:"bandedRange,omitempty"` 210 211 // ForceSendFields is a list of field names (e.g. "BandedRange") to 212 // unconditionally include in API requests. By default, fields with 213 // empty or default values are omitted from API requests. However, any 214 // non-pointer, non-interface field appearing in ForceSendFields will be 215 // sent to the server regardless of whether the field is empty or not. 216 // This may be used to include empty fields in Patch requests. 217 ForceSendFields []string `json:"-"` 218 219 // NullFields is a list of field names (e.g. "BandedRange") to include 220 // in API requests with the JSON null value. By default, fields with 221 // empty values are omitted from API requests. However, any field with 222 // an empty value appearing in NullFields will be sent to the server as 223 // null. It is an error if a field in this list has a non-empty value. 224 // This may be used to include null fields in Patch requests. 225 NullFields []string `json:"-"` 226} 227 228func (s *AddBandingRequest) MarshalJSON() ([]byte, error) { 229 type NoMethod AddBandingRequest 230 raw := NoMethod(*s) 231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 232} 233 234// AddBandingResponse: The result of adding a banded range. 235type AddBandingResponse struct { 236 // BandedRange: The banded range that was added. 237 BandedRange *BandedRange `json:"bandedRange,omitempty"` 238 239 // ForceSendFields is a list of field names (e.g. "BandedRange") to 240 // unconditionally include in API requests. By default, fields with 241 // empty or default values are omitted from API requests. However, any 242 // non-pointer, non-interface field appearing in ForceSendFields will be 243 // sent to the server regardless of whether the field is empty or not. 244 // This may be used to include empty fields in Patch requests. 245 ForceSendFields []string `json:"-"` 246 247 // NullFields is a list of field names (e.g. "BandedRange") to include 248 // in API requests with the JSON null value. By default, fields with 249 // empty values are omitted from API requests. However, any field with 250 // an empty value appearing in NullFields will be sent to the server as 251 // null. It is an error if a field in this list has a non-empty value. 252 // This may be used to include null fields in Patch requests. 253 NullFields []string `json:"-"` 254} 255 256func (s *AddBandingResponse) MarshalJSON() ([]byte, error) { 257 type NoMethod AddBandingResponse 258 raw := NoMethod(*s) 259 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 260} 261 262// AddChartRequest: Adds a chart to a sheet in the spreadsheet. 263type AddChartRequest struct { 264 // Chart: The chart that should be added to the spreadsheet, including 265 // the position where it should be placed. The chartId field is 266 // optional; if one is not set, an id will be randomly generated. (It is 267 // an error to specify the ID of an embedded object that already 268 // exists.) 269 Chart *EmbeddedChart `json:"chart,omitempty"` 270 271 // ForceSendFields is a list of field names (e.g. "Chart") to 272 // unconditionally include in API requests. By default, fields with 273 // empty or default values are omitted from API requests. However, any 274 // non-pointer, non-interface field appearing in ForceSendFields will be 275 // sent to the server regardless of whether the field is empty or not. 276 // This may be used to include empty fields in Patch requests. 277 ForceSendFields []string `json:"-"` 278 279 // NullFields is a list of field names (e.g. "Chart") to include in API 280 // requests with the JSON null value. By default, fields with empty 281 // values are omitted from API requests. However, any field with an 282 // empty value appearing in NullFields will be sent to the server as 283 // null. It is an error if a field in this list has a non-empty value. 284 // This may be used to include null fields in Patch requests. 285 NullFields []string `json:"-"` 286} 287 288func (s *AddChartRequest) MarshalJSON() ([]byte, error) { 289 type NoMethod AddChartRequest 290 raw := NoMethod(*s) 291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 292} 293 294// AddChartResponse: The result of adding a chart to a spreadsheet. 295type AddChartResponse struct { 296 // Chart: The newly added chart. 297 Chart *EmbeddedChart `json:"chart,omitempty"` 298 299 // ForceSendFields is a list of field names (e.g. "Chart") to 300 // unconditionally include in API requests. By default, fields with 301 // empty or default values are omitted from API requests. However, any 302 // non-pointer, non-interface field appearing in ForceSendFields will be 303 // sent to the server regardless of whether the field is empty or not. 304 // This may be used to include empty fields in Patch requests. 305 ForceSendFields []string `json:"-"` 306 307 // NullFields is a list of field names (e.g. "Chart") to include in API 308 // requests with the JSON null value. By default, fields with empty 309 // values are omitted from API requests. However, any field with an 310 // empty value appearing in NullFields will be sent to the server as 311 // null. It is an error if a field in this list has a non-empty value. 312 // This may be used to include null fields in Patch requests. 313 NullFields []string `json:"-"` 314} 315 316func (s *AddChartResponse) MarshalJSON() ([]byte, error) { 317 type NoMethod AddChartResponse 318 raw := NoMethod(*s) 319 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 320} 321 322// AddConditionalFormatRuleRequest: Adds a new conditional format rule 323// at the given index. All subsequent rules' indexes are incremented. 324type AddConditionalFormatRuleRequest struct { 325 // Index: The zero-based index where the rule should be inserted. 326 Index int64 `json:"index,omitempty"` 327 328 // Rule: The rule to add. 329 Rule *ConditionalFormatRule `json:"rule,omitempty"` 330 331 // ForceSendFields is a list of field names (e.g. "Index") to 332 // unconditionally include in API requests. By default, fields with 333 // empty or default values are omitted from API requests. However, any 334 // non-pointer, non-interface field appearing in ForceSendFields will be 335 // sent to the server regardless of whether the field is empty or not. 336 // This may be used to include empty fields in Patch requests. 337 ForceSendFields []string `json:"-"` 338 339 // NullFields is a list of field names (e.g. "Index") to include in API 340 // requests with the JSON null value. By default, fields with empty 341 // values are omitted from API requests. However, any field with an 342 // empty value appearing in NullFields will be sent to the server as 343 // null. It is an error if a field in this list has a non-empty value. 344 // This may be used to include null fields in Patch requests. 345 NullFields []string `json:"-"` 346} 347 348func (s *AddConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 349 type NoMethod AddConditionalFormatRuleRequest 350 raw := NoMethod(*s) 351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 352} 353 354// AddDataSourceRequest: Adds a data source. After the data source is 355// added successfully, an associated DATA_SOURCE sheet is created and an 356// execution is triggered to refresh the sheet to read data from the 357// data source. The request requires an additional `bigquery.readonly` 358// OAuth scope. 359type AddDataSourceRequest struct { 360 // DataSource: The data source to add. 361 DataSource *DataSource `json:"dataSource,omitempty"` 362 363 // ForceSendFields is a list of field names (e.g. "DataSource") to 364 // unconditionally include in API requests. By default, fields with 365 // empty or default values are omitted from API requests. However, any 366 // non-pointer, non-interface field appearing in ForceSendFields will be 367 // sent to the server regardless of whether the field is empty or not. 368 // This may be used to include empty fields in Patch requests. 369 ForceSendFields []string `json:"-"` 370 371 // NullFields is a list of field names (e.g. "DataSource") to include in 372 // API requests with the JSON null value. By default, fields with empty 373 // values are omitted from API requests. However, any field with an 374 // empty value appearing in NullFields will be sent to the server as 375 // null. It is an error if a field in this list has a non-empty value. 376 // This may be used to include null fields in Patch requests. 377 NullFields []string `json:"-"` 378} 379 380func (s *AddDataSourceRequest) MarshalJSON() ([]byte, error) { 381 type NoMethod AddDataSourceRequest 382 raw := NoMethod(*s) 383 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 384} 385 386// AddDataSourceResponse: The result of adding a data source. 387type AddDataSourceResponse struct { 388 // DataExecutionStatus: The data execution status. 389 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 390 391 // DataSource: The data source that was created. 392 DataSource *DataSource `json:"dataSource,omitempty"` 393 394 // ForceSendFields is a list of field names (e.g. "DataExecutionStatus") 395 // to unconditionally include in API requests. By default, fields with 396 // empty or default values are omitted from API requests. However, any 397 // non-pointer, non-interface field appearing in ForceSendFields will be 398 // sent to the server regardless of whether the field is empty or not. 399 // This may be used to include empty fields in Patch requests. 400 ForceSendFields []string `json:"-"` 401 402 // NullFields is a list of field names (e.g. "DataExecutionStatus") to 403 // include in API requests with the JSON null value. By default, fields 404 // with empty values are omitted from API requests. However, any field 405 // with an empty value appearing in NullFields will be sent to the 406 // server as null. It is an error if a field in this list has a 407 // non-empty value. This may be used to include null fields in Patch 408 // requests. 409 NullFields []string `json:"-"` 410} 411 412func (s *AddDataSourceResponse) MarshalJSON() ([]byte, error) { 413 type NoMethod AddDataSourceResponse 414 raw := NoMethod(*s) 415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 416} 417 418// AddDimensionGroupRequest: Creates a group over the specified range. 419// If the requested range is a superset of the range of an existing 420// group G, then the depth of G is incremented and this new group G' has 421// the depth of that group. For example, a group [C:D, depth 1] + [B:E] 422// results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested 423// range is a subset of the range of an existing group G, then the depth 424// of the new group G' becomes one greater than the depth of G. For 425// example, a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 426// 1] and [C:D, depth 2]. If the requested range starts before and ends 427// within, or starts within and ends after, the range of an existing 428// group G, then the range of the existing group G becomes the union of 429// the ranges, and the new group G' has depth one greater than the depth 430// of G and range as the intersection of the ranges. For example, a 431// group [B:D, depth 1] + [C:E] results in groups [B:E, depth 1] and 432// [C:D, depth 2]. 433type AddDimensionGroupRequest struct { 434 // Range: The range over which to create a group. 435 Range *DimensionRange `json:"range,omitempty"` 436 437 // ForceSendFields is a list of field names (e.g. "Range") to 438 // unconditionally include in API requests. By default, fields with 439 // empty or default values are omitted from API requests. However, any 440 // non-pointer, non-interface field appearing in ForceSendFields will be 441 // sent to the server regardless of whether the field is empty or not. 442 // This may be used to include empty fields in Patch requests. 443 ForceSendFields []string `json:"-"` 444 445 // NullFields is a list of field names (e.g. "Range") to include in API 446 // requests with the JSON null value. By default, fields with empty 447 // values are omitted from API requests. However, any field with an 448 // empty value appearing in NullFields will be sent to the server as 449 // null. It is an error if a field in this list has a non-empty value. 450 // This may be used to include null fields in Patch requests. 451 NullFields []string `json:"-"` 452} 453 454func (s *AddDimensionGroupRequest) MarshalJSON() ([]byte, error) { 455 type NoMethod AddDimensionGroupRequest 456 raw := NoMethod(*s) 457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 458} 459 460// AddDimensionGroupResponse: The result of adding a group. 461type AddDimensionGroupResponse struct { 462 // DimensionGroups: All groups of a dimension after adding a group to 463 // that dimension. 464 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 465 466 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 467 // unconditionally include in API requests. By default, fields with 468 // empty or default values are omitted from API requests. However, any 469 // non-pointer, non-interface field appearing in ForceSendFields will be 470 // sent to the server regardless of whether the field is empty or not. 471 // This may be used to include empty fields in Patch requests. 472 ForceSendFields []string `json:"-"` 473 474 // NullFields is a list of field names (e.g. "DimensionGroups") to 475 // include in API requests with the JSON null value. By default, fields 476 // with empty values are omitted from API requests. However, any field 477 // with an empty value appearing in NullFields will be sent to the 478 // server as null. It is an error if a field in this list has a 479 // non-empty value. This may be used to include null fields in Patch 480 // requests. 481 NullFields []string `json:"-"` 482} 483 484func (s *AddDimensionGroupResponse) MarshalJSON() ([]byte, error) { 485 type NoMethod AddDimensionGroupResponse 486 raw := NoMethod(*s) 487 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 488} 489 490// AddFilterViewRequest: Adds a filter view. 491type AddFilterViewRequest struct { 492 // Filter: The filter to add. The filterViewId field is optional; if one 493 // is not set, an id will be randomly generated. (It is an error to 494 // specify the ID of a filter that already exists.) 495 Filter *FilterView `json:"filter,omitempty"` 496 497 // ForceSendFields is a list of field names (e.g. "Filter") to 498 // unconditionally include in API requests. By default, fields with 499 // empty or default values are omitted from API requests. However, any 500 // non-pointer, non-interface field appearing in ForceSendFields will be 501 // sent to the server regardless of whether the field is empty or not. 502 // This may be used to include empty fields in Patch requests. 503 ForceSendFields []string `json:"-"` 504 505 // NullFields is a list of field names (e.g. "Filter") to include in API 506 // requests with the JSON null value. By default, fields with empty 507 // values are omitted from API requests. However, any field with an 508 // empty value appearing in NullFields will be sent to the server as 509 // null. It is an error if a field in this list has a non-empty value. 510 // This may be used to include null fields in Patch requests. 511 NullFields []string `json:"-"` 512} 513 514func (s *AddFilterViewRequest) MarshalJSON() ([]byte, error) { 515 type NoMethod AddFilterViewRequest 516 raw := NoMethod(*s) 517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 518} 519 520// AddFilterViewResponse: The result of adding a filter view. 521type AddFilterViewResponse struct { 522 // Filter: The newly added filter view. 523 Filter *FilterView `json:"filter,omitempty"` 524 525 // ForceSendFields is a list of field names (e.g. "Filter") to 526 // unconditionally include in API requests. By default, fields with 527 // empty or default values are omitted from API requests. However, any 528 // non-pointer, non-interface field appearing in ForceSendFields will be 529 // sent to the server regardless of whether the field is empty or not. 530 // This may be used to include empty fields in Patch requests. 531 ForceSendFields []string `json:"-"` 532 533 // NullFields is a list of field names (e.g. "Filter") to include in API 534 // requests with the JSON null value. By default, fields with empty 535 // values are omitted from API requests. However, any field with an 536 // empty value appearing in NullFields will be sent to the server as 537 // null. It is an error if a field in this list has a non-empty value. 538 // This may be used to include null fields in Patch requests. 539 NullFields []string `json:"-"` 540} 541 542func (s *AddFilterViewResponse) MarshalJSON() ([]byte, error) { 543 type NoMethod AddFilterViewResponse 544 raw := NoMethod(*s) 545 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 546} 547 548// AddNamedRangeRequest: Adds a named range to the spreadsheet. 549type AddNamedRangeRequest struct { 550 // NamedRange: The named range to add. The namedRangeId field is 551 // optional; if one is not set, an id will be randomly generated. (It is 552 // an error to specify the ID of a range that already exists.) 553 NamedRange *NamedRange `json:"namedRange,omitempty"` 554 555 // ForceSendFields is a list of field names (e.g. "NamedRange") to 556 // unconditionally include in API requests. By default, fields with 557 // empty or default values are omitted from API requests. However, any 558 // non-pointer, non-interface field appearing in ForceSendFields will be 559 // sent to the server regardless of whether the field is empty or not. 560 // This may be used to include empty fields in Patch requests. 561 ForceSendFields []string `json:"-"` 562 563 // NullFields is a list of field names (e.g. "NamedRange") to include in 564 // API requests with the JSON null value. By default, fields with empty 565 // values are omitted from API requests. However, any field with an 566 // empty value appearing in NullFields will be sent to the server as 567 // null. It is an error if a field in this list has a non-empty value. 568 // This may be used to include null fields in Patch requests. 569 NullFields []string `json:"-"` 570} 571 572func (s *AddNamedRangeRequest) MarshalJSON() ([]byte, error) { 573 type NoMethod AddNamedRangeRequest 574 raw := NoMethod(*s) 575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 576} 577 578// AddNamedRangeResponse: The result of adding a named range. 579type AddNamedRangeResponse struct { 580 // NamedRange: The named range to add. 581 NamedRange *NamedRange `json:"namedRange,omitempty"` 582 583 // ForceSendFields is a list of field names (e.g. "NamedRange") to 584 // unconditionally include in API requests. By default, fields with 585 // empty or default values are omitted from API requests. However, any 586 // non-pointer, non-interface field appearing in ForceSendFields will be 587 // sent to the server regardless of whether the field is empty or not. 588 // This may be used to include empty fields in Patch requests. 589 ForceSendFields []string `json:"-"` 590 591 // NullFields is a list of field names (e.g. "NamedRange") to include in 592 // API requests with the JSON null value. By default, fields with empty 593 // values are omitted from API requests. However, any field with an 594 // empty value appearing in NullFields will be sent to the server as 595 // null. It is an error if a field in this list has a non-empty value. 596 // This may be used to include null fields in Patch requests. 597 NullFields []string `json:"-"` 598} 599 600func (s *AddNamedRangeResponse) MarshalJSON() ([]byte, error) { 601 type NoMethod AddNamedRangeResponse 602 raw := NoMethod(*s) 603 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 604} 605 606// AddProtectedRangeRequest: Adds a new protected range. 607type AddProtectedRangeRequest struct { 608 // ProtectedRange: The protected range to be added. The protectedRangeId 609 // field is optional; if one is not set, an id will be randomly 610 // generated. (It is an error to specify the ID of a range that already 611 // exists.) 612 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 613 614 // ForceSendFields is a list of field names (e.g. "ProtectedRange") to 615 // unconditionally include in API requests. By default, fields with 616 // empty or default values are omitted from API requests. However, any 617 // non-pointer, non-interface field appearing in ForceSendFields will be 618 // sent to the server regardless of whether the field is empty or not. 619 // This may be used to include empty fields in Patch requests. 620 ForceSendFields []string `json:"-"` 621 622 // NullFields is a list of field names (e.g. "ProtectedRange") to 623 // include in API requests with the JSON null value. By default, fields 624 // with empty values are omitted from API requests. However, any field 625 // with an empty value appearing in NullFields will be sent to the 626 // server as null. It is an error if a field in this list has a 627 // non-empty value. This may be used to include null fields in Patch 628 // requests. 629 NullFields []string `json:"-"` 630} 631 632func (s *AddProtectedRangeRequest) MarshalJSON() ([]byte, error) { 633 type NoMethod AddProtectedRangeRequest 634 raw := NoMethod(*s) 635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 636} 637 638// AddProtectedRangeResponse: The result of adding a new protected 639// range. 640type AddProtectedRangeResponse struct { 641 // ProtectedRange: The newly added protected range. 642 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 643 644 // ForceSendFields is a list of field names (e.g. "ProtectedRange") to 645 // unconditionally include in API requests. By default, fields with 646 // empty or default values are omitted from API requests. However, any 647 // non-pointer, non-interface field appearing in ForceSendFields will be 648 // sent to the server regardless of whether the field is empty or not. 649 // This may be used to include empty fields in Patch requests. 650 ForceSendFields []string `json:"-"` 651 652 // NullFields is a list of field names (e.g. "ProtectedRange") to 653 // include in API requests with the JSON null value. By default, fields 654 // with empty values are omitted from API requests. However, any field 655 // with an empty value appearing in NullFields will be sent to the 656 // server as null. It is an error if a field in this list has a 657 // non-empty value. This may be used to include null fields in Patch 658 // requests. 659 NullFields []string `json:"-"` 660} 661 662func (s *AddProtectedRangeResponse) MarshalJSON() ([]byte, error) { 663 type NoMethod AddProtectedRangeResponse 664 raw := NoMethod(*s) 665 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 666} 667 668// AddSheetRequest: Adds a new sheet. When a sheet is added at a given 669// index, all subsequent sheets' indexes are incremented. To add an 670// object sheet, use AddChartRequest instead and specify 671// EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.newSheet. 672type AddSheetRequest struct { 673 // Properties: The properties the new sheet should have. All properties 674 // are optional. The sheetId field is optional; if one is not set, an id 675 // will be randomly generated. (It is an error to specify the ID of a 676 // sheet that already exists.) 677 Properties *SheetProperties `json:"properties,omitempty"` 678 679 // ForceSendFields is a list of field names (e.g. "Properties") to 680 // unconditionally include in API requests. By default, fields with 681 // empty or default values are omitted from API requests. However, any 682 // non-pointer, non-interface field appearing in ForceSendFields will be 683 // sent to the server regardless of whether the field is empty or not. 684 // This may be used to include empty fields in Patch requests. 685 ForceSendFields []string `json:"-"` 686 687 // NullFields is a list of field names (e.g. "Properties") to include in 688 // API requests with the JSON null value. By default, fields with empty 689 // values are omitted from API requests. However, any field with an 690 // empty value appearing in NullFields will be sent to the server as 691 // null. It is an error if a field in this list has a non-empty value. 692 // This may be used to include null fields in Patch requests. 693 NullFields []string `json:"-"` 694} 695 696func (s *AddSheetRequest) MarshalJSON() ([]byte, error) { 697 type NoMethod AddSheetRequest 698 raw := NoMethod(*s) 699 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 700} 701 702// AddSheetResponse: The result of adding a sheet. 703type AddSheetResponse struct { 704 // Properties: The properties of the newly added sheet. 705 Properties *SheetProperties `json:"properties,omitempty"` 706 707 // ForceSendFields is a list of field names (e.g. "Properties") to 708 // unconditionally include in API requests. By default, fields with 709 // empty or default values are omitted from API requests. However, any 710 // non-pointer, non-interface field appearing in ForceSendFields will be 711 // sent to the server regardless of whether the field is empty or not. 712 // This may be used to include empty fields in Patch requests. 713 ForceSendFields []string `json:"-"` 714 715 // NullFields is a list of field names (e.g. "Properties") to include in 716 // API requests with the JSON null value. By default, fields with empty 717 // values are omitted from API requests. However, any field with an 718 // empty value appearing in NullFields will be sent to the server as 719 // null. It is an error if a field in this list has a non-empty value. 720 // This may be used to include null fields in Patch requests. 721 NullFields []string `json:"-"` 722} 723 724func (s *AddSheetResponse) MarshalJSON() ([]byte, error) { 725 type NoMethod AddSheetResponse 726 raw := NoMethod(*s) 727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 728} 729 730// AddSlicerRequest: Adds a slicer to a sheet in the spreadsheet. 731type AddSlicerRequest struct { 732 // Slicer: The slicer that should be added to the spreadsheet, including 733 // the position where it should be placed. The slicerId field is 734 // optional; if one is not set, an id will be randomly generated. (It is 735 // an error to specify the ID of a slicer that already exists.) 736 Slicer *Slicer `json:"slicer,omitempty"` 737 738 // ForceSendFields is a list of field names (e.g. "Slicer") to 739 // unconditionally include in API requests. By default, fields with 740 // empty or default values are omitted from API requests. However, any 741 // non-pointer, non-interface field appearing in ForceSendFields will be 742 // sent to the server regardless of whether the field is empty or not. 743 // This may be used to include empty fields in Patch requests. 744 ForceSendFields []string `json:"-"` 745 746 // NullFields is a list of field names (e.g. "Slicer") to include in API 747 // requests with the JSON null value. By default, fields with empty 748 // values are omitted from API requests. However, any field with an 749 // empty value appearing in NullFields will be sent to the server as 750 // null. It is an error if a field in this list has a non-empty value. 751 // This may be used to include null fields in Patch requests. 752 NullFields []string `json:"-"` 753} 754 755func (s *AddSlicerRequest) MarshalJSON() ([]byte, error) { 756 type NoMethod AddSlicerRequest 757 raw := NoMethod(*s) 758 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 759} 760 761// AddSlicerResponse: The result of adding a slicer to a spreadsheet. 762type AddSlicerResponse struct { 763 // Slicer: The newly added slicer. 764 Slicer *Slicer `json:"slicer,omitempty"` 765 766 // ForceSendFields is a list of field names (e.g. "Slicer") to 767 // unconditionally include in API requests. By default, fields with 768 // empty or default values are omitted from API requests. However, any 769 // non-pointer, non-interface field appearing in ForceSendFields will be 770 // sent to the server regardless of whether the field is empty or not. 771 // This may be used to include empty fields in Patch requests. 772 ForceSendFields []string `json:"-"` 773 774 // NullFields is a list of field names (e.g. "Slicer") to include in API 775 // requests with the JSON null value. By default, fields with empty 776 // values are omitted from API requests. However, any field with an 777 // empty value appearing in NullFields will be sent to the server as 778 // null. It is an error if a field in this list has a non-empty value. 779 // This may be used to include null fields in Patch requests. 780 NullFields []string `json:"-"` 781} 782 783func (s *AddSlicerResponse) MarshalJSON() ([]byte, error) { 784 type NoMethod AddSlicerResponse 785 raw := NoMethod(*s) 786 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 787} 788 789// AppendCellsRequest: Adds new cells after the last row with data in a 790// sheet, inserting new rows into the sheet if necessary. 791type AppendCellsRequest struct { 792 // Fields: The fields of CellData that should be updated. At least one 793 // field must be specified. The root is the CellData; 'row.values.' 794 // should not be specified. A single "*" can be used as short-hand for 795 // listing every field. 796 Fields string `json:"fields,omitempty"` 797 798 // Rows: The data to append. 799 Rows []*RowData `json:"rows,omitempty"` 800 801 // SheetId: The sheet ID to append the data to. 802 SheetId int64 `json:"sheetId,omitempty"` 803 804 // ForceSendFields is a list of field names (e.g. "Fields") to 805 // unconditionally include in API requests. By default, fields with 806 // empty or default values are omitted from API requests. However, any 807 // non-pointer, non-interface field appearing in ForceSendFields will be 808 // sent to the server regardless of whether the field is empty or not. 809 // This may be used to include empty fields in Patch requests. 810 ForceSendFields []string `json:"-"` 811 812 // NullFields is a list of field names (e.g. "Fields") to include in API 813 // requests with the JSON null value. By default, fields with empty 814 // values are omitted from API requests. However, any field with an 815 // empty value appearing in NullFields will be sent to the server as 816 // null. It is an error if a field in this list has a non-empty value. 817 // This may be used to include null fields in Patch requests. 818 NullFields []string `json:"-"` 819} 820 821func (s *AppendCellsRequest) MarshalJSON() ([]byte, error) { 822 type NoMethod AppendCellsRequest 823 raw := NoMethod(*s) 824 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 825} 826 827// AppendDimensionRequest: Appends rows or columns to the end of a 828// sheet. 829type AppendDimensionRequest struct { 830 // Dimension: Whether rows or columns should be appended. 831 // 832 // Possible values: 833 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 834 // "ROWS" - Operates on the rows of a sheet. 835 // "COLUMNS" - Operates on the columns of a sheet. 836 Dimension string `json:"dimension,omitempty"` 837 838 // Length: The number of rows or columns to append. 839 Length int64 `json:"length,omitempty"` 840 841 // SheetId: The sheet to append rows or columns to. 842 SheetId int64 `json:"sheetId,omitempty"` 843 844 // ForceSendFields is a list of field names (e.g. "Dimension") to 845 // unconditionally include in API requests. By default, fields with 846 // empty or default values are omitted from API requests. However, any 847 // non-pointer, non-interface field appearing in ForceSendFields will be 848 // sent to the server regardless of whether the field is empty or not. 849 // This may be used to include empty fields in Patch requests. 850 ForceSendFields []string `json:"-"` 851 852 // NullFields is a list of field names (e.g. "Dimension") to include in 853 // API requests with the JSON null value. By default, fields with empty 854 // values are omitted from API requests. However, any field with an 855 // empty value appearing in NullFields will be sent to the server as 856 // null. It is an error if a field in this list has a non-empty value. 857 // This may be used to include null fields in Patch requests. 858 NullFields []string `json:"-"` 859} 860 861func (s *AppendDimensionRequest) MarshalJSON() ([]byte, error) { 862 type NoMethod AppendDimensionRequest 863 raw := NoMethod(*s) 864 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 865} 866 867// AppendValuesResponse: The response when updating a range of values in 868// a spreadsheet. 869type AppendValuesResponse struct { 870 // SpreadsheetId: The spreadsheet the updates were applied to. 871 SpreadsheetId string `json:"spreadsheetId,omitempty"` 872 873 // TableRange: The range (in A1 notation) of the table that values are 874 // being appended to (before the values were appended). Empty if no 875 // table was found. 876 TableRange string `json:"tableRange,omitempty"` 877 878 // Updates: Information about the updates that were applied. 879 Updates *UpdateValuesResponse `json:"updates,omitempty"` 880 881 // ServerResponse contains the HTTP response code and headers from the 882 // server. 883 googleapi.ServerResponse `json:"-"` 884 885 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 886 // unconditionally include in API requests. By default, fields with 887 // empty or default values are omitted from API requests. However, any 888 // non-pointer, non-interface field appearing in ForceSendFields will be 889 // sent to the server regardless of whether the field is empty or not. 890 // This may be used to include empty fields in Patch requests. 891 ForceSendFields []string `json:"-"` 892 893 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 894 // in API requests with the JSON null value. By default, fields with 895 // empty values are omitted from API requests. However, any field with 896 // an empty value appearing in NullFields will be sent to the server as 897 // null. It is an error if a field in this list has a non-empty value. 898 // This may be used to include null fields in Patch requests. 899 NullFields []string `json:"-"` 900} 901 902func (s *AppendValuesResponse) MarshalJSON() ([]byte, error) { 903 type NoMethod AppendValuesResponse 904 raw := NoMethod(*s) 905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 906} 907 908// AutoFillRequest: Fills in more data based on existing data. 909type AutoFillRequest struct { 910 // Range: The range to autofill. This will examine the range and detect 911 // the location that has data and automatically fill that data in to the 912 // rest of the range. 913 Range *GridRange `json:"range,omitempty"` 914 915 // SourceAndDestination: The source and destination areas to autofill. 916 // This explicitly lists the source of the autofill and where to extend 917 // that data. 918 SourceAndDestination *SourceAndDestination `json:"sourceAndDestination,omitempty"` 919 920 // UseAlternateSeries: True if we should generate data with the 921 // "alternate" series. This differs based on the type and amount of 922 // source data. 923 UseAlternateSeries bool `json:"useAlternateSeries,omitempty"` 924 925 // ForceSendFields is a list of field names (e.g. "Range") to 926 // unconditionally include in API requests. By default, fields with 927 // empty or default values are omitted from API requests. However, any 928 // non-pointer, non-interface field appearing in ForceSendFields will be 929 // sent to the server regardless of whether the field is empty or not. 930 // This may be used to include empty fields in Patch requests. 931 ForceSendFields []string `json:"-"` 932 933 // NullFields is a list of field names (e.g. "Range") to include in API 934 // requests with the JSON null value. By default, fields with empty 935 // values are omitted from API requests. However, any field with an 936 // empty value appearing in NullFields will be sent to the server as 937 // null. It is an error if a field in this list has a non-empty value. 938 // This may be used to include null fields in Patch requests. 939 NullFields []string `json:"-"` 940} 941 942func (s *AutoFillRequest) MarshalJSON() ([]byte, error) { 943 type NoMethod AutoFillRequest 944 raw := NoMethod(*s) 945 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 946} 947 948// AutoResizeDimensionsRequest: Automatically resizes one or more 949// dimensions based on the contents of the cells in that dimension. 950type AutoResizeDimensionsRequest struct { 951 // DataSourceSheetDimensions: The dimensions on a data source sheet to 952 // automatically resize. 953 DataSourceSheetDimensions *DataSourceSheetDimensionRange `json:"dataSourceSheetDimensions,omitempty"` 954 955 // Dimensions: The dimensions to automatically resize. 956 Dimensions *DimensionRange `json:"dimensions,omitempty"` 957 958 // ForceSendFields is a list of field names (e.g. 959 // "DataSourceSheetDimensions") to unconditionally include in API 960 // requests. By default, fields with empty or default values are omitted 961 // from API requests. However, any non-pointer, non-interface field 962 // appearing in ForceSendFields will be sent to the server regardless of 963 // whether the field is empty or not. This may be used to include empty 964 // fields in Patch requests. 965 ForceSendFields []string `json:"-"` 966 967 // NullFields is a list of field names (e.g. 968 // "DataSourceSheetDimensions") to include in API requests with the JSON 969 // null value. By default, fields with empty values are omitted from API 970 // requests. However, any field with an empty value appearing in 971 // NullFields will be sent to the server as null. It is an error if a 972 // field in this list has a non-empty value. This may be used to include 973 // null fields in Patch requests. 974 NullFields []string `json:"-"` 975} 976 977func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) { 978 type NoMethod AutoResizeDimensionsRequest 979 raw := NoMethod(*s) 980 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 981} 982 983// BandedRange: A banded (alternating colors) range in a sheet. 984type BandedRange struct { 985 // BandedRangeId: The id of the banded range. 986 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 987 988 // ColumnProperties: Properties for column bands. These properties are 989 // applied on a column- by-column basis throughout all the columns in 990 // the range. At least one of row_properties or column_properties must 991 // be specified. 992 ColumnProperties *BandingProperties `json:"columnProperties,omitempty"` 993 994 // Range: The range over which these properties are applied. 995 Range *GridRange `json:"range,omitempty"` 996 997 // RowProperties: Properties for row bands. These properties are applied 998 // on a row-by-row basis throughout all the rows in the range. At least 999 // one of row_properties or column_properties must be specified. 1000 RowProperties *BandingProperties `json:"rowProperties,omitempty"` 1001 1002 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 1003 // unconditionally include in API requests. By default, fields with 1004 // empty or default values are omitted from API requests. However, any 1005 // non-pointer, non-interface field appearing in ForceSendFields will be 1006 // sent to the server regardless of whether the field is empty or not. 1007 // This may be used to include empty fields in Patch requests. 1008 ForceSendFields []string `json:"-"` 1009 1010 // NullFields is a list of field names (e.g. "BandedRangeId") to include 1011 // in API requests with the JSON null value. By default, fields with 1012 // empty values are omitted from API requests. However, any field with 1013 // an empty value appearing in NullFields will be sent to the server as 1014 // null. It is an error if a field in this list has a non-empty value. 1015 // This may be used to include null fields in Patch requests. 1016 NullFields []string `json:"-"` 1017} 1018 1019func (s *BandedRange) MarshalJSON() ([]byte, error) { 1020 type NoMethod BandedRange 1021 raw := NoMethod(*s) 1022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1023} 1024 1025// BandingProperties: Properties referring a single dimension (either 1026// row or column). If both BandedRange.row_properties and 1027// BandedRange.column_properties are set, the fill colors are applied to 1028// cells according to the following rules: * header_color and 1029// footer_color take priority over band colors. * first_band_color takes 1030// priority over second_band_color. * row_properties takes priority over 1031// column_properties. For example, the first row color takes priority 1032// over the first column color, but the first column color takes 1033// priority over the second row color. Similarly, the row header takes 1034// priority over the column header in the top left cell, but the column 1035// header takes priority over the first row color if the row header is 1036// not set. 1037type BandingProperties struct { 1038 // FirstBandColor: The first color that is alternating. (Required) 1039 FirstBandColor *Color `json:"firstBandColor,omitempty"` 1040 1041 // FirstBandColorStyle: The first color that is alternating. (Required) 1042 // If first_band_color is also set, this field takes precedence. 1043 FirstBandColorStyle *ColorStyle `json:"firstBandColorStyle,omitempty"` 1044 1045 // FooterColor: The color of the last row or column. If this field is 1046 // not set, the last row or column is filled with either 1047 // first_band_color or second_band_color, depending on the color of the 1048 // previous row or column. 1049 FooterColor *Color `json:"footerColor,omitempty"` 1050 1051 // FooterColorStyle: The color of the last row or column. If this field 1052 // is not set, the last row or column is filled with either 1053 // first_band_color or second_band_color, depending on the color of the 1054 // previous row or column. If footer_color is also set, this field takes 1055 // precedence. 1056 FooterColorStyle *ColorStyle `json:"footerColorStyle,omitempty"` 1057 1058 // HeaderColor: The color of the first row or column. If this field is 1059 // set, the first row or column is filled with this color and the colors 1060 // alternate between first_band_color and second_band_color starting 1061 // from the second row or column. Otherwise, the first row or column is 1062 // filled with first_band_color and the colors proceed to alternate as 1063 // they normally would. 1064 HeaderColor *Color `json:"headerColor,omitempty"` 1065 1066 // HeaderColorStyle: The color of the first row or column. If this field 1067 // is set, the first row or column is filled with this color and the 1068 // colors alternate between first_band_color and second_band_color 1069 // starting from the second row or column. Otherwise, the first row or 1070 // column is filled with first_band_color and the colors proceed to 1071 // alternate as they normally would. If header_color is also set, this 1072 // field takes precedence. 1073 HeaderColorStyle *ColorStyle `json:"headerColorStyle,omitempty"` 1074 1075 // SecondBandColor: The second color that is alternating. (Required) 1076 SecondBandColor *Color `json:"secondBandColor,omitempty"` 1077 1078 // SecondBandColorStyle: The second color that is alternating. 1079 // (Required) If second_band_color is also set, this field takes 1080 // precedence. 1081 SecondBandColorStyle *ColorStyle `json:"secondBandColorStyle,omitempty"` 1082 1083 // ForceSendFields is a list of field names (e.g. "FirstBandColor") to 1084 // unconditionally include in API requests. By default, fields with 1085 // empty or default values are omitted from API requests. However, any 1086 // non-pointer, non-interface field appearing in ForceSendFields will be 1087 // sent to the server regardless of whether the field is empty or not. 1088 // This may be used to include empty fields in Patch requests. 1089 ForceSendFields []string `json:"-"` 1090 1091 // NullFields is a list of field names (e.g. "FirstBandColor") to 1092 // include in API requests with the JSON null value. By default, fields 1093 // with empty values are omitted from API requests. However, any field 1094 // with an empty value appearing in NullFields will be sent to the 1095 // server as null. It is an error if a field in this list has a 1096 // non-empty value. This may be used to include null fields in Patch 1097 // requests. 1098 NullFields []string `json:"-"` 1099} 1100 1101func (s *BandingProperties) MarshalJSON() ([]byte, error) { 1102 type NoMethod BandingProperties 1103 raw := NoMethod(*s) 1104 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1105} 1106 1107// BaselineValueFormat: Formatting options for baseline value. 1108type BaselineValueFormat struct { 1109 // ComparisonType: The comparison type of key value with baseline value. 1110 // 1111 // Possible values: 1112 // "COMPARISON_TYPE_UNDEFINED" - Default value, do not use. 1113 // "ABSOLUTE_DIFFERENCE" - Use absolute difference between key and 1114 // baseline value. 1115 // "PERCENTAGE_DIFFERENCE" - Use percentage difference between key and 1116 // baseline value. 1117 ComparisonType string `json:"comparisonType,omitempty"` 1118 1119 // Description: Description which is appended after the baseline value. 1120 // This field is optional. 1121 Description string `json:"description,omitempty"` 1122 1123 // NegativeColor: Color to be used, in case baseline value represents a 1124 // negative change for key value. This field is optional. 1125 NegativeColor *Color `json:"negativeColor,omitempty"` 1126 1127 // NegativeColorStyle: Color to be used, in case baseline value 1128 // represents a negative change for key value. This field is optional. 1129 // If negative_color is also set, this field takes precedence. 1130 NegativeColorStyle *ColorStyle `json:"negativeColorStyle,omitempty"` 1131 1132 // Position: Specifies the horizontal text positioning of baseline 1133 // value. This field is optional. If not specified, default positioning 1134 // is used. 1135 Position *TextPosition `json:"position,omitempty"` 1136 1137 // PositiveColor: Color to be used, in case baseline value represents a 1138 // positive change for key value. This field is optional. 1139 PositiveColor *Color `json:"positiveColor,omitempty"` 1140 1141 // PositiveColorStyle: Color to be used, in case baseline value 1142 // represents a positive change for key value. This field is optional. 1143 // If positive_color is also set, this field takes precedence. 1144 PositiveColorStyle *ColorStyle `json:"positiveColorStyle,omitempty"` 1145 1146 // TextFormat: Text formatting options for baseline value. The link 1147 // field is not supported. 1148 TextFormat *TextFormat `json:"textFormat,omitempty"` 1149 1150 // ForceSendFields is a list of field names (e.g. "ComparisonType") to 1151 // unconditionally include in API requests. By default, fields with 1152 // empty or default values are omitted from API requests. However, any 1153 // non-pointer, non-interface field appearing in ForceSendFields will be 1154 // sent to the server regardless of whether the field is empty or not. 1155 // This may be used to include empty fields in Patch requests. 1156 ForceSendFields []string `json:"-"` 1157 1158 // NullFields is a list of field names (e.g. "ComparisonType") to 1159 // include in API requests with the JSON null value. By default, fields 1160 // with empty values are omitted from API requests. However, any field 1161 // with an empty value appearing in NullFields will be sent to the 1162 // server as null. It is an error if a field in this list has a 1163 // non-empty value. This may be used to include null fields in Patch 1164 // requests. 1165 NullFields []string `json:"-"` 1166} 1167 1168func (s *BaselineValueFormat) MarshalJSON() ([]byte, error) { 1169 type NoMethod BaselineValueFormat 1170 raw := NoMethod(*s) 1171 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1172} 1173 1174// BasicChartAxis: An axis of the chart. A chart may not have more than 1175// one axis per axis position. 1176type BasicChartAxis struct { 1177 // Format: The format of the title. Only valid if the axis is not 1178 // associated with the domain. The link field is not supported. 1179 Format *TextFormat `json:"format,omitempty"` 1180 1181 // Position: The position of this axis. 1182 // 1183 // Possible values: 1184 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1185 // use. 1186 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. For 1187 // most charts, this is the standard major axis. For bar charts, this is 1188 // a minor axis. 1189 // "LEFT_AXIS" - The axis rendered at the left of a chart. For most 1190 // charts, this is a minor axis. For bar charts, this is the standard 1191 // major axis. 1192 // "RIGHT_AXIS" - The axis rendered at the right of a chart. For most 1193 // charts, this is a minor axis. For bar charts, this is an unusual 1194 // major axis. 1195 Position string `json:"position,omitempty"` 1196 1197 // Title: The title of this axis. If set, this overrides any title 1198 // inferred from headers of the data. 1199 Title string `json:"title,omitempty"` 1200 1201 // TitleTextPosition: The axis title text position. 1202 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 1203 1204 // ViewWindowOptions: The view window options for this axis. 1205 ViewWindowOptions *ChartAxisViewWindowOptions `json:"viewWindowOptions,omitempty"` 1206 1207 // ForceSendFields is a list of field names (e.g. "Format") to 1208 // unconditionally include in API requests. By default, fields with 1209 // empty or default values are omitted from API requests. However, any 1210 // non-pointer, non-interface field appearing in ForceSendFields will be 1211 // sent to the server regardless of whether the field is empty or not. 1212 // This may be used to include empty fields in Patch requests. 1213 ForceSendFields []string `json:"-"` 1214 1215 // NullFields is a list of field names (e.g. "Format") to include in API 1216 // requests with the JSON null value. By default, fields with empty 1217 // values are omitted from API requests. However, any field with an 1218 // empty value appearing in NullFields will be sent to the server as 1219 // null. It is an error if a field in this list has a non-empty value. 1220 // This may be used to include null fields in Patch requests. 1221 NullFields []string `json:"-"` 1222} 1223 1224func (s *BasicChartAxis) MarshalJSON() ([]byte, error) { 1225 type NoMethod BasicChartAxis 1226 raw := NoMethod(*s) 1227 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1228} 1229 1230// BasicChartDomain: The domain of a chart. For example, if charting 1231// stock prices over time, this would be the date. 1232type BasicChartDomain struct { 1233 // Domain: The data of the domain. For example, if charting stock prices 1234 // over time, this is the data representing the dates. 1235 Domain *ChartData `json:"domain,omitempty"` 1236 1237 // Reversed: True to reverse the order of the domain values (horizontal 1238 // axis). 1239 Reversed bool `json:"reversed,omitempty"` 1240 1241 // ForceSendFields is a list of field names (e.g. "Domain") to 1242 // unconditionally include in API requests. By default, fields with 1243 // empty or default values are omitted from API requests. However, any 1244 // non-pointer, non-interface field appearing in ForceSendFields will be 1245 // sent to the server regardless of whether the field is empty or not. 1246 // This may be used to include empty fields in Patch requests. 1247 ForceSendFields []string `json:"-"` 1248 1249 // NullFields is a list of field names (e.g. "Domain") to include in API 1250 // requests with the JSON null value. By default, fields with empty 1251 // values are omitted from API requests. However, any field with an 1252 // empty value appearing in NullFields will be sent to the server as 1253 // null. It is an error if a field in this list has a non-empty value. 1254 // This may be used to include null fields in Patch requests. 1255 NullFields []string `json:"-"` 1256} 1257 1258func (s *BasicChartDomain) MarshalJSON() ([]byte, error) { 1259 type NoMethod BasicChartDomain 1260 raw := NoMethod(*s) 1261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1262} 1263 1264// BasicChartSeries: A single series of data in a chart. For example, if 1265// charting stock prices over time, multiple series may exist, one for 1266// the "Open Price", "High Price", "Low Price" and "Close Price". 1267type BasicChartSeries struct { 1268 // Color: The color for elements (such as bars, lines, and points) 1269 // associated with this series. If empty, a default color is used. 1270 Color *Color `json:"color,omitempty"` 1271 1272 // ColorStyle: The color for elements (such as bars, lines, and points) 1273 // associated with this series. If empty, a default color is used. If 1274 // color is also set, this field takes precedence. 1275 ColorStyle *ColorStyle `json:"colorStyle,omitempty"` 1276 1277 // DataLabel: Information about the data labels for this series. 1278 DataLabel *DataLabel `json:"dataLabel,omitempty"` 1279 1280 // LineStyle: The line style of this series. Valid only if the chartType 1281 // is AREA, LINE, or SCATTER. COMBO charts are also supported if the 1282 // series chart type is AREA or LINE. 1283 LineStyle *LineStyle `json:"lineStyle,omitempty"` 1284 1285 // PointStyle: The style for points associated with this series. Valid 1286 // only if the chartType is AREA, LINE, or SCATTER. COMBO charts are 1287 // also supported if the series chart type is AREA, LINE, or SCATTER. If 1288 // empty, a default point style is used. 1289 PointStyle *PointStyle `json:"pointStyle,omitempty"` 1290 1291 // Series: The data being visualized in this chart series. 1292 Series *ChartData `json:"series,omitempty"` 1293 1294 // StyleOverrides: Style override settings for series data points. 1295 StyleOverrides []*BasicSeriesDataPointStyleOverride `json:"styleOverrides,omitempty"` 1296 1297 // TargetAxis: The minor axis that will specify the range of values for 1298 // this series. For example, if charting stocks over time, the "Volume" 1299 // series may want to be pinned to the right with the prices pinned to 1300 // the left, because the scale of trading volume is different than the 1301 // scale of prices. It is an error to specify an axis that isn't a valid 1302 // minor axis for the chart's type. 1303 // 1304 // Possible values: 1305 // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not 1306 // use. 1307 // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart. For 1308 // most charts, this is the standard major axis. For bar charts, this is 1309 // a minor axis. 1310 // "LEFT_AXIS" - The axis rendered at the left of a chart. For most 1311 // charts, this is a minor axis. For bar charts, this is the standard 1312 // major axis. 1313 // "RIGHT_AXIS" - The axis rendered at the right of a chart. For most 1314 // charts, this is a minor axis. For bar charts, this is an unusual 1315 // major axis. 1316 TargetAxis string `json:"targetAxis,omitempty"` 1317 1318 // Type: The type of this series. Valid only if the chartType is COMBO. 1319 // Different types will change the way the series is visualized. Only 1320 // LINE, AREA, and COLUMN are supported. 1321 // 1322 // Possible values: 1323 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1324 // "BAR" - A bar chart. 1325 // "LINE" - A line chart. 1326 // "AREA" - An area chart. 1327 // "COLUMN" - A column chart. 1328 // "SCATTER" - A scatter chart. 1329 // "COMBO" - A combo chart. 1330 // "STEPPED_AREA" - A stepped area chart. 1331 Type string `json:"type,omitempty"` 1332 1333 // ForceSendFields is a list of field names (e.g. "Color") to 1334 // unconditionally include in API requests. By default, fields with 1335 // empty or default values are omitted from API requests. However, any 1336 // non-pointer, non-interface field appearing in ForceSendFields will be 1337 // sent to the server regardless of whether the field is empty or not. 1338 // This may be used to include empty fields in Patch requests. 1339 ForceSendFields []string `json:"-"` 1340 1341 // NullFields is a list of field names (e.g. "Color") to include in API 1342 // requests with the JSON null value. By default, fields with empty 1343 // values are omitted from API requests. However, any field with an 1344 // empty value appearing in NullFields will be sent to the server as 1345 // null. It is an error if a field in this list has a non-empty value. 1346 // This may be used to include null fields in Patch requests. 1347 NullFields []string `json:"-"` 1348} 1349 1350func (s *BasicChartSeries) MarshalJSON() ([]byte, error) { 1351 type NoMethod BasicChartSeries 1352 raw := NoMethod(*s) 1353 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1354} 1355 1356// BasicChartSpec: The specification for a basic chart. See 1357// BasicChartType for the list of charts this supports. 1358type BasicChartSpec struct { 1359 // Axis: The axis on the chart. 1360 Axis []*BasicChartAxis `json:"axis,omitempty"` 1361 1362 // ChartType: The type of the chart. 1363 // 1364 // Possible values: 1365 // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use. 1366 // "BAR" - A bar chart. 1367 // "LINE" - A line chart. 1368 // "AREA" - An area chart. 1369 // "COLUMN" - A column chart. 1370 // "SCATTER" - A scatter chart. 1371 // "COMBO" - A combo chart. 1372 // "STEPPED_AREA" - A stepped area chart. 1373 ChartType string `json:"chartType,omitempty"` 1374 1375 // CompareMode: The behavior of tooltips and data highlighting when 1376 // hovering on data and chart area. 1377 // 1378 // Possible values: 1379 // "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" - Default value, do not use. 1380 // "DATUM" - Only the focused data element is highlighted and shown in 1381 // the tooltip. 1382 // "CATEGORY" - All data elements with the same category (e.g., domain 1383 // value) are highlighted and shown in the tooltip. 1384 CompareMode string `json:"compareMode,omitempty"` 1385 1386 // Domains: The domain of data this is charting. Only a single domain is 1387 // supported. 1388 Domains []*BasicChartDomain `json:"domains,omitempty"` 1389 1390 // HeaderCount: The number of rows or columns in the data that are 1391 // "headers". If not set, Google Sheets will guess how many rows are 1392 // headers based on the data. (Note that BasicChartAxis.title may 1393 // override the axis title inferred from the header values.) 1394 HeaderCount int64 `json:"headerCount,omitempty"` 1395 1396 // InterpolateNulls: If some values in a series are missing, gaps may 1397 // appear in the chart (e.g, segments of lines in a line chart will be 1398 // missing). To eliminate these gaps set this to true. Applies to Line, 1399 // Area, and Combo charts. 1400 InterpolateNulls bool `json:"interpolateNulls,omitempty"` 1401 1402 // LegendPosition: The position of the chart legend. 1403 // 1404 // Possible values: 1405 // "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 1406 // use. 1407 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 1408 // chart. 1409 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 1410 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 1411 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 1412 // "NO_LEGEND" - No legend is rendered. 1413 LegendPosition string `json:"legendPosition,omitempty"` 1414 1415 // LineSmoothing: Gets whether all lines should be rendered smooth or 1416 // straight by default. Applies to Line charts. 1417 LineSmoothing bool `json:"lineSmoothing,omitempty"` 1418 1419 // Series: The data this chart is visualizing. 1420 Series []*BasicChartSeries `json:"series,omitempty"` 1421 1422 // StackedType: The stacked type for charts that support vertical 1423 // stacking. Applies to Area, Bar, Column, Combo, and Stepped Area 1424 // charts. 1425 // 1426 // Possible values: 1427 // "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 1428 // "NOT_STACKED" - Series are not stacked. 1429 // "STACKED" - Series values are stacked, each value is rendered 1430 // vertically beginning from the top of the value below it. 1431 // "PERCENT_STACKED" - Vertical stacks are stretched to reach the top 1432 // of the chart, with values laid out as percentages of each other. 1433 StackedType string `json:"stackedType,omitempty"` 1434 1435 // ThreeDimensional: True to make the chart 3D. Applies to Bar and 1436 // Column charts. 1437 ThreeDimensional bool `json:"threeDimensional,omitempty"` 1438 1439 // TotalDataLabel: Controls whether to display additional data labels on 1440 // stacked charts which sum the total value of all stacked values at 1441 // each value along the domain axis. These data labels can only be set 1442 // when chart_type is one of AREA, BAR, COLUMN, COMBO or STEPPED_AREA 1443 // and stacked_type is either STACKED or PERCENT_STACKED. In addition, 1444 // for COMBO, this will only be supported if there is only one type of 1445 // stackable series type or one type has more series than the others and 1446 // each of the other types have no more than one series. For example, if 1447 // a chart has two stacked bar series and one area series, the total 1448 // data labels will be supported. If it has three bar series and two 1449 // area series, total data labels are not allowed. Neither CUSTOM nor 1450 // placement can be set on the total_data_label. 1451 TotalDataLabel *DataLabel `json:"totalDataLabel,omitempty"` 1452 1453 // ForceSendFields is a list of field names (e.g. "Axis") to 1454 // unconditionally include in API requests. By default, fields with 1455 // empty or default values are omitted from API requests. However, any 1456 // non-pointer, non-interface field appearing in ForceSendFields will be 1457 // sent to the server regardless of whether the field is empty or not. 1458 // This may be used to include empty fields in Patch requests. 1459 ForceSendFields []string `json:"-"` 1460 1461 // NullFields is a list of field names (e.g. "Axis") to include in API 1462 // 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 *BasicChartSpec) MarshalJSON() ([]byte, error) { 1471 type NoMethod BasicChartSpec 1472 raw := NoMethod(*s) 1473 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1474} 1475 1476// BasicFilter: The default filter associated with a sheet. 1477type BasicFilter struct { 1478 // Criteria: The criteria for showing/hiding values per column. The 1479 // map's key is the column index, and the value is the criteria for that 1480 // column. This field is deprecated in favor of filter_specs. 1481 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 1482 1483 // FilterSpecs: The filter criteria per column. Both criteria and 1484 // filter_specs are populated in responses. If both fields are specified 1485 // in an update request, this field takes precedence. 1486 FilterSpecs []*FilterSpec `json:"filterSpecs,omitempty"` 1487 1488 // Range: The range the filter covers. 1489 Range *GridRange `json:"range,omitempty"` 1490 1491 // SortSpecs: The sort order per column. Later specifications are used 1492 // when values are equal in the earlier specifications. 1493 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 1494 1495 // ForceSendFields is a list of field names (e.g. "Criteria") to 1496 // unconditionally include in API requests. By default, fields with 1497 // empty or default values are omitted from API requests. However, any 1498 // non-pointer, non-interface field appearing in ForceSendFields will be 1499 // sent to the server regardless of whether the field is empty or not. 1500 // This may be used to include empty fields in Patch requests. 1501 ForceSendFields []string `json:"-"` 1502 1503 // NullFields is a list of field names (e.g. "Criteria") to include in 1504 // API requests with the JSON null value. By default, fields with empty 1505 // values are omitted from API requests. However, any field with an 1506 // empty value appearing in NullFields will be sent to the server as 1507 // null. It is an error if a field in this list has a non-empty value. 1508 // This may be used to include null fields in Patch requests. 1509 NullFields []string `json:"-"` 1510} 1511 1512func (s *BasicFilter) MarshalJSON() ([]byte, error) { 1513 type NoMethod BasicFilter 1514 raw := NoMethod(*s) 1515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1516} 1517 1518// BasicSeriesDataPointStyleOverride: Style override settings for a 1519// single series data point. 1520type BasicSeriesDataPointStyleOverride struct { 1521 // Color: Color of the series data point. If empty, the series default 1522 // is used. 1523 Color *Color `json:"color,omitempty"` 1524 1525 // ColorStyle: Color of the series data point. If empty, the series 1526 // default is used. If color is also set, this field takes precedence. 1527 ColorStyle *ColorStyle `json:"colorStyle,omitempty"` 1528 1529 // Index: Zero based index of the series data point. 1530 Index int64 `json:"index,omitempty"` 1531 1532 // PointStyle: Point style of the series data point. Valid only if the 1533 // chartType is AREA, LINE, or SCATTER. COMBO charts are also supported 1534 // if the series chart type is AREA, LINE, or SCATTER. If empty, the 1535 // series default is used. 1536 PointStyle *PointStyle `json:"pointStyle,omitempty"` 1537 1538 // ForceSendFields is a list of field names (e.g. "Color") to 1539 // unconditionally include in API requests. By default, fields with 1540 // empty or default values are omitted from API requests. However, any 1541 // non-pointer, non-interface field appearing in ForceSendFields will be 1542 // sent to the server regardless of whether the field is empty or not. 1543 // This may be used to include empty fields in Patch requests. 1544 ForceSendFields []string `json:"-"` 1545 1546 // NullFields is a list of field names (e.g. "Color") to include in API 1547 // requests with the JSON null value. By default, fields with empty 1548 // values are omitted from API requests. However, any field with an 1549 // empty value appearing in NullFields will be sent to the server as 1550 // null. It is an error if a field in this list has a non-empty value. 1551 // This may be used to include null fields in Patch requests. 1552 NullFields []string `json:"-"` 1553} 1554 1555func (s *BasicSeriesDataPointStyleOverride) MarshalJSON() ([]byte, error) { 1556 type NoMethod BasicSeriesDataPointStyleOverride 1557 raw := NoMethod(*s) 1558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1559} 1560 1561// BatchClearValuesByDataFilterRequest: The request for clearing more 1562// than one range selected by a DataFilter in a spreadsheet. 1563type BatchClearValuesByDataFilterRequest struct { 1564 // DataFilters: The DataFilters used to determine which ranges to clear. 1565 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1566 1567 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1568 // unconditionally include in API requests. By default, fields with 1569 // empty or default values are omitted from API requests. However, any 1570 // non-pointer, non-interface field appearing in ForceSendFields will be 1571 // sent to the server regardless of whether the field is empty or not. 1572 // This may be used to include empty fields in Patch requests. 1573 ForceSendFields []string `json:"-"` 1574 1575 // NullFields is a list of field names (e.g. "DataFilters") to include 1576 // in API requests with the JSON null value. By default, fields with 1577 // empty values are omitted from API requests. However, any field with 1578 // an empty value appearing in NullFields will be sent to the server as 1579 // null. It is an error if a field in this list has a non-empty value. 1580 // This may be used to include null fields in Patch requests. 1581 NullFields []string `json:"-"` 1582} 1583 1584func (s *BatchClearValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1585 type NoMethod BatchClearValuesByDataFilterRequest 1586 raw := NoMethod(*s) 1587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1588} 1589 1590// BatchClearValuesByDataFilterResponse: The response when clearing a 1591// range of values selected with DataFilters in a spreadsheet. 1592type BatchClearValuesByDataFilterResponse struct { 1593 // ClearedRanges: The ranges that were cleared, in A1 notation. If the 1594 // requests are for an unbounded range or a ranger larger than the 1595 // bounds of the sheet, this is the actual ranges that were cleared, 1596 // bounded to the sheet's limits. 1597 ClearedRanges []string `json:"clearedRanges,omitempty"` 1598 1599 // SpreadsheetId: The spreadsheet the updates were applied to. 1600 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1601 1602 // ServerResponse contains the HTTP response code and headers from the 1603 // server. 1604 googleapi.ServerResponse `json:"-"` 1605 1606 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1607 // unconditionally include in API requests. By default, fields with 1608 // empty or default values are omitted from API requests. However, any 1609 // non-pointer, non-interface field appearing in ForceSendFields will be 1610 // sent to the server regardless of whether the field is empty or not. 1611 // This may be used to include empty fields in Patch requests. 1612 ForceSendFields []string `json:"-"` 1613 1614 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1615 // in API requests with the JSON null value. By default, fields with 1616 // empty values are omitted from API requests. However, any field with 1617 // an empty value appearing in NullFields will be sent to the server as 1618 // null. It is an error if a field in this list has a non-empty value. 1619 // This may be used to include null fields in Patch requests. 1620 NullFields []string `json:"-"` 1621} 1622 1623func (s *BatchClearValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1624 type NoMethod BatchClearValuesByDataFilterResponse 1625 raw := NoMethod(*s) 1626 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1627} 1628 1629// BatchClearValuesRequest: The request for clearing more than one range 1630// of values in a spreadsheet. 1631type BatchClearValuesRequest struct { 1632 // Ranges: The ranges to clear, in A1 or R1C1 notation. 1633 Ranges []string `json:"ranges,omitempty"` 1634 1635 // ForceSendFields is a list of field names (e.g. "Ranges") to 1636 // unconditionally include in API requests. By default, fields with 1637 // empty or default values are omitted from API requests. However, any 1638 // non-pointer, non-interface field appearing in ForceSendFields will be 1639 // sent to the server regardless of whether the field is empty or not. 1640 // This may be used to include empty fields in Patch requests. 1641 ForceSendFields []string `json:"-"` 1642 1643 // NullFields is a list of field names (e.g. "Ranges") to include in API 1644 // requests with the JSON null value. By default, fields with empty 1645 // values are omitted from API requests. However, any field with an 1646 // empty value appearing in NullFields will be sent to the server as 1647 // null. It is an error if a field in this list has a non-empty value. 1648 // This may be used to include null fields in Patch requests. 1649 NullFields []string `json:"-"` 1650} 1651 1652func (s *BatchClearValuesRequest) MarshalJSON() ([]byte, error) { 1653 type NoMethod BatchClearValuesRequest 1654 raw := NoMethod(*s) 1655 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1656} 1657 1658// BatchClearValuesResponse: The response when clearing a range of 1659// values in a spreadsheet. 1660type BatchClearValuesResponse struct { 1661 // ClearedRanges: The ranges that were cleared, in A1 notation. If the 1662 // requests are for an unbounded range or a ranger larger than the 1663 // bounds of the sheet, this is the actual ranges that were cleared, 1664 // bounded to the sheet's limits. 1665 ClearedRanges []string `json:"clearedRanges,omitempty"` 1666 1667 // SpreadsheetId: The spreadsheet the updates were applied to. 1668 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1669 1670 // ServerResponse contains the HTTP response code and headers from the 1671 // server. 1672 googleapi.ServerResponse `json:"-"` 1673 1674 // ForceSendFields is a list of field names (e.g. "ClearedRanges") to 1675 // unconditionally include in API requests. By default, fields with 1676 // empty or default values are omitted from API requests. However, any 1677 // non-pointer, non-interface field appearing in ForceSendFields will be 1678 // sent to the server regardless of whether the field is empty or not. 1679 // This may be used to include empty fields in Patch requests. 1680 ForceSendFields []string `json:"-"` 1681 1682 // NullFields is a list of field names (e.g. "ClearedRanges") to include 1683 // in API requests with the JSON null value. By default, fields with 1684 // empty values are omitted from API requests. However, any field with 1685 // an empty value appearing in NullFields will be sent to the server as 1686 // null. It is an error if a field in this list has a non-empty value. 1687 // This may be used to include null fields in Patch requests. 1688 NullFields []string `json:"-"` 1689} 1690 1691func (s *BatchClearValuesResponse) MarshalJSON() ([]byte, error) { 1692 type NoMethod BatchClearValuesResponse 1693 raw := NoMethod(*s) 1694 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1695} 1696 1697// BatchGetValuesByDataFilterRequest: The request for retrieving a range 1698// of values in a spreadsheet selected by a set of DataFilters. 1699type BatchGetValuesByDataFilterRequest struct { 1700 // DataFilters: The data filters used to match the ranges of values to 1701 // retrieve. Ranges that match any of the specified data filters are 1702 // included in the response. 1703 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 1704 1705 // DateTimeRenderOption: How dates, times, and durations should be 1706 // represented in the output. This is ignored if value_render_option is 1707 // FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER. 1708 // 1709 // Possible values: 1710 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1711 // fields to be output as doubles in "serial number" format, as 1712 // popularized by Lotus 1-2-3. The whole number portion of the value 1713 // (left of the decimal) counts the days since December 30th 1899. The 1714 // fractional portion (right of the decimal) counts the time as a 1715 // fraction of the day. For example, January 1st 1900 at noon would be 1716 // 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 1717 // noon is half a day. February 1st 1900 at 3pm would be 33.625. This 1718 // correctly treats the year 1900 as not a leap year. 1719 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1720 // fields to be output as strings in their given number format (which is 1721 // dependent on the spreadsheet locale). 1722 DateTimeRenderOption string `json:"dateTimeRenderOption,omitempty"` 1723 1724 // MajorDimension: The major dimension that results should use. For 1725 // example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then a 1726 // request that selects that range and sets `majorDimension=ROWS` 1727 // returns `[[1,2],[3,4]]`, whereas a request that sets 1728 // `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`. 1729 // 1730 // Possible values: 1731 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 1732 // "ROWS" - Operates on the rows of a sheet. 1733 // "COLUMNS" - Operates on the columns of a sheet. 1734 MajorDimension string `json:"majorDimension,omitempty"` 1735 1736 // ValueRenderOption: How values should be represented in the output. 1737 // The default render option is FORMATTED_VALUE. 1738 // 1739 // Possible values: 1740 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1741 // reply according to the cell's formatting. Formatting is based on the 1742 // spreadsheet's locale, not the requesting user's locale. For example, 1743 // if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 1744 // `A2` would return "$1.23". 1745 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1746 // in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 1747 // formatted as currency, then `A2` would return the number `1.23`. 1748 // "FORMULA" - Values will not be calculated. The reply will include 1749 // the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 1750 // formatted as currency, then A2 would return "=A1". 1751 ValueRenderOption string `json:"valueRenderOption,omitempty"` 1752 1753 // ForceSendFields is a list of field names (e.g. "DataFilters") to 1754 // unconditionally include in API requests. By default, fields with 1755 // empty or default values are omitted from API requests. However, any 1756 // non-pointer, non-interface field appearing in ForceSendFields will be 1757 // sent to the server regardless of whether the field is empty or not. 1758 // This may be used to include empty fields in Patch requests. 1759 ForceSendFields []string `json:"-"` 1760 1761 // NullFields is a list of field names (e.g. "DataFilters") to include 1762 // in API requests with the JSON null value. By default, fields with 1763 // empty values are omitted from API requests. However, any field with 1764 // an empty value appearing in NullFields will be sent to the server as 1765 // null. It is an error if a field in this list has a non-empty value. 1766 // This may be used to include null fields in Patch requests. 1767 NullFields []string `json:"-"` 1768} 1769 1770func (s *BatchGetValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 1771 type NoMethod BatchGetValuesByDataFilterRequest 1772 raw := NoMethod(*s) 1773 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1774} 1775 1776// BatchGetValuesByDataFilterResponse: The response when retrieving more 1777// than one range of values in a spreadsheet selected by DataFilters. 1778type BatchGetValuesByDataFilterResponse struct { 1779 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1780 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1781 1782 // ValueRanges: The requested values with the list of data filters that 1783 // matched them. 1784 ValueRanges []*MatchedValueRange `json:"valueRanges,omitempty"` 1785 1786 // ServerResponse contains the HTTP response code and headers from the 1787 // server. 1788 googleapi.ServerResponse `json:"-"` 1789 1790 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1791 // unconditionally include in API requests. By default, fields with 1792 // empty or default values are omitted from API requests. However, any 1793 // non-pointer, non-interface field appearing in ForceSendFields will be 1794 // sent to the server regardless of whether the field is empty or not. 1795 // This may be used to include empty fields in Patch requests. 1796 ForceSendFields []string `json:"-"` 1797 1798 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1799 // in API requests with the JSON null value. By default, fields with 1800 // empty values are omitted from API requests. However, any field with 1801 // an empty value appearing in NullFields will be sent to the server as 1802 // null. It is an error if a field in this list has a non-empty value. 1803 // This may be used to include null fields in Patch requests. 1804 NullFields []string `json:"-"` 1805} 1806 1807func (s *BatchGetValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 1808 type NoMethod BatchGetValuesByDataFilterResponse 1809 raw := NoMethod(*s) 1810 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1811} 1812 1813// BatchGetValuesResponse: The response when retrieving more than one 1814// range of values in a spreadsheet. 1815type BatchGetValuesResponse struct { 1816 // SpreadsheetId: The ID of the spreadsheet the data was retrieved from. 1817 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1818 1819 // ValueRanges: The requested values. The order of the ValueRanges is 1820 // the same as the order of the requested ranges. 1821 ValueRanges []*ValueRange `json:"valueRanges,omitempty"` 1822 1823 // ServerResponse contains the HTTP response code and headers from the 1824 // server. 1825 googleapi.ServerResponse `json:"-"` 1826 1827 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 1828 // unconditionally include in API requests. By default, fields with 1829 // empty or default values are omitted from API requests. However, any 1830 // non-pointer, non-interface field appearing in ForceSendFields will be 1831 // sent to the server regardless of whether the field is empty or not. 1832 // This may be used to include empty fields in Patch requests. 1833 ForceSendFields []string `json:"-"` 1834 1835 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 1836 // in API requests with the JSON null value. By default, fields with 1837 // empty values are omitted from API requests. However, any field with 1838 // an empty value appearing in NullFields will be sent to the server as 1839 // null. It is an error if a field in this list has a non-empty value. 1840 // This may be used to include null fields in Patch requests. 1841 NullFields []string `json:"-"` 1842} 1843 1844func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) { 1845 type NoMethod BatchGetValuesResponse 1846 raw := NoMethod(*s) 1847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1848} 1849 1850// BatchUpdateSpreadsheetRequest: The request for updating any aspect of 1851// a spreadsheet. 1852type BatchUpdateSpreadsheetRequest struct { 1853 // IncludeSpreadsheetInResponse: Determines if the update response 1854 // should include the spreadsheet resource. 1855 IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"` 1856 1857 // Requests: A list of updates to apply to the spreadsheet. Requests 1858 // will be applied in the order they are specified. If any request is 1859 // not valid, no requests will be applied. 1860 Requests []*Request `json:"requests,omitempty"` 1861 1862 // ResponseIncludeGridData: True if grid data should be returned. 1863 // Meaningful only if include_spreadsheet_in_response is 'true'. This 1864 // parameter is ignored if a field mask was set in the request. 1865 ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"` 1866 1867 // ResponseRanges: Limits the ranges included in the response 1868 // spreadsheet. Meaningful only if include_spreadsheet_in_response is 1869 // 'true'. 1870 ResponseRanges []string `json:"responseRanges,omitempty"` 1871 1872 // ForceSendFields is a list of field names (e.g. 1873 // "IncludeSpreadsheetInResponse") to unconditionally include in API 1874 // requests. By default, fields with empty or default values are omitted 1875 // from API requests. However, any non-pointer, non-interface field 1876 // appearing in ForceSendFields will be sent to the server regardless of 1877 // whether the field is empty or not. This may be used to include empty 1878 // fields in Patch requests. 1879 ForceSendFields []string `json:"-"` 1880 1881 // NullFields is a list of field names (e.g. 1882 // "IncludeSpreadsheetInResponse") to include in API requests with the 1883 // JSON null value. By default, fields with empty values are omitted 1884 // from API requests. However, any field with an empty value appearing 1885 // in NullFields will be sent to the server as null. It is an error if a 1886 // field in this list has a non-empty value. This may be used to include 1887 // null fields in Patch requests. 1888 NullFields []string `json:"-"` 1889} 1890 1891func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) { 1892 type NoMethod BatchUpdateSpreadsheetRequest 1893 raw := NoMethod(*s) 1894 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1895} 1896 1897// BatchUpdateSpreadsheetResponse: The reply for batch updating a 1898// spreadsheet. 1899type BatchUpdateSpreadsheetResponse struct { 1900 // Replies: The reply of the updates. This maps 1:1 with the updates, 1901 // although replies to some requests may be empty. 1902 Replies []*Response `json:"replies,omitempty"` 1903 1904 // SpreadsheetId: The spreadsheet the updates were applied to. 1905 SpreadsheetId string `json:"spreadsheetId,omitempty"` 1906 1907 // UpdatedSpreadsheet: The spreadsheet after updates were applied. This 1908 // is only set if 1909 // BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response is 1910 // `true`. 1911 UpdatedSpreadsheet *Spreadsheet `json:"updatedSpreadsheet,omitempty"` 1912 1913 // ServerResponse contains the HTTP response code and headers from the 1914 // server. 1915 googleapi.ServerResponse `json:"-"` 1916 1917 // ForceSendFields is a list of field names (e.g. "Replies") to 1918 // unconditionally include in API requests. By default, fields with 1919 // empty or default values are omitted from API requests. However, any 1920 // non-pointer, non-interface field appearing in ForceSendFields will be 1921 // sent to the server regardless of whether the field is empty or not. 1922 // This may be used to include empty fields in Patch requests. 1923 ForceSendFields []string `json:"-"` 1924 1925 // NullFields is a list of field names (e.g. "Replies") to include in 1926 // API requests with the JSON null value. By default, fields with empty 1927 // values are omitted from API requests. However, any field with an 1928 // empty value appearing in NullFields will be sent to the server as 1929 // null. It is an error if a field in this list has a non-empty value. 1930 // This may be used to include null fields in Patch requests. 1931 NullFields []string `json:"-"` 1932} 1933 1934func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) { 1935 type NoMethod BatchUpdateSpreadsheetResponse 1936 raw := NoMethod(*s) 1937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1938} 1939 1940// BatchUpdateValuesByDataFilterRequest: The request for updating more 1941// than one range of values in a spreadsheet. 1942type BatchUpdateValuesByDataFilterRequest struct { 1943 // Data: The new values to apply to the spreadsheet. If more than one 1944 // range is matched by the specified DataFilter the specified values are 1945 // applied to all of those ranges. 1946 Data []*DataFilterValueRange `json:"data,omitempty"` 1947 1948 // IncludeValuesInResponse: Determines if the update response should 1949 // include the values of the cells that were updated. By default, 1950 // responses do not include the updated values. The `updatedData` field 1951 // within each of the BatchUpdateValuesResponse.responses contains the 1952 // updated values. If the range to write was larger than the range 1953 // actually written, the response includes all values in the requested 1954 // range (excluding trailing empty rows and columns). 1955 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 1956 1957 // ResponseDateTimeRenderOption: Determines how dates, times, and 1958 // durations in the response should be rendered. This is ignored if 1959 // response_value_render_option is FORMATTED_VALUE. The default dateTime 1960 // render option is SERIAL_NUMBER. 1961 // 1962 // Possible values: 1963 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 1964 // fields to be output as doubles in "serial number" format, as 1965 // popularized by Lotus 1-2-3. The whole number portion of the value 1966 // (left of the decimal) counts the days since December 30th 1899. The 1967 // fractional portion (right of the decimal) counts the time as a 1968 // fraction of the day. For example, January 1st 1900 at noon would be 1969 // 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 1970 // noon is half a day. February 1st 1900 at 3pm would be 33.625. This 1971 // correctly treats the year 1900 as not a leap year. 1972 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 1973 // fields to be output as strings in their given number format (which is 1974 // dependent on the spreadsheet locale). 1975 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 1976 1977 // ResponseValueRenderOption: Determines how values in the response 1978 // should be rendered. The default render option is FORMATTED_VALUE. 1979 // 1980 // Possible values: 1981 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 1982 // reply according to the cell's formatting. Formatting is based on the 1983 // spreadsheet's locale, not the requesting user's locale. For example, 1984 // if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 1985 // `A2` would return "$1.23". 1986 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 1987 // in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 1988 // formatted as currency, then `A2` would return the number `1.23`. 1989 // "FORMULA" - Values will not be calculated. The reply will include 1990 // the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 1991 // formatted as currency, then A2 would return "=A1". 1992 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 1993 1994 // ValueInputOption: How the input data should be interpreted. 1995 // 1996 // Possible values: 1997 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 1998 // must not be used. 1999 // "RAW" - The values the user has entered will not be parsed and will 2000 // be stored as-is. 2001 // "USER_ENTERED" - The values will be parsed as if the user typed 2002 // them into the UI. Numbers will stay as numbers, but strings may be 2003 // converted to numbers, dates, etc. following the same rules that are 2004 // applied when entering text into a cell via the Google Sheets UI. 2005 ValueInputOption string `json:"valueInputOption,omitempty"` 2006 2007 // ForceSendFields is a list of field names (e.g. "Data") to 2008 // unconditionally include in API requests. By default, fields with 2009 // empty or default values are omitted from API requests. However, any 2010 // non-pointer, non-interface field appearing in ForceSendFields will be 2011 // sent to the server regardless of whether the field is empty or not. 2012 // This may be used to include empty fields in Patch requests. 2013 ForceSendFields []string `json:"-"` 2014 2015 // NullFields is a list of field names (e.g. "Data") to include in API 2016 // requests with the JSON null value. By default, fields with empty 2017 // values are omitted from API requests. However, any field with an 2018 // empty value appearing in NullFields will be sent to the server as 2019 // null. It is an error if a field in this list has a non-empty value. 2020 // This may be used to include null fields in Patch requests. 2021 NullFields []string `json:"-"` 2022} 2023 2024func (s *BatchUpdateValuesByDataFilterRequest) MarshalJSON() ([]byte, error) { 2025 type NoMethod BatchUpdateValuesByDataFilterRequest 2026 raw := NoMethod(*s) 2027 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2028} 2029 2030// BatchUpdateValuesByDataFilterResponse: The response when updating a 2031// range of values in a spreadsheet. 2032type BatchUpdateValuesByDataFilterResponse struct { 2033 // Responses: The response for each range updated. 2034 Responses []*UpdateValuesByDataFilterResponse `json:"responses,omitempty"` 2035 2036 // SpreadsheetId: The spreadsheet the updates were applied to. 2037 SpreadsheetId string `json:"spreadsheetId,omitempty"` 2038 2039 // TotalUpdatedCells: The total number of cells updated. 2040 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 2041 2042 // TotalUpdatedColumns: The total number of columns where at least one 2043 // cell in the column was updated. 2044 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 2045 2046 // TotalUpdatedRows: The total number of rows where at least one cell in 2047 // the row was updated. 2048 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 2049 2050 // TotalUpdatedSheets: The total number of sheets where at least one 2051 // cell in the sheet was updated. 2052 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 2053 2054 // ServerResponse contains the HTTP response code and headers from the 2055 // server. 2056 googleapi.ServerResponse `json:"-"` 2057 2058 // ForceSendFields is a list of field names (e.g. "Responses") to 2059 // unconditionally include in API requests. By default, fields with 2060 // empty or default values are omitted from API requests. However, any 2061 // non-pointer, non-interface field appearing in ForceSendFields will be 2062 // sent to the server regardless of whether the field is empty or not. 2063 // This may be used to include empty fields in Patch requests. 2064 ForceSendFields []string `json:"-"` 2065 2066 // NullFields is a list of field names (e.g. "Responses") to include in 2067 // API requests with the JSON null value. By default, fields with empty 2068 // values are omitted from API requests. However, any field with an 2069 // empty value appearing in NullFields will be sent to the server as 2070 // null. It is an error if a field in this list has a non-empty value. 2071 // This may be used to include null fields in Patch requests. 2072 NullFields []string `json:"-"` 2073} 2074 2075func (s *BatchUpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 2076 type NoMethod BatchUpdateValuesByDataFilterResponse 2077 raw := NoMethod(*s) 2078 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2079} 2080 2081// BatchUpdateValuesRequest: The request for updating more than one 2082// range of values in a spreadsheet. 2083type BatchUpdateValuesRequest struct { 2084 // Data: The new values to apply to the spreadsheet. 2085 Data []*ValueRange `json:"data,omitempty"` 2086 2087 // IncludeValuesInResponse: Determines if the update response should 2088 // include the values of the cells that were updated. By default, 2089 // responses do not include the updated values. The `updatedData` field 2090 // within each of the BatchUpdateValuesResponse.responses contains the 2091 // updated values. If the range to write was larger than the range 2092 // actually written, the response includes all values in the requested 2093 // range (excluding trailing empty rows and columns). 2094 IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"` 2095 2096 // ResponseDateTimeRenderOption: Determines how dates, times, and 2097 // durations in the response should be rendered. This is ignored if 2098 // response_value_render_option is FORMATTED_VALUE. The default dateTime 2099 // render option is SERIAL_NUMBER. 2100 // 2101 // Possible values: 2102 // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 2103 // fields to be output as doubles in "serial number" format, as 2104 // popularized by Lotus 1-2-3. The whole number portion of the value 2105 // (left of the decimal) counts the days since December 30th 1899. The 2106 // fractional portion (right of the decimal) counts the time as a 2107 // fraction of the day. For example, January 1st 1900 at noon would be 2108 // 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 2109 // noon is half a day. February 1st 1900 at 3pm would be 33.625. This 2110 // correctly treats the year 1900 as not a leap year. 2111 // "FORMATTED_STRING" - Instructs date, time, datetime, and duration 2112 // fields to be output as strings in their given number format (which is 2113 // dependent on the spreadsheet locale). 2114 ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"` 2115 2116 // ResponseValueRenderOption: Determines how values in the response 2117 // should be rendered. The default render option is FORMATTED_VALUE. 2118 // 2119 // Possible values: 2120 // "FORMATTED_VALUE" - Values will be calculated & formatted in the 2121 // reply according to the cell's formatting. Formatting is based on the 2122 // spreadsheet's locale, not the requesting user's locale. For example, 2123 // if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 2124 // `A2` would return "$1.23". 2125 // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 2126 // in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 2127 // formatted as currency, then `A2` would return the number `1.23`. 2128 // "FORMULA" - Values will not be calculated. The reply will include 2129 // the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 2130 // formatted as currency, then A2 would return "=A1". 2131 ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"` 2132 2133 // ValueInputOption: How the input data should be interpreted. 2134 // 2135 // Possible values: 2136 // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 2137 // must not be used. 2138 // "RAW" - The values the user has entered will not be parsed and will 2139 // be stored as-is. 2140 // "USER_ENTERED" - The values will be parsed as if the user typed 2141 // them into the UI. Numbers will stay as numbers, but strings may be 2142 // converted to numbers, dates, etc. following the same rules that are 2143 // applied when entering text into a cell via the Google Sheets UI. 2144 ValueInputOption string `json:"valueInputOption,omitempty"` 2145 2146 // ForceSendFields is a list of field names (e.g. "Data") to 2147 // unconditionally include in API requests. By default, fields with 2148 // empty or default values are omitted from API requests. However, any 2149 // non-pointer, non-interface field appearing in ForceSendFields will be 2150 // sent to the server regardless of whether the field is empty or not. 2151 // This may be used to include empty fields in Patch requests. 2152 ForceSendFields []string `json:"-"` 2153 2154 // NullFields is a list of field names (e.g. "Data") to include in API 2155 // requests with the JSON null value. By default, fields with empty 2156 // values are omitted from API requests. However, any field with an 2157 // empty value appearing in NullFields will be sent to the server as 2158 // null. It is an error if a field in this list has a non-empty value. 2159 // This may be used to include null fields in Patch requests. 2160 NullFields []string `json:"-"` 2161} 2162 2163func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) { 2164 type NoMethod BatchUpdateValuesRequest 2165 raw := NoMethod(*s) 2166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2167} 2168 2169// BatchUpdateValuesResponse: The response when updating a range of 2170// values in a spreadsheet. 2171type BatchUpdateValuesResponse struct { 2172 // Responses: One UpdateValuesResponse per requested range, in the same 2173 // order as the requests appeared. 2174 Responses []*UpdateValuesResponse `json:"responses,omitempty"` 2175 2176 // SpreadsheetId: The spreadsheet the updates were applied to. 2177 SpreadsheetId string `json:"spreadsheetId,omitempty"` 2178 2179 // TotalUpdatedCells: The total number of cells updated. 2180 TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"` 2181 2182 // TotalUpdatedColumns: The total number of columns where at least one 2183 // cell in the column was updated. 2184 TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"` 2185 2186 // TotalUpdatedRows: The total number of rows where at least one cell in 2187 // the row was updated. 2188 TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"` 2189 2190 // TotalUpdatedSheets: The total number of sheets where at least one 2191 // cell in the sheet was updated. 2192 TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"` 2193 2194 // ServerResponse contains the HTTP response code and headers from the 2195 // server. 2196 googleapi.ServerResponse `json:"-"` 2197 2198 // ForceSendFields is a list of field names (e.g. "Responses") to 2199 // unconditionally include in API requests. By default, fields with 2200 // empty or default values are omitted from API requests. However, any 2201 // non-pointer, non-interface field appearing in ForceSendFields will be 2202 // sent to the server regardless of whether the field is empty or not. 2203 // This may be used to include empty fields in Patch requests. 2204 ForceSendFields []string `json:"-"` 2205 2206 // NullFields is a list of field names (e.g. "Responses") to include in 2207 // API requests with the JSON null value. By default, fields with empty 2208 // values are omitted from API requests. However, any field with an 2209 // empty value appearing in NullFields will be sent to the server as 2210 // null. It is an error if a field in this list has a non-empty value. 2211 // This may be used to include null fields in Patch requests. 2212 NullFields []string `json:"-"` 2213} 2214 2215func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) { 2216 type NoMethod BatchUpdateValuesResponse 2217 raw := NoMethod(*s) 2218 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2219} 2220 2221// BigQueryDataSourceSpec: The specification of a BigQuery data source 2222// that's connected to a sheet. 2223type BigQueryDataSourceSpec struct { 2224 // ProjectId: The ID of a BigQuery enabled GCP project with a billing 2225 // account attached. For any queries executed against the data source, 2226 // the project is charged. 2227 ProjectId string `json:"projectId,omitempty"` 2228 2229 // QuerySpec: A BigQueryQuerySpec. 2230 QuerySpec *BigQueryQuerySpec `json:"querySpec,omitempty"` 2231 2232 // TableSpec: A BigQueryTableSpec. 2233 TableSpec *BigQueryTableSpec `json:"tableSpec,omitempty"` 2234 2235 // ForceSendFields is a list of field names (e.g. "ProjectId") to 2236 // unconditionally include in API requests. By default, fields with 2237 // empty or default values are omitted from API requests. However, any 2238 // non-pointer, non-interface field appearing in ForceSendFields will be 2239 // sent to the server regardless of whether the field is empty or not. 2240 // This may be used to include empty fields in Patch requests. 2241 ForceSendFields []string `json:"-"` 2242 2243 // NullFields is a list of field names (e.g. "ProjectId") to include in 2244 // API requests with the JSON null value. By default, fields with empty 2245 // values are omitted from API requests. However, any field with an 2246 // empty value appearing in NullFields will be sent to the server as 2247 // null. It is an error if a field in this list has a non-empty value. 2248 // This may be used to include null fields in Patch requests. 2249 NullFields []string `json:"-"` 2250} 2251 2252func (s *BigQueryDataSourceSpec) MarshalJSON() ([]byte, error) { 2253 type NoMethod BigQueryDataSourceSpec 2254 raw := NoMethod(*s) 2255 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2256} 2257 2258// BigQueryQuerySpec: Specifies a custom BigQuery query. 2259type BigQueryQuerySpec struct { 2260 // RawQuery: The raw query string. 2261 RawQuery string `json:"rawQuery,omitempty"` 2262 2263 // ForceSendFields is a list of field names (e.g. "RawQuery") to 2264 // unconditionally include in API requests. By default, fields with 2265 // empty or default values are omitted from API requests. However, any 2266 // non-pointer, non-interface field appearing in ForceSendFields will be 2267 // sent to the server regardless of whether the field is empty or not. 2268 // This may be used to include empty fields in Patch requests. 2269 ForceSendFields []string `json:"-"` 2270 2271 // NullFields is a list of field names (e.g. "RawQuery") to include in 2272 // API requests with the JSON null value. By default, fields with empty 2273 // values are omitted from API requests. However, any field with an 2274 // empty value appearing in NullFields will be sent to the server as 2275 // null. It is an error if a field in this list has a non-empty value. 2276 // This may be used to include null fields in Patch requests. 2277 NullFields []string `json:"-"` 2278} 2279 2280func (s *BigQueryQuerySpec) MarshalJSON() ([]byte, error) { 2281 type NoMethod BigQueryQuerySpec 2282 raw := NoMethod(*s) 2283 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2284} 2285 2286// BigQueryTableSpec: Specifies a BigQuery table definition. Only native 2287// tables (https://cloud.google.com/bigquery/docs/tables-intro) is 2288// allowed. 2289type BigQueryTableSpec struct { 2290 // DatasetId: The BigQuery dataset id. 2291 DatasetId string `json:"datasetId,omitempty"` 2292 2293 // TableId: The BigQuery table id. 2294 TableId string `json:"tableId,omitempty"` 2295 2296 // TableProjectId: The ID of a BigQuery project the table belongs to. If 2297 // not specified, the project_id is assumed. 2298 TableProjectId string `json:"tableProjectId,omitempty"` 2299 2300 // ForceSendFields is a list of field names (e.g. "DatasetId") to 2301 // unconditionally include in API requests. By default, fields with 2302 // empty or default values are omitted from API requests. However, any 2303 // non-pointer, non-interface field appearing in ForceSendFields will be 2304 // sent to the server regardless of whether the field is empty or not. 2305 // This may be used to include empty fields in Patch requests. 2306 ForceSendFields []string `json:"-"` 2307 2308 // NullFields is a list of field names (e.g. "DatasetId") to include in 2309 // API requests with the JSON null value. By default, fields with empty 2310 // values are omitted from API requests. However, any field with an 2311 // empty value appearing in NullFields will be sent to the server as 2312 // null. It is an error if a field in this list has a non-empty value. 2313 // This may be used to include null fields in Patch requests. 2314 NullFields []string `json:"-"` 2315} 2316 2317func (s *BigQueryTableSpec) MarshalJSON() ([]byte, error) { 2318 type NoMethod BigQueryTableSpec 2319 raw := NoMethod(*s) 2320 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2321} 2322 2323// BooleanCondition: A condition that can evaluate to true or false. 2324// BooleanConditions are used by conditional formatting, data 2325// validation, and the criteria in filters. 2326type BooleanCondition struct { 2327 // Type: The type of condition. 2328 // 2329 // Possible values: 2330 // "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use. 2331 // "NUMBER_GREATER" - The cell's value must be greater than the 2332 // condition's value. Supported by data validation, conditional 2333 // formatting and filters. Requires a single ConditionValue. 2334 // "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or 2335 // equal to the condition's value. Supported by data validation, 2336 // conditional formatting and filters. Requires a single ConditionValue. 2337 // "NUMBER_LESS" - The cell's value must be less than the condition's 2338 // value. Supported by data validation, conditional formatting and 2339 // filters. Requires a single ConditionValue. 2340 // "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal 2341 // to the condition's value. Supported by data validation, conditional 2342 // formatting and filters. Requires a single ConditionValue. 2343 // "NUMBER_EQ" - The cell's value must be equal to the condition's 2344 // value. Supported by data validation, conditional formatting and 2345 // filters. Requires a single ConditionValue for data validation, 2346 // conditional formatting, and filters on non-data source objects and at 2347 // least one ConditionValue for filters on data source objects. 2348 // "NUMBER_NOT_EQ" - The cell's value must be not equal to the 2349 // condition's value. Supported by data validation, conditional 2350 // formatting and filters. Requires a single ConditionValue for data 2351 // validation, conditional formatting, and filters on non-data source 2352 // objects and at least one ConditionValue for filters on data source 2353 // objects. 2354 // "NUMBER_BETWEEN" - The cell's value must be between the two 2355 // condition values. Supported by data validation, conditional 2356 // formatting and filters. Requires exactly two ConditionValues. 2357 // "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two 2358 // condition values. Supported by data validation, conditional 2359 // formatting and filters. Requires exactly two ConditionValues. 2360 // "TEXT_CONTAINS" - The cell's value must contain the condition's 2361 // value. Supported by data validation, conditional formatting and 2362 // filters. Requires a single ConditionValue. 2363 // "TEXT_NOT_CONTAINS" - The cell's value must not contain the 2364 // condition's value. Supported by data validation, conditional 2365 // formatting and filters. Requires a single ConditionValue. 2366 // "TEXT_STARTS_WITH" - The cell's value must start with the 2367 // condition's value. Supported by conditional formatting and filters. 2368 // Requires a single ConditionValue. 2369 // "TEXT_ENDS_WITH" - The cell's value must end with the condition's 2370 // value. Supported by conditional formatting and filters. Requires a 2371 // single ConditionValue. 2372 // "TEXT_EQ" - The cell's value must be exactly the condition's value. 2373 // Supported by data validation, conditional formatting and filters. 2374 // Requires a single ConditionValue for data validation, conditional 2375 // formatting, and filters on non-data source objects and at least one 2376 // ConditionValue for filters on data source objects. 2377 // "TEXT_IS_EMAIL" - The cell's value must be a valid email address. 2378 // Supported by data validation. Requires no ConditionValues. 2379 // "TEXT_IS_URL" - The cell's value must be a valid URL. Supported by 2380 // data validation. Requires no ConditionValues. 2381 // "DATE_EQ" - The cell's value must be the same date as the 2382 // condition's value. Supported by data validation, conditional 2383 // formatting and filters. Requires a single ConditionValue for data 2384 // validation, conditional formatting, and filters on non-data source 2385 // objects and at least one ConditionValue for filters on data source 2386 // objects. 2387 // "DATE_BEFORE" - The cell's value must be before the date of the 2388 // condition's value. Supported by data validation, conditional 2389 // formatting and filters. Requires a single ConditionValue that may be 2390 // a relative date. 2391 // "DATE_AFTER" - The cell's value must be after the date of the 2392 // condition's value. Supported by data validation, conditional 2393 // formatting and filters. Requires a single ConditionValue that may be 2394 // a relative date. 2395 // "DATE_ON_OR_BEFORE" - The cell's value must be on or before the 2396 // date of the condition's value. Supported by data validation. Requires 2397 // a single ConditionValue that may be a relative date. 2398 // "DATE_ON_OR_AFTER" - The cell's value must be on or after the date 2399 // of the condition's value. Supported by data validation. Requires a 2400 // single ConditionValue that may be a relative date. 2401 // "DATE_BETWEEN" - The cell's value must be between the dates of the 2402 // two condition values. Supported by data validation. Requires exactly 2403 // two ConditionValues. 2404 // "DATE_NOT_BETWEEN" - The cell's value must be outside the dates of 2405 // the two condition values. Supported by data validation. Requires 2406 // exactly two ConditionValues. 2407 // "DATE_IS_VALID" - The cell's value must be a date. Supported by 2408 // data validation. Requires no ConditionValues. 2409 // "ONE_OF_RANGE" - The cell's value must be listed in the grid in 2410 // condition value's range. Supported by data validation. Requires a 2411 // single ConditionValue, and the value must be a valid range in A1 2412 // notation. 2413 // "ONE_OF_LIST" - The cell's value must be in the list of condition 2414 // values. Supported by data validation. Supports any number of 2415 // condition values, one per item in the list. Formulas are not 2416 // supported in the values. 2417 // "BLANK" - The cell's value must be empty. Supported by conditional 2418 // formatting and filters. Requires no ConditionValues. 2419 // "NOT_BLANK" - The cell's value must not be empty. Supported by 2420 // conditional formatting and filters. Requires no ConditionValues. 2421 // "CUSTOM_FORMULA" - The condition's formula must evaluate to true. 2422 // Supported by data validation, conditional formatting and filters. Not 2423 // supported by data source sheet filters. Requires a single 2424 // ConditionValue. 2425 // "BOOLEAN" - The cell's value must be TRUE/FALSE or in the list of 2426 // condition values. Supported by data validation. Renders as a cell 2427 // checkbox. Supports zero, one or two ConditionValues. No values 2428 // indicates the cell must be TRUE or FALSE, where TRUE renders as 2429 // checked and FALSE renders as unchecked. One value indicates the cell 2430 // will render as checked when it contains that value and unchecked when 2431 // it is blank. Two values indicate that the cell will render as checked 2432 // when it contains the first value and unchecked when it contains the 2433 // second value. For example, ["Yes","No"] indicates that the cell will 2434 // render a checked box when it has the value "Yes" and an unchecked box 2435 // when it has the value "No". 2436 // "TEXT_NOT_EQ" - The cell's value must be exactly not the 2437 // condition's value. Supported by filters on data source objects. 2438 // Requires at least one ConditionValue. 2439 // "DATE_NOT_EQ" - The cell's value must be exactly not the 2440 // condition's value. Supported by filters on data source objects. 2441 // Requires at least one ConditionValue. 2442 Type string `json:"type,omitempty"` 2443 2444 // Values: The values of the condition. The number of supported values 2445 // depends on the condition type. Some support zero values, others one 2446 // or two values, and ConditionType.ONE_OF_LIST supports an arbitrary 2447 // number of values. 2448 Values []*ConditionValue `json:"values,omitempty"` 2449 2450 // ForceSendFields is a list of field names (e.g. "Type") to 2451 // unconditionally include in API requests. By default, fields with 2452 // empty or default values are omitted from API requests. However, any 2453 // non-pointer, non-interface field appearing in ForceSendFields will be 2454 // sent to the server regardless of whether the field is empty or not. 2455 // This may be used to include empty fields in Patch requests. 2456 ForceSendFields []string `json:"-"` 2457 2458 // NullFields is a list of field names (e.g. "Type") to include in API 2459 // requests with the JSON null value. By default, fields with empty 2460 // values are omitted from API requests. However, any field with an 2461 // empty value appearing in NullFields will be sent to the server as 2462 // null. It is an error if a field in this list has a non-empty value. 2463 // This may be used to include null fields in Patch requests. 2464 NullFields []string `json:"-"` 2465} 2466 2467func (s *BooleanCondition) MarshalJSON() ([]byte, error) { 2468 type NoMethod BooleanCondition 2469 raw := NoMethod(*s) 2470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2471} 2472 2473// BooleanRule: A rule that may or may not match, depending on the 2474// condition. 2475type BooleanRule struct { 2476 // Condition: The condition of the rule. If the condition evaluates to 2477 // true, the format is applied. 2478 Condition *BooleanCondition `json:"condition,omitempty"` 2479 2480 // Format: The format to apply. Conditional formatting can only apply a 2481 // subset of formatting: bold, italic, strikethrough, foreground color & 2482 // background color. 2483 Format *CellFormat `json:"format,omitempty"` 2484 2485 // ForceSendFields is a list of field names (e.g. "Condition") to 2486 // unconditionally include in API requests. By default, fields with 2487 // empty or default values are omitted from API requests. However, any 2488 // non-pointer, non-interface field appearing in ForceSendFields will be 2489 // sent to the server regardless of whether the field is empty or not. 2490 // This may be used to include empty fields in Patch requests. 2491 ForceSendFields []string `json:"-"` 2492 2493 // NullFields is a list of field names (e.g. "Condition") to include in 2494 // API requests with the JSON null value. By default, fields with empty 2495 // values are omitted from API requests. However, any field with an 2496 // empty value appearing in NullFields will be sent to the server as 2497 // null. It is an error if a field in this list has a non-empty value. 2498 // This may be used to include null fields in Patch requests. 2499 NullFields []string `json:"-"` 2500} 2501 2502func (s *BooleanRule) MarshalJSON() ([]byte, error) { 2503 type NoMethod BooleanRule 2504 raw := NoMethod(*s) 2505 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2506} 2507 2508// Border: A border along a cell. 2509type Border struct { 2510 // Color: The color of the border. 2511 Color *Color `json:"color,omitempty"` 2512 2513 // ColorStyle: The color of the border. If color is also set, this field 2514 // takes precedence. 2515 ColorStyle *ColorStyle `json:"colorStyle,omitempty"` 2516 2517 // Style: The style of the border. 2518 // 2519 // Possible values: 2520 // "STYLE_UNSPECIFIED" - The style is not specified. Do not use this. 2521 // "DOTTED" - The border is dotted. 2522 // "DASHED" - The border is dashed. 2523 // "SOLID" - The border is a thin solid line. 2524 // "SOLID_MEDIUM" - The border is a medium solid line. 2525 // "SOLID_THICK" - The border is a thick solid line. 2526 // "NONE" - No border. Used only when updating a border in order to 2527 // erase it. 2528 // "DOUBLE" - The border is two solid lines. 2529 Style string `json:"style,omitempty"` 2530 2531 // Width: The width of the border, in pixels. Deprecated; the width is 2532 // determined by the "style" field. 2533 Width int64 `json:"width,omitempty"` 2534 2535 // ForceSendFields is a list of field names (e.g. "Color") to 2536 // unconditionally include in API requests. By default, fields with 2537 // empty or default values are omitted from API requests. However, any 2538 // non-pointer, non-interface field appearing in ForceSendFields will be 2539 // sent to the server regardless of whether the field is empty or not. 2540 // This may be used to include empty fields in Patch requests. 2541 ForceSendFields []string `json:"-"` 2542 2543 // NullFields is a list of field names (e.g. "Color") to include in API 2544 // requests with the JSON null value. By default, fields with empty 2545 // values are omitted from API requests. However, any field with an 2546 // empty value appearing in NullFields will be sent to the server as 2547 // null. It is an error if a field in this list has a non-empty value. 2548 // This may be used to include null fields in Patch requests. 2549 NullFields []string `json:"-"` 2550} 2551 2552func (s *Border) MarshalJSON() ([]byte, error) { 2553 type NoMethod Border 2554 raw := NoMethod(*s) 2555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2556} 2557 2558// Borders: The borders of the cell. 2559type Borders struct { 2560 // Bottom: The bottom border of the cell. 2561 Bottom *Border `json:"bottom,omitempty"` 2562 2563 // Left: The left border of the cell. 2564 Left *Border `json:"left,omitempty"` 2565 2566 // Right: The right border of the cell. 2567 Right *Border `json:"right,omitempty"` 2568 2569 // Top: The top border of the cell. 2570 Top *Border `json:"top,omitempty"` 2571 2572 // ForceSendFields is a list of field names (e.g. "Bottom") to 2573 // unconditionally include in API requests. By default, fields with 2574 // empty or default values are omitted from API requests. However, any 2575 // non-pointer, non-interface field appearing in ForceSendFields will be 2576 // sent to the server regardless of whether the field is empty or not. 2577 // This may be used to include empty fields in Patch requests. 2578 ForceSendFields []string `json:"-"` 2579 2580 // NullFields is a list of field names (e.g. "Bottom") to include in API 2581 // requests with the JSON null value. By default, fields with empty 2582 // values are omitted from API requests. However, any field with an 2583 // empty value appearing in NullFields will be sent to the server as 2584 // null. It is an error if a field in this list has a non-empty value. 2585 // This may be used to include null fields in Patch requests. 2586 NullFields []string `json:"-"` 2587} 2588 2589func (s *Borders) MarshalJSON() ([]byte, error) { 2590 type NoMethod Borders 2591 raw := NoMethod(*s) 2592 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2593} 2594 2595// BubbleChartSpec: A bubble chart. 2596type BubbleChartSpec struct { 2597 // BubbleBorderColor: The bubble border color. 2598 BubbleBorderColor *Color `json:"bubbleBorderColor,omitempty"` 2599 2600 // BubbleBorderColorStyle: The bubble border color. If 2601 // bubble_border_color is also set, this field takes precedence. 2602 BubbleBorderColorStyle *ColorStyle `json:"bubbleBorderColorStyle,omitempty"` 2603 2604 // BubbleLabels: The data containing the bubble labels. These do not 2605 // need to be unique. 2606 BubbleLabels *ChartData `json:"bubbleLabels,omitempty"` 2607 2608 // BubbleMaxRadiusSize: The max radius size of the bubbles, in pixels. 2609 // If specified, the field must be a positive value. 2610 BubbleMaxRadiusSize int64 `json:"bubbleMaxRadiusSize,omitempty"` 2611 2612 // BubbleMinRadiusSize: The minimum radius size of the bubbles, in 2613 // pixels. If specific, the field must be a positive value. 2614 BubbleMinRadiusSize int64 `json:"bubbleMinRadiusSize,omitempty"` 2615 2616 // BubbleOpacity: The opacity of the bubbles between 0 and 1.0. 0 is 2617 // fully transparent and 1 is fully opaque. 2618 BubbleOpacity float64 `json:"bubbleOpacity,omitempty"` 2619 2620 // BubbleSizes: The data containing the bubble sizes. Bubble sizes are 2621 // used to draw the bubbles at different sizes relative to each other. 2622 // If specified, group_ids must also be specified. This field is 2623 // optional. 2624 BubbleSizes *ChartData `json:"bubbleSizes,omitempty"` 2625 2626 // BubbleTextStyle: The format of the text inside the bubbles. 2627 // Strikethrough, underline, and link are not supported. 2628 BubbleTextStyle *TextFormat `json:"bubbleTextStyle,omitempty"` 2629 2630 // Domain: The data containing the bubble x-values. These values locate 2631 // the bubbles in the chart horizontally. 2632 Domain *ChartData `json:"domain,omitempty"` 2633 2634 // GroupIds: The data containing the bubble group IDs. All bubbles with 2635 // the same group ID are drawn in the same color. If bubble_sizes is 2636 // specified then this field must also be specified but may contain 2637 // blank values. This field is optional. 2638 GroupIds *ChartData `json:"groupIds,omitempty"` 2639 2640 // LegendPosition: Where the legend of the chart should be drawn. 2641 // 2642 // Possible values: 2643 // "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 2644 // use. 2645 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 2646 // chart. 2647 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 2648 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 2649 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 2650 // "NO_LEGEND" - No legend is rendered. 2651 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 2652 LegendPosition string `json:"legendPosition,omitempty"` 2653 2654 // Series: The data containing the bubble y-values. These values locate 2655 // the bubbles in the chart vertically. 2656 Series *ChartData `json:"series,omitempty"` 2657 2658 // ForceSendFields is a list of field names (e.g. "BubbleBorderColor") 2659 // to unconditionally include in API requests. By default, fields with 2660 // empty or default values are omitted from API requests. However, any 2661 // non-pointer, non-interface field appearing in ForceSendFields will be 2662 // sent to the server regardless of whether the field is empty or not. 2663 // This may be used to include empty fields in Patch requests. 2664 ForceSendFields []string `json:"-"` 2665 2666 // NullFields is a list of field names (e.g. "BubbleBorderColor") to 2667 // include in API requests with the JSON null value. By default, fields 2668 // with empty values are omitted from API requests. However, any field 2669 // with an empty value appearing in NullFields will be sent to the 2670 // server as null. It is an error if a field in this list has a 2671 // non-empty value. This may be used to include null fields in Patch 2672 // requests. 2673 NullFields []string `json:"-"` 2674} 2675 2676func (s *BubbleChartSpec) MarshalJSON() ([]byte, error) { 2677 type NoMethod BubbleChartSpec 2678 raw := NoMethod(*s) 2679 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2680} 2681 2682func (s *BubbleChartSpec) UnmarshalJSON(data []byte) error { 2683 type NoMethod BubbleChartSpec 2684 var s1 struct { 2685 BubbleOpacity gensupport.JSONFloat64 `json:"bubbleOpacity"` 2686 *NoMethod 2687 } 2688 s1.NoMethod = (*NoMethod)(s) 2689 if err := json.Unmarshal(data, &s1); err != nil { 2690 return err 2691 } 2692 s.BubbleOpacity = float64(s1.BubbleOpacity) 2693 return nil 2694} 2695 2696// CandlestickChartSpec: A candlestick chart. 2697type CandlestickChartSpec struct { 2698 // Data: The Candlestick chart data. Only one CandlestickData is 2699 // supported. 2700 Data []*CandlestickData `json:"data,omitempty"` 2701 2702 // Domain: The domain data (horizontal axis) for the candlestick chart. 2703 // String data will be treated as discrete labels, other data will be 2704 // treated as continuous values. 2705 Domain *CandlestickDomain `json:"domain,omitempty"` 2706 2707 // ForceSendFields is a list of field names (e.g. "Data") to 2708 // unconditionally include in API requests. By default, fields with 2709 // empty or default values are omitted from API requests. However, any 2710 // non-pointer, non-interface field appearing in ForceSendFields will be 2711 // sent to the server regardless of whether the field is empty or not. 2712 // This may be used to include empty fields in Patch requests. 2713 ForceSendFields []string `json:"-"` 2714 2715 // NullFields is a list of field names (e.g. "Data") to include in API 2716 // requests with the JSON null value. By default, fields with empty 2717 // values are omitted from API requests. However, any field with an 2718 // empty value appearing in NullFields will be sent to the server as 2719 // null. It is an error if a field in this list has a non-empty value. 2720 // This may be used to include null fields in Patch requests. 2721 NullFields []string `json:"-"` 2722} 2723 2724func (s *CandlestickChartSpec) MarshalJSON() ([]byte, error) { 2725 type NoMethod CandlestickChartSpec 2726 raw := NoMethod(*s) 2727 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2728} 2729 2730// CandlestickData: The Candlestick chart data, each containing the low, 2731// open, close, and high values for a series. 2732type CandlestickData struct { 2733 // CloseSeries: The range data (vertical axis) for the close/final value 2734 // for each candle. This is the top of the candle body. If greater than 2735 // the open value the candle will be filled. Otherwise the candle will 2736 // be hollow. 2737 CloseSeries *CandlestickSeries `json:"closeSeries,omitempty"` 2738 2739 // HighSeries: The range data (vertical axis) for the high/maximum value 2740 // for each candle. This is the top of the candle's center line. 2741 HighSeries *CandlestickSeries `json:"highSeries,omitempty"` 2742 2743 // LowSeries: The range data (vertical axis) for the low/minimum value 2744 // for each candle. This is the bottom of the candle's center line. 2745 LowSeries *CandlestickSeries `json:"lowSeries,omitempty"` 2746 2747 // OpenSeries: The range data (vertical axis) for the open/initial value 2748 // for each candle. This is the bottom of the candle body. If less than 2749 // the close value the candle will be filled. Otherwise the candle will 2750 // be hollow. 2751 OpenSeries *CandlestickSeries `json:"openSeries,omitempty"` 2752 2753 // ForceSendFields is a list of field names (e.g. "CloseSeries") to 2754 // unconditionally include in API requests. By default, fields with 2755 // empty or default values are omitted from API requests. However, any 2756 // non-pointer, non-interface field appearing in ForceSendFields will be 2757 // sent to the server regardless of whether the field is empty or not. 2758 // This may be used to include empty fields in Patch requests. 2759 ForceSendFields []string `json:"-"` 2760 2761 // NullFields is a list of field names (e.g. "CloseSeries") to include 2762 // in API requests with the JSON null value. By default, fields with 2763 // empty values are omitted from API requests. However, any field with 2764 // an empty value appearing in NullFields will be sent to the server as 2765 // null. It is an error if a field in this list has a non-empty value. 2766 // This may be used to include null fields in Patch requests. 2767 NullFields []string `json:"-"` 2768} 2769 2770func (s *CandlestickData) MarshalJSON() ([]byte, error) { 2771 type NoMethod CandlestickData 2772 raw := NoMethod(*s) 2773 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2774} 2775 2776// CandlestickDomain: The domain of a CandlestickChart. 2777type CandlestickDomain struct { 2778 // Data: The data of the CandlestickDomain. 2779 Data *ChartData `json:"data,omitempty"` 2780 2781 // Reversed: True to reverse the order of the domain values (horizontal 2782 // axis). 2783 Reversed bool `json:"reversed,omitempty"` 2784 2785 // ForceSendFields is a list of field names (e.g. "Data") to 2786 // unconditionally include in API requests. By default, fields with 2787 // empty or default values are omitted from API requests. However, any 2788 // non-pointer, non-interface field appearing in ForceSendFields will be 2789 // sent to the server regardless of whether the field is empty or not. 2790 // This may be used to include empty fields in Patch requests. 2791 ForceSendFields []string `json:"-"` 2792 2793 // NullFields is a list of field names (e.g. "Data") to include in API 2794 // requests with the JSON null value. By default, fields with empty 2795 // values are omitted from API requests. However, any field with an 2796 // empty value appearing in NullFields will be sent to the server as 2797 // null. It is an error if a field in this list has a non-empty value. 2798 // This may be used to include null fields in Patch requests. 2799 NullFields []string `json:"-"` 2800} 2801 2802func (s *CandlestickDomain) MarshalJSON() ([]byte, error) { 2803 type NoMethod CandlestickDomain 2804 raw := NoMethod(*s) 2805 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2806} 2807 2808// CandlestickSeries: The series of a CandlestickData. 2809type CandlestickSeries struct { 2810 // Data: The data of the CandlestickSeries. 2811 Data *ChartData `json:"data,omitempty"` 2812 2813 // ForceSendFields is a list of field names (e.g. "Data") to 2814 // unconditionally include in API requests. By default, fields with 2815 // empty or default values are omitted from API requests. However, any 2816 // non-pointer, non-interface field appearing in ForceSendFields will be 2817 // sent to the server regardless of whether the field is empty or not. 2818 // This may be used to include empty fields in Patch requests. 2819 ForceSendFields []string `json:"-"` 2820 2821 // NullFields is a list of field names (e.g. "Data") to include in API 2822 // requests with the JSON null value. By default, fields with empty 2823 // values are omitted from API requests. However, any field with an 2824 // empty value appearing in NullFields will be sent to the server as 2825 // null. It is an error if a field in this list has a non-empty value. 2826 // This may be used to include null fields in Patch requests. 2827 NullFields []string `json:"-"` 2828} 2829 2830func (s *CandlestickSeries) MarshalJSON() ([]byte, error) { 2831 type NoMethod CandlestickSeries 2832 raw := NoMethod(*s) 2833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2834} 2835 2836// CellData: Data about a specific cell. 2837type CellData struct { 2838 // DataSourceFormula: Output only. Information about a data source 2839 // formula on the cell. The field is set if user_entered_value is a 2840 // formula referencing some DATA_SOURCE sheet, e.g. 2841 // `=SUM(DataSheet!Column)`. 2842 DataSourceFormula *DataSourceFormula `json:"dataSourceFormula,omitempty"` 2843 2844 // DataSourceTable: A data source table anchored at this cell. The size 2845 // of data source table itself is computed dynamically based on its 2846 // configuration. Only the first cell of the data source table contains 2847 // the data source table definition. The other cells will contain the 2848 // display values of the data source table result in their 2849 // effective_value fields. 2850 DataSourceTable *DataSourceTable `json:"dataSourceTable,omitempty"` 2851 2852 // DataValidation: A data validation rule on the cell, if any. When 2853 // writing, the new data validation rule will overwrite any prior rule. 2854 DataValidation *DataValidationRule `json:"dataValidation,omitempty"` 2855 2856 // EffectiveFormat: The effective format being used by the cell. This 2857 // includes the results of applying any conditional formatting and, if 2858 // the cell contains a formula, the computed number format. If the 2859 // effective format is the default format, effective format will not be 2860 // written. This field is read-only. 2861 EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"` 2862 2863 // EffectiveValue: The effective value of the cell. For cells with 2864 // formulas, this is the calculated value. For cells with literals, this 2865 // is the same as the user_entered_value. This field is read-only. 2866 EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"` 2867 2868 // FormattedValue: The formatted value of the cell. This is the value as 2869 // it's shown to the user. This field is read-only. 2870 FormattedValue string `json:"formattedValue,omitempty"` 2871 2872 // Hyperlink: A hyperlink this cell points to, if any. If the cell 2873 // contains multiple hyperlinks, this field will be empty. This field is 2874 // read-only. To set it, use a `=HYPERLINK` formula in the 2875 // userEnteredValue.formulaValue field. A cell-level link can also be 2876 // set from the userEnteredFormat.textFormat field. Alternatively, set a 2877 // hyperlink in the textFormatRun.format.link field that spans the 2878 // entire cell. 2879 Hyperlink string `json:"hyperlink,omitempty"` 2880 2881 // Note: Any note on the cell. 2882 Note string `json:"note,omitempty"` 2883 2884 // PivotTable: A pivot table anchored at this cell. The size of pivot 2885 // table itself is computed dynamically based on its data, grouping, 2886 // filters, values, etc. Only the top-left cell of the pivot table 2887 // contains the pivot table definition. The other cells will contain the 2888 // calculated values of the results of the pivot in their 2889 // effective_value fields. 2890 PivotTable *PivotTable `json:"pivotTable,omitempty"` 2891 2892 // TextFormatRuns: Runs of rich text applied to subsections of the cell. 2893 // Runs are only valid on user entered strings, not formulas, bools, or 2894 // numbers. Properties of a run start at a specific index in the text 2895 // and continue until the next run. Runs will inherit the properties of 2896 // the cell unless explicitly changed. When writing, the new runs will 2897 // overwrite any prior runs. When writing a new user_entered_value, 2898 // previous runs are erased. 2899 TextFormatRuns []*TextFormatRun `json:"textFormatRuns,omitempty"` 2900 2901 // UserEnteredFormat: The format the user entered for the cell. When 2902 // writing, the new format will be merged with the existing format. 2903 UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"` 2904 2905 // UserEnteredValue: The value the user entered in the cell. e.g, 2906 // `1234`, `'Hello'`, or `=NOW()` Note: Dates, Times and DateTimes are 2907 // represented as doubles in serial number format. 2908 UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"` 2909 2910 // ForceSendFields is a list of field names (e.g. "DataSourceFormula") 2911 // to unconditionally include in API requests. By default, fields with 2912 // empty or default values are omitted from API requests. However, any 2913 // non-pointer, non-interface field appearing in ForceSendFields will be 2914 // sent to the server regardless of whether the field is empty or not. 2915 // This may be used to include empty fields in Patch requests. 2916 ForceSendFields []string `json:"-"` 2917 2918 // NullFields is a list of field names (e.g. "DataSourceFormula") to 2919 // include in API requests with the JSON null value. By default, fields 2920 // with empty values are omitted from API requests. However, any field 2921 // with an empty value appearing in NullFields will be sent to the 2922 // server as null. It is an error if a field in this list has a 2923 // non-empty value. This may be used to include null fields in Patch 2924 // requests. 2925 NullFields []string `json:"-"` 2926} 2927 2928func (s *CellData) MarshalJSON() ([]byte, error) { 2929 type NoMethod CellData 2930 raw := NoMethod(*s) 2931 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2932} 2933 2934// CellFormat: The format of a cell. 2935type CellFormat struct { 2936 // BackgroundColor: The background color of the cell. 2937 BackgroundColor *Color `json:"backgroundColor,omitempty"` 2938 2939 // BackgroundColorStyle: The background color of the cell. If 2940 // background_color is also set, this field takes precedence. 2941 BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` 2942 2943 // Borders: The borders of the cell. 2944 Borders *Borders `json:"borders,omitempty"` 2945 2946 // HorizontalAlignment: The horizontal alignment of the value in the 2947 // cell. 2948 // 2949 // Possible values: 2950 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 2951 // specified. Do not use this. 2952 // "LEFT" - The text is explicitly aligned to the left of the cell. 2953 // "CENTER" - The text is explicitly aligned to the center of the 2954 // cell. 2955 // "RIGHT" - The text is explicitly aligned to the right of the cell. 2956 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 2957 2958 // HyperlinkDisplayType: How a hyperlink, if it exists, should be 2959 // displayed in the cell. 2960 // 2961 // Possible values: 2962 // "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" - The default value: the 2963 // hyperlink is rendered. Do not use this. 2964 // "LINKED" - A hyperlink should be explicitly rendered. 2965 // "PLAIN_TEXT" - A hyperlink should not be rendered. 2966 HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"` 2967 2968 // NumberFormat: A format describing how number values should be 2969 // represented to the user. 2970 NumberFormat *NumberFormat `json:"numberFormat,omitempty"` 2971 2972 // Padding: The padding of the cell. 2973 Padding *Padding `json:"padding,omitempty"` 2974 2975 // TextDirection: The direction of the text in the cell. 2976 // 2977 // Possible values: 2978 // "TEXT_DIRECTION_UNSPECIFIED" - The text direction is not specified. 2979 // Do not use this. 2980 // "LEFT_TO_RIGHT" - The text direction of left-to-right was set by 2981 // the user. 2982 // "RIGHT_TO_LEFT" - The text direction of right-to-left was set by 2983 // the user. 2984 TextDirection string `json:"textDirection,omitempty"` 2985 2986 // TextFormat: The format of the text in the cell (unless overridden by 2987 // a format run). Setting a cell-level link here will clear the cell's 2988 // existing links. Setting the link field in a TextFormatRun will take 2989 // precedence over the cell-level link. 2990 TextFormat *TextFormat `json:"textFormat,omitempty"` 2991 2992 // TextRotation: The rotation applied to text in a cell 2993 TextRotation *TextRotation `json:"textRotation,omitempty"` 2994 2995 // VerticalAlignment: The vertical alignment of the value in the cell. 2996 // 2997 // Possible values: 2998 // "VERTICAL_ALIGN_UNSPECIFIED" - The vertical alignment is not 2999 // specified. Do not use this. 3000 // "TOP" - The text is explicitly aligned to the top of the cell. 3001 // "MIDDLE" - The text is explicitly aligned to the middle of the 3002 // cell. 3003 // "BOTTOM" - The text is explicitly aligned to the bottom of the 3004 // cell. 3005 VerticalAlignment string `json:"verticalAlignment,omitempty"` 3006 3007 // WrapStrategy: The wrap strategy for the value in the cell. 3008 // 3009 // Possible values: 3010 // "WRAP_STRATEGY_UNSPECIFIED" - The default value, do not use. 3011 // "OVERFLOW_CELL" - Lines that are longer than the cell width will be 3012 // written in the next cell over, so long as that cell is empty. If the 3013 // next cell over is non-empty, this behaves the same as `CLIP`. The 3014 // text will never wrap to the next line unless the user manually 3015 // inserts a new line. Example: | First sentence. | | Manual newline 3016 // that is very long. <- Text continues into next cell | Next newline. | 3017 // "LEGACY_WRAP" - This wrap strategy represents the old Google Sheets 3018 // wrap strategy where words that are longer than a line are clipped 3019 // rather than broken. This strategy is not supported on all platforms 3020 // and is being phased out. Example: | Cell has a | | loooooooooo| <- 3021 // Word is clipped. | word. | 3022 // "CLIP" - Lines that are longer than the cell width will be clipped. 3023 // The text will never wrap to the next line unless the user manually 3024 // inserts a new line. Example: | First sentence. | | Manual newline t| 3025 // <- Text is clipped | Next newline. | 3026 // "WRAP" - Words that are longer than a line are wrapped at the 3027 // character level rather than clipped. Example: | Cell has a | | 3028 // loooooooooo| <- Word is broken. | ong word. | 3029 WrapStrategy string `json:"wrapStrategy,omitempty"` 3030 3031 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 3032 // unconditionally include in API requests. By default, fields with 3033 // empty or default values are omitted from API requests. However, any 3034 // non-pointer, non-interface field appearing in ForceSendFields will be 3035 // sent to the server regardless of whether the field is empty or not. 3036 // This may be used to include empty fields in Patch requests. 3037 ForceSendFields []string `json:"-"` 3038 3039 // NullFields is a list of field names (e.g. "BackgroundColor") to 3040 // include in API requests with the JSON null value. By default, fields 3041 // with empty values are omitted from API requests. However, any field 3042 // with an empty value appearing in NullFields will be sent to the 3043 // server as null. It is an error if a field in this list has a 3044 // non-empty value. This may be used to include null fields in Patch 3045 // requests. 3046 NullFields []string `json:"-"` 3047} 3048 3049func (s *CellFormat) MarshalJSON() ([]byte, error) { 3050 type NoMethod CellFormat 3051 raw := NoMethod(*s) 3052 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3053} 3054 3055// ChartAxisViewWindowOptions: The options that define a "view window" 3056// for a chart (such as the visible values in an axis). 3057type ChartAxisViewWindowOptions struct { 3058 // ViewWindowMax: The maximum numeric value to be shown in this view 3059 // window. If unset, will automatically determine a maximum value that 3060 // looks good for the data. 3061 ViewWindowMax float64 `json:"viewWindowMax,omitempty"` 3062 3063 // ViewWindowMin: The minimum numeric value to be shown in this view 3064 // window. If unset, will automatically determine a minimum value that 3065 // looks good for the data. 3066 ViewWindowMin float64 `json:"viewWindowMin,omitempty"` 3067 3068 // ViewWindowMode: The view window's mode. 3069 // 3070 // Possible values: 3071 // "DEFAULT_VIEW_WINDOW_MODE" - The default view window mode used in 3072 // the Sheets editor for this chart type. In most cases, if set, the 3073 // default mode is equivalent to `PRETTY`. 3074 // "VIEW_WINDOW_MODE_UNSUPPORTED" - Do not use. Represents that the 3075 // currently set mode is not supported by the API. 3076 // "EXPLICIT" - Follows the min and max exactly if specified. If a 3077 // value is unspecified, it will fall back to the `PRETTY` value. 3078 // "PRETTY" - Chooses a min and max that make the chart look good. 3079 // Both min and max are ignored in this mode. 3080 ViewWindowMode string `json:"viewWindowMode,omitempty"` 3081 3082 // ForceSendFields is a list of field names (e.g. "ViewWindowMax") to 3083 // unconditionally include in API requests. By default, fields with 3084 // empty or default values are omitted from API requests. However, any 3085 // non-pointer, non-interface field appearing in ForceSendFields will be 3086 // sent to the server regardless of whether the field is empty or not. 3087 // This may be used to include empty fields in Patch requests. 3088 ForceSendFields []string `json:"-"` 3089 3090 // NullFields is a list of field names (e.g. "ViewWindowMax") to include 3091 // in API requests with the JSON null value. By default, fields with 3092 // empty values are omitted from API requests. However, any field with 3093 // an empty value appearing in NullFields will be sent to the server as 3094 // null. It is an error if a field in this list has a non-empty value. 3095 // This may be used to include null fields in Patch requests. 3096 NullFields []string `json:"-"` 3097} 3098 3099func (s *ChartAxisViewWindowOptions) MarshalJSON() ([]byte, error) { 3100 type NoMethod ChartAxisViewWindowOptions 3101 raw := NoMethod(*s) 3102 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3103} 3104 3105func (s *ChartAxisViewWindowOptions) UnmarshalJSON(data []byte) error { 3106 type NoMethod ChartAxisViewWindowOptions 3107 var s1 struct { 3108 ViewWindowMax gensupport.JSONFloat64 `json:"viewWindowMax"` 3109 ViewWindowMin gensupport.JSONFloat64 `json:"viewWindowMin"` 3110 *NoMethod 3111 } 3112 s1.NoMethod = (*NoMethod)(s) 3113 if err := json.Unmarshal(data, &s1); err != nil { 3114 return err 3115 } 3116 s.ViewWindowMax = float64(s1.ViewWindowMax) 3117 s.ViewWindowMin = float64(s1.ViewWindowMin) 3118 return nil 3119} 3120 3121// ChartCustomNumberFormatOptions: Custom number formatting options for 3122// chart attributes. 3123type ChartCustomNumberFormatOptions struct { 3124 // Prefix: Custom prefix to be prepended to the chart attribute. This 3125 // field is optional. 3126 Prefix string `json:"prefix,omitempty"` 3127 3128 // Suffix: Custom suffix to be appended to the chart attribute. This 3129 // field is optional. 3130 Suffix string `json:"suffix,omitempty"` 3131 3132 // ForceSendFields is a list of field names (e.g. "Prefix") to 3133 // unconditionally include in API requests. By default, fields with 3134 // empty or default values are omitted from API requests. However, any 3135 // non-pointer, non-interface field appearing in ForceSendFields will be 3136 // sent to the server regardless of whether the field is empty or not. 3137 // This may be used to include empty fields in Patch requests. 3138 ForceSendFields []string `json:"-"` 3139 3140 // NullFields is a list of field names (e.g. "Prefix") to include in API 3141 // requests with the JSON null value. By default, fields with empty 3142 // values are omitted from API requests. However, any field with an 3143 // empty value appearing in NullFields will be sent to the server as 3144 // null. It is an error if a field in this list has a non-empty value. 3145 // This may be used to include null fields in Patch requests. 3146 NullFields []string `json:"-"` 3147} 3148 3149func (s *ChartCustomNumberFormatOptions) MarshalJSON() ([]byte, error) { 3150 type NoMethod ChartCustomNumberFormatOptions 3151 raw := NoMethod(*s) 3152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3153} 3154 3155// ChartData: The data included in a domain or series. 3156type ChartData struct { 3157 // AggregateType: The aggregation type for the series of a data source 3158 // chart. Only supported for data source charts. 3159 // 3160 // Possible values: 3161 // "CHART_AGGREGATE_TYPE_UNSPECIFIED" - Default value, do not use. 3162 // "AVERAGE" - Average aggregate function. 3163 // "COUNT" - Count aggregate function. 3164 // "MAX" - Maximum aggregate function. 3165 // "MEDIAN" - Median aggregate function. 3166 // "MIN" - Minimum aggregate function. 3167 // "SUM" - Sum aggregate function. 3168 AggregateType string `json:"aggregateType,omitempty"` 3169 3170 // ColumnReference: The reference to the data source column that the 3171 // data reads from. 3172 ColumnReference *DataSourceColumnReference `json:"columnReference,omitempty"` 3173 3174 // GroupRule: The rule to group the data by if the ChartData backs the 3175 // domain of a data source chart. Only supported for data source charts. 3176 GroupRule *ChartGroupRule `json:"groupRule,omitempty"` 3177 3178 // SourceRange: The source ranges of the data. 3179 SourceRange *ChartSourceRange `json:"sourceRange,omitempty"` 3180 3181 // ForceSendFields is a list of field names (e.g. "AggregateType") to 3182 // unconditionally include in API requests. By default, fields with 3183 // empty or default values are omitted from API requests. However, any 3184 // non-pointer, non-interface field appearing in ForceSendFields will be 3185 // sent to the server regardless of whether the field is empty or not. 3186 // This may be used to include empty fields in Patch requests. 3187 ForceSendFields []string `json:"-"` 3188 3189 // NullFields is a list of field names (e.g. "AggregateType") to include 3190 // in API requests with the JSON null value. By default, fields with 3191 // empty values are omitted from API requests. However, any field with 3192 // an empty value appearing in NullFields will be sent to the server as 3193 // null. It is an error if a field in this list has a non-empty value. 3194 // This may be used to include null fields in Patch requests. 3195 NullFields []string `json:"-"` 3196} 3197 3198func (s *ChartData) MarshalJSON() ([]byte, error) { 3199 type NoMethod ChartData 3200 raw := NoMethod(*s) 3201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3202} 3203 3204// ChartDateTimeRule: Allows you to organize the date-time values in a 3205// source data column into buckets based on selected parts of their date 3206// or time values. 3207type ChartDateTimeRule struct { 3208 // Type: The type of date-time grouping to apply. 3209 // 3210 // Possible values: 3211 // "CHART_DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not 3212 // use. 3213 // "SECOND" - Group dates by second, from 0 to 59. 3214 // "MINUTE" - Group dates by minute, from 0 to 59. 3215 // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23. 3216 // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour 3217 // system, for example 19:45. 3218 // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour 3219 // system, for example 7:45 PM. The AM/PM designation is translated 3220 // based on the spreadsheet locale. 3221 // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The 3222 // days of the week will be translated based on the spreadsheet locale. 3223 // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note 3224 // that dates after Feb. 29 fall in different buckets in leap years than 3225 // in non-leap years. 3226 // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31. 3227 // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The 3228 // month is translated based on the spreadsheet locale. 3229 // "MONTH" - Group dates by month, for example Nov. The month is 3230 // translated based on the spreadsheet locale. 3231 // "QUARTER" - Group dates by quarter, for example Q1 (which 3232 // represents Jan-Mar). 3233 // "YEAR" - Group dates by year, for example 2008. 3234 // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov. 3235 // The month is translated based on the spreadsheet locale. 3236 // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008 3237 // Q4. 3238 // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example 3239 // 2008-11-22. 3240 Type string `json:"type,omitempty"` 3241 3242 // ForceSendFields is a list of field names (e.g. "Type") to 3243 // unconditionally include in API requests. By default, fields with 3244 // empty or default values are omitted from API requests. However, any 3245 // non-pointer, non-interface field appearing in ForceSendFields will be 3246 // sent to the server regardless of whether the field is empty or not. 3247 // This may be used to include empty fields in Patch requests. 3248 ForceSendFields []string `json:"-"` 3249 3250 // NullFields is a list of field names (e.g. "Type") to include in API 3251 // requests with the JSON null value. By default, fields with empty 3252 // values are omitted from API requests. However, any field with an 3253 // empty value appearing in NullFields will be sent to the server as 3254 // null. It is an error if a field in this list has a non-empty value. 3255 // This may be used to include null fields in Patch requests. 3256 NullFields []string `json:"-"` 3257} 3258 3259func (s *ChartDateTimeRule) MarshalJSON() ([]byte, error) { 3260 type NoMethod ChartDateTimeRule 3261 raw := NoMethod(*s) 3262 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3263} 3264 3265// ChartGroupRule: An optional setting on the ChartData of the domain of 3266// a data source chart that defines buckets for the values in the domain 3267// rather than breaking out each individual value. For example, when 3268// plotting a data source chart, you can specify a histogram rule on the 3269// domain (it should only contain numeric values), grouping its values 3270// into buckets. Any values of a chart series that fall into the same 3271// bucket are aggregated based on the aggregate_type. 3272type ChartGroupRule struct { 3273 // DateTimeRule: A ChartDateTimeRule. 3274 DateTimeRule *ChartDateTimeRule `json:"dateTimeRule,omitempty"` 3275 3276 // HistogramRule: A ChartHistogramRule 3277 HistogramRule *ChartHistogramRule `json:"histogramRule,omitempty"` 3278 3279 // ForceSendFields is a list of field names (e.g. "DateTimeRule") to 3280 // unconditionally include in API requests. By default, fields with 3281 // empty or default values are omitted from API requests. However, any 3282 // non-pointer, non-interface field appearing in ForceSendFields will be 3283 // sent to the server regardless of whether the field is empty or not. 3284 // This may be used to include empty fields in Patch requests. 3285 ForceSendFields []string `json:"-"` 3286 3287 // NullFields is a list of field names (e.g. "DateTimeRule") to include 3288 // in API requests with the JSON null value. By default, fields with 3289 // empty values are omitted from API requests. However, any field with 3290 // an empty value appearing in NullFields will be sent to the server as 3291 // null. It is an error if a field in this list has a non-empty value. 3292 // This may be used to include null fields in Patch requests. 3293 NullFields []string `json:"-"` 3294} 3295 3296func (s *ChartGroupRule) MarshalJSON() ([]byte, error) { 3297 type NoMethod ChartGroupRule 3298 raw := NoMethod(*s) 3299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3300} 3301 3302// ChartHistogramRule: Allows you to organize numeric values in a source 3303// data column into buckets of constant size. 3304type ChartHistogramRule struct { 3305 // IntervalSize: The size of the buckets that are created. Must be 3306 // positive. 3307 IntervalSize float64 `json:"intervalSize,omitempty"` 3308 3309 // MaxValue: The maximum value at which items are placed into buckets. 3310 // Values greater than the maximum are grouped into a single bucket. If 3311 // omitted, it is determined by the maximum item value. 3312 MaxValue float64 `json:"maxValue,omitempty"` 3313 3314 // MinValue: The minimum value at which items are placed into buckets. 3315 // Values that are less than the minimum are grouped into a single 3316 // bucket. If omitted, it is determined by the minimum item value. 3317 MinValue float64 `json:"minValue,omitempty"` 3318 3319 // ForceSendFields is a list of field names (e.g. "IntervalSize") to 3320 // unconditionally include in API requests. By default, fields with 3321 // empty or default values are omitted from API requests. However, any 3322 // non-pointer, non-interface field appearing in ForceSendFields will be 3323 // sent to the server regardless of whether the field is empty or not. 3324 // This may be used to include empty fields in Patch requests. 3325 ForceSendFields []string `json:"-"` 3326 3327 // NullFields is a list of field names (e.g. "IntervalSize") to include 3328 // in API requests with the JSON null value. By default, fields with 3329 // empty values are omitted from API requests. However, any field with 3330 // an empty value appearing in NullFields will be sent to the server as 3331 // null. It is an error if a field in this list has a non-empty value. 3332 // This may be used to include null fields in Patch requests. 3333 NullFields []string `json:"-"` 3334} 3335 3336func (s *ChartHistogramRule) MarshalJSON() ([]byte, error) { 3337 type NoMethod ChartHistogramRule 3338 raw := NoMethod(*s) 3339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3340} 3341 3342func (s *ChartHistogramRule) UnmarshalJSON(data []byte) error { 3343 type NoMethod ChartHistogramRule 3344 var s1 struct { 3345 IntervalSize gensupport.JSONFloat64 `json:"intervalSize"` 3346 MaxValue gensupport.JSONFloat64 `json:"maxValue"` 3347 MinValue gensupport.JSONFloat64 `json:"minValue"` 3348 *NoMethod 3349 } 3350 s1.NoMethod = (*NoMethod)(s) 3351 if err := json.Unmarshal(data, &s1); err != nil { 3352 return err 3353 } 3354 s.IntervalSize = float64(s1.IntervalSize) 3355 s.MaxValue = float64(s1.MaxValue) 3356 s.MinValue = float64(s1.MinValue) 3357 return nil 3358} 3359 3360// ChartSourceRange: Source ranges for a chart. 3361type ChartSourceRange struct { 3362 // Sources: The ranges of data for a series or domain. Exactly one 3363 // dimension must have a length of 1, and all sources in the list must 3364 // have the same dimension with length 1. The domain (if it exists) & 3365 // all series must have the same number of source ranges. If using more 3366 // than one source range, then the source range at a given offset must 3367 // be in order and contiguous across the domain and series. For example, 3368 // these are valid configurations: domain sources: A1:A5 series1 3369 // sources: B1:B5 series2 sources: D6:D10 domain sources: A1:A5, C10:C12 3370 // series1 sources: B1:B5, D10:D12 series2 sources: C1:C5, E10:E12 3371 Sources []*GridRange `json:"sources,omitempty"` 3372 3373 // ForceSendFields is a list of field names (e.g. "Sources") to 3374 // unconditionally include in API requests. By default, fields with 3375 // empty or default values are omitted from API requests. However, any 3376 // non-pointer, non-interface field appearing in ForceSendFields will be 3377 // sent to the server regardless of whether the field is empty or not. 3378 // This may be used to include empty fields in Patch requests. 3379 ForceSendFields []string `json:"-"` 3380 3381 // NullFields is a list of field names (e.g. "Sources") to include in 3382 // API requests with the JSON null value. By default, fields with empty 3383 // values are omitted from API requests. However, any field with an 3384 // empty value appearing in NullFields will be sent to the server as 3385 // null. It is an error if a field in this list has a non-empty value. 3386 // This may be used to include null fields in Patch requests. 3387 NullFields []string `json:"-"` 3388} 3389 3390func (s *ChartSourceRange) MarshalJSON() ([]byte, error) { 3391 type NoMethod ChartSourceRange 3392 raw := NoMethod(*s) 3393 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3394} 3395 3396// ChartSpec: The specifications of a chart. 3397type ChartSpec struct { 3398 // AltText: The alternative text that describes the chart. This is often 3399 // used for accessibility. 3400 AltText string `json:"altText,omitempty"` 3401 3402 // BackgroundColor: The background color of the entire chart. Not 3403 // applicable to Org charts. 3404 BackgroundColor *Color `json:"backgroundColor,omitempty"` 3405 3406 // BackgroundColorStyle: The background color of the entire chart. Not 3407 // applicable to Org charts. If background_color is also set, this field 3408 // takes precedence. 3409 BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` 3410 3411 // BasicChart: A basic chart specification, can be one of many kinds of 3412 // charts. See BasicChartType for the list of all charts this supports. 3413 BasicChart *BasicChartSpec `json:"basicChart,omitempty"` 3414 3415 // BubbleChart: A bubble chart specification. 3416 BubbleChart *BubbleChartSpec `json:"bubbleChart,omitempty"` 3417 3418 // CandlestickChart: A candlestick chart specification. 3419 CandlestickChart *CandlestickChartSpec `json:"candlestickChart,omitempty"` 3420 3421 // DataSourceChartProperties: If present, the field contains data source 3422 // chart specific properties. 3423 DataSourceChartProperties *DataSourceChartProperties `json:"dataSourceChartProperties,omitempty"` 3424 3425 // FilterSpecs: The filters applied to the source data of the chart. 3426 // Only supported for data source charts. 3427 FilterSpecs []*FilterSpec `json:"filterSpecs,omitempty"` 3428 3429 // FontName: The name of the font to use by default for all chart text 3430 // (e.g. title, axis labels, legend). If a font is specified for a 3431 // specific part of the chart it will override this font name. 3432 FontName string `json:"fontName,omitempty"` 3433 3434 // HiddenDimensionStrategy: Determines how the charts will use hidden 3435 // rows or columns. 3436 // 3437 // Possible values: 3438 // "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" - Default value, do 3439 // not use. 3440 // "SKIP_HIDDEN_ROWS_AND_COLUMNS" - Charts will skip hidden rows and 3441 // columns. 3442 // "SKIP_HIDDEN_ROWS" - Charts will skip hidden rows only. 3443 // "SKIP_HIDDEN_COLUMNS" - Charts will skip hidden columns only. 3444 // "SHOW_ALL" - Charts will not skip any hidden rows or columns. 3445 HiddenDimensionStrategy string `json:"hiddenDimensionStrategy,omitempty"` 3446 3447 // HistogramChart: A histogram chart specification. 3448 HistogramChart *HistogramChartSpec `json:"histogramChart,omitempty"` 3449 3450 // Maximized: True to make a chart fill the entire space in which it's 3451 // rendered with minimum padding. False to use the default padding. (Not 3452 // applicable to Geo and Org charts.) 3453 Maximized bool `json:"maximized,omitempty"` 3454 3455 // OrgChart: An org chart specification. 3456 OrgChart *OrgChartSpec `json:"orgChart,omitempty"` 3457 3458 // PieChart: A pie chart specification. 3459 PieChart *PieChartSpec `json:"pieChart,omitempty"` 3460 3461 // ScorecardChart: A scorecard chart specification. 3462 ScorecardChart *ScorecardChartSpec `json:"scorecardChart,omitempty"` 3463 3464 // SortSpecs: The order to sort the chart data by. Only a single sort 3465 // spec is supported. Only supported for data source charts. 3466 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 3467 3468 // Subtitle: The subtitle of the chart. 3469 Subtitle string `json:"subtitle,omitempty"` 3470 3471 // SubtitleTextFormat: The subtitle text format. Strikethrough, 3472 // underline, and link are not supported. 3473 SubtitleTextFormat *TextFormat `json:"subtitleTextFormat,omitempty"` 3474 3475 // SubtitleTextPosition: The subtitle text position. This field is 3476 // optional. 3477 SubtitleTextPosition *TextPosition `json:"subtitleTextPosition,omitempty"` 3478 3479 // Title: The title of the chart. 3480 Title string `json:"title,omitempty"` 3481 3482 // TitleTextFormat: The title text format. Strikethrough, underline, and 3483 // link are not supported. 3484 TitleTextFormat *TextFormat `json:"titleTextFormat,omitempty"` 3485 3486 // TitleTextPosition: The title text position. This field is optional. 3487 TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"` 3488 3489 // TreemapChart: A treemap chart specification. 3490 TreemapChart *TreemapChartSpec `json:"treemapChart,omitempty"` 3491 3492 // WaterfallChart: A waterfall chart specification. 3493 WaterfallChart *WaterfallChartSpec `json:"waterfallChart,omitempty"` 3494 3495 // ForceSendFields is a list of field names (e.g. "AltText") to 3496 // unconditionally include in API requests. By default, fields with 3497 // empty or default values are omitted from API requests. However, any 3498 // non-pointer, non-interface field appearing in ForceSendFields will be 3499 // sent to the server regardless of whether the field is empty or not. 3500 // This may be used to include empty fields in Patch requests. 3501 ForceSendFields []string `json:"-"` 3502 3503 // NullFields is a list of field names (e.g. "AltText") to include in 3504 // API requests with the JSON null value. By default, fields with empty 3505 // values are omitted from API requests. However, any field with an 3506 // empty value appearing in NullFields will be sent to the server as 3507 // null. It is an error if a field in this list has a non-empty value. 3508 // This may be used to include null fields in Patch requests. 3509 NullFields []string `json:"-"` 3510} 3511 3512func (s *ChartSpec) MarshalJSON() ([]byte, error) { 3513 type NoMethod ChartSpec 3514 raw := NoMethod(*s) 3515 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3516} 3517 3518// ClearBasicFilterRequest: Clears the basic filter, if any exists on 3519// the sheet. 3520type ClearBasicFilterRequest struct { 3521 // SheetId: The sheet ID on which the basic filter should be cleared. 3522 SheetId int64 `json:"sheetId,omitempty"` 3523 3524 // ForceSendFields is a list of field names (e.g. "SheetId") to 3525 // unconditionally include in API requests. By default, fields with 3526 // empty or default values are omitted from API requests. However, any 3527 // non-pointer, non-interface field appearing in ForceSendFields will be 3528 // sent to the server regardless of whether the field is empty or not. 3529 // This may be used to include empty fields in Patch requests. 3530 ForceSendFields []string `json:"-"` 3531 3532 // NullFields is a list of field names (e.g. "SheetId") to include in 3533 // API requests with the JSON null value. By default, fields with empty 3534 // values are omitted from API requests. However, any field with an 3535 // empty value appearing in NullFields will be sent to the server as 3536 // null. It is an error if a field in this list has a non-empty value. 3537 // This may be used to include null fields in Patch requests. 3538 NullFields []string `json:"-"` 3539} 3540 3541func (s *ClearBasicFilterRequest) MarshalJSON() ([]byte, error) { 3542 type NoMethod ClearBasicFilterRequest 3543 raw := NoMethod(*s) 3544 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3545} 3546 3547// ClearValuesRequest: The request for clearing a range of values in a 3548// spreadsheet. 3549type ClearValuesRequest struct { 3550} 3551 3552// ClearValuesResponse: The response when clearing a range of values in 3553// a spreadsheet. 3554type ClearValuesResponse struct { 3555 // ClearedRange: The range (in A1 notation) that was cleared. (If the 3556 // request was for an unbounded range or a ranger larger than the bounds 3557 // of the sheet, this will be the actual range that was cleared, bounded 3558 // to the sheet's limits.) 3559 ClearedRange string `json:"clearedRange,omitempty"` 3560 3561 // SpreadsheetId: The spreadsheet the updates were applied to. 3562 SpreadsheetId string `json:"spreadsheetId,omitempty"` 3563 3564 // ServerResponse contains the HTTP response code and headers from the 3565 // server. 3566 googleapi.ServerResponse `json:"-"` 3567 3568 // ForceSendFields is a list of field names (e.g. "ClearedRange") to 3569 // unconditionally include in API requests. By default, fields with 3570 // empty or default values are omitted from API requests. However, any 3571 // non-pointer, non-interface field appearing in ForceSendFields will be 3572 // sent to the server regardless of whether the field is empty or not. 3573 // This may be used to include empty fields in Patch requests. 3574 ForceSendFields []string `json:"-"` 3575 3576 // NullFields is a list of field names (e.g. "ClearedRange") to include 3577 // in API requests with the JSON null value. By default, fields with 3578 // empty values are omitted from API requests. However, any field with 3579 // an empty value appearing in NullFields will be sent to the server as 3580 // null. It is an error if a field in this list has a non-empty value. 3581 // This may be used to include null fields in Patch requests. 3582 NullFields []string `json:"-"` 3583} 3584 3585func (s *ClearValuesResponse) MarshalJSON() ([]byte, error) { 3586 type NoMethod ClearValuesResponse 3587 raw := NoMethod(*s) 3588 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3589} 3590 3591// Color: Represents a color in the RGBA color space. This 3592// representation is designed for simplicity of conversion to/from color 3593// representations in various languages over compactness. For example, 3594// the fields of this representation can be trivially provided to the 3595// constructor of `java.awt.Color` in Java; it can also be trivially 3596// provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; 3597// and, with just a little work, it can be easily formatted into a CSS 3598// `rgba()` string in JavaScript. This reference page doesn't carry 3599// information about the absolute color space that should be used to 3600// interpret the RGB value (e.g. sRGB, Adobe RGB, DCI-P3, BT.2020, 3601// etc.). By default, applications should assume the sRGB color space. 3602// When color equality needs to be decided, implementations, unless 3603// documented otherwise, treat two colors as equal if all their red, 3604// green, blue, and alpha values each differ by at most 1e-5. Example 3605// (Java): import com.google.type.Color; // ... public static 3606// java.awt.Color fromProto(Color protocolor) { float alpha = 3607// protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; 3608// return new java.awt.Color( protocolor.getRed(), 3609// protocolor.getGreen(), protocolor.getBlue(), alpha); } public static 3610// Color toProto(java.awt.Color color) { float red = (float) 3611// color.getRed(); float green = (float) color.getGreen(); float blue = 3612// (float) color.getBlue(); float denominator = 255.0; Color.Builder 3613// resultBuilder = Color .newBuilder() .setRed(red / denominator) 3614// .setGreen(green / denominator) .setBlue(blue / denominator); int 3615// alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( 3616// FloatValue .newBuilder() .setValue(((float) alpha) / denominator) 3617// .build()); } return resultBuilder.build(); } // ... Example (iOS / 3618// Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float 3619// red = [protocolor red]; float green = [protocolor green]; float blue 3620// = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; 3621// float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper 3622// value]; } return [UIColor colorWithRed:red green:green blue:blue 3623// alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, 3624// green, blue, alpha; if (![color getRed:&red green:&green blue:&blue 3625// alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; 3626// [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; 3627// if (alpha <= 0.9999) { [result 3628// setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; 3629// return result; } // ... Example (JavaScript): // ... var 3630// protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red 3631// || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = 3632// rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green 3633// = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); 3634// if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, 3635// blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams 3636// = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', 3637// alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, 3638// blue) { var rgbNumber = new Number((red << 16) | (green << 8) | 3639// blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - 3640// hexString.length; var resultBuilder = ['#']; for (var i = 0; i < 3641// missingZeros; i++) { resultBuilder.push('0'); } 3642// resultBuilder.push(hexString); return resultBuilder.join(''); }; // 3643// ... 3644type Color struct { 3645 // Alpha: The fraction of this color that should be applied to the 3646 // pixel. That is, the final pixel color is defined by the equation: 3647 // `pixel color = alpha * (this color) + (1.0 - alpha) * (background 3648 // color)` This means that a value of 1.0 corresponds to a solid color, 3649 // whereas a value of 0.0 corresponds to a completely transparent color. 3650 // This uses a wrapper message rather than a simple float scalar so that 3651 // it is possible to distinguish between a default value and the value 3652 // being unset. If omitted, this color object is rendered as a solid 3653 // color (as if the alpha value had been explicitly given a value of 3654 // 1.0). 3655 Alpha float64 `json:"alpha,omitempty"` 3656 3657 // Blue: The amount of blue in the color as a value in the interval [0, 3658 // 1]. 3659 Blue float64 `json:"blue,omitempty"` 3660 3661 // Green: The amount of green in the color as a value in the interval 3662 // [0, 1]. 3663 Green float64 `json:"green,omitempty"` 3664 3665 // Red: The amount of red in the color as a value in the interval [0, 3666 // 1]. 3667 Red float64 `json:"red,omitempty"` 3668 3669 // ForceSendFields is a list of field names (e.g. "Alpha") to 3670 // unconditionally include in API requests. By default, fields with 3671 // empty or default values are omitted from API requests. However, any 3672 // non-pointer, non-interface field appearing in ForceSendFields will be 3673 // sent to the server regardless of whether the field is empty or not. 3674 // This may be used to include empty fields in Patch requests. 3675 ForceSendFields []string `json:"-"` 3676 3677 // NullFields is a list of field names (e.g. "Alpha") to include in API 3678 // requests with the JSON null value. By default, fields with empty 3679 // values are omitted from API requests. However, any field with an 3680 // empty value appearing in NullFields will be sent to the server as 3681 // null. It is an error if a field in this list has a non-empty value. 3682 // This may be used to include null fields in Patch requests. 3683 NullFields []string `json:"-"` 3684} 3685 3686func (s *Color) MarshalJSON() ([]byte, error) { 3687 type NoMethod Color 3688 raw := NoMethod(*s) 3689 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3690} 3691 3692func (s *Color) UnmarshalJSON(data []byte) error { 3693 type NoMethod Color 3694 var s1 struct { 3695 Alpha gensupport.JSONFloat64 `json:"alpha"` 3696 Blue gensupport.JSONFloat64 `json:"blue"` 3697 Green gensupport.JSONFloat64 `json:"green"` 3698 Red gensupport.JSONFloat64 `json:"red"` 3699 *NoMethod 3700 } 3701 s1.NoMethod = (*NoMethod)(s) 3702 if err := json.Unmarshal(data, &s1); err != nil { 3703 return err 3704 } 3705 s.Alpha = float64(s1.Alpha) 3706 s.Blue = float64(s1.Blue) 3707 s.Green = float64(s1.Green) 3708 s.Red = float64(s1.Red) 3709 return nil 3710} 3711 3712// ColorStyle: A color value. 3713type ColorStyle struct { 3714 // RgbColor: RGB color. 3715 RgbColor *Color `json:"rgbColor,omitempty"` 3716 3717 // ThemeColor: Theme color. 3718 // 3719 // Possible values: 3720 // "THEME_COLOR_TYPE_UNSPECIFIED" - Unspecified theme color 3721 // "TEXT" - Represents the primary text color 3722 // "BACKGROUND" - Represents the primary background color 3723 // "ACCENT1" - Represents the first accent color 3724 // "ACCENT2" - Represents the second accent color 3725 // "ACCENT3" - Represents the third accent color 3726 // "ACCENT4" - Represents the fourth accent color 3727 // "ACCENT5" - Represents the fifth accent color 3728 // "ACCENT6" - Represents the sixth accent color 3729 // "LINK" - Represents the color to use for hyperlinks 3730 ThemeColor string `json:"themeColor,omitempty"` 3731 3732 // ForceSendFields is a list of field names (e.g. "RgbColor") to 3733 // unconditionally include in API requests. By default, fields with 3734 // empty or default values are omitted from API requests. However, any 3735 // non-pointer, non-interface field appearing in ForceSendFields will be 3736 // sent to the server regardless of whether the field is empty or not. 3737 // This may be used to include empty fields in Patch requests. 3738 ForceSendFields []string `json:"-"` 3739 3740 // NullFields is a list of field names (e.g. "RgbColor") to include in 3741 // API requests with the JSON null value. By default, fields with empty 3742 // values are omitted from API requests. However, any field with an 3743 // empty value appearing in NullFields will be sent to the server as 3744 // null. It is an error if a field in this list has a non-empty value. 3745 // This may be used to include null fields in Patch requests. 3746 NullFields []string `json:"-"` 3747} 3748 3749func (s *ColorStyle) MarshalJSON() ([]byte, error) { 3750 type NoMethod ColorStyle 3751 raw := NoMethod(*s) 3752 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3753} 3754 3755// ConditionValue: The value of the condition. 3756type ConditionValue struct { 3757 // RelativeDate: A relative date (based on the current date). Valid only 3758 // if the type is DATE_BEFORE, DATE_AFTER, DATE_ON_OR_BEFORE or 3759 // DATE_ON_OR_AFTER. Relative dates are not supported in data 3760 // validation. They are supported only in conditional formatting and 3761 // conditional filters. 3762 // 3763 // Possible values: 3764 // "RELATIVE_DATE_UNSPECIFIED" - Default value, do not use. 3765 // "PAST_YEAR" - The value is one year before today. 3766 // "PAST_MONTH" - The value is one month before today. 3767 // "PAST_WEEK" - The value is one week before today. 3768 // "YESTERDAY" - The value is yesterday. 3769 // "TODAY" - The value is today. 3770 // "TOMORROW" - The value is tomorrow. 3771 RelativeDate string `json:"relativeDate,omitempty"` 3772 3773 // UserEnteredValue: A value the condition is based on. The value is 3774 // parsed as if the user typed into a cell. Formulas are supported (and 3775 // must begin with an `=` or a '+'). 3776 UserEnteredValue string `json:"userEnteredValue,omitempty"` 3777 3778 // ForceSendFields is a list of field names (e.g. "RelativeDate") to 3779 // unconditionally include in API requests. By default, fields with 3780 // empty or default values are omitted from API requests. However, any 3781 // non-pointer, non-interface field appearing in ForceSendFields will be 3782 // sent to the server regardless of whether the field is empty or not. 3783 // This may be used to include empty fields in Patch requests. 3784 ForceSendFields []string `json:"-"` 3785 3786 // NullFields is a list of field names (e.g. "RelativeDate") to include 3787 // in API requests with the JSON null value. By default, fields with 3788 // empty values are omitted from API requests. However, any field with 3789 // an empty value appearing in NullFields will be sent to the server as 3790 // null. It is an error if a field in this list has a non-empty value. 3791 // This may be used to include null fields in Patch requests. 3792 NullFields []string `json:"-"` 3793} 3794 3795func (s *ConditionValue) MarshalJSON() ([]byte, error) { 3796 type NoMethod ConditionValue 3797 raw := NoMethod(*s) 3798 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3799} 3800 3801// ConditionalFormatRule: A rule describing a conditional format. 3802type ConditionalFormatRule struct { 3803 // BooleanRule: The formatting is either "on" or "off" according to the 3804 // rule. 3805 BooleanRule *BooleanRule `json:"booleanRule,omitempty"` 3806 3807 // GradientRule: The formatting will vary based on the gradients in the 3808 // rule. 3809 GradientRule *GradientRule `json:"gradientRule,omitempty"` 3810 3811 // Ranges: The ranges that are formatted if the condition is true. All 3812 // the ranges must be on the same grid. 3813 Ranges []*GridRange `json:"ranges,omitempty"` 3814 3815 // ForceSendFields is a list of field names (e.g. "BooleanRule") to 3816 // unconditionally include in API requests. By default, fields with 3817 // empty or default values are omitted from API requests. However, any 3818 // non-pointer, non-interface field appearing in ForceSendFields will be 3819 // sent to the server regardless of whether the field is empty or not. 3820 // This may be used to include empty fields in Patch requests. 3821 ForceSendFields []string `json:"-"` 3822 3823 // NullFields is a list of field names (e.g. "BooleanRule") to include 3824 // in API requests with the JSON null value. By default, fields with 3825 // empty values are omitted from API requests. However, any field with 3826 // an empty value appearing in NullFields will be sent to the server as 3827 // null. It is an error if a field in this list has a non-empty value. 3828 // This may be used to include null fields in Patch requests. 3829 NullFields []string `json:"-"` 3830} 3831 3832func (s *ConditionalFormatRule) MarshalJSON() ([]byte, error) { 3833 type NoMethod ConditionalFormatRule 3834 raw := NoMethod(*s) 3835 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3836} 3837 3838// CopyPasteRequest: Copies data from the source to the destination. 3839type CopyPasteRequest struct { 3840 // Destination: The location to paste to. If the range covers a span 3841 // that's a multiple of the source's height or width, then the data will 3842 // be repeated to fill in the destination range. If the range is smaller 3843 // than the source range, the entire source data will still be copied 3844 // (beyond the end of the destination range). 3845 Destination *GridRange `json:"destination,omitempty"` 3846 3847 // PasteOrientation: How that data should be oriented when pasting. 3848 // 3849 // Possible values: 3850 // "NORMAL" - Paste normally. 3851 // "TRANSPOSE" - Paste transposed, where all rows become columns and 3852 // vice versa. 3853 PasteOrientation string `json:"pasteOrientation,omitempty"` 3854 3855 // PasteType: What kind of data to paste. 3856 // 3857 // Possible values: 3858 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3859 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3860 // or merges. 3861 // "PASTE_FORMAT" - Paste the format and data validation only. 3862 // "PASTE_NO_BORDERS" - Like `PASTE_NORMAL` but without borders. 3863 // "PASTE_FORMULA" - Paste the formulas only. 3864 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 3865 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 3866 // rules only. 3867 PasteType string `json:"pasteType,omitempty"` 3868 3869 // Source: The source range to copy. 3870 Source *GridRange `json:"source,omitempty"` 3871 3872 // ForceSendFields is a list of field names (e.g. "Destination") to 3873 // unconditionally include in API requests. By default, fields with 3874 // empty or default values are omitted from API requests. However, any 3875 // non-pointer, non-interface field appearing in ForceSendFields will be 3876 // sent to the server regardless of whether the field is empty or not. 3877 // This may be used to include empty fields in Patch requests. 3878 ForceSendFields []string `json:"-"` 3879 3880 // NullFields is a list of field names (e.g. "Destination") to include 3881 // in API requests with the JSON null value. By default, fields with 3882 // empty values are omitted from API requests. However, any field with 3883 // an empty value appearing in NullFields will be sent to the server as 3884 // null. It is an error if a field in this list has a non-empty value. 3885 // This may be used to include null fields in Patch requests. 3886 NullFields []string `json:"-"` 3887} 3888 3889func (s *CopyPasteRequest) MarshalJSON() ([]byte, error) { 3890 type NoMethod CopyPasteRequest 3891 raw := NoMethod(*s) 3892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3893} 3894 3895// CopySheetToAnotherSpreadsheetRequest: The request to copy a sheet 3896// across spreadsheets. 3897type CopySheetToAnotherSpreadsheetRequest struct { 3898 // DestinationSpreadsheetId: The ID of the spreadsheet to copy the sheet 3899 // to. 3900 DestinationSpreadsheetId string `json:"destinationSpreadsheetId,omitempty"` 3901 3902 // ForceSendFields is a list of field names (e.g. 3903 // "DestinationSpreadsheetId") to unconditionally include in API 3904 // requests. By default, fields with empty or default values are omitted 3905 // from API requests. However, any non-pointer, non-interface field 3906 // appearing in ForceSendFields will be sent to the server regardless of 3907 // whether the field is empty or not. This may be used to include empty 3908 // fields in Patch requests. 3909 ForceSendFields []string `json:"-"` 3910 3911 // NullFields is a list of field names (e.g. "DestinationSpreadsheetId") 3912 // to include in API requests with the JSON null value. By default, 3913 // fields with empty values are omitted from API requests. However, any 3914 // field with an empty value appearing in NullFields will be sent to the 3915 // server as null. It is an error if a field in this list has a 3916 // non-empty value. This may be used to include null fields in Patch 3917 // requests. 3918 NullFields []string `json:"-"` 3919} 3920 3921func (s *CopySheetToAnotherSpreadsheetRequest) MarshalJSON() ([]byte, error) { 3922 type NoMethod CopySheetToAnotherSpreadsheetRequest 3923 raw := NoMethod(*s) 3924 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3925} 3926 3927// CreateDeveloperMetadataRequest: A request to create developer 3928// metadata. 3929type CreateDeveloperMetadataRequest struct { 3930 // DeveloperMetadata: The developer metadata to create. 3931 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3932 3933 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3934 // to unconditionally include in API requests. By default, fields with 3935 // empty or default values are omitted from API requests. However, any 3936 // non-pointer, non-interface field appearing in ForceSendFields will be 3937 // sent to the server regardless of whether the field is empty or not. 3938 // This may be used to include empty fields in Patch requests. 3939 ForceSendFields []string `json:"-"` 3940 3941 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3942 // include in API requests with the JSON null value. By default, fields 3943 // with empty values are omitted from API requests. However, any field 3944 // with an empty value appearing in NullFields will be sent to the 3945 // server as null. It is an error if a field in this list has a 3946 // non-empty value. This may be used to include null fields in Patch 3947 // requests. 3948 NullFields []string `json:"-"` 3949} 3950 3951func (s *CreateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 3952 type NoMethod CreateDeveloperMetadataRequest 3953 raw := NoMethod(*s) 3954 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3955} 3956 3957// CreateDeveloperMetadataResponse: The response from creating developer 3958// metadata. 3959type CreateDeveloperMetadataResponse struct { 3960 // DeveloperMetadata: The developer metadata that was created. 3961 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 3962 3963 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 3964 // to unconditionally include in API requests. By default, fields with 3965 // empty or default values are omitted from API requests. However, any 3966 // non-pointer, non-interface field appearing in ForceSendFields will be 3967 // sent to the server regardless of whether the field is empty or not. 3968 // This may be used to include empty fields in Patch requests. 3969 ForceSendFields []string `json:"-"` 3970 3971 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 3972 // include in API requests with the JSON null value. By default, fields 3973 // with empty values are omitted from API requests. However, any field 3974 // with an empty value appearing in NullFields will be sent to the 3975 // server as null. It is an error if a field in this list has a 3976 // non-empty value. This may be used to include null fields in Patch 3977 // requests. 3978 NullFields []string `json:"-"` 3979} 3980 3981func (s *CreateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 3982 type NoMethod CreateDeveloperMetadataResponse 3983 raw := NoMethod(*s) 3984 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3985} 3986 3987// CutPasteRequest: Moves data from the source to the destination. 3988type CutPasteRequest struct { 3989 // Destination: The top-left coordinate where the data should be pasted. 3990 Destination *GridCoordinate `json:"destination,omitempty"` 3991 3992 // PasteType: What kind of data to paste. All the source data will be 3993 // cut, regardless of what is pasted. 3994 // 3995 // Possible values: 3996 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 3997 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 3998 // or merges. 3999 // "PASTE_FORMAT" - Paste the format and data validation only. 4000 // "PASTE_NO_BORDERS" - Like `PASTE_NORMAL` but without borders. 4001 // "PASTE_FORMULA" - Paste the formulas only. 4002 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 4003 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 4004 // rules only. 4005 PasteType string `json:"pasteType,omitempty"` 4006 4007 // Source: The source data to cut. 4008 Source *GridRange `json:"source,omitempty"` 4009 4010 // ForceSendFields is a list of field names (e.g. "Destination") to 4011 // unconditionally include in API requests. By default, fields with 4012 // empty or default values are omitted from API requests. However, any 4013 // non-pointer, non-interface field appearing in ForceSendFields will be 4014 // sent to the server regardless of whether the field is empty or not. 4015 // This may be used to include empty fields in Patch requests. 4016 ForceSendFields []string `json:"-"` 4017 4018 // NullFields is a list of field names (e.g. "Destination") to include 4019 // in API requests with the JSON null value. By default, fields with 4020 // empty values are omitted from API requests. However, any field with 4021 // an empty value appearing in NullFields will be sent to the server as 4022 // null. It is an error if a field in this list has a non-empty value. 4023 // This may be used to include null fields in Patch requests. 4024 NullFields []string `json:"-"` 4025} 4026 4027func (s *CutPasteRequest) MarshalJSON() ([]byte, error) { 4028 type NoMethod CutPasteRequest 4029 raw := NoMethod(*s) 4030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4031} 4032 4033// DataExecutionStatus: The data execution status. A data execution is 4034// created to sync a data source object with the latest data from a 4035// DataSource. It is usually scheduled to run at background, you can 4036// check its state to tell if an execution completes There are several 4037// scenarios where a data execution is triggered to run: * Adding a data 4038// source creates an associated data source sheet as well as a data 4039// execution to sync the data from the data source to the sheet. * 4040// Updating a data source creates a data execution to refresh the 4041// associated data source sheet similarly. * You can send refresh 4042// request to explicitly refresh one or multiple data source objects. 4043type DataExecutionStatus struct { 4044 // ErrorCode: The error code. 4045 // 4046 // Possible values: 4047 // "DATA_EXECUTION_ERROR_CODE_UNSPECIFIED" - Default value, do not 4048 // use. 4049 // "TIMED_OUT" - The data execution timed out. 4050 // "TOO_MANY_ROWS" - The data execution returns more rows than the 4051 // limit. 4052 // "TOO_MANY_CELLS" - The data execution returns more cells than the 4053 // limit. 4054 // "ENGINE" - Error is received from the backend data execution engine 4055 // (e.g. BigQuery). Check error_message for details. 4056 // "PARAMETER_INVALID" - One or some of the provided data source 4057 // parameters are invalid. 4058 // "UNSUPPORTED_DATA_TYPE" - The data execution returns an unsupported 4059 // data type. 4060 // "DUPLICATE_COLUMN_NAMES" - The data execution returns duplicate 4061 // column names or aliases. 4062 // "INTERRUPTED" - The data execution is interrupted. Please refresh 4063 // later. 4064 // "CONCURRENT_QUERY" - The data execution is currently in progress, 4065 // can not be refreshed until it completes. 4066 // "OTHER" - Other errors. 4067 // "TOO_MANY_CHARS_PER_CELL" - The data execution returns values that 4068 // exceed the maximum characters allowed in a single cell. 4069 // "DATA_NOT_FOUND" - The database referenced by the data source is 4070 // not found. */ 4071 // "PERMISSION_DENIED" - The user does not have access to the database 4072 // referenced by the data source. 4073 // "MISSING_COLUMN_ALIAS" - The data execution returns columns with 4074 // missing aliases. 4075 // "OBJECT_NOT_FOUND" - The data source object does not exist. 4076 // "OBJECT_IN_ERROR_STATE" - The data source object is currently in 4077 // error state. To force refresh, set force in RefreshDataSourceRequest. 4078 // "OBJECT_SPEC_INVALID" - The data source object specification is 4079 // invalid. 4080 ErrorCode string `json:"errorCode,omitempty"` 4081 4082 // ErrorMessage: The error message, which may be empty. 4083 ErrorMessage string `json:"errorMessage,omitempty"` 4084 4085 // LastRefreshTime: Gets the time the data last successfully refreshed. 4086 LastRefreshTime string `json:"lastRefreshTime,omitempty"` 4087 4088 // State: The state of the data execution. 4089 // 4090 // Possible values: 4091 // "DATA_EXECUTION_STATE_UNSPECIFIED" - Default value, do not use. 4092 // "NOT_STARTED" - The data execution has not started. 4093 // "RUNNING" - The data execution has started and is running. 4094 // "SUCCEEDED" - The data execution has completed successfully. 4095 // "FAILED" - The data execution has completed with errors. 4096 State string `json:"state,omitempty"` 4097 4098 // ForceSendFields is a list of field names (e.g. "ErrorCode") to 4099 // unconditionally include in API requests. By default, fields with 4100 // empty or default values are omitted from API requests. However, any 4101 // non-pointer, non-interface field appearing in ForceSendFields will be 4102 // sent to the server regardless of whether the field is empty or not. 4103 // This may be used to include empty fields in Patch requests. 4104 ForceSendFields []string `json:"-"` 4105 4106 // NullFields is a list of field names (e.g. "ErrorCode") to include in 4107 // API requests with the JSON null value. By default, fields with empty 4108 // values are omitted from API requests. However, any field with an 4109 // empty value appearing in NullFields will be sent to the server as 4110 // null. It is an error if a field in this list has a non-empty value. 4111 // This may be used to include null fields in Patch requests. 4112 NullFields []string `json:"-"` 4113} 4114 4115func (s *DataExecutionStatus) MarshalJSON() ([]byte, error) { 4116 type NoMethod DataExecutionStatus 4117 raw := NoMethod(*s) 4118 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4119} 4120 4121// DataFilter: Filter that describes what data should be selected or 4122// returned from a request. 4123type DataFilter struct { 4124 // A1Range: Selects data that matches the specified A1 range. 4125 A1Range string `json:"a1Range,omitempty"` 4126 4127 // DeveloperMetadataLookup: Selects data associated with the developer 4128 // metadata matching the criteria described by this 4129 // DeveloperMetadataLookup. 4130 DeveloperMetadataLookup *DeveloperMetadataLookup `json:"developerMetadataLookup,omitempty"` 4131 4132 // GridRange: Selects data that matches the range described by the 4133 // GridRange. 4134 GridRange *GridRange `json:"gridRange,omitempty"` 4135 4136 // ForceSendFields is a list of field names (e.g. "A1Range") to 4137 // unconditionally include in API requests. By default, fields with 4138 // empty or default values are omitted from API requests. However, any 4139 // non-pointer, non-interface field appearing in ForceSendFields will be 4140 // sent to the server regardless of whether the field is empty or not. 4141 // This may be used to include empty fields in Patch requests. 4142 ForceSendFields []string `json:"-"` 4143 4144 // NullFields is a list of field names (e.g. "A1Range") to include in 4145 // API requests with the JSON null value. By default, fields with empty 4146 // values are omitted from API requests. However, any field with an 4147 // empty value appearing in NullFields will be sent to the server as 4148 // null. It is an error if a field in this list has a non-empty value. 4149 // This may be used to include null fields in Patch requests. 4150 NullFields []string `json:"-"` 4151} 4152 4153func (s *DataFilter) MarshalJSON() ([]byte, error) { 4154 type NoMethod DataFilter 4155 raw := NoMethod(*s) 4156 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4157} 4158 4159// DataFilterValueRange: A range of values whose location is specified 4160// by a DataFilter. 4161type DataFilterValueRange struct { 4162 // DataFilter: The data filter describing the location of the values in 4163 // the spreadsheet. 4164 DataFilter *DataFilter `json:"dataFilter,omitempty"` 4165 4166 // MajorDimension: The major dimension of the values. 4167 // 4168 // Possible values: 4169 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 4170 // "ROWS" - Operates on the rows of a sheet. 4171 // "COLUMNS" - Operates on the columns of a sheet. 4172 MajorDimension string `json:"majorDimension,omitempty"` 4173 4174 // Values: The data to be written. If the provided values exceed any of 4175 // the ranges matched by the data filter then the request fails. If the 4176 // provided values are less than the matched ranges only the specified 4177 // values are written, existing values in the matched ranges remain 4178 // unaffected. 4179 Values [][]interface{} `json:"values,omitempty"` 4180 4181 // ForceSendFields is a list of field names (e.g. "DataFilter") to 4182 // unconditionally include in API requests. By default, fields with 4183 // empty or default values are omitted from API requests. However, any 4184 // non-pointer, non-interface field appearing in ForceSendFields will be 4185 // sent to the server regardless of whether the field is empty or not. 4186 // This may be used to include empty fields in Patch requests. 4187 ForceSendFields []string `json:"-"` 4188 4189 // NullFields is a list of field names (e.g. "DataFilter") to include in 4190 // API requests with the JSON null value. By default, fields with empty 4191 // values are omitted from API requests. However, any field with an 4192 // empty value appearing in NullFields will be sent to the server as 4193 // null. It is an error if a field in this list has a non-empty value. 4194 // This may be used to include null fields in Patch requests. 4195 NullFields []string `json:"-"` 4196} 4197 4198func (s *DataFilterValueRange) MarshalJSON() ([]byte, error) { 4199 type NoMethod DataFilterValueRange 4200 raw := NoMethod(*s) 4201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4202} 4203 4204// DataLabel: Settings for one set of data labels. Data labels are 4205// annotations that appear next to a set of data, such as the points on 4206// a line chart, and provide additional information about what the data 4207// represents, such as a text representation of the value behind that 4208// point on the graph. 4209type DataLabel struct { 4210 // CustomLabelData: Data to use for custom labels. Only used if type is 4211 // set to CUSTOM. This data must be the same length as the series or 4212 // other element this data label is applied to. In addition, if the 4213 // series is split into multiple source ranges, this source data must 4214 // come from the next column in the source data. For example, if the 4215 // series is B2:B4,E6:E8 then this data must come from C2:C4,F6:F8. 4216 CustomLabelData *ChartData `json:"customLabelData,omitempty"` 4217 4218 // Placement: The placement of the data label relative to the labeled 4219 // data. 4220 // 4221 // Possible values: 4222 // "DATA_LABEL_PLACEMENT_UNSPECIFIED" - The positioning is determined 4223 // automatically by the renderer. 4224 // "CENTER" - Center within a bar or column, both horizontally and 4225 // vertically. 4226 // "LEFT" - To the left of a data point. 4227 // "RIGHT" - To the right of a data point. 4228 // "ABOVE" - Above a data point. 4229 // "BELOW" - Below a data point. 4230 // "INSIDE_END" - Inside a bar or column at the end (top if positive, 4231 // bottom if negative). 4232 // "INSIDE_BASE" - Inside a bar or column at the base. 4233 // "OUTSIDE_END" - Outside a bar or column at the end. 4234 Placement string `json:"placement,omitempty"` 4235 4236 // TextFormat: The text format used for the data label. The link field 4237 // is not supported. 4238 TextFormat *TextFormat `json:"textFormat,omitempty"` 4239 4240 // Type: The type of the data label. 4241 // 4242 // Possible values: 4243 // "DATA_LABEL_TYPE_UNSPECIFIED" - The data label type is not 4244 // specified and will be interpreted depending on the context of the 4245 // data label within the chart. 4246 // "NONE" - The data label is not displayed. 4247 // "DATA" - The data label is displayed using values from the series 4248 // data. 4249 // "CUSTOM" - The data label is displayed using values from a custom 4250 // data source indicated by customLabelData. 4251 Type string `json:"type,omitempty"` 4252 4253 // ForceSendFields is a list of field names (e.g. "CustomLabelData") to 4254 // unconditionally include in API requests. By default, fields with 4255 // empty or default values are omitted from API requests. However, any 4256 // non-pointer, non-interface field appearing in ForceSendFields will be 4257 // sent to the server regardless of whether the field is empty or not. 4258 // This may be used to include empty fields in Patch requests. 4259 ForceSendFields []string `json:"-"` 4260 4261 // NullFields is a list of field names (e.g. "CustomLabelData") to 4262 // include in API requests with the JSON null value. By default, fields 4263 // with empty values are omitted from API requests. However, any field 4264 // with an empty value appearing in NullFields will be sent to the 4265 // server as null. It is an error if a field in this list has a 4266 // non-empty value. This may be used to include null fields in Patch 4267 // requests. 4268 NullFields []string `json:"-"` 4269} 4270 4271func (s *DataLabel) MarshalJSON() ([]byte, error) { 4272 type NoMethod DataLabel 4273 raw := NoMethod(*s) 4274 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4275} 4276 4277// DataSource: Information about an external data source in the 4278// spreadsheet. 4279type DataSource struct { 4280 // CalculatedColumns: All calculated columns in the data source. 4281 CalculatedColumns []*DataSourceColumn `json:"calculatedColumns,omitempty"` 4282 4283 // DataSourceId: The spreadsheet-scoped unique ID that identifies the 4284 // data source. Example: 1080547365. 4285 DataSourceId string `json:"dataSourceId,omitempty"` 4286 4287 // SheetId: The ID of the Sheet connected with the data source. The 4288 // field cannot be changed once set. When creating a data source, an 4289 // associated DATA_SOURCE sheet is also created, if the field is not 4290 // specified, the ID of the created sheet will be randomly generated. 4291 SheetId int64 `json:"sheetId,omitempty"` 4292 4293 // Spec: The DataSourceSpec for the data source connected with this 4294 // spreadsheet. 4295 Spec *DataSourceSpec `json:"spec,omitempty"` 4296 4297 // ForceSendFields is a list of field names (e.g. "CalculatedColumns") 4298 // to unconditionally include in API requests. By default, fields with 4299 // empty or default values are omitted from API requests. However, any 4300 // non-pointer, non-interface field appearing in ForceSendFields will be 4301 // sent to the server regardless of whether the field is empty or not. 4302 // This may be used to include empty fields in Patch requests. 4303 ForceSendFields []string `json:"-"` 4304 4305 // NullFields is a list of field names (e.g. "CalculatedColumns") to 4306 // include in API requests with the JSON null value. By default, fields 4307 // with empty values are omitted from API requests. However, any field 4308 // with an empty value appearing in NullFields will be sent to the 4309 // server as null. It is an error if a field in this list has a 4310 // non-empty value. This may be used to include null fields in Patch 4311 // requests. 4312 NullFields []string `json:"-"` 4313} 4314 4315func (s *DataSource) MarshalJSON() ([]byte, error) { 4316 type NoMethod DataSource 4317 raw := NoMethod(*s) 4318 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4319} 4320 4321// DataSourceChartProperties: Properties of a data source chart. 4322type DataSourceChartProperties struct { 4323 // DataExecutionStatus: Output only. The data execution status. 4324 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 4325 4326 // DataSourceId: ID of the data source that the chart is associated 4327 // with. 4328 DataSourceId string `json:"dataSourceId,omitempty"` 4329 4330 // ForceSendFields is a list of field names (e.g. "DataExecutionStatus") 4331 // to unconditionally include in API requests. By default, fields with 4332 // empty or default values are omitted from API requests. However, any 4333 // non-pointer, non-interface field appearing in ForceSendFields will be 4334 // sent to the server regardless of whether the field is empty or not. 4335 // This may be used to include empty fields in Patch requests. 4336 ForceSendFields []string `json:"-"` 4337 4338 // NullFields is a list of field names (e.g. "DataExecutionStatus") to 4339 // include in API requests with the JSON null value. By default, fields 4340 // with empty values are omitted from API requests. However, any field 4341 // with an empty value appearing in NullFields will be sent to the 4342 // server as null. It is an error if a field in this list has a 4343 // non-empty value. This may be used to include null fields in Patch 4344 // requests. 4345 NullFields []string `json:"-"` 4346} 4347 4348func (s *DataSourceChartProperties) MarshalJSON() ([]byte, error) { 4349 type NoMethod DataSourceChartProperties 4350 raw := NoMethod(*s) 4351 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4352} 4353 4354// DataSourceColumn: A column in a data source. 4355type DataSourceColumn struct { 4356 // Formula: The formula of the calculated column. 4357 Formula string `json:"formula,omitempty"` 4358 4359 // Reference: The column reference. 4360 Reference *DataSourceColumnReference `json:"reference,omitempty"` 4361 4362 // ForceSendFields is a list of field names (e.g. "Formula") to 4363 // unconditionally include in API requests. By default, fields with 4364 // empty or default values are omitted from API requests. However, any 4365 // non-pointer, non-interface field appearing in ForceSendFields will be 4366 // sent to the server regardless of whether the field is empty or not. 4367 // This may be used to include empty fields in Patch requests. 4368 ForceSendFields []string `json:"-"` 4369 4370 // NullFields is a list of field names (e.g. "Formula") to include in 4371 // API requests with the JSON null value. By default, fields with empty 4372 // values are omitted from API requests. However, any field with an 4373 // empty value appearing in NullFields will be sent to the server as 4374 // null. It is an error if a field in this list has a non-empty value. 4375 // This may be used to include null fields in Patch requests. 4376 NullFields []string `json:"-"` 4377} 4378 4379func (s *DataSourceColumn) MarshalJSON() ([]byte, error) { 4380 type NoMethod DataSourceColumn 4381 raw := NoMethod(*s) 4382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4383} 4384 4385// DataSourceColumnReference: An unique identifier that references a 4386// data source column. 4387type DataSourceColumnReference struct { 4388 // Name: The display name of the column. It should be unique within a 4389 // data source. 4390 Name string `json:"name,omitempty"` 4391 4392 // ForceSendFields is a list of field names (e.g. "Name") to 4393 // unconditionally include in API requests. By default, fields with 4394 // empty or default values are omitted from API requests. However, any 4395 // non-pointer, non-interface field appearing in ForceSendFields will be 4396 // sent to the server regardless of whether the field is empty or not. 4397 // This may be used to include empty fields in Patch requests. 4398 ForceSendFields []string `json:"-"` 4399 4400 // NullFields is a list of field names (e.g. "Name") to include in API 4401 // requests with the JSON null value. By default, fields with empty 4402 // values are omitted from API requests. However, any field with an 4403 // empty value appearing in NullFields will be sent to the server as 4404 // null. It is an error if a field in this list has a non-empty value. 4405 // This may be used to include null fields in Patch requests. 4406 NullFields []string `json:"-"` 4407} 4408 4409func (s *DataSourceColumnReference) MarshalJSON() ([]byte, error) { 4410 type NoMethod DataSourceColumnReference 4411 raw := NoMethod(*s) 4412 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4413} 4414 4415// DataSourceFormula: A data source formula. 4416type DataSourceFormula struct { 4417 // DataExecutionStatus: Output only. The data execution status. 4418 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 4419 4420 // DataSourceId: The ID of the data source the formula is associated 4421 // with. 4422 DataSourceId string `json:"dataSourceId,omitempty"` 4423 4424 // ForceSendFields is a list of field names (e.g. "DataExecutionStatus") 4425 // to unconditionally include in API requests. By default, fields with 4426 // empty or default values are omitted from API requests. However, any 4427 // non-pointer, non-interface field appearing in ForceSendFields will be 4428 // sent to the server regardless of whether the field is empty or not. 4429 // This may be used to include empty fields in Patch requests. 4430 ForceSendFields []string `json:"-"` 4431 4432 // NullFields is a list of field names (e.g. "DataExecutionStatus") to 4433 // include in API requests with the JSON null value. By default, fields 4434 // with empty values are omitted from API requests. However, any field 4435 // with an empty value appearing in NullFields will be sent to the 4436 // server as null. It is an error if a field in this list has a 4437 // non-empty value. This may be used to include null fields in Patch 4438 // requests. 4439 NullFields []string `json:"-"` 4440} 4441 4442func (s *DataSourceFormula) MarshalJSON() ([]byte, error) { 4443 type NoMethod DataSourceFormula 4444 raw := NoMethod(*s) 4445 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4446} 4447 4448// DataSourceObjectReference: Reference to a data source object. 4449type DataSourceObjectReference struct { 4450 // ChartId: References to a data source chart. 4451 ChartId int64 `json:"chartId,omitempty"` 4452 4453 // DataSourceFormulaCell: References to a cell containing 4454 // DataSourceFormula. 4455 DataSourceFormulaCell *GridCoordinate `json:"dataSourceFormulaCell,omitempty"` 4456 4457 // DataSourcePivotTableAnchorCell: References to a data source 4458 // PivotTable anchored at the cell. 4459 DataSourcePivotTableAnchorCell *GridCoordinate `json:"dataSourcePivotTableAnchorCell,omitempty"` 4460 4461 // DataSourceTableAnchorCell: References to a DataSourceTable anchored 4462 // at the cell. 4463 DataSourceTableAnchorCell *GridCoordinate `json:"dataSourceTableAnchorCell,omitempty"` 4464 4465 // SheetId: References to a DATA_SOURCE sheet. 4466 SheetId string `json:"sheetId,omitempty"` 4467 4468 // ForceSendFields is a list of field names (e.g. "ChartId") to 4469 // unconditionally include in API requests. By default, fields with 4470 // empty or default values are omitted from API requests. However, any 4471 // non-pointer, non-interface field appearing in ForceSendFields will be 4472 // sent to the server regardless of whether the field is empty or not. 4473 // This may be used to include empty fields in Patch requests. 4474 ForceSendFields []string `json:"-"` 4475 4476 // NullFields is a list of field names (e.g. "ChartId") to include in 4477 // API requests with the JSON null value. By default, fields with empty 4478 // values are omitted from API requests. However, any field with an 4479 // empty value appearing in NullFields will be sent to the server as 4480 // null. It is an error if a field in this list has a non-empty value. 4481 // This may be used to include null fields in Patch requests. 4482 NullFields []string `json:"-"` 4483} 4484 4485func (s *DataSourceObjectReference) MarshalJSON() ([]byte, error) { 4486 type NoMethod DataSourceObjectReference 4487 raw := NoMethod(*s) 4488 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4489} 4490 4491// DataSourceObjectReferences: A list of references to data source 4492// objects. 4493type DataSourceObjectReferences struct { 4494 // References: The references. 4495 References []*DataSourceObjectReference `json:"references,omitempty"` 4496 4497 // ForceSendFields is a list of field names (e.g. "References") to 4498 // unconditionally include in API requests. By default, fields with 4499 // empty or default values are omitted from API requests. However, any 4500 // non-pointer, non-interface field appearing in ForceSendFields will be 4501 // sent to the server regardless of whether the field is empty or not. 4502 // This may be used to include empty fields in Patch requests. 4503 ForceSendFields []string `json:"-"` 4504 4505 // NullFields is a list of field names (e.g. "References") to include in 4506 // API requests with the JSON null value. By default, fields with empty 4507 // values are omitted from API requests. However, any field with an 4508 // empty value appearing in NullFields will be sent to the server as 4509 // null. It is an error if a field in this list has a non-empty value. 4510 // This may be used to include null fields in Patch requests. 4511 NullFields []string `json:"-"` 4512} 4513 4514func (s *DataSourceObjectReferences) MarshalJSON() ([]byte, error) { 4515 type NoMethod DataSourceObjectReferences 4516 raw := NoMethod(*s) 4517 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4518} 4519 4520// DataSourceParameter: A parameter in a data source's query. The 4521// parameter allows the user to pass in values from the spreadsheet into 4522// a query. 4523type DataSourceParameter struct { 4524 // Name: Named parameter. Must be a legitimate identifier for the 4525 // DataSource that supports it. For example, BigQuery identifier 4526 // (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#identifiers). 4527 Name string `json:"name,omitempty"` 4528 4529 // NamedRangeId: ID of a NamedRange. Its size must be 1x1. 4530 NamedRangeId string `json:"namedRangeId,omitempty"` 4531 4532 // Range: A range that contains the value of the parameter. Its size 4533 // must be 1x1. 4534 Range *GridRange `json:"range,omitempty"` 4535 4536 // ForceSendFields is a list of field names (e.g. "Name") to 4537 // unconditionally include in API requests. By default, fields with 4538 // empty or default values are omitted from API requests. However, any 4539 // non-pointer, non-interface field appearing in ForceSendFields will be 4540 // sent to the server regardless of whether the field is empty or not. 4541 // This may be used to include empty fields in Patch requests. 4542 ForceSendFields []string `json:"-"` 4543 4544 // NullFields is a list of field names (e.g. "Name") to include in API 4545 // requests with the JSON null value. By default, fields with empty 4546 // values are omitted from API requests. However, any field with an 4547 // empty value appearing in NullFields will be sent to the server as 4548 // null. It is an error if a field in this list has a non-empty value. 4549 // This may be used to include null fields in Patch requests. 4550 NullFields []string `json:"-"` 4551} 4552 4553func (s *DataSourceParameter) MarshalJSON() ([]byte, error) { 4554 type NoMethod DataSourceParameter 4555 raw := NoMethod(*s) 4556 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4557} 4558 4559// DataSourceRefreshDailySchedule: A schedule for data to refresh every 4560// day in a given time interval. 4561type DataSourceRefreshDailySchedule struct { 4562 // StartTime: The start time of a time interval in which a data source 4563 // refresh is scheduled. Only `hours` part is used. The time interval 4564 // size defaults to that in the Sheets editor. 4565 StartTime *TimeOfDay `json:"startTime,omitempty"` 4566 4567 // ForceSendFields is a list of field names (e.g. "StartTime") to 4568 // unconditionally include in API requests. By default, fields with 4569 // empty or default values are omitted from API requests. However, any 4570 // non-pointer, non-interface field appearing in ForceSendFields will be 4571 // sent to the server regardless of whether the field is empty or not. 4572 // This may be used to include empty fields in Patch requests. 4573 ForceSendFields []string `json:"-"` 4574 4575 // NullFields is a list of field names (e.g. "StartTime") to include in 4576 // API requests with the JSON null value. By default, fields with empty 4577 // values are omitted from API requests. However, any field with an 4578 // empty value appearing in NullFields will be sent to the server as 4579 // null. It is an error if a field in this list has a non-empty value. 4580 // This may be used to include null fields in Patch requests. 4581 NullFields []string `json:"-"` 4582} 4583 4584func (s *DataSourceRefreshDailySchedule) MarshalJSON() ([]byte, error) { 4585 type NoMethod DataSourceRefreshDailySchedule 4586 raw := NoMethod(*s) 4587 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4588} 4589 4590// DataSourceRefreshMonthlySchedule: A monthly schedule for data to 4591// refresh on specific days in the month in a given time interval. 4592type DataSourceRefreshMonthlySchedule struct { 4593 // DaysOfMonth: Days of the month to refresh. Only 1-28 are supported, 4594 // mapping to the 1st to the 28th day. At lesat one day must be 4595 // specified. 4596 DaysOfMonth []int64 `json:"daysOfMonth,omitempty"` 4597 4598 // StartTime: The start time of a time interval in which a data source 4599 // refresh is scheduled. Only `hours` part is used. The time interval 4600 // size defaults to that in the Sheets editor. 4601 StartTime *TimeOfDay `json:"startTime,omitempty"` 4602 4603 // ForceSendFields is a list of field names (e.g. "DaysOfMonth") to 4604 // unconditionally include in API requests. By default, fields with 4605 // empty or default values are omitted from API requests. However, any 4606 // non-pointer, non-interface field appearing in ForceSendFields will be 4607 // sent to the server regardless of whether the field is empty or not. 4608 // This may be used to include empty fields in Patch requests. 4609 ForceSendFields []string `json:"-"` 4610 4611 // NullFields is a list of field names (e.g. "DaysOfMonth") to include 4612 // in API requests with the JSON null value. By default, fields with 4613 // empty values are omitted from API requests. However, any field with 4614 // an empty value appearing in NullFields will be sent to the server as 4615 // null. It is an error if a field in this list has a non-empty value. 4616 // This may be used to include null fields in Patch requests. 4617 NullFields []string `json:"-"` 4618} 4619 4620func (s *DataSourceRefreshMonthlySchedule) MarshalJSON() ([]byte, error) { 4621 type NoMethod DataSourceRefreshMonthlySchedule 4622 raw := NoMethod(*s) 4623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4624} 4625 4626// DataSourceRefreshSchedule: Schedule for refreshing the data source. 4627// Data sources in the spreadsheet are refreshed within a time interval. 4628// You can specify the start time by clicking the Scheduled Refresh 4629// button in the Sheets editor, but the interval is fixed at 4 hours. 4630// For example, if you specify a start time of 8am , the refresh will 4631// take place between 8am and 12pm every day. 4632type DataSourceRefreshSchedule struct { 4633 // DailySchedule: Daily refresh schedule. 4634 DailySchedule *DataSourceRefreshDailySchedule `json:"dailySchedule,omitempty"` 4635 4636 // Enabled: True if the refresh schedule is enabled, or false otherwise. 4637 Enabled bool `json:"enabled,omitempty"` 4638 4639 // MonthlySchedule: Monthly refresh schedule. 4640 MonthlySchedule *DataSourceRefreshMonthlySchedule `json:"monthlySchedule,omitempty"` 4641 4642 // NextRun: Output only. The time interval of the next run. 4643 NextRun *Interval `json:"nextRun,omitempty"` 4644 4645 // RefreshScope: The scope of the refresh. Must be ALL_DATA_SOURCES. 4646 // 4647 // Possible values: 4648 // "DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED" - Default value, do not 4649 // use. 4650 // "ALL_DATA_SOURCES" - Refreshes all data sources and their 4651 // associated data source objects in the spreadsheet. 4652 RefreshScope string `json:"refreshScope,omitempty"` 4653 4654 // WeeklySchedule: Weekly refresh schedule. 4655 WeeklySchedule *DataSourceRefreshWeeklySchedule `json:"weeklySchedule,omitempty"` 4656 4657 // ForceSendFields is a list of field names (e.g. "DailySchedule") to 4658 // unconditionally include in API requests. By default, fields with 4659 // empty or default values are omitted from API requests. However, any 4660 // non-pointer, non-interface field appearing in ForceSendFields will be 4661 // sent to the server regardless of whether the field is empty or not. 4662 // This may be used to include empty fields in Patch requests. 4663 ForceSendFields []string `json:"-"` 4664 4665 // NullFields is a list of field names (e.g. "DailySchedule") to include 4666 // in API requests with the JSON null value. By default, fields with 4667 // empty values are omitted from API requests. However, any field with 4668 // an empty value appearing in NullFields will be sent to the server as 4669 // null. It is an error if a field in this list has a non-empty value. 4670 // This may be used to include null fields in Patch requests. 4671 NullFields []string `json:"-"` 4672} 4673 4674func (s *DataSourceRefreshSchedule) MarshalJSON() ([]byte, error) { 4675 type NoMethod DataSourceRefreshSchedule 4676 raw := NoMethod(*s) 4677 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4678} 4679 4680// DataSourceRefreshWeeklySchedule: A weekly schedule for data to 4681// refresh on specific days in a given time interval. 4682type DataSourceRefreshWeeklySchedule struct { 4683 // DaysOfWeek: Days of the week to refresh. At least one day must be 4684 // specified. 4685 // 4686 // Possible values: 4687 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified. 4688 // "MONDAY" - Monday 4689 // "TUESDAY" - Tuesday 4690 // "WEDNESDAY" - Wednesday 4691 // "THURSDAY" - Thursday 4692 // "FRIDAY" - Friday 4693 // "SATURDAY" - Saturday 4694 // "SUNDAY" - Sunday 4695 DaysOfWeek []string `json:"daysOfWeek,omitempty"` 4696 4697 // StartTime: The start time of a time interval in which a data source 4698 // refresh is scheduled. Only `hours` part is used. The time interval 4699 // size defaults to that in the Sheets editor. 4700 StartTime *TimeOfDay `json:"startTime,omitempty"` 4701 4702 // ForceSendFields is a list of field names (e.g. "DaysOfWeek") to 4703 // unconditionally include in API requests. By default, fields with 4704 // empty or default values are omitted from API requests. However, any 4705 // non-pointer, non-interface field appearing in ForceSendFields will be 4706 // sent to the server regardless of whether the field is empty or not. 4707 // This may be used to include empty fields in Patch requests. 4708 ForceSendFields []string `json:"-"` 4709 4710 // NullFields is a list of field names (e.g. "DaysOfWeek") to include in 4711 // API requests with the JSON null value. By default, fields with empty 4712 // values are omitted from API requests. However, any field with an 4713 // empty value appearing in NullFields will be sent to the server as 4714 // null. It is an error if a field in this list has a non-empty value. 4715 // This may be used to include null fields in Patch requests. 4716 NullFields []string `json:"-"` 4717} 4718 4719func (s *DataSourceRefreshWeeklySchedule) MarshalJSON() ([]byte, error) { 4720 type NoMethod DataSourceRefreshWeeklySchedule 4721 raw := NoMethod(*s) 4722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4723} 4724 4725// DataSourceSheetDimensionRange: A range along a single dimension on a 4726// DATA_SOURCE sheet. 4727type DataSourceSheetDimensionRange struct { 4728 // ColumnReferences: The columns on the data source sheet. 4729 ColumnReferences []*DataSourceColumnReference `json:"columnReferences,omitempty"` 4730 4731 // SheetId: The ID of the data source sheet the range is on. 4732 SheetId int64 `json:"sheetId,omitempty"` 4733 4734 // ForceSendFields is a list of field names (e.g. "ColumnReferences") to 4735 // unconditionally include in API requests. By default, fields with 4736 // empty or default values are omitted from API requests. However, any 4737 // non-pointer, non-interface field appearing in ForceSendFields will be 4738 // sent to the server regardless of whether the field is empty or not. 4739 // This may be used to include empty fields in Patch requests. 4740 ForceSendFields []string `json:"-"` 4741 4742 // NullFields is a list of field names (e.g. "ColumnReferences") to 4743 // include in API requests with the JSON null value. By default, fields 4744 // with empty values are omitted from API requests. However, any field 4745 // with an empty value appearing in NullFields will be sent to the 4746 // server as null. It is an error if a field in this list has a 4747 // non-empty value. This may be used to include null fields in Patch 4748 // requests. 4749 NullFields []string `json:"-"` 4750} 4751 4752func (s *DataSourceSheetDimensionRange) MarshalJSON() ([]byte, error) { 4753 type NoMethod DataSourceSheetDimensionRange 4754 raw := NoMethod(*s) 4755 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4756} 4757 4758// DataSourceSheetProperties: Additional properties of a DATA_SOURCE 4759// sheet. 4760type DataSourceSheetProperties struct { 4761 // Columns: The columns displayed on the sheet, corresponding to the 4762 // values in RowData. 4763 Columns []*DataSourceColumn `json:"columns,omitempty"` 4764 4765 // DataExecutionStatus: The data execution status. 4766 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 4767 4768 // DataSourceId: ID of the DataSource the sheet is connected to. 4769 DataSourceId string `json:"dataSourceId,omitempty"` 4770 4771 // ForceSendFields is a list of field names (e.g. "Columns") to 4772 // unconditionally include in API requests. By default, fields with 4773 // empty or default values are omitted from API requests. However, any 4774 // non-pointer, non-interface field appearing in ForceSendFields will be 4775 // sent to the server regardless of whether the field is empty or not. 4776 // This may be used to include empty fields in Patch requests. 4777 ForceSendFields []string `json:"-"` 4778 4779 // NullFields is a list of field names (e.g. "Columns") to include in 4780 // API requests with the JSON null value. By default, fields with empty 4781 // values are omitted from API requests. However, any field with an 4782 // empty value appearing in NullFields will be sent to the server as 4783 // null. It is an error if a field in this list has a non-empty value. 4784 // This may be used to include null fields in Patch requests. 4785 NullFields []string `json:"-"` 4786} 4787 4788func (s *DataSourceSheetProperties) MarshalJSON() ([]byte, error) { 4789 type NoMethod DataSourceSheetProperties 4790 raw := NoMethod(*s) 4791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4792} 4793 4794// DataSourceSpec: This specifies the details of the data source. For 4795// example, for BigQuery, this specifies information about the BigQuery 4796// source. 4797type DataSourceSpec struct { 4798 // BigQuery: A BigQueryDataSourceSpec. 4799 BigQuery *BigQueryDataSourceSpec `json:"bigQuery,omitempty"` 4800 4801 // Parameters: The parameters of the data source, used when querying the 4802 // data source. 4803 Parameters []*DataSourceParameter `json:"parameters,omitempty"` 4804 4805 // ForceSendFields is a list of field names (e.g. "BigQuery") to 4806 // unconditionally include in API requests. By default, fields with 4807 // empty or default values are omitted from API requests. However, any 4808 // non-pointer, non-interface field appearing in ForceSendFields will be 4809 // sent to the server regardless of whether the field is empty or not. 4810 // This may be used to include empty fields in Patch requests. 4811 ForceSendFields []string `json:"-"` 4812 4813 // NullFields is a list of field names (e.g. "BigQuery") to include in 4814 // API requests with the JSON null value. By default, fields with empty 4815 // values are omitted from API requests. However, any field with an 4816 // empty value appearing in NullFields will be sent to the server as 4817 // null. It is an error if a field in this list has a non-empty value. 4818 // This may be used to include null fields in Patch requests. 4819 NullFields []string `json:"-"` 4820} 4821 4822func (s *DataSourceSpec) MarshalJSON() ([]byte, error) { 4823 type NoMethod DataSourceSpec 4824 raw := NoMethod(*s) 4825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4826} 4827 4828// DataSourceTable: A data source table, which allows the user to import 4829// a static table of data from the DataSource into Sheets. This is also 4830// known as "Extract" in the Sheets editor. 4831type DataSourceTable struct { 4832 // ColumnSelectionType: The type to select columns for the data source 4833 // table. Defaults to SELECTED. 4834 // 4835 // Possible values: 4836 // "DATA_SOURCE_TABLE_COLUMN_SELECTION_TYPE_UNSPECIFIED" - The default 4837 // column selection type, do not use. 4838 // "SELECTED" - Select columns specified by columns field. 4839 // "SYNC_ALL" - Sync all current and future columns in the data 4840 // source. If set, the data source table fetches all the columns in the 4841 // data source at the time of refresh. 4842 ColumnSelectionType string `json:"columnSelectionType,omitempty"` 4843 4844 // Columns: Columns selected for the data source table. The 4845 // column_selection_type must be SELECTED. 4846 Columns []*DataSourceColumnReference `json:"columns,omitempty"` 4847 4848 // DataExecutionStatus: Output only. The data execution status. 4849 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 4850 4851 // DataSourceId: The ID of the data source the data source table is 4852 // associated with. 4853 DataSourceId string `json:"dataSourceId,omitempty"` 4854 4855 // FilterSpecs: Filter specifications in the data source table. 4856 FilterSpecs []*FilterSpec `json:"filterSpecs,omitempty"` 4857 4858 // RowLimit: The limit of rows to return. If not set, a default limit is 4859 // applied. Please refer to the Sheets editor for the default and max 4860 // limit. 4861 RowLimit int64 `json:"rowLimit,omitempty"` 4862 4863 // SortSpecs: Sort specifications in the data source table. The result 4864 // of the data source table is sorted based on the sort specifications 4865 // in order. 4866 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 4867 4868 // ForceSendFields is a list of field names (e.g. "ColumnSelectionType") 4869 // to unconditionally include in API requests. By default, fields with 4870 // empty or default values are omitted from API requests. However, any 4871 // non-pointer, non-interface field appearing in ForceSendFields will be 4872 // sent to the server regardless of whether the field is empty or not. 4873 // This may be used to include empty fields in Patch requests. 4874 ForceSendFields []string `json:"-"` 4875 4876 // NullFields is a list of field names (e.g. "ColumnSelectionType") to 4877 // include in API requests with the JSON null value. By default, fields 4878 // with empty values are omitted from API requests. However, any field 4879 // with an empty value appearing in NullFields will be sent to the 4880 // server as null. It is an error if a field in this list has a 4881 // non-empty value. This may be used to include null fields in Patch 4882 // requests. 4883 NullFields []string `json:"-"` 4884} 4885 4886func (s *DataSourceTable) MarshalJSON() ([]byte, error) { 4887 type NoMethod DataSourceTable 4888 raw := NoMethod(*s) 4889 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4890} 4891 4892// DataValidationRule: A data validation rule. 4893type DataValidationRule struct { 4894 // Condition: The condition that data in the cell must match. 4895 Condition *BooleanCondition `json:"condition,omitempty"` 4896 4897 // InputMessage: A message to show the user when adding data to the 4898 // cell. 4899 InputMessage string `json:"inputMessage,omitempty"` 4900 4901 // ShowCustomUi: True if the UI should be customized based on the kind 4902 // of condition. If true, "List" conditions will show a dropdown. 4903 ShowCustomUi bool `json:"showCustomUi,omitempty"` 4904 4905 // Strict: True if invalid data should be rejected. 4906 Strict bool `json:"strict,omitempty"` 4907 4908 // ForceSendFields is a list of field names (e.g. "Condition") to 4909 // unconditionally include in API requests. By default, fields with 4910 // empty or default values are omitted from API requests. However, any 4911 // non-pointer, non-interface field appearing in ForceSendFields will be 4912 // sent to the server regardless of whether the field is empty or not. 4913 // This may be used to include empty fields in Patch requests. 4914 ForceSendFields []string `json:"-"` 4915 4916 // NullFields is a list of field names (e.g. "Condition") to include in 4917 // API requests with the JSON null value. By default, fields with empty 4918 // values are omitted from API requests. However, any field with an 4919 // empty value appearing in NullFields will be sent to the server as 4920 // null. It is an error if a field in this list has a non-empty value. 4921 // This may be used to include null fields in Patch requests. 4922 NullFields []string `json:"-"` 4923} 4924 4925func (s *DataValidationRule) MarshalJSON() ([]byte, error) { 4926 type NoMethod DataValidationRule 4927 raw := NoMethod(*s) 4928 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4929} 4930 4931// DateTimeRule: Allows you to organize the date-time values in a source 4932// data column into buckets based on selected parts of their date or 4933// time values. For example, consider a pivot table showing sales 4934// transactions by date: +----------+--------------+ | Date | SUM of 4935// Sales | +----------+--------------+ | 1/1/2017 | $621.14 | | 2/3/2017 4936// | $708.84 | | 5/8/2017 | $326.84 | ... +----------+--------------+ 4937// Applying a date-time group rule with a DateTimeRuleType of YEAR_MONTH 4938// results in the following pivot table. +--------------+--------------+ 4939// | Grouped Date | SUM of Sales | +--------------+--------------+ | 4940// 2017-Jan | $53,731.78 | | 2017-Feb | $83,475.32 | | 2017-Mar | 4941// $94,385.05 | ... +--------------+--------------+ 4942type DateTimeRule struct { 4943 // Type: The type of date-time grouping to apply. 4944 // 4945 // Possible values: 4946 // "DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not use. 4947 // "SECOND" - Group dates by second, from 0 to 59. 4948 // "MINUTE" - Group dates by minute, from 0 to 59. 4949 // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23. 4950 // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour 4951 // system, for example 19:45. 4952 // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour 4953 // system, for example 7:45 PM. The AM/PM designation is translated 4954 // based on the spreadsheet locale. 4955 // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The 4956 // days of the week will be translated based on the spreadsheet locale. 4957 // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note 4958 // that dates after Feb. 29 fall in different buckets in leap years than 4959 // in non-leap years. 4960 // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31. 4961 // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The 4962 // month is translated based on the spreadsheet locale. 4963 // "MONTH" - Group dates by month, for example Nov. The month is 4964 // translated based on the spreadsheet locale. 4965 // "QUARTER" - Group dates by quarter, for example Q1 (which 4966 // represents Jan-Mar). 4967 // "YEAR" - Group dates by year, for example 2008. 4968 // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov. 4969 // The month is translated based on the spreadsheet locale. 4970 // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008 4971 // Q4. 4972 // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example 4973 // 2008-11-22. 4974 Type string `json:"type,omitempty"` 4975 4976 // ForceSendFields is a list of field names (e.g. "Type") to 4977 // unconditionally include in API requests. By default, fields with 4978 // empty or default values are omitted from API requests. However, any 4979 // non-pointer, non-interface field appearing in ForceSendFields will be 4980 // sent to the server regardless of whether the field is empty or not. 4981 // This may be used to include empty fields in Patch requests. 4982 ForceSendFields []string `json:"-"` 4983 4984 // NullFields is a list of field names (e.g. "Type") to include in API 4985 // requests with the JSON null value. By default, fields with empty 4986 // values are omitted from API requests. However, any field with an 4987 // empty value appearing in NullFields will be sent to the server as 4988 // null. It is an error if a field in this list has a non-empty value. 4989 // This may be used to include null fields in Patch requests. 4990 NullFields []string `json:"-"` 4991} 4992 4993func (s *DateTimeRule) MarshalJSON() ([]byte, error) { 4994 type NoMethod DateTimeRule 4995 raw := NoMethod(*s) 4996 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 4997} 4998 4999// DeleteBandingRequest: Removes the banded range with the given ID from 5000// the spreadsheet. 5001type DeleteBandingRequest struct { 5002 // BandedRangeId: The ID of the banded range to delete. 5003 BandedRangeId int64 `json:"bandedRangeId,omitempty"` 5004 5005 // ForceSendFields is a list of field names (e.g. "BandedRangeId") to 5006 // unconditionally include in API requests. By default, fields with 5007 // empty or default values are omitted from API requests. However, any 5008 // non-pointer, non-interface field appearing in ForceSendFields will be 5009 // sent to the server regardless of whether the field is empty or not. 5010 // This may be used to include empty fields in Patch requests. 5011 ForceSendFields []string `json:"-"` 5012 5013 // NullFields is a list of field names (e.g. "BandedRangeId") to include 5014 // in API requests with the JSON null value. By default, fields with 5015 // empty values are omitted from API requests. However, any field with 5016 // an empty value appearing in NullFields will be sent to the server as 5017 // null. It is an error if a field in this list has a non-empty value. 5018 // This may be used to include null fields in Patch requests. 5019 NullFields []string `json:"-"` 5020} 5021 5022func (s *DeleteBandingRequest) MarshalJSON() ([]byte, error) { 5023 type NoMethod DeleteBandingRequest 5024 raw := NoMethod(*s) 5025 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5026} 5027 5028// DeleteConditionalFormatRuleRequest: Deletes a conditional format rule 5029// at the given index. All subsequent rules' indexes are decremented. 5030type DeleteConditionalFormatRuleRequest struct { 5031 // Index: The zero-based index of the rule to be deleted. 5032 Index int64 `json:"index,omitempty"` 5033 5034 // SheetId: The sheet the rule is being deleted from. 5035 SheetId int64 `json:"sheetId,omitempty"` 5036 5037 // ForceSendFields is a list of field names (e.g. "Index") to 5038 // unconditionally include in API requests. By default, fields with 5039 // empty or default values are omitted from API requests. However, any 5040 // non-pointer, non-interface field appearing in ForceSendFields will be 5041 // sent to the server regardless of whether the field is empty or not. 5042 // This may be used to include empty fields in Patch requests. 5043 ForceSendFields []string `json:"-"` 5044 5045 // NullFields is a list of field names (e.g. "Index") to include in API 5046 // requests with the JSON null value. By default, fields with empty 5047 // values are omitted from API requests. However, any field with an 5048 // empty value appearing in NullFields will be sent to the server as 5049 // null. It is an error if a field in this list has a non-empty value. 5050 // This may be used to include null fields in Patch requests. 5051 NullFields []string `json:"-"` 5052} 5053 5054func (s *DeleteConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 5055 type NoMethod DeleteConditionalFormatRuleRequest 5056 raw := NoMethod(*s) 5057 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5058} 5059 5060// DeleteConditionalFormatRuleResponse: The result of deleting a 5061// conditional format rule. 5062type DeleteConditionalFormatRuleResponse struct { 5063 // Rule: The rule that was deleted. 5064 Rule *ConditionalFormatRule `json:"rule,omitempty"` 5065 5066 // ForceSendFields is a list of field names (e.g. "Rule") to 5067 // unconditionally include in API requests. By default, fields with 5068 // empty or default values are omitted from API requests. However, any 5069 // non-pointer, non-interface field appearing in ForceSendFields will be 5070 // sent to the server regardless of whether the field is empty or not. 5071 // This may be used to include empty fields in Patch requests. 5072 ForceSendFields []string `json:"-"` 5073 5074 // NullFields is a list of field names (e.g. "Rule") to include in API 5075 // requests with the JSON null value. By default, fields with empty 5076 // values are omitted from API requests. However, any field with an 5077 // empty value appearing in NullFields will be sent to the server as 5078 // null. It is an error if a field in this list has a non-empty value. 5079 // This may be used to include null fields in Patch requests. 5080 NullFields []string `json:"-"` 5081} 5082 5083func (s *DeleteConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 5084 type NoMethod DeleteConditionalFormatRuleResponse 5085 raw := NoMethod(*s) 5086 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5087} 5088 5089// DeleteDataSourceRequest: Deletes a data source. The request also 5090// deletes the associated data source sheet, and unlinks all associated 5091// data source objects. 5092type DeleteDataSourceRequest struct { 5093 // DataSourceId: The ID of the data source to delete. 5094 DataSourceId string `json:"dataSourceId,omitempty"` 5095 5096 // ForceSendFields is a list of field names (e.g. "DataSourceId") to 5097 // unconditionally include in API requests. By default, fields with 5098 // empty or default values are omitted from API requests. However, any 5099 // non-pointer, non-interface field appearing in ForceSendFields will be 5100 // sent to the server regardless of whether the field is empty or not. 5101 // This may be used to include empty fields in Patch requests. 5102 ForceSendFields []string `json:"-"` 5103 5104 // NullFields is a list of field names (e.g. "DataSourceId") to include 5105 // in API requests with the JSON null value. By default, fields with 5106 // empty values are omitted from API requests. However, any field with 5107 // an empty value appearing in NullFields will be sent to the server as 5108 // null. It is an error if a field in this list has a non-empty value. 5109 // This may be used to include null fields in Patch requests. 5110 NullFields []string `json:"-"` 5111} 5112 5113func (s *DeleteDataSourceRequest) MarshalJSON() ([]byte, error) { 5114 type NoMethod DeleteDataSourceRequest 5115 raw := NoMethod(*s) 5116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5117} 5118 5119// DeleteDeveloperMetadataRequest: A request to delete developer 5120// metadata. 5121type DeleteDeveloperMetadataRequest struct { 5122 // DataFilter: The data filter describing the criteria used to select 5123 // which developer metadata entry to delete. 5124 DataFilter *DataFilter `json:"dataFilter,omitempty"` 5125 5126 // ForceSendFields is a list of field names (e.g. "DataFilter") to 5127 // unconditionally include in API requests. By default, fields with 5128 // empty or default values are omitted from API requests. However, any 5129 // non-pointer, non-interface field appearing in ForceSendFields will be 5130 // sent to the server regardless of whether the field is empty or not. 5131 // This may be used to include empty fields in Patch requests. 5132 ForceSendFields []string `json:"-"` 5133 5134 // NullFields is a list of field names (e.g. "DataFilter") to include in 5135 // API requests with the JSON null value. By default, fields with empty 5136 // values are omitted from API requests. However, any field with an 5137 // empty value appearing in NullFields will be sent to the server as 5138 // null. It is an error if a field in this list has a non-empty value. 5139 // This may be used to include null fields in Patch requests. 5140 NullFields []string `json:"-"` 5141} 5142 5143func (s *DeleteDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 5144 type NoMethod DeleteDeveloperMetadataRequest 5145 raw := NoMethod(*s) 5146 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5147} 5148 5149// DeleteDeveloperMetadataResponse: The response from deleting developer 5150// metadata. 5151type DeleteDeveloperMetadataResponse struct { 5152 // DeletedDeveloperMetadata: The metadata that was deleted. 5153 DeletedDeveloperMetadata []*DeveloperMetadata `json:"deletedDeveloperMetadata,omitempty"` 5154 5155 // ForceSendFields is a list of field names (e.g. 5156 // "DeletedDeveloperMetadata") to unconditionally include in API 5157 // requests. By default, fields with empty or default values are omitted 5158 // from API requests. However, any non-pointer, non-interface field 5159 // appearing in ForceSendFields will be sent to the server regardless of 5160 // whether the field is empty or not. This may be used to include empty 5161 // fields in Patch requests. 5162 ForceSendFields []string `json:"-"` 5163 5164 // NullFields is a list of field names (e.g. "DeletedDeveloperMetadata") 5165 // to include in API requests with the JSON null value. By default, 5166 // fields with empty values are omitted from API requests. However, any 5167 // field with an empty value appearing in NullFields will be sent to the 5168 // server as null. It is an error if a field in this list has a 5169 // non-empty value. This may be used to include null fields in Patch 5170 // requests. 5171 NullFields []string `json:"-"` 5172} 5173 5174func (s *DeleteDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 5175 type NoMethod DeleteDeveloperMetadataResponse 5176 raw := NoMethod(*s) 5177 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5178} 5179 5180// DeleteDimensionGroupRequest: Deletes a group over the specified range 5181// by decrementing the depth of the dimensions in the range. For 5182// example, assume the sheet has a depth-1 group over B:E and a depth-2 5183// group over C:D. Deleting a group over D:E leaves the sheet with a 5184// depth-1 group over B:D and a depth-2 group over C:C. 5185type DeleteDimensionGroupRequest struct { 5186 // Range: The range of the group to be deleted. 5187 Range *DimensionRange `json:"range,omitempty"` 5188 5189 // ForceSendFields is a list of field names (e.g. "Range") to 5190 // unconditionally include in API requests. By default, fields with 5191 // empty or default values are omitted from API requests. However, any 5192 // non-pointer, non-interface field appearing in ForceSendFields will be 5193 // sent to the server regardless of whether the field is empty or not. 5194 // This may be used to include empty fields in Patch requests. 5195 ForceSendFields []string `json:"-"` 5196 5197 // NullFields is a list of field names (e.g. "Range") to include in API 5198 // requests with the JSON null value. By default, fields with empty 5199 // values are omitted from API requests. However, any field with an 5200 // empty value appearing in NullFields will be sent to the server as 5201 // null. It is an error if a field in this list has a non-empty value. 5202 // This may be used to include null fields in Patch requests. 5203 NullFields []string `json:"-"` 5204} 5205 5206func (s *DeleteDimensionGroupRequest) MarshalJSON() ([]byte, error) { 5207 type NoMethod DeleteDimensionGroupRequest 5208 raw := NoMethod(*s) 5209 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5210} 5211 5212// DeleteDimensionGroupResponse: The result of deleting a group. 5213type DeleteDimensionGroupResponse struct { 5214 // DimensionGroups: All groups of a dimension after deleting a group 5215 // from that dimension. 5216 DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"` 5217 5218 // ForceSendFields is a list of field names (e.g. "DimensionGroups") to 5219 // unconditionally include in API requests. By default, fields with 5220 // empty or default values are omitted from API requests. However, any 5221 // non-pointer, non-interface field appearing in ForceSendFields will be 5222 // sent to the server regardless of whether the field is empty or not. 5223 // This may be used to include empty fields in Patch requests. 5224 ForceSendFields []string `json:"-"` 5225 5226 // NullFields is a list of field names (e.g. "DimensionGroups") to 5227 // include in API requests with the JSON null value. By default, fields 5228 // with empty values are omitted from API requests. However, any field 5229 // with an empty value appearing in NullFields will be sent to the 5230 // server as null. It is an error if a field in this list has a 5231 // non-empty value. This may be used to include null fields in Patch 5232 // requests. 5233 NullFields []string `json:"-"` 5234} 5235 5236func (s *DeleteDimensionGroupResponse) MarshalJSON() ([]byte, error) { 5237 type NoMethod DeleteDimensionGroupResponse 5238 raw := NoMethod(*s) 5239 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5240} 5241 5242// DeleteDimensionRequest: Deletes the dimensions from the sheet. 5243type DeleteDimensionRequest struct { 5244 // Range: The dimensions to delete from the sheet. 5245 Range *DimensionRange `json:"range,omitempty"` 5246 5247 // ForceSendFields is a list of field names (e.g. "Range") to 5248 // unconditionally include in API requests. By default, fields with 5249 // empty or default values are omitted from API requests. However, any 5250 // non-pointer, non-interface field appearing in ForceSendFields will be 5251 // sent to the server regardless of whether the field is empty or not. 5252 // This may be used to include empty fields in Patch requests. 5253 ForceSendFields []string `json:"-"` 5254 5255 // NullFields is a list of field names (e.g. "Range") to include in API 5256 // requests with the JSON null value. By default, fields with empty 5257 // values are omitted from API requests. However, any field with an 5258 // empty value appearing in NullFields will be sent to the server as 5259 // null. It is an error if a field in this list has a non-empty value. 5260 // This may be used to include null fields in Patch requests. 5261 NullFields []string `json:"-"` 5262} 5263 5264func (s *DeleteDimensionRequest) MarshalJSON() ([]byte, error) { 5265 type NoMethod DeleteDimensionRequest 5266 raw := NoMethod(*s) 5267 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5268} 5269 5270// DeleteDuplicatesRequest: Removes rows within this range that contain 5271// values in the specified columns that are duplicates of values in any 5272// previous row. Rows with identical values but different letter cases, 5273// formatting, or formulas are considered to be duplicates. This request 5274// also removes duplicate rows hidden from view (for example, due to a 5275// filter). When removing duplicates, the first instance of each 5276// duplicate row scanning from the top downwards is kept in the 5277// resulting range. Content outside of the specified range isn't 5278// removed, and rows considered duplicates do not have to be adjacent to 5279// each other in the range. 5280type DeleteDuplicatesRequest struct { 5281 // ComparisonColumns: The columns in the range to analyze for duplicate 5282 // values. If no columns are selected then all columns are analyzed for 5283 // duplicates. 5284 ComparisonColumns []*DimensionRange `json:"comparisonColumns,omitempty"` 5285 5286 // Range: The range to remove duplicates rows from. 5287 Range *GridRange `json:"range,omitempty"` 5288 5289 // ForceSendFields is a list of field names (e.g. "ComparisonColumns") 5290 // to unconditionally include in API requests. By default, fields with 5291 // empty or default values are omitted from API requests. However, any 5292 // non-pointer, non-interface field appearing in ForceSendFields will be 5293 // sent to the server regardless of whether the field is empty or not. 5294 // This may be used to include empty fields in Patch requests. 5295 ForceSendFields []string `json:"-"` 5296 5297 // NullFields is a list of field names (e.g. "ComparisonColumns") to 5298 // include in API requests with the JSON null value. By default, fields 5299 // with empty values are omitted from API requests. However, any field 5300 // with an empty value appearing in NullFields will be sent to the 5301 // server as null. It is an error if a field in this list has a 5302 // non-empty value. This may be used to include null fields in Patch 5303 // requests. 5304 NullFields []string `json:"-"` 5305} 5306 5307func (s *DeleteDuplicatesRequest) MarshalJSON() ([]byte, error) { 5308 type NoMethod DeleteDuplicatesRequest 5309 raw := NoMethod(*s) 5310 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5311} 5312 5313// DeleteDuplicatesResponse: The result of removing duplicates in a 5314// range. 5315type DeleteDuplicatesResponse struct { 5316 // DuplicatesRemovedCount: The number of duplicate rows removed. 5317 DuplicatesRemovedCount int64 `json:"duplicatesRemovedCount,omitempty"` 5318 5319 // ForceSendFields is a list of field names (e.g. 5320 // "DuplicatesRemovedCount") to unconditionally include in API requests. 5321 // By default, fields with empty or default values are omitted from API 5322 // requests. However, any non-pointer, non-interface field appearing in 5323 // ForceSendFields will be sent to the server regardless of whether the 5324 // field is empty or not. This may be used to include empty fields in 5325 // Patch requests. 5326 ForceSendFields []string `json:"-"` 5327 5328 // NullFields is a list of field names (e.g. "DuplicatesRemovedCount") 5329 // to include in API requests with the JSON null value. By default, 5330 // fields with empty values are omitted from API requests. However, any 5331 // field with an empty value appearing in NullFields will be sent to the 5332 // server as null. It is an error if a field in this list has a 5333 // non-empty value. This may be used to include null fields in Patch 5334 // requests. 5335 NullFields []string `json:"-"` 5336} 5337 5338func (s *DeleteDuplicatesResponse) MarshalJSON() ([]byte, error) { 5339 type NoMethod DeleteDuplicatesResponse 5340 raw := NoMethod(*s) 5341 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5342} 5343 5344// DeleteEmbeddedObjectRequest: Deletes the embedded object with the 5345// given ID. 5346type DeleteEmbeddedObjectRequest struct { 5347 // ObjectId: The ID of the embedded object to delete. 5348 ObjectId int64 `json:"objectId,omitempty"` 5349 5350 // ForceSendFields is a list of field names (e.g. "ObjectId") to 5351 // unconditionally include in API requests. By default, fields with 5352 // empty or default values are omitted from API requests. However, any 5353 // non-pointer, non-interface field appearing in ForceSendFields will be 5354 // sent to the server regardless of whether the field is empty or not. 5355 // This may be used to include empty fields in Patch requests. 5356 ForceSendFields []string `json:"-"` 5357 5358 // NullFields is a list of field names (e.g. "ObjectId") to include in 5359 // API requests with the JSON null value. By default, fields with empty 5360 // values are omitted from API requests. However, any field with an 5361 // empty value appearing in NullFields will be sent to the server as 5362 // null. It is an error if a field in this list has a non-empty value. 5363 // This may be used to include null fields in Patch requests. 5364 NullFields []string `json:"-"` 5365} 5366 5367func (s *DeleteEmbeddedObjectRequest) MarshalJSON() ([]byte, error) { 5368 type NoMethod DeleteEmbeddedObjectRequest 5369 raw := NoMethod(*s) 5370 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5371} 5372 5373// DeleteFilterViewRequest: Deletes a particular filter view. 5374type DeleteFilterViewRequest struct { 5375 // FilterId: The ID of the filter to delete. 5376 FilterId int64 `json:"filterId,omitempty"` 5377 5378 // ForceSendFields is a list of field names (e.g. "FilterId") to 5379 // unconditionally include in API requests. By default, fields with 5380 // empty or default values are omitted from API requests. However, any 5381 // non-pointer, non-interface field appearing in ForceSendFields will be 5382 // sent to the server regardless of whether the field is empty or not. 5383 // This may be used to include empty fields in Patch requests. 5384 ForceSendFields []string `json:"-"` 5385 5386 // NullFields is a list of field names (e.g. "FilterId") to include in 5387 // API requests with the JSON null value. By default, fields with empty 5388 // values are omitted from API requests. However, any field with an 5389 // empty value appearing in NullFields will be sent to the server as 5390 // null. It is an error if a field in this list has a non-empty value. 5391 // This may be used to include null fields in Patch requests. 5392 NullFields []string `json:"-"` 5393} 5394 5395func (s *DeleteFilterViewRequest) MarshalJSON() ([]byte, error) { 5396 type NoMethod DeleteFilterViewRequest 5397 raw := NoMethod(*s) 5398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5399} 5400 5401// DeleteNamedRangeRequest: Removes the named range with the given ID 5402// from the spreadsheet. 5403type DeleteNamedRangeRequest struct { 5404 // NamedRangeId: The ID of the named range to delete. 5405 NamedRangeId string `json:"namedRangeId,omitempty"` 5406 5407 // ForceSendFields is a list of field names (e.g. "NamedRangeId") to 5408 // unconditionally include in API requests. By default, fields with 5409 // empty or default values are omitted from API requests. However, any 5410 // non-pointer, non-interface field appearing in ForceSendFields will be 5411 // sent to the server regardless of whether the field is empty or not. 5412 // This may be used to include empty fields in Patch requests. 5413 ForceSendFields []string `json:"-"` 5414 5415 // NullFields is a list of field names (e.g. "NamedRangeId") to include 5416 // in API requests with the JSON null value. By default, fields with 5417 // empty values are omitted from API requests. However, any field with 5418 // an empty value appearing in NullFields will be sent to the server as 5419 // null. It is an error if a field in this list has a non-empty value. 5420 // This may be used to include null fields in Patch requests. 5421 NullFields []string `json:"-"` 5422} 5423 5424func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) { 5425 type NoMethod DeleteNamedRangeRequest 5426 raw := NoMethod(*s) 5427 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5428} 5429 5430// DeleteProtectedRangeRequest: Deletes the protected range with the 5431// given ID. 5432type DeleteProtectedRangeRequest struct { 5433 // ProtectedRangeId: The ID of the protected range to delete. 5434 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 5435 5436 // ForceSendFields is a list of field names (e.g. "ProtectedRangeId") to 5437 // unconditionally include in API requests. By default, fields with 5438 // empty or default values are omitted from API requests. However, any 5439 // non-pointer, non-interface field appearing in ForceSendFields will be 5440 // sent to the server regardless of whether the field is empty or not. 5441 // This may be used to include empty fields in Patch requests. 5442 ForceSendFields []string `json:"-"` 5443 5444 // NullFields is a list of field names (e.g. "ProtectedRangeId") to 5445 // include in API requests with the JSON null value. By default, fields 5446 // with empty values are omitted from API requests. However, any field 5447 // with an empty value appearing in NullFields will be sent to the 5448 // server as null. It is an error if a field in this list has a 5449 // non-empty value. This may be used to include null fields in Patch 5450 // requests. 5451 NullFields []string `json:"-"` 5452} 5453 5454func (s *DeleteProtectedRangeRequest) MarshalJSON() ([]byte, error) { 5455 type NoMethod DeleteProtectedRangeRequest 5456 raw := NoMethod(*s) 5457 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5458} 5459 5460// DeleteRangeRequest: Deletes a range of cells, shifting other cells 5461// into the deleted area. 5462type DeleteRangeRequest struct { 5463 // Range: The range of cells to delete. 5464 Range *GridRange `json:"range,omitempty"` 5465 5466 // ShiftDimension: The dimension from which deleted cells will be 5467 // replaced with. If ROWS, existing cells will be shifted upward to 5468 // replace the deleted cells. If COLUMNS, existing cells will be shifted 5469 // left to replace the deleted cells. 5470 // 5471 // Possible values: 5472 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 5473 // "ROWS" - Operates on the rows of a sheet. 5474 // "COLUMNS" - Operates on the columns of a sheet. 5475 ShiftDimension string `json:"shiftDimension,omitempty"` 5476 5477 // ForceSendFields is a list of field names (e.g. "Range") to 5478 // unconditionally include in API requests. By default, fields with 5479 // empty or default values are omitted from API requests. However, any 5480 // non-pointer, non-interface field appearing in ForceSendFields will be 5481 // sent to the server regardless of whether the field is empty or not. 5482 // This may be used to include empty fields in Patch requests. 5483 ForceSendFields []string `json:"-"` 5484 5485 // NullFields is a list of field names (e.g. "Range") to include in API 5486 // requests with the JSON null value. By default, fields with empty 5487 // values are omitted from API requests. However, any field with an 5488 // empty value appearing in NullFields will be sent to the server as 5489 // null. It is an error if a field in this list has a non-empty value. 5490 // This may be used to include null fields in Patch requests. 5491 NullFields []string `json:"-"` 5492} 5493 5494func (s *DeleteRangeRequest) MarshalJSON() ([]byte, error) { 5495 type NoMethod DeleteRangeRequest 5496 raw := NoMethod(*s) 5497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5498} 5499 5500// DeleteSheetRequest: Deletes the requested sheet. 5501type DeleteSheetRequest struct { 5502 // SheetId: The ID of the sheet to delete. If the sheet is of 5503 // DATA_SOURCE type, the associated DataSource is also deleted. 5504 SheetId int64 `json:"sheetId,omitempty"` 5505 5506 // ForceSendFields is a list of field names (e.g. "SheetId") to 5507 // unconditionally include in API requests. By default, fields with 5508 // empty or default values are omitted from API requests. However, any 5509 // non-pointer, non-interface field appearing in ForceSendFields will be 5510 // sent to the server regardless of whether the field is empty or not. 5511 // This may be used to include empty fields in Patch requests. 5512 ForceSendFields []string `json:"-"` 5513 5514 // NullFields is a list of field names (e.g. "SheetId") to include in 5515 // API requests with the JSON null value. By default, fields with empty 5516 // values are omitted from API requests. However, any field with an 5517 // empty value appearing in NullFields will be sent to the server as 5518 // null. It is an error if a field in this list has a non-empty value. 5519 // This may be used to include null fields in Patch requests. 5520 NullFields []string `json:"-"` 5521} 5522 5523func (s *DeleteSheetRequest) MarshalJSON() ([]byte, error) { 5524 type NoMethod DeleteSheetRequest 5525 raw := NoMethod(*s) 5526 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5527} 5528 5529// DeveloperMetadata: Developer metadata associated with a location or 5530// object in a spreadsheet. Developer metadata may be used to associate 5531// arbitrary data with various parts of a spreadsheet and will remain 5532// associated at those locations as they move around and the spreadsheet 5533// is edited. For example, if developer metadata is associated with row 5534// 5 and another row is then subsequently inserted above row 5, that 5535// original metadata will still be associated with the row it was first 5536// associated with (what is now row 6). If the associated object is 5537// deleted its metadata is deleted too. 5538type DeveloperMetadata struct { 5539 // Location: The location where the metadata is associated. 5540 Location *DeveloperMetadataLocation `json:"location,omitempty"` 5541 5542 // MetadataId: The spreadsheet-scoped unique ID that identifies the 5543 // metadata. IDs may be specified when metadata is created, otherwise 5544 // one will be randomly generated and assigned. Must be positive. 5545 MetadataId int64 `json:"metadataId,omitempty"` 5546 5547 // MetadataKey: The metadata key. There may be multiple metadata in a 5548 // spreadsheet with the same key. Developer metadata must always have a 5549 // key specified. 5550 MetadataKey string `json:"metadataKey,omitempty"` 5551 5552 // MetadataValue: Data associated with the metadata's key. 5553 MetadataValue string `json:"metadataValue,omitempty"` 5554 5555 // Visibility: The metadata visibility. Developer metadata must always 5556 // have a visibility specified. 5557 // 5558 // Possible values: 5559 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 5560 // "DOCUMENT" - Document-visible metadata is accessible from any 5561 // developer project with access to the document. 5562 // "PROJECT" - Project-visible metadata is only visible to and 5563 // accessible by the developer project that created the metadata. 5564 Visibility string `json:"visibility,omitempty"` 5565 5566 // ServerResponse contains the HTTP response code and headers from the 5567 // server. 5568 googleapi.ServerResponse `json:"-"` 5569 5570 // ForceSendFields is a list of field names (e.g. "Location") to 5571 // unconditionally include in API requests. By default, fields with 5572 // empty or default values are omitted from API requests. However, any 5573 // non-pointer, non-interface field appearing in ForceSendFields will be 5574 // sent to the server regardless of whether the field is empty or not. 5575 // This may be used to include empty fields in Patch requests. 5576 ForceSendFields []string `json:"-"` 5577 5578 // NullFields is a list of field names (e.g. "Location") to include in 5579 // API requests with the JSON null value. By default, fields with empty 5580 // values are omitted from API requests. However, any field with an 5581 // empty value appearing in NullFields will be sent to the server as 5582 // null. It is an error if a field in this list has a non-empty value. 5583 // This may be used to include null fields in Patch requests. 5584 NullFields []string `json:"-"` 5585} 5586 5587func (s *DeveloperMetadata) MarshalJSON() ([]byte, error) { 5588 type NoMethod DeveloperMetadata 5589 raw := NoMethod(*s) 5590 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5591} 5592 5593// DeveloperMetadataLocation: A location where metadata may be 5594// associated in a spreadsheet. 5595type DeveloperMetadataLocation struct { 5596 // DimensionRange: Represents the row or column when metadata is 5597 // associated with a dimension. The specified DimensionRange must 5598 // represent a single row or column; it cannot be unbounded or span 5599 // multiple rows or columns. 5600 DimensionRange *DimensionRange `json:"dimensionRange,omitempty"` 5601 5602 // LocationType: The type of location this object represents. This field 5603 // is read-only. 5604 // 5605 // Possible values: 5606 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 5607 // "ROW" - Developer metadata associated on an entire row dimension. 5608 // "COLUMN" - Developer metadata associated on an entire column 5609 // dimension. 5610 // "SHEET" - Developer metadata associated on an entire sheet. 5611 // "SPREADSHEET" - Developer metadata associated on the entire 5612 // spreadsheet. 5613 LocationType string `json:"locationType,omitempty"` 5614 5615 // SheetId: The ID of the sheet when metadata is associated with an 5616 // entire sheet. 5617 SheetId int64 `json:"sheetId,omitempty"` 5618 5619 // Spreadsheet: True when metadata is associated with an entire 5620 // spreadsheet. 5621 Spreadsheet bool `json:"spreadsheet,omitempty"` 5622 5623 // ForceSendFields is a list of field names (e.g. "DimensionRange") to 5624 // unconditionally include in API requests. By default, fields with 5625 // empty or default values are omitted from API requests. However, any 5626 // non-pointer, non-interface field appearing in ForceSendFields will be 5627 // sent to the server regardless of whether the field is empty or not. 5628 // This may be used to include empty fields in Patch requests. 5629 ForceSendFields []string `json:"-"` 5630 5631 // NullFields is a list of field names (e.g. "DimensionRange") to 5632 // include in API requests with the JSON null value. By default, fields 5633 // with empty values are omitted from API requests. However, any field 5634 // with an empty value appearing in NullFields will be sent to the 5635 // server as null. It is an error if a field in this list has a 5636 // non-empty value. This may be used to include null fields in Patch 5637 // requests. 5638 NullFields []string `json:"-"` 5639} 5640 5641func (s *DeveloperMetadataLocation) MarshalJSON() ([]byte, error) { 5642 type NoMethod DeveloperMetadataLocation 5643 raw := NoMethod(*s) 5644 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5645} 5646 5647// DeveloperMetadataLookup: Selects DeveloperMetadata that matches all 5648// of the specified fields. For example, if only a metadata ID is 5649// specified this considers the DeveloperMetadata with that particular 5650// unique ID. If a metadata key is specified, this considers all 5651// developer metadata with that key. If a key, visibility, and location 5652// type are all specified, this considers all developer metadata with 5653// that key and visibility that are associated with a location of that 5654// type. In general, this selects all DeveloperMetadata that matches the 5655// intersection of all the specified fields; any field or combination of 5656// fields may be specified. 5657type DeveloperMetadataLookup struct { 5658 // LocationMatchingStrategy: Determines how this lookup matches the 5659 // location. If this field is specified as EXACT, only developer 5660 // metadata associated on the exact location specified is matched. If 5661 // this field is specified to INTERSECTING, developer metadata 5662 // associated on intersecting locations is also matched. If left 5663 // unspecified, this field assumes a default value of INTERSECTING. If 5664 // this field is specified, a metadataLocation must also be specified. 5665 // 5666 // Possible values: 5667 // "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" - 5668 // Default value. This value must not be used. 5669 // "EXACT_LOCATION" - Indicates that a specified location should be 5670 // matched exactly. For example, if row three were specified as a 5671 // location this matching strategy would only match developer metadata 5672 // also associated on row three. Metadata associated on other locations 5673 // would not be considered. 5674 // "INTERSECTING_LOCATION" - Indicates that a specified location 5675 // should match that exact location as well as any intersecting 5676 // locations. For example, if row three were specified as a location 5677 // this matching strategy would match developer metadata associated on 5678 // row three as well as metadata associated on locations that intersect 5679 // row three. If, for instance, there was developer metadata associated 5680 // on column B, this matching strategy would also match that location 5681 // because column B intersects row three. 5682 LocationMatchingStrategy string `json:"locationMatchingStrategy,omitempty"` 5683 5684 // LocationType: Limits the selected developer metadata to those entries 5685 // which are associated with locations of the specified type. For 5686 // example, when this field is specified as ROW this lookup only 5687 // considers developer metadata associated on rows. If the field is left 5688 // unspecified, all location types are considered. This field cannot be 5689 // specified as SPREADSHEET when the locationMatchingStrategy is 5690 // specified as INTERSECTING or when the metadataLocation is specified 5691 // as a non-spreadsheet location: spreadsheet metadata cannot intersect 5692 // any other developer metadata location. This field also must be left 5693 // unspecified when the locationMatchingStrategy is specified as EXACT. 5694 // 5695 // Possible values: 5696 // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value. 5697 // "ROW" - Developer metadata associated on an entire row dimension. 5698 // "COLUMN" - Developer metadata associated on an entire column 5699 // dimension. 5700 // "SHEET" - Developer metadata associated on an entire sheet. 5701 // "SPREADSHEET" - Developer metadata associated on the entire 5702 // spreadsheet. 5703 LocationType string `json:"locationType,omitempty"` 5704 5705 // MetadataId: Limits the selected developer metadata to that which has 5706 // a matching DeveloperMetadata.metadata_id. 5707 MetadataId int64 `json:"metadataId,omitempty"` 5708 5709 // MetadataKey: Limits the selected developer metadata to that which has 5710 // a matching DeveloperMetadata.metadata_key. 5711 MetadataKey string `json:"metadataKey,omitempty"` 5712 5713 // MetadataLocation: Limits the selected developer metadata to those 5714 // entries associated with the specified location. This field either 5715 // matches exact locations or all intersecting locations according the 5716 // specified locationMatchingStrategy. 5717 MetadataLocation *DeveloperMetadataLocation `json:"metadataLocation,omitempty"` 5718 5719 // MetadataValue: Limits the selected developer metadata to that which 5720 // has a matching DeveloperMetadata.metadata_value. 5721 MetadataValue string `json:"metadataValue,omitempty"` 5722 5723 // Visibility: Limits the selected developer metadata to that which has 5724 // a matching DeveloperMetadata.visibility. If left unspecified, all 5725 // developer metadata visibile to the requesting project is considered. 5726 // 5727 // Possible values: 5728 // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value. 5729 // "DOCUMENT" - Document-visible metadata is accessible from any 5730 // developer project with access to the document. 5731 // "PROJECT" - Project-visible metadata is only visible to and 5732 // accessible by the developer project that created the metadata. 5733 Visibility string `json:"visibility,omitempty"` 5734 5735 // ForceSendFields is a list of field names (e.g. 5736 // "LocationMatchingStrategy") to unconditionally include in API 5737 // requests. By default, fields with empty or default values are omitted 5738 // from API requests. However, any non-pointer, non-interface field 5739 // appearing in ForceSendFields will be sent to the server regardless of 5740 // whether the field is empty or not. This may be used to include empty 5741 // fields in Patch requests. 5742 ForceSendFields []string `json:"-"` 5743 5744 // NullFields is a list of field names (e.g. "LocationMatchingStrategy") 5745 // to include in API requests with the JSON null value. By default, 5746 // fields with empty values are omitted from API requests. However, any 5747 // field with an empty value appearing in NullFields will be sent to the 5748 // server as null. It is an error if a field in this list has a 5749 // non-empty value. This may be used to include null fields in Patch 5750 // requests. 5751 NullFields []string `json:"-"` 5752} 5753 5754func (s *DeveloperMetadataLookup) MarshalJSON() ([]byte, error) { 5755 type NoMethod DeveloperMetadataLookup 5756 raw := NoMethod(*s) 5757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5758} 5759 5760// DimensionGroup: A group over an interval of rows or columns on a 5761// sheet, which can contain or be contained within other groups. A group 5762// can be collapsed or expanded as a unit on the sheet. 5763type DimensionGroup struct { 5764 // Collapsed: This field is true if this group is collapsed. A collapsed 5765 // group remains collapsed if an overlapping group at a shallower depth 5766 // is expanded. A true value does not imply that all dimensions within 5767 // the group are hidden, since a dimension's visibility can change 5768 // independently from this group property. However, when this property 5769 // is updated, all dimensions within it are set to hidden if this field 5770 // is true, or set to visible if this field is false. 5771 Collapsed bool `json:"collapsed,omitempty"` 5772 5773 // Depth: The depth of the group, representing how many groups have a 5774 // range that wholly contains the range of this group. 5775 Depth int64 `json:"depth,omitempty"` 5776 5777 // Range: The range over which this group exists. 5778 Range *DimensionRange `json:"range,omitempty"` 5779 5780 // ForceSendFields is a list of field names (e.g. "Collapsed") to 5781 // unconditionally include in API requests. By default, fields with 5782 // empty or default values are omitted from API requests. However, any 5783 // non-pointer, non-interface field appearing in ForceSendFields will be 5784 // sent to the server regardless of whether the field is empty or not. 5785 // This may be used to include empty fields in Patch requests. 5786 ForceSendFields []string `json:"-"` 5787 5788 // NullFields is a list of field names (e.g. "Collapsed") to include in 5789 // API requests with the JSON null value. By default, fields with empty 5790 // values are omitted from API requests. However, any field with an 5791 // empty value appearing in NullFields will be sent to the server as 5792 // null. It is an error if a field in this list has a non-empty value. 5793 // This may be used to include null fields in Patch requests. 5794 NullFields []string `json:"-"` 5795} 5796 5797func (s *DimensionGroup) MarshalJSON() ([]byte, error) { 5798 type NoMethod DimensionGroup 5799 raw := NoMethod(*s) 5800 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5801} 5802 5803// DimensionProperties: Properties about a dimension. 5804type DimensionProperties struct { 5805 // DataSourceColumnReference: Output only. If set, this is a column in a 5806 // data source sheet. 5807 DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` 5808 5809 // DeveloperMetadata: The developer metadata associated with a single 5810 // row or column. 5811 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 5812 5813 // HiddenByFilter: True if this dimension is being filtered. This field 5814 // is read-only. 5815 HiddenByFilter bool `json:"hiddenByFilter,omitempty"` 5816 5817 // HiddenByUser: True if this dimension is explicitly hidden. 5818 HiddenByUser bool `json:"hiddenByUser,omitempty"` 5819 5820 // PixelSize: The height (if a row) or width (if a column) of the 5821 // dimension in pixels. 5822 PixelSize int64 `json:"pixelSize,omitempty"` 5823 5824 // ForceSendFields is a list of field names (e.g. 5825 // "DataSourceColumnReference") to unconditionally include in API 5826 // requests. By default, fields with empty or default values are omitted 5827 // from API requests. However, any non-pointer, non-interface field 5828 // appearing in ForceSendFields will be sent to the server regardless of 5829 // whether the field is empty or not. This may be used to include empty 5830 // fields in Patch requests. 5831 ForceSendFields []string `json:"-"` 5832 5833 // NullFields is a list of field names (e.g. 5834 // "DataSourceColumnReference") to include in API requests with the JSON 5835 // null value. By default, fields with empty values are omitted from API 5836 // requests. However, any field with an empty value appearing in 5837 // NullFields will be sent to the server as null. It is an error if a 5838 // field in this list has a non-empty value. This may be used to include 5839 // null fields in Patch requests. 5840 NullFields []string `json:"-"` 5841} 5842 5843func (s *DimensionProperties) MarshalJSON() ([]byte, error) { 5844 type NoMethod DimensionProperties 5845 raw := NoMethod(*s) 5846 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5847} 5848 5849// DimensionRange: A range along a single dimension on a sheet. All 5850// indexes are zero-based. Indexes are half open: the start index is 5851// inclusive and the end index is exclusive. Missing indexes indicate 5852// the range is unbounded on that side. 5853type DimensionRange struct { 5854 // Dimension: The dimension of the span. 5855 // 5856 // Possible values: 5857 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 5858 // "ROWS" - Operates on the rows of a sheet. 5859 // "COLUMNS" - Operates on the columns of a sheet. 5860 Dimension string `json:"dimension,omitempty"` 5861 5862 // EndIndex: The end (exclusive) of the span, or not set if unbounded. 5863 EndIndex int64 `json:"endIndex,omitempty"` 5864 5865 // SheetId: The sheet this span is on. 5866 SheetId int64 `json:"sheetId,omitempty"` 5867 5868 // StartIndex: The start (inclusive) of the span, or not set if 5869 // unbounded. 5870 StartIndex int64 `json:"startIndex,omitempty"` 5871 5872 // ForceSendFields is a list of field names (e.g. "Dimension") to 5873 // unconditionally include in API requests. By default, fields with 5874 // empty or default values are omitted from API requests. However, any 5875 // non-pointer, non-interface field appearing in ForceSendFields will be 5876 // sent to the server regardless of whether the field is empty or not. 5877 // This may be used to include empty fields in Patch requests. 5878 ForceSendFields []string `json:"-"` 5879 5880 // NullFields is a list of field names (e.g. "Dimension") to include in 5881 // API requests with the JSON null value. By default, fields with empty 5882 // values are omitted from API requests. However, any field with an 5883 // empty value appearing in NullFields will be sent to the server as 5884 // null. It is an error if a field in this list has a non-empty value. 5885 // This may be used to include null fields in Patch requests. 5886 NullFields []string `json:"-"` 5887} 5888 5889func (s *DimensionRange) MarshalJSON() ([]byte, error) { 5890 type NoMethod DimensionRange 5891 raw := NoMethod(*s) 5892 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5893} 5894 5895// DuplicateFilterViewRequest: Duplicates a particular filter view. 5896type DuplicateFilterViewRequest struct { 5897 // FilterId: The ID of the filter being duplicated. 5898 FilterId int64 `json:"filterId,omitempty"` 5899 5900 // ForceSendFields is a list of field names (e.g. "FilterId") to 5901 // unconditionally include in API requests. By default, fields with 5902 // empty or default values are omitted from API requests. However, any 5903 // non-pointer, non-interface field appearing in ForceSendFields will be 5904 // sent to the server regardless of whether the field is empty or not. 5905 // This may be used to include empty fields in Patch requests. 5906 ForceSendFields []string `json:"-"` 5907 5908 // NullFields is a list of field names (e.g. "FilterId") to include in 5909 // API requests with the JSON null value. By default, fields with empty 5910 // values are omitted from API requests. However, any field with an 5911 // empty value appearing in NullFields will be sent to the server as 5912 // null. It is an error if a field in this list has a non-empty value. 5913 // This may be used to include null fields in Patch requests. 5914 NullFields []string `json:"-"` 5915} 5916 5917func (s *DuplicateFilterViewRequest) MarshalJSON() ([]byte, error) { 5918 type NoMethod DuplicateFilterViewRequest 5919 raw := NoMethod(*s) 5920 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5921} 5922 5923// DuplicateFilterViewResponse: The result of a filter view being 5924// duplicated. 5925type DuplicateFilterViewResponse struct { 5926 // Filter: The newly created filter. 5927 Filter *FilterView `json:"filter,omitempty"` 5928 5929 // ForceSendFields is a list of field names (e.g. "Filter") to 5930 // unconditionally include in API requests. By default, fields with 5931 // empty or default values are omitted from API requests. However, any 5932 // non-pointer, non-interface field appearing in ForceSendFields will be 5933 // sent to the server regardless of whether the field is empty or not. 5934 // This may be used to include empty fields in Patch requests. 5935 ForceSendFields []string `json:"-"` 5936 5937 // NullFields is a list of field names (e.g. "Filter") to include in API 5938 // requests with the JSON null value. By default, fields with empty 5939 // values are omitted from API requests. However, any field with an 5940 // empty value appearing in NullFields will be sent to the server as 5941 // null. It is an error if a field in this list has a non-empty value. 5942 // This may be used to include null fields in Patch requests. 5943 NullFields []string `json:"-"` 5944} 5945 5946func (s *DuplicateFilterViewResponse) MarshalJSON() ([]byte, error) { 5947 type NoMethod DuplicateFilterViewResponse 5948 raw := NoMethod(*s) 5949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5950} 5951 5952// DuplicateSheetRequest: Duplicates the contents of a sheet. 5953type DuplicateSheetRequest struct { 5954 // InsertSheetIndex: The zero-based index where the new sheet should be 5955 // inserted. The index of all sheets after this are incremented. 5956 InsertSheetIndex int64 `json:"insertSheetIndex,omitempty"` 5957 5958 // NewSheetId: If set, the ID of the new sheet. If not set, an ID is 5959 // chosen. If set, the ID must not conflict with any existing sheet ID. 5960 // If set, it must be non-negative. 5961 NewSheetId int64 `json:"newSheetId,omitempty"` 5962 5963 // NewSheetName: The name of the new sheet. If empty, a new name is 5964 // chosen for you. 5965 NewSheetName string `json:"newSheetName,omitempty"` 5966 5967 // SourceSheetId: The sheet to duplicate. If the source sheet is of 5968 // DATA_SOURCE type, its backing DataSource is also duplicated and 5969 // associated with the new copy of the sheet. No data execution is 5970 // triggered, the grid data of this sheet is also copied over but only 5971 // available after the batch request completes. 5972 SourceSheetId int64 `json:"sourceSheetId,omitempty"` 5973 5974 // ForceSendFields is a list of field names (e.g. "InsertSheetIndex") to 5975 // unconditionally include in API requests. By default, fields with 5976 // empty or default values are omitted from API requests. However, any 5977 // non-pointer, non-interface field appearing in ForceSendFields will be 5978 // sent to the server regardless of whether the field is empty or not. 5979 // This may be used to include empty fields in Patch requests. 5980 ForceSendFields []string `json:"-"` 5981 5982 // NullFields is a list of field names (e.g. "InsertSheetIndex") to 5983 // include in API requests with the JSON null value. By default, fields 5984 // with empty values are omitted from API requests. However, any field 5985 // with an empty value appearing in NullFields will be sent to the 5986 // server as null. It is an error if a field in this list has a 5987 // non-empty value. This may be used to include null fields in Patch 5988 // requests. 5989 NullFields []string `json:"-"` 5990} 5991 5992func (s *DuplicateSheetRequest) MarshalJSON() ([]byte, error) { 5993 type NoMethod DuplicateSheetRequest 5994 raw := NoMethod(*s) 5995 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 5996} 5997 5998// DuplicateSheetResponse: The result of duplicating a sheet. 5999type DuplicateSheetResponse struct { 6000 // Properties: The properties of the duplicate sheet. 6001 Properties *SheetProperties `json:"properties,omitempty"` 6002 6003 // ForceSendFields is a list of field names (e.g. "Properties") to 6004 // unconditionally include in API requests. By default, fields with 6005 // empty or default values are omitted from API requests. However, any 6006 // non-pointer, non-interface field appearing in ForceSendFields will be 6007 // sent to the server regardless of whether the field is empty or not. 6008 // This may be used to include empty fields in Patch requests. 6009 ForceSendFields []string `json:"-"` 6010 6011 // NullFields is a list of field names (e.g. "Properties") to include in 6012 // API requests with the JSON null value. By default, fields with empty 6013 // values are omitted from API requests. However, any field with an 6014 // empty value appearing in NullFields will be sent to the server as 6015 // null. It is an error if a field in this list has a non-empty value. 6016 // This may be used to include null fields in Patch requests. 6017 NullFields []string `json:"-"` 6018} 6019 6020func (s *DuplicateSheetResponse) MarshalJSON() ([]byte, error) { 6021 type NoMethod DuplicateSheetResponse 6022 raw := NoMethod(*s) 6023 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6024} 6025 6026// Editors: The editors of a protected range. 6027type Editors struct { 6028 // DomainUsersCanEdit: True if anyone in the document's domain has edit 6029 // access to the protected range. Domain protection is only supported on 6030 // documents within a domain. 6031 DomainUsersCanEdit bool `json:"domainUsersCanEdit,omitempty"` 6032 6033 // Groups: The email addresses of groups with edit access to the 6034 // protected range. 6035 Groups []string `json:"groups,omitempty"` 6036 6037 // Users: The email addresses of users with edit access to the protected 6038 // range. 6039 Users []string `json:"users,omitempty"` 6040 6041 // ForceSendFields is a list of field names (e.g. "DomainUsersCanEdit") 6042 // to unconditionally include in API requests. By default, fields with 6043 // empty or default values are omitted from API requests. However, any 6044 // non-pointer, non-interface field appearing in ForceSendFields will be 6045 // sent to the server regardless of whether the field is empty or not. 6046 // This may be used to include empty fields in Patch requests. 6047 ForceSendFields []string `json:"-"` 6048 6049 // NullFields is a list of field names (e.g. "DomainUsersCanEdit") to 6050 // include in API requests with the JSON null value. By default, fields 6051 // with empty values are omitted from API requests. However, any field 6052 // with an empty value appearing in NullFields will be sent to the 6053 // server as null. It is an error if a field in this list has a 6054 // non-empty value. This may be used to include null fields in Patch 6055 // requests. 6056 NullFields []string `json:"-"` 6057} 6058 6059func (s *Editors) MarshalJSON() ([]byte, error) { 6060 type NoMethod Editors 6061 raw := NoMethod(*s) 6062 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6063} 6064 6065// EmbeddedChart: A chart embedded in a sheet. 6066type EmbeddedChart struct { 6067 // Border: The border of the chart. 6068 Border *EmbeddedObjectBorder `json:"border,omitempty"` 6069 6070 // ChartId: The ID of the chart. 6071 ChartId int64 `json:"chartId,omitempty"` 6072 6073 // Position: The position of the chart. 6074 Position *EmbeddedObjectPosition `json:"position,omitempty"` 6075 6076 // Spec: The specification of the chart. 6077 Spec *ChartSpec `json:"spec,omitempty"` 6078 6079 // ForceSendFields is a list of field names (e.g. "Border") to 6080 // unconditionally include in API requests. By default, fields with 6081 // empty or default values are omitted from API requests. However, any 6082 // non-pointer, non-interface field appearing in ForceSendFields will be 6083 // sent to the server regardless of whether the field is empty or not. 6084 // This may be used to include empty fields in Patch requests. 6085 ForceSendFields []string `json:"-"` 6086 6087 // NullFields is a list of field names (e.g. "Border") to include in API 6088 // requests with the JSON null value. By default, fields with empty 6089 // values are omitted from API requests. However, any field with an 6090 // empty value appearing in NullFields will be sent to the server as 6091 // null. It is an error if a field in this list has a non-empty value. 6092 // This may be used to include null fields in Patch requests. 6093 NullFields []string `json:"-"` 6094} 6095 6096func (s *EmbeddedChart) MarshalJSON() ([]byte, error) { 6097 type NoMethod EmbeddedChart 6098 raw := NoMethod(*s) 6099 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6100} 6101 6102// EmbeddedObjectBorder: A border along an embedded object. 6103type EmbeddedObjectBorder struct { 6104 // Color: The color of the border. 6105 Color *Color `json:"color,omitempty"` 6106 6107 // ColorStyle: The color of the border. If color is also set, this field 6108 // takes precedence. 6109 ColorStyle *ColorStyle `json:"colorStyle,omitempty"` 6110 6111 // ForceSendFields is a list of field names (e.g. "Color") to 6112 // unconditionally include in API requests. By default, fields with 6113 // empty or default values are omitted from API requests. However, any 6114 // non-pointer, non-interface field appearing in ForceSendFields will be 6115 // sent to the server regardless of whether the field is empty or not. 6116 // This may be used to include empty fields in Patch requests. 6117 ForceSendFields []string `json:"-"` 6118 6119 // NullFields is a list of field names (e.g. "Color") to include in API 6120 // requests with the JSON null value. By default, fields with empty 6121 // values are omitted from API requests. However, any field with an 6122 // empty value appearing in NullFields will be sent to the server as 6123 // null. It is an error if a field in this list has a non-empty value. 6124 // This may be used to include null fields in Patch requests. 6125 NullFields []string `json:"-"` 6126} 6127 6128func (s *EmbeddedObjectBorder) MarshalJSON() ([]byte, error) { 6129 type NoMethod EmbeddedObjectBorder 6130 raw := NoMethod(*s) 6131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6132} 6133 6134// EmbeddedObjectPosition: The position of an embedded object such as a 6135// chart. 6136type EmbeddedObjectPosition struct { 6137 // NewSheet: If true, the embedded object is put on a new sheet whose ID 6138 // is chosen for you. Used only when writing. 6139 NewSheet bool `json:"newSheet,omitempty"` 6140 6141 // OverlayPosition: The position at which the object is overlaid on top 6142 // of a grid. 6143 OverlayPosition *OverlayPosition `json:"overlayPosition,omitempty"` 6144 6145 // SheetId: The sheet this is on. Set only if the embedded object is on 6146 // its own sheet. Must be non-negative. 6147 SheetId int64 `json:"sheetId,omitempty"` 6148 6149 // ForceSendFields is a list of field names (e.g. "NewSheet") to 6150 // unconditionally include in API requests. By default, fields with 6151 // empty or default values are omitted from API requests. However, any 6152 // non-pointer, non-interface field appearing in ForceSendFields will be 6153 // sent to the server regardless of whether the field is empty or not. 6154 // This may be used to include empty fields in Patch requests. 6155 ForceSendFields []string `json:"-"` 6156 6157 // NullFields is a list of field names (e.g. "NewSheet") to include in 6158 // API requests with the JSON null value. By default, fields with empty 6159 // values are omitted from API requests. However, any field with an 6160 // empty value appearing in NullFields will be sent to the server as 6161 // null. It is an error if a field in this list has a non-empty value. 6162 // This may be used to include null fields in Patch requests. 6163 NullFields []string `json:"-"` 6164} 6165 6166func (s *EmbeddedObjectPosition) MarshalJSON() ([]byte, error) { 6167 type NoMethod EmbeddedObjectPosition 6168 raw := NoMethod(*s) 6169 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6170} 6171 6172// ErrorValue: An error in a cell. 6173type ErrorValue struct { 6174 // Message: A message with more information about the error (in the 6175 // spreadsheet's locale). 6176 Message string `json:"message,omitempty"` 6177 6178 // Type: The type of error. 6179 // 6180 // Possible values: 6181 // "ERROR_TYPE_UNSPECIFIED" - The default error type, do not use this. 6182 // "ERROR" - Corresponds to the `#ERROR!` error. 6183 // "NULL_VALUE" - Corresponds to the `#NULL!` error. 6184 // "DIVIDE_BY_ZERO" - Corresponds to the `#DIV/0` error. 6185 // "VALUE" - Corresponds to the `#VALUE!` error. 6186 // "REF" - Corresponds to the `#REF!` error. 6187 // "NAME" - Corresponds to the `#NAME?` error. 6188 // "NUM" - Corresponds to the `#NUM!` error. 6189 // "N_A" - Corresponds to the `#N/A` error. 6190 // "LOADING" - Corresponds to the `Loading...` state. 6191 Type string `json:"type,omitempty"` 6192 6193 // ForceSendFields is a list of field names (e.g. "Message") to 6194 // unconditionally include in API requests. By default, fields with 6195 // empty or default values are omitted from API requests. However, any 6196 // non-pointer, non-interface field appearing in ForceSendFields will be 6197 // sent to the server regardless of whether the field is empty or not. 6198 // This may be used to include empty fields in Patch requests. 6199 ForceSendFields []string `json:"-"` 6200 6201 // NullFields is a list of field names (e.g. "Message") to include in 6202 // API requests with the JSON null value. By default, fields with empty 6203 // values are omitted from API requests. However, any field with an 6204 // empty value appearing in NullFields will be sent to the server as 6205 // null. It is an error if a field in this list has a non-empty value. 6206 // This may be used to include null fields in Patch requests. 6207 NullFields []string `json:"-"` 6208} 6209 6210func (s *ErrorValue) MarshalJSON() ([]byte, error) { 6211 type NoMethod ErrorValue 6212 raw := NoMethod(*s) 6213 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6214} 6215 6216// ExtendedValue: The kinds of value that a cell in a spreadsheet can 6217// have. 6218type ExtendedValue struct { 6219 // BoolValue: Represents a boolean value. 6220 BoolValue *bool `json:"boolValue,omitempty"` 6221 6222 // ErrorValue: Represents an error. This field is read-only. 6223 ErrorValue *ErrorValue `json:"errorValue,omitempty"` 6224 6225 // FormulaValue: Represents a formula. 6226 FormulaValue *string `json:"formulaValue,omitempty"` 6227 6228 // NumberValue: Represents a double value. Note: Dates, Times and 6229 // DateTimes are represented as doubles in SERIAL_NUMBER format. 6230 NumberValue *float64 `json:"numberValue,omitempty"` 6231 6232 // StringValue: Represents a string value. Leading single quotes are not 6233 // included. For example, if the user typed `'123` into the UI, this 6234 // would be represented as a `stringValue` of "123". 6235 StringValue *string `json:"stringValue,omitempty"` 6236 6237 // ForceSendFields is a list of field names (e.g. "BoolValue") to 6238 // unconditionally include in API requests. By default, fields with 6239 // empty or default values are omitted from API requests. However, any 6240 // non-pointer, non-interface field appearing in ForceSendFields will be 6241 // sent to the server regardless of whether the field is empty or not. 6242 // This may be used to include empty fields in Patch requests. 6243 ForceSendFields []string `json:"-"` 6244 6245 // NullFields is a list of field names (e.g. "BoolValue") to include in 6246 // API requests with the JSON null value. By default, fields with empty 6247 // values are omitted from API requests. However, any field with an 6248 // empty value appearing in NullFields will be sent to the server as 6249 // null. It is an error if a field in this list has a non-empty value. 6250 // This may be used to include null fields in Patch requests. 6251 NullFields []string `json:"-"` 6252} 6253 6254func (s *ExtendedValue) MarshalJSON() ([]byte, error) { 6255 type NoMethod ExtendedValue 6256 raw := NoMethod(*s) 6257 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6258} 6259 6260func (s *ExtendedValue) UnmarshalJSON(data []byte) error { 6261 type NoMethod ExtendedValue 6262 var s1 struct { 6263 NumberValue *gensupport.JSONFloat64 `json:"numberValue"` 6264 *NoMethod 6265 } 6266 s1.NoMethod = (*NoMethod)(s) 6267 if err := json.Unmarshal(data, &s1); err != nil { 6268 return err 6269 } 6270 if s1.NumberValue != nil { 6271 s.NumberValue = (*float64)(s1.NumberValue) 6272 } 6273 return nil 6274} 6275 6276// FilterCriteria: Criteria for showing/hiding rows in a filter or 6277// filter view. 6278type FilterCriteria struct { 6279 // Condition: A condition that must be true for values to be shown. 6280 // (This does not override hidden_values -- if a value is listed there, 6281 // it will still be hidden.) 6282 Condition *BooleanCondition `json:"condition,omitempty"` 6283 6284 // HiddenValues: Values that should be hidden. 6285 HiddenValues []string `json:"hiddenValues,omitempty"` 6286 6287 // VisibleBackgroundColor: The background fill color to filter by; only 6288 // cells with this fill color are shown. Mutually exclusive with 6289 // visible_foreground_color. 6290 VisibleBackgroundColor *Color `json:"visibleBackgroundColor,omitempty"` 6291 6292 // VisibleBackgroundColorStyle: The background fill color to filter by; 6293 // only cells with this fill color are shown. This field is mutually 6294 // exclusive with visible_foreground_color, and must be set to an 6295 // RGB-type color. If visible_background_color is also set, this field 6296 // takes precedence. 6297 VisibleBackgroundColorStyle *ColorStyle `json:"visibleBackgroundColorStyle,omitempty"` 6298 6299 // VisibleForegroundColor: The foreground color to filter by; only cells 6300 // with this foreground color are shown. Mutually exclusive with 6301 // visible_background_color. 6302 VisibleForegroundColor *Color `json:"visibleForegroundColor,omitempty"` 6303 6304 // VisibleForegroundColorStyle: The foreground color to filter by; only 6305 // cells with this foreground color are shown. This field is mutually 6306 // exclusive with visible_background_color, and must be set to an 6307 // RGB-type color. If visible_foreground_color is also set, this field 6308 // takes precedence. 6309 VisibleForegroundColorStyle *ColorStyle `json:"visibleForegroundColorStyle,omitempty"` 6310 6311 // ForceSendFields is a list of field names (e.g. "Condition") to 6312 // unconditionally include in API requests. By default, fields with 6313 // empty or default values are omitted from API requests. However, any 6314 // non-pointer, non-interface field appearing in ForceSendFields will be 6315 // sent to the server regardless of whether the field is empty or not. 6316 // This may be used to include empty fields in Patch requests. 6317 ForceSendFields []string `json:"-"` 6318 6319 // NullFields is a list of field names (e.g. "Condition") to include in 6320 // API requests with the JSON null value. By default, fields with empty 6321 // values are omitted from API requests. However, any field with an 6322 // empty value appearing in NullFields will be sent to the server as 6323 // null. It is an error if a field in this list has a non-empty value. 6324 // This may be used to include null fields in Patch requests. 6325 NullFields []string `json:"-"` 6326} 6327 6328func (s *FilterCriteria) MarshalJSON() ([]byte, error) { 6329 type NoMethod FilterCriteria 6330 raw := NoMethod(*s) 6331 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6332} 6333 6334// FilterSpec: The filter criteria associated with a specific column. 6335type FilterSpec struct { 6336 // ColumnIndex: The column index. 6337 ColumnIndex int64 `json:"columnIndex,omitempty"` 6338 6339 // DataSourceColumnReference: Reference to a data source column. 6340 DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` 6341 6342 // FilterCriteria: The criteria for the column. 6343 FilterCriteria *FilterCriteria `json:"filterCriteria,omitempty"` 6344 6345 // ForceSendFields is a list of field names (e.g. "ColumnIndex") to 6346 // unconditionally include in API requests. By default, fields with 6347 // empty or default values are omitted from API requests. However, any 6348 // non-pointer, non-interface field appearing in ForceSendFields will be 6349 // sent to the server regardless of whether the field is empty or not. 6350 // This may be used to include empty fields in Patch requests. 6351 ForceSendFields []string `json:"-"` 6352 6353 // NullFields is a list of field names (e.g. "ColumnIndex") to include 6354 // in API requests with the JSON null value. By default, fields with 6355 // empty values are omitted from API requests. However, any field with 6356 // an empty value appearing in NullFields will be sent to the server as 6357 // null. It is an error if a field in this list has a non-empty value. 6358 // This may be used to include null fields in Patch requests. 6359 NullFields []string `json:"-"` 6360} 6361 6362func (s *FilterSpec) MarshalJSON() ([]byte, error) { 6363 type NoMethod FilterSpec 6364 raw := NoMethod(*s) 6365 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6366} 6367 6368// FilterView: A filter view. 6369type FilterView struct { 6370 // Criteria: The criteria for showing/hiding values per column. The 6371 // map's key is the column index, and the value is the criteria for that 6372 // column. This field is deprecated in favor of filter_specs. 6373 Criteria map[string]FilterCriteria `json:"criteria,omitempty"` 6374 6375 // FilterSpecs: The filter criteria for showing/hiding values per 6376 // column. Both criteria and filter_specs are populated in responses. If 6377 // both fields are specified in an update request, this field takes 6378 // precedence. 6379 FilterSpecs []*FilterSpec `json:"filterSpecs,omitempty"` 6380 6381 // FilterViewId: The ID of the filter view. 6382 FilterViewId int64 `json:"filterViewId,omitempty"` 6383 6384 // NamedRangeId: The named range this filter view is backed by, if any. 6385 // When writing, only one of range or named_range_id may be set. 6386 NamedRangeId string `json:"namedRangeId,omitempty"` 6387 6388 // Range: The range this filter view covers. When writing, only one of 6389 // range or named_range_id may be set. 6390 Range *GridRange `json:"range,omitempty"` 6391 6392 // SortSpecs: The sort order per column. Later specifications are used 6393 // when values are equal in the earlier specifications. 6394 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 6395 6396 // Title: The name of the filter view. 6397 Title string `json:"title,omitempty"` 6398 6399 // ForceSendFields is a list of field names (e.g. "Criteria") to 6400 // unconditionally include in API requests. By default, fields with 6401 // empty or default values are omitted from API requests. However, any 6402 // non-pointer, non-interface field appearing in ForceSendFields will be 6403 // sent to the server regardless of whether the field is empty or not. 6404 // This may be used to include empty fields in Patch requests. 6405 ForceSendFields []string `json:"-"` 6406 6407 // NullFields is a list of field names (e.g. "Criteria") to include in 6408 // API requests with the JSON null value. By default, fields with empty 6409 // values are omitted from API requests. However, any field with an 6410 // empty value appearing in NullFields will be sent to the server as 6411 // null. It is an error if a field in this list has a non-empty value. 6412 // This may be used to include null fields in Patch requests. 6413 NullFields []string `json:"-"` 6414} 6415 6416func (s *FilterView) MarshalJSON() ([]byte, error) { 6417 type NoMethod FilterView 6418 raw := NoMethod(*s) 6419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6420} 6421 6422// FindReplaceRequest: Finds and replaces data in cells over a range, 6423// sheet, or all sheets. 6424type FindReplaceRequest struct { 6425 // AllSheets: True to find/replace over all sheets. 6426 AllSheets bool `json:"allSheets,omitempty"` 6427 6428 // Find: The value to search. 6429 Find string `json:"find,omitempty"` 6430 6431 // IncludeFormulas: True if the search should include cells with 6432 // formulas. False to skip cells with formulas. 6433 IncludeFormulas bool `json:"includeFormulas,omitempty"` 6434 6435 // MatchCase: True if the search is case sensitive. 6436 MatchCase bool `json:"matchCase,omitempty"` 6437 6438 // MatchEntireCell: True if the find value should match the entire cell. 6439 MatchEntireCell bool `json:"matchEntireCell,omitempty"` 6440 6441 // Range: The range to find/replace over. 6442 Range *GridRange `json:"range,omitempty"` 6443 6444 // Replacement: The value to use as the replacement. 6445 Replacement string `json:"replacement,omitempty"` 6446 6447 // SearchByRegex: True if the find value is a regex. The regular 6448 // expression and replacement should follow Java regex rules at 6449 // https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. 6450 // The replacement string is allowed to refer to capturing groups. For 6451 // example, if one cell has the contents "Google Sheets" and another 6452 // has "Google Docs", then searching for "o.* (.*)" with a 6453 // replacement of "$1 Rocks" would change the contents of the cells to 6454 // "GSheets Rocks" and "GDocs Rocks" respectively. 6455 SearchByRegex bool `json:"searchByRegex,omitempty"` 6456 6457 // SheetId: The sheet to find/replace over. 6458 SheetId int64 `json:"sheetId,omitempty"` 6459 6460 // ForceSendFields is a list of field names (e.g. "AllSheets") to 6461 // unconditionally include in API requests. By default, fields with 6462 // empty or default values are omitted from API requests. However, any 6463 // non-pointer, non-interface field appearing in ForceSendFields will be 6464 // sent to the server regardless of whether the field is empty or not. 6465 // This may be used to include empty fields in Patch requests. 6466 ForceSendFields []string `json:"-"` 6467 6468 // NullFields is a list of field names (e.g. "AllSheets") to include in 6469 // API requests with the JSON null value. By default, fields with empty 6470 // values are omitted from API requests. However, any field with an 6471 // empty value appearing in NullFields will be sent to the server as 6472 // null. It is an error if a field in this list has a non-empty value. 6473 // This may be used to include null fields in Patch requests. 6474 NullFields []string `json:"-"` 6475} 6476 6477func (s *FindReplaceRequest) MarshalJSON() ([]byte, error) { 6478 type NoMethod FindReplaceRequest 6479 raw := NoMethod(*s) 6480 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6481} 6482 6483// FindReplaceResponse: The result of the find/replace. 6484type FindReplaceResponse struct { 6485 // FormulasChanged: The number of formula cells changed. 6486 FormulasChanged int64 `json:"formulasChanged,omitempty"` 6487 6488 // OccurrencesChanged: The number of occurrences (possibly multiple 6489 // within a cell) changed. For example, if replacing "e" with "o" in 6490 // "Google Sheets", this would be "3" because "Google Sheets" -> 6491 // "Googlo Shoots". 6492 OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"` 6493 6494 // RowsChanged: The number of rows changed. 6495 RowsChanged int64 `json:"rowsChanged,omitempty"` 6496 6497 // SheetsChanged: The number of sheets changed. 6498 SheetsChanged int64 `json:"sheetsChanged,omitempty"` 6499 6500 // ValuesChanged: The number of non-formula cells changed. 6501 ValuesChanged int64 `json:"valuesChanged,omitempty"` 6502 6503 // ForceSendFields is a list of field names (e.g. "FormulasChanged") to 6504 // unconditionally include in API requests. By default, fields with 6505 // empty or default values are omitted from API requests. However, any 6506 // non-pointer, non-interface field appearing in ForceSendFields will be 6507 // sent to the server regardless of whether the field is empty or not. 6508 // This may be used to include empty fields in Patch requests. 6509 ForceSendFields []string `json:"-"` 6510 6511 // NullFields is a list of field names (e.g. "FormulasChanged") to 6512 // include in API requests with the JSON null value. By default, fields 6513 // with empty values are omitted from API requests. However, any field 6514 // with an empty value appearing in NullFields will be sent to the 6515 // server as null. It is an error if a field in this list has a 6516 // non-empty value. This may be used to include null fields in Patch 6517 // requests. 6518 NullFields []string `json:"-"` 6519} 6520 6521func (s *FindReplaceResponse) MarshalJSON() ([]byte, error) { 6522 type NoMethod FindReplaceResponse 6523 raw := NoMethod(*s) 6524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6525} 6526 6527// GetSpreadsheetByDataFilterRequest: The request for retrieving a 6528// Spreadsheet. 6529type GetSpreadsheetByDataFilterRequest struct { 6530 // DataFilters: The DataFilters used to select which ranges to retrieve 6531 // from the spreadsheet. 6532 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 6533 6534 // IncludeGridData: True if grid data should be returned. This parameter 6535 // is ignored if a field mask was set in the request. 6536 IncludeGridData bool `json:"includeGridData,omitempty"` 6537 6538 // ForceSendFields is a list of field names (e.g. "DataFilters") to 6539 // unconditionally include in API requests. By default, fields with 6540 // empty or default values are omitted from API requests. However, any 6541 // non-pointer, non-interface field appearing in ForceSendFields will be 6542 // sent to the server regardless of whether the field is empty or not. 6543 // This may be used to include empty fields in Patch requests. 6544 ForceSendFields []string `json:"-"` 6545 6546 // NullFields is a list of field names (e.g. "DataFilters") to include 6547 // in API requests with the JSON null value. By default, fields with 6548 // empty values are omitted from API requests. However, any field with 6549 // an empty value appearing in NullFields will be sent to the server as 6550 // null. It is an error if a field in this list has a non-empty value. 6551 // This may be used to include null fields in Patch requests. 6552 NullFields []string `json:"-"` 6553} 6554 6555func (s *GetSpreadsheetByDataFilterRequest) MarshalJSON() ([]byte, error) { 6556 type NoMethod GetSpreadsheetByDataFilterRequest 6557 raw := NoMethod(*s) 6558 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6559} 6560 6561// GradientRule: A rule that applies a gradient color scale format, 6562// based on the interpolation points listed. The format of a cell will 6563// vary based on its contents as compared to the values of the 6564// interpolation points. 6565type GradientRule struct { 6566 // Maxpoint: The final interpolation point. 6567 Maxpoint *InterpolationPoint `json:"maxpoint,omitempty"` 6568 6569 // Midpoint: An optional midway interpolation point. 6570 Midpoint *InterpolationPoint `json:"midpoint,omitempty"` 6571 6572 // Minpoint: The starting interpolation point. 6573 Minpoint *InterpolationPoint `json:"minpoint,omitempty"` 6574 6575 // ForceSendFields is a list of field names (e.g. "Maxpoint") to 6576 // unconditionally include in API requests. By default, fields with 6577 // empty or default values are omitted from API requests. However, any 6578 // non-pointer, non-interface field appearing in ForceSendFields will be 6579 // sent to the server regardless of whether the field is empty or not. 6580 // This may be used to include empty fields in Patch requests. 6581 ForceSendFields []string `json:"-"` 6582 6583 // NullFields is a list of field names (e.g. "Maxpoint") to include in 6584 // API requests with the JSON null value. By default, fields with empty 6585 // values are omitted from API requests. However, any field with an 6586 // empty value appearing in NullFields will be sent to the server as 6587 // null. It is an error if a field in this list has a non-empty value. 6588 // This may be used to include null fields in Patch requests. 6589 NullFields []string `json:"-"` 6590} 6591 6592func (s *GradientRule) MarshalJSON() ([]byte, error) { 6593 type NoMethod GradientRule 6594 raw := NoMethod(*s) 6595 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6596} 6597 6598// GridCoordinate: A coordinate in a sheet. All indexes are zero-based. 6599type GridCoordinate struct { 6600 // ColumnIndex: The column index of the coordinate. 6601 ColumnIndex int64 `json:"columnIndex,omitempty"` 6602 6603 // RowIndex: The row index of the coordinate. 6604 RowIndex int64 `json:"rowIndex,omitempty"` 6605 6606 // SheetId: The sheet this coordinate is on. 6607 SheetId int64 `json:"sheetId,omitempty"` 6608 6609 // ForceSendFields is a list of field names (e.g. "ColumnIndex") to 6610 // unconditionally include in API requests. By default, fields with 6611 // empty or default values are omitted from API requests. However, any 6612 // non-pointer, non-interface field appearing in ForceSendFields will be 6613 // sent to the server regardless of whether the field is empty or not. 6614 // This may be used to include empty fields in Patch requests. 6615 ForceSendFields []string `json:"-"` 6616 6617 // NullFields is a list of field names (e.g. "ColumnIndex") to include 6618 // in API requests with the JSON null value. By default, fields with 6619 // empty values are omitted from API requests. However, any field with 6620 // an 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 *GridCoordinate) MarshalJSON() ([]byte, error) { 6627 type NoMethod GridCoordinate 6628 raw := NoMethod(*s) 6629 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6630} 6631 6632// GridData: Data in the grid, as well as metadata about the dimensions. 6633type GridData struct { 6634 // ColumnMetadata: Metadata about the requested columns in the grid, 6635 // starting with the column in start_column. 6636 ColumnMetadata []*DimensionProperties `json:"columnMetadata,omitempty"` 6637 6638 // RowData: The data in the grid, one entry per row, starting with the 6639 // row in startRow. The values in RowData will correspond to columns 6640 // starting at start_column. 6641 RowData []*RowData `json:"rowData,omitempty"` 6642 6643 // RowMetadata: Metadata about the requested rows in the grid, starting 6644 // with the row in start_row. 6645 RowMetadata []*DimensionProperties `json:"rowMetadata,omitempty"` 6646 6647 // StartColumn: The first column this GridData refers to, zero-based. 6648 StartColumn int64 `json:"startColumn,omitempty"` 6649 6650 // StartRow: The first row this GridData refers to, zero-based. 6651 StartRow int64 `json:"startRow,omitempty"` 6652 6653 // ForceSendFields is a list of field names (e.g. "ColumnMetadata") to 6654 // unconditionally include in API requests. By default, fields with 6655 // empty or default values are omitted from API requests. However, any 6656 // non-pointer, non-interface field appearing in ForceSendFields will be 6657 // sent to the server regardless of whether the field is empty or not. 6658 // This may be used to include empty fields in Patch requests. 6659 ForceSendFields []string `json:"-"` 6660 6661 // NullFields is a list of field names (e.g. "ColumnMetadata") to 6662 // include in API requests with the JSON null value. By default, fields 6663 // with empty values are omitted from API requests. However, any field 6664 // with an empty value appearing in NullFields will be sent to the 6665 // server as null. It is an error if a field in this list has a 6666 // non-empty value. This may be used to include null fields in Patch 6667 // requests. 6668 NullFields []string `json:"-"` 6669} 6670 6671func (s *GridData) MarshalJSON() ([]byte, error) { 6672 type NoMethod GridData 6673 raw := NoMethod(*s) 6674 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6675} 6676 6677// GridProperties: Properties of a grid. 6678type GridProperties struct { 6679 // ColumnCount: The number of columns in the grid. 6680 ColumnCount int64 `json:"columnCount,omitempty"` 6681 6682 // ColumnGroupControlAfter: True if the column grouping control toggle 6683 // is shown after the group. 6684 ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"` 6685 6686 // FrozenColumnCount: The number of columns that are frozen in the grid. 6687 FrozenColumnCount int64 `json:"frozenColumnCount,omitempty"` 6688 6689 // FrozenRowCount: The number of rows that are frozen in the grid. 6690 FrozenRowCount int64 `json:"frozenRowCount,omitempty"` 6691 6692 // HideGridlines: True if the grid isn't showing gridlines in the UI. 6693 HideGridlines bool `json:"hideGridlines,omitempty"` 6694 6695 // RowCount: The number of rows in the grid. 6696 RowCount int64 `json:"rowCount,omitempty"` 6697 6698 // RowGroupControlAfter: True if the row grouping control toggle is 6699 // shown after the group. 6700 RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"` 6701 6702 // ForceSendFields is a list of field names (e.g. "ColumnCount") to 6703 // unconditionally include in API requests. By default, fields with 6704 // empty or default values are omitted from API requests. However, any 6705 // non-pointer, non-interface field appearing in ForceSendFields will be 6706 // sent to the server regardless of whether the field is empty or not. 6707 // This may be used to include empty fields in Patch requests. 6708 ForceSendFields []string `json:"-"` 6709 6710 // NullFields is a list of field names (e.g. "ColumnCount") to include 6711 // in API requests with the JSON null value. By default, fields with 6712 // empty values are omitted from API requests. However, any field with 6713 // an empty value appearing in NullFields will be sent to the server as 6714 // null. It is an error if a field in this list has a non-empty value. 6715 // This may be used to include null fields in Patch requests. 6716 NullFields []string `json:"-"` 6717} 6718 6719func (s *GridProperties) MarshalJSON() ([]byte, error) { 6720 type NoMethod GridProperties 6721 raw := NoMethod(*s) 6722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6723} 6724 6725// GridRange: A range on a sheet. All indexes are zero-based. Indexes 6726// are half open, i.e. the start index is inclusive and the end index is 6727// exclusive -- [start_index, end_index). Missing indexes indicate the 6728// range is unbounded on that side. For example, if "Sheet1" is sheet 6729// ID 0, then: `Sheet1!A1:A1 == sheet_id: 0, start_row_index: 0, 6730// end_row_index: 1, start_column_index: 0, end_column_index: 1` 6731// `Sheet1!A3:B4 == sheet_id: 0, start_row_index: 2, end_row_index: 4, 6732// start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 6733// 0, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == 6734// sheet_id: 0, start_row_index: 4, start_column_index: 0, 6735// end_column_index: 2` `Sheet1 == sheet_id:0` The start index must 6736// always be less than or equal to the end index. If the start index 6737// equals the end index, then the range is empty. Empty ranges are 6738// typically not meaningful and are usually rendered in the UI as 6739// `#REF!`. 6740type GridRange struct { 6741 // EndColumnIndex: The end column (exclusive) of the range, or not set 6742 // if unbounded. 6743 EndColumnIndex int64 `json:"endColumnIndex,omitempty"` 6744 6745 // EndRowIndex: The end row (exclusive) of the range, or not set if 6746 // unbounded. 6747 EndRowIndex int64 `json:"endRowIndex,omitempty"` 6748 6749 // SheetId: The sheet this range is on. 6750 SheetId int64 `json:"sheetId,omitempty"` 6751 6752 // StartColumnIndex: The start column (inclusive) of the range, or not 6753 // set if unbounded. 6754 StartColumnIndex int64 `json:"startColumnIndex,omitempty"` 6755 6756 // StartRowIndex: The start row (inclusive) of the range, or not set if 6757 // unbounded. 6758 StartRowIndex int64 `json:"startRowIndex,omitempty"` 6759 6760 // ForceSendFields is a list of field names (e.g. "EndColumnIndex") to 6761 // unconditionally include in API requests. By default, fields with 6762 // empty or default values are omitted from API requests. However, any 6763 // non-pointer, non-interface field appearing in ForceSendFields will be 6764 // sent to the server regardless of whether the field is empty or not. 6765 // This may be used to include empty fields in Patch requests. 6766 ForceSendFields []string `json:"-"` 6767 6768 // NullFields is a list of field names (e.g. "EndColumnIndex") to 6769 // include in API requests with the JSON null value. By default, fields 6770 // with empty values are omitted from API requests. However, any field 6771 // with an empty value appearing in NullFields will be sent to the 6772 // server as null. It is an error if a field in this list has a 6773 // non-empty value. This may be used to include null fields in Patch 6774 // requests. 6775 NullFields []string `json:"-"` 6776} 6777 6778func (s *GridRange) MarshalJSON() ([]byte, error) { 6779 type NoMethod GridRange 6780 raw := NoMethod(*s) 6781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6782} 6783 6784// HistogramChartSpec: A histogram chart. A histogram chart groups data 6785// items into bins, displaying each bin as a column of stacked items. 6786// Histograms are used to display the distribution of a dataset. Each 6787// column of items represents a range into which those items fall. The 6788// number of bins can be chosen automatically or specified explicitly. 6789type HistogramChartSpec struct { 6790 // BucketSize: By default the bucket size (the range of values stacked 6791 // in a single column) is chosen automatically, but it may be overridden 6792 // here. E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 6793 // - 3.0, etc. Cannot be negative. This field is optional. 6794 BucketSize float64 `json:"bucketSize,omitempty"` 6795 6796 // LegendPosition: The position of the chart legend. 6797 // 6798 // Possible values: 6799 // "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do 6800 // not use. 6801 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 6802 // chart. 6803 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 6804 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 6805 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 6806 // "NO_LEGEND" - No legend is rendered. 6807 // "INSIDE_LEGEND" - The legend is rendered inside the chart area. 6808 LegendPosition string `json:"legendPosition,omitempty"` 6809 6810 // OutlierPercentile: The outlier percentile is used to ensure that 6811 // outliers do not adversely affect the calculation of bucket sizes. For 6812 // example, setting an outlier percentile of 0.05 indicates that the top 6813 // and bottom 5% of values when calculating buckets. The values are 6814 // still included in the chart, they will be added to the first or last 6815 // buckets instead of their own buckets. Must be between 0.0 and 0.5. 6816 OutlierPercentile float64 `json:"outlierPercentile,omitempty"` 6817 6818 // Series: The series for a histogram may be either a single series of 6819 // values to be bucketed or multiple series, each of the same length, 6820 // containing the name of the series followed by the values to be 6821 // bucketed for that series. 6822 Series []*HistogramSeries `json:"series,omitempty"` 6823 6824 // ShowItemDividers: Whether horizontal divider lines should be 6825 // displayed between items in each column. 6826 ShowItemDividers bool `json:"showItemDividers,omitempty"` 6827 6828 // ForceSendFields is a list of field names (e.g. "BucketSize") to 6829 // unconditionally include in API requests. By default, fields with 6830 // empty or default values are omitted from API requests. However, any 6831 // non-pointer, non-interface field appearing in ForceSendFields will be 6832 // sent to the server regardless of whether the field is empty or not. 6833 // This may be used to include empty fields in Patch requests. 6834 ForceSendFields []string `json:"-"` 6835 6836 // NullFields is a list of field names (e.g. "BucketSize") to include in 6837 // API requests with the JSON null value. By default, fields with empty 6838 // values are omitted from API requests. However, any field with an 6839 // empty value appearing in NullFields will be sent to the server as 6840 // null. It is an error if a field in this list has a non-empty value. 6841 // This may be used to include null fields in Patch requests. 6842 NullFields []string `json:"-"` 6843} 6844 6845func (s *HistogramChartSpec) MarshalJSON() ([]byte, error) { 6846 type NoMethod HistogramChartSpec 6847 raw := NoMethod(*s) 6848 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6849} 6850 6851func (s *HistogramChartSpec) UnmarshalJSON(data []byte) error { 6852 type NoMethod HistogramChartSpec 6853 var s1 struct { 6854 BucketSize gensupport.JSONFloat64 `json:"bucketSize"` 6855 OutlierPercentile gensupport.JSONFloat64 `json:"outlierPercentile"` 6856 *NoMethod 6857 } 6858 s1.NoMethod = (*NoMethod)(s) 6859 if err := json.Unmarshal(data, &s1); err != nil { 6860 return err 6861 } 6862 s.BucketSize = float64(s1.BucketSize) 6863 s.OutlierPercentile = float64(s1.OutlierPercentile) 6864 return nil 6865} 6866 6867// HistogramRule: Allows you to organize the numeric values in a source 6868// data column into buckets of a constant size. All values from 6869// HistogramRule.start to HistogramRule.end are placed into groups of 6870// size HistogramRule.interval. In addition, all values below 6871// HistogramRule.start are placed in one group, and all values above 6872// HistogramRule.end are placed in another. Only HistogramRule.interval 6873// is required, though if HistogramRule.start and HistogramRule.end are 6874// both provided, HistogramRule.start must be less than 6875// HistogramRule.end. For example, a pivot table showing average 6876// purchase amount by age that has 50+ rows: +-----+-------------------+ 6877// | Age | AVERAGE of Amount | +-----+-------------------+ | 16 | $27.13 6878// | | 17 | $5.24 | | 18 | $20.15 | ... +-----+-------------------+ 6879// could be turned into a pivot table that looks like the one below by 6880// applying a histogram group rule with a HistogramRule.start of 25, an 6881// HistogramRule.interval of 20, and an HistogramRule.end of 65. 6882// +-------------+-------------------+ | Grouped Age | AVERAGE of Amount 6883// | +-------------+-------------------+ | < 25 | $19.34 | | 25-45 | 6884// $31.43 | | 45-65 | $35.87 | | > 65 | $27.55 | 6885// +-------------+-------------------+ | Grand Total | $29.12 | 6886// +-------------+-------------------+ 6887type HistogramRule struct { 6888 // End: The maximum value at which items are placed into buckets of 6889 // constant size. Values above end are lumped into a single bucket. This 6890 // field is optional. 6891 End float64 `json:"end,omitempty"` 6892 6893 // Interval: The size of the buckets that are created. Must be positive. 6894 Interval float64 `json:"interval,omitempty"` 6895 6896 // Start: The minimum value at which items are placed into buckets of 6897 // constant size. Values below start are lumped into a single bucket. 6898 // This field is optional. 6899 Start float64 `json:"start,omitempty"` 6900 6901 // ForceSendFields is a list of field names (e.g. "End") to 6902 // unconditionally include in API requests. By default, fields with 6903 // empty or default values are omitted from API requests. However, any 6904 // non-pointer, non-interface field appearing in ForceSendFields will be 6905 // sent to the server regardless of whether the field is empty or not. 6906 // This may be used to include empty fields in Patch requests. 6907 ForceSendFields []string `json:"-"` 6908 6909 // NullFields is a list of field names (e.g. "End") to include in API 6910 // requests with the JSON null value. By default, fields with empty 6911 // values are omitted from API requests. However, any field with an 6912 // empty value appearing in NullFields will be sent to the server as 6913 // null. It is an error if a field in this list has a non-empty value. 6914 // This may be used to include null fields in Patch requests. 6915 NullFields []string `json:"-"` 6916} 6917 6918func (s *HistogramRule) MarshalJSON() ([]byte, error) { 6919 type NoMethod HistogramRule 6920 raw := NoMethod(*s) 6921 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6922} 6923 6924func (s *HistogramRule) UnmarshalJSON(data []byte) error { 6925 type NoMethod HistogramRule 6926 var s1 struct { 6927 End gensupport.JSONFloat64 `json:"end"` 6928 Interval gensupport.JSONFloat64 `json:"interval"` 6929 Start gensupport.JSONFloat64 `json:"start"` 6930 *NoMethod 6931 } 6932 s1.NoMethod = (*NoMethod)(s) 6933 if err := json.Unmarshal(data, &s1); err != nil { 6934 return err 6935 } 6936 s.End = float64(s1.End) 6937 s.Interval = float64(s1.Interval) 6938 s.Start = float64(s1.Start) 6939 return nil 6940} 6941 6942// HistogramSeries: A histogram series containing the series color and 6943// data. 6944type HistogramSeries struct { 6945 // BarColor: The color of the column representing this series in each 6946 // bucket. This field is optional. 6947 BarColor *Color `json:"barColor,omitempty"` 6948 6949 // BarColorStyle: The color of the column representing this series in 6950 // each bucket. This field is optional. If bar_color is also set, this 6951 // field takes precedence. 6952 BarColorStyle *ColorStyle `json:"barColorStyle,omitempty"` 6953 6954 // Data: The data for this histogram series. 6955 Data *ChartData `json:"data,omitempty"` 6956 6957 // ForceSendFields is a list of field names (e.g. "BarColor") to 6958 // unconditionally include in API requests. By default, fields with 6959 // empty or default values are omitted from API requests. However, any 6960 // non-pointer, non-interface field appearing in ForceSendFields will be 6961 // sent to the server regardless of whether the field is empty or not. 6962 // This may be used to include empty fields in Patch requests. 6963 ForceSendFields []string `json:"-"` 6964 6965 // NullFields is a list of field names (e.g. "BarColor") to include in 6966 // API requests with the JSON null value. By default, fields with empty 6967 // values are omitted from API requests. However, any field with an 6968 // empty value appearing in NullFields will be sent to the server as 6969 // null. It is an error if a field in this list has a non-empty value. 6970 // This may be used to include null fields in Patch requests. 6971 NullFields []string `json:"-"` 6972} 6973 6974func (s *HistogramSeries) MarshalJSON() ([]byte, error) { 6975 type NoMethod HistogramSeries 6976 raw := NoMethod(*s) 6977 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 6978} 6979 6980// InsertDimensionRequest: Inserts rows or columns in a sheet at a 6981// particular index. 6982type InsertDimensionRequest struct { 6983 // InheritFromBefore: Whether dimension properties should be extended 6984 // from the dimensions before or after the newly inserted dimensions. 6985 // True to inherit from the dimensions before (in which case the start 6986 // index must be greater than 0), and false to inherit from the 6987 // dimensions after. For example, if row index 0 has red background and 6988 // row index 1 has a green background, then inserting 2 rows at index 1 6989 // can inherit either the green or red background. If 6990 // `inheritFromBefore` is true, the two new rows will be red (because 6991 // the row before the insertion point was red), whereas if 6992 // `inheritFromBefore` is false, the two new rows will be green (because 6993 // the row after the insertion point was green). 6994 InheritFromBefore bool `json:"inheritFromBefore,omitempty"` 6995 6996 // Range: The dimensions to insert. Both the start and end indexes must 6997 // be bounded. 6998 Range *DimensionRange `json:"range,omitempty"` 6999 7000 // ForceSendFields is a list of field names (e.g. "InheritFromBefore") 7001 // to unconditionally include in API requests. By default, fields with 7002 // empty or default values are omitted from API requests. However, any 7003 // non-pointer, non-interface field appearing in ForceSendFields will be 7004 // sent to the server regardless of whether the field is empty or not. 7005 // This may be used to include empty fields in Patch requests. 7006 ForceSendFields []string `json:"-"` 7007 7008 // NullFields is a list of field names (e.g. "InheritFromBefore") to 7009 // include in API requests with the JSON null value. By default, fields 7010 // with empty values are omitted from API requests. However, any field 7011 // with an empty value appearing in NullFields will be sent to the 7012 // server as null. It is an error if a field in this list has a 7013 // non-empty value. This may be used to include null fields in Patch 7014 // requests. 7015 NullFields []string `json:"-"` 7016} 7017 7018func (s *InsertDimensionRequest) MarshalJSON() ([]byte, error) { 7019 type NoMethod InsertDimensionRequest 7020 raw := NoMethod(*s) 7021 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7022} 7023 7024// InsertRangeRequest: Inserts cells into a range, shifting the existing 7025// cells over or down. 7026type InsertRangeRequest struct { 7027 // Range: The range to insert new cells into. 7028 Range *GridRange `json:"range,omitempty"` 7029 7030 // ShiftDimension: The dimension which will be shifted when inserting 7031 // cells. If ROWS, existing cells will be shifted down. If COLUMNS, 7032 // existing cells will be shifted right. 7033 // 7034 // Possible values: 7035 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 7036 // "ROWS" - Operates on the rows of a sheet. 7037 // "COLUMNS" - Operates on the columns of a sheet. 7038 ShiftDimension string `json:"shiftDimension,omitempty"` 7039 7040 // ForceSendFields is a list of field names (e.g. "Range") to 7041 // unconditionally include in API requests. By default, fields with 7042 // empty or default values are omitted from API requests. However, any 7043 // non-pointer, non-interface field appearing in ForceSendFields will be 7044 // sent to the server regardless of whether the field is empty or not. 7045 // This may be used to include empty fields in Patch requests. 7046 ForceSendFields []string `json:"-"` 7047 7048 // NullFields is a list of field names (e.g. "Range") to include in API 7049 // requests with the JSON null value. By default, fields with empty 7050 // values are omitted from API requests. However, any field with an 7051 // empty value appearing in NullFields will be sent to the server as 7052 // null. It is an error if a field in this list has a non-empty value. 7053 // This may be used to include null fields in Patch requests. 7054 NullFields []string `json:"-"` 7055} 7056 7057func (s *InsertRangeRequest) MarshalJSON() ([]byte, error) { 7058 type NoMethod InsertRangeRequest 7059 raw := NoMethod(*s) 7060 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7061} 7062 7063// InterpolationPoint: A single interpolation point on a gradient 7064// conditional format. These pin the gradient color scale according to 7065// the color, type and value chosen. 7066type InterpolationPoint struct { 7067 // Color: The color this interpolation point should use. 7068 Color *Color `json:"color,omitempty"` 7069 7070 // ColorStyle: The color this interpolation point should use. If color 7071 // is also set, this field takes precedence. 7072 ColorStyle *ColorStyle `json:"colorStyle,omitempty"` 7073 7074 // Type: How the value should be interpreted. 7075 // 7076 // Possible values: 7077 // "INTERPOLATION_POINT_TYPE_UNSPECIFIED" - The default value, do not 7078 // use. 7079 // "MIN" - The interpolation point uses the minimum value in the cells 7080 // over the range of the conditional format. 7081 // "MAX" - The interpolation point uses the maximum value in the cells 7082 // over the range of the conditional format. 7083 // "NUMBER" - The interpolation point uses exactly the value in 7084 // InterpolationPoint.value. 7085 // "PERCENT" - The interpolation point is the given percentage over 7086 // all the cells in the range of the conditional format. This is 7087 // equivalent to `NUMBER` if the value was: `=(MAX(FLATTEN(range)) * 7088 // (value / 100)) + (MIN(FLATTEN(range)) * (1 - (value / 100)))` (where 7089 // errors in the range are ignored when flattening). 7090 // "PERCENTILE" - The interpolation point is the given percentile over 7091 // all the cells in the range of the conditional format. This is 7092 // equivalent to `NUMBER` if the value was: `=PERCENTILE(FLATTEN(range), 7093 // value / 100)` (where errors in the range are ignored when 7094 // flattening). 7095 Type string `json:"type,omitempty"` 7096 7097 // Value: The value this interpolation point uses. May be a formula. 7098 // Unused if type is MIN or MAX. 7099 Value string `json:"value,omitempty"` 7100 7101 // ForceSendFields is a list of field names (e.g. "Color") to 7102 // unconditionally include in API requests. By default, fields with 7103 // empty or default values are omitted from API requests. However, any 7104 // non-pointer, non-interface field appearing in ForceSendFields will be 7105 // sent to the server regardless of whether the field is empty or not. 7106 // This may be used to include empty fields in Patch requests. 7107 ForceSendFields []string `json:"-"` 7108 7109 // NullFields is a list of field names (e.g. "Color") to include in API 7110 // requests with the JSON null value. By default, fields with empty 7111 // values are omitted from API requests. However, any field with an 7112 // empty value appearing in NullFields will be sent to the server as 7113 // null. It is an error if a field in this list has a non-empty value. 7114 // This may be used to include null fields in Patch requests. 7115 NullFields []string `json:"-"` 7116} 7117 7118func (s *InterpolationPoint) MarshalJSON() ([]byte, error) { 7119 type NoMethod InterpolationPoint 7120 raw := NoMethod(*s) 7121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7122} 7123 7124// Interval: Represents a time interval, encoded as a Timestamp start 7125// (inclusive) and a Timestamp end (exclusive). The start must be less 7126// than or equal to the end. When the start equals the end, the interval 7127// is empty (matches no time). When both start and end are unspecified, 7128// the interval matches any time. 7129type Interval struct { 7130 // EndTime: Optional. Exclusive end of the interval. If specified, a 7131 // Timestamp matching this interval will have to be before the end. 7132 EndTime string `json:"endTime,omitempty"` 7133 7134 // StartTime: Optional. Inclusive start of the interval. If specified, a 7135 // Timestamp matching this interval will have to be the same or after 7136 // the start. 7137 StartTime string `json:"startTime,omitempty"` 7138 7139 // ForceSendFields is a list of field names (e.g. "EndTime") to 7140 // unconditionally include in API requests. By default, fields with 7141 // empty or default values are omitted from API requests. However, any 7142 // non-pointer, non-interface field appearing in ForceSendFields will be 7143 // sent to the server regardless of whether the field is empty or not. 7144 // This may be used to include empty fields in Patch requests. 7145 ForceSendFields []string `json:"-"` 7146 7147 // NullFields is a list of field names (e.g. "EndTime") to include in 7148 // API requests with the JSON null value. By default, fields with empty 7149 // values are omitted from API requests. However, any field with an 7150 // empty value appearing in NullFields will be sent to the server as 7151 // null. It is an error if a field in this list has a non-empty value. 7152 // This may be used to include null fields in Patch requests. 7153 NullFields []string `json:"-"` 7154} 7155 7156func (s *Interval) MarshalJSON() ([]byte, error) { 7157 type NoMethod Interval 7158 raw := NoMethod(*s) 7159 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7160} 7161 7162// IterativeCalculationSettings: Settings to control how circular 7163// dependencies are resolved with iterative calculation. 7164type IterativeCalculationSettings struct { 7165 // ConvergenceThreshold: When iterative calculation is enabled and 7166 // successive results differ by less than this threshold value, the 7167 // calculation rounds stop. 7168 ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"` 7169 7170 // MaxIterations: When iterative calculation is enabled, the maximum 7171 // number of calculation rounds to perform. 7172 MaxIterations int64 `json:"maxIterations,omitempty"` 7173 7174 // ForceSendFields is a list of field names (e.g. 7175 // "ConvergenceThreshold") to unconditionally include in API requests. 7176 // By default, fields with empty or default values are omitted from API 7177 // requests. However, any non-pointer, non-interface field appearing in 7178 // ForceSendFields will be sent to the server regardless of whether the 7179 // field is empty or not. This may be used to include empty fields in 7180 // Patch requests. 7181 ForceSendFields []string `json:"-"` 7182 7183 // NullFields is a list of field names (e.g. "ConvergenceThreshold") to 7184 // include in API requests with the JSON null value. By default, fields 7185 // with empty values are omitted from API requests. However, any field 7186 // with an empty value appearing in NullFields will be sent to the 7187 // server as null. It is an error if a field in this list has a 7188 // non-empty value. This may be used to include null fields in Patch 7189 // requests. 7190 NullFields []string `json:"-"` 7191} 7192 7193func (s *IterativeCalculationSettings) MarshalJSON() ([]byte, error) { 7194 type NoMethod IterativeCalculationSettings 7195 raw := NoMethod(*s) 7196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7197} 7198 7199func (s *IterativeCalculationSettings) UnmarshalJSON(data []byte) error { 7200 type NoMethod IterativeCalculationSettings 7201 var s1 struct { 7202 ConvergenceThreshold gensupport.JSONFloat64 `json:"convergenceThreshold"` 7203 *NoMethod 7204 } 7205 s1.NoMethod = (*NoMethod)(s) 7206 if err := json.Unmarshal(data, &s1); err != nil { 7207 return err 7208 } 7209 s.ConvergenceThreshold = float64(s1.ConvergenceThreshold) 7210 return nil 7211} 7212 7213// KeyValueFormat: Formatting options for key value. 7214type KeyValueFormat struct { 7215 // Position: Specifies the horizontal text positioning of key value. 7216 // This field is optional. If not specified, default positioning is 7217 // used. 7218 Position *TextPosition `json:"position,omitempty"` 7219 7220 // TextFormat: Text formatting options for key value. The link field is 7221 // not supported. 7222 TextFormat *TextFormat `json:"textFormat,omitempty"` 7223 7224 // ForceSendFields is a list of field names (e.g. "Position") to 7225 // unconditionally include in API requests. By default, fields with 7226 // empty or default values are omitted from API requests. However, any 7227 // non-pointer, non-interface field appearing in ForceSendFields will be 7228 // sent to the server regardless of whether the field is empty or not. 7229 // This may be used to include empty fields in Patch requests. 7230 ForceSendFields []string `json:"-"` 7231 7232 // NullFields is a list of field names (e.g. "Position") to include in 7233 // API requests with the JSON null value. By default, fields with empty 7234 // values are omitted from API requests. However, any field with an 7235 // empty value appearing in NullFields will be sent to the server as 7236 // null. It is an error if a field in this list has a non-empty value. 7237 // This may be used to include null fields in Patch requests. 7238 NullFields []string `json:"-"` 7239} 7240 7241func (s *KeyValueFormat) MarshalJSON() ([]byte, error) { 7242 type NoMethod KeyValueFormat 7243 raw := NoMethod(*s) 7244 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7245} 7246 7247// LineStyle: Properties that describe the style of a line. 7248type LineStyle struct { 7249 // Type: The dash type of the line. 7250 // 7251 // Possible values: 7252 // "LINE_DASH_TYPE_UNSPECIFIED" - Default value, do not use. 7253 // "INVISIBLE" - No dash type, which is equivalent to a non-visible 7254 // line. 7255 // "CUSTOM" - A custom dash for a line. Modifying the exact custom 7256 // dash style is currently unsupported. 7257 // "SOLID" - A solid line. 7258 // "DOTTED" - A dotted line. 7259 // "MEDIUM_DASHED" - A dashed line where the dashes have "medium" 7260 // length. 7261 // "MEDIUM_DASHED_DOTTED" - A line that alternates between a "medium" 7262 // dash and a dot. 7263 // "LONG_DASHED" - A dashed line where the dashes have "long" length. 7264 // "LONG_DASHED_DOTTED" - A line that alternates between a "long" dash 7265 // and a dot. 7266 Type string `json:"type,omitempty"` 7267 7268 // Width: The thickness of the line, in px. 7269 Width int64 `json:"width,omitempty"` 7270 7271 // ForceSendFields is a list of field names (e.g. "Type") to 7272 // unconditionally include in API requests. By default, fields with 7273 // empty or default values are omitted from API requests. However, any 7274 // non-pointer, non-interface field appearing in ForceSendFields will be 7275 // sent to the server regardless of whether the field is empty or not. 7276 // This may be used to include empty fields in Patch requests. 7277 ForceSendFields []string `json:"-"` 7278 7279 // NullFields is a list of field names (e.g. "Type") to include in API 7280 // requests with the JSON null value. By default, fields with empty 7281 // values are omitted from API requests. However, any field with an 7282 // empty value appearing in NullFields will be sent to the server as 7283 // null. It is an error if a field in this list has a non-empty value. 7284 // This may be used to include null fields in Patch requests. 7285 NullFields []string `json:"-"` 7286} 7287 7288func (s *LineStyle) MarshalJSON() ([]byte, error) { 7289 type NoMethod LineStyle 7290 raw := NoMethod(*s) 7291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7292} 7293 7294// Link: An external or local reference. 7295type Link struct { 7296 // Uri: The link identifier. 7297 Uri string `json:"uri,omitempty"` 7298 7299 // ForceSendFields is a list of field names (e.g. "Uri") to 7300 // unconditionally include in API requests. By default, fields with 7301 // empty or default values are omitted from API requests. However, any 7302 // non-pointer, non-interface field appearing in ForceSendFields will be 7303 // sent to the server regardless of whether the field is empty or not. 7304 // This may be used to include empty fields in Patch requests. 7305 ForceSendFields []string `json:"-"` 7306 7307 // NullFields is a list of field names (e.g. "Uri") to include in API 7308 // requests with the JSON null value. By default, fields with empty 7309 // values are omitted from API requests. However, any field with an 7310 // empty value appearing in NullFields will be sent to the server as 7311 // null. It is an error if a field in this list has a non-empty value. 7312 // This may be used to include null fields in Patch requests. 7313 NullFields []string `json:"-"` 7314} 7315 7316func (s *Link) MarshalJSON() ([]byte, error) { 7317 type NoMethod Link 7318 raw := NoMethod(*s) 7319 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7320} 7321 7322// ManualRule: Allows you to manually organize the values in a source 7323// data column into buckets with names of your choosing. For example, a 7324// pivot table that aggregates population by state: 7325// +-------+-------------------+ | State | SUM of Population | 7326// +-------+-------------------+ | AK | 0.7 | | AL | 4.8 | | AR | 2.9 | 7327// ... +-------+-------------------+ could be turned into a pivot table 7328// that aggregates population by time zone by providing a list of groups 7329// (for example, groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) 7330// to a manual group rule. Note that a similar effect could be achieved 7331// by adding a time zone column to the source data and adjusting the 7332// pivot table. +-----------+-------------------+ | Time Zone | SUM of 7333// Population | +-----------+-------------------+ | Central | 106.3 | | 7334// Eastern | 151.9 | | Mountain | 17.4 | ... 7335// +-----------+-------------------+ 7336type ManualRule struct { 7337 // Groups: The list of group names and the corresponding items from the 7338 // source data that map to each group name. 7339 Groups []*ManualRuleGroup `json:"groups,omitempty"` 7340 7341 // ForceSendFields is a list of field names (e.g. "Groups") to 7342 // unconditionally include in API requests. By default, fields with 7343 // empty or default values are omitted from API requests. However, any 7344 // non-pointer, non-interface field appearing in ForceSendFields will be 7345 // sent to the server regardless of whether the field is empty or not. 7346 // This may be used to include empty fields in Patch requests. 7347 ForceSendFields []string `json:"-"` 7348 7349 // NullFields is a list of field names (e.g. "Groups") to include in API 7350 // requests with the JSON null value. By default, fields with empty 7351 // values are omitted from API requests. However, any field with an 7352 // empty value appearing in NullFields will be sent to the server as 7353 // null. It is an error if a field in this list has a non-empty value. 7354 // This may be used to include null fields in Patch requests. 7355 NullFields []string `json:"-"` 7356} 7357 7358func (s *ManualRule) MarshalJSON() ([]byte, error) { 7359 type NoMethod ManualRule 7360 raw := NoMethod(*s) 7361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7362} 7363 7364// ManualRuleGroup: A group name and a list of items from the source 7365// data that should be placed in the group with this name. 7366type ManualRuleGroup struct { 7367 // GroupName: The group name, which must be a string. Each group in a 7368 // given ManualRule must have a unique group name. 7369 GroupName *ExtendedValue `json:"groupName,omitempty"` 7370 7371 // Items: The items in the source data that should be placed into this 7372 // group. Each item may be a string, number, or boolean. Items may 7373 // appear in at most one group within a given ManualRule. Items that do 7374 // not appear in any group will appear on their own. 7375 Items []*ExtendedValue `json:"items,omitempty"` 7376 7377 // ForceSendFields is a list of field names (e.g. "GroupName") to 7378 // unconditionally include in API requests. By default, fields with 7379 // empty or default values are omitted from API requests. However, any 7380 // non-pointer, non-interface field appearing in ForceSendFields will be 7381 // sent to the server regardless of whether the field is empty or not. 7382 // This may be used to include empty fields in Patch requests. 7383 ForceSendFields []string `json:"-"` 7384 7385 // NullFields is a list of field names (e.g. "GroupName") to include in 7386 // API requests with the JSON null value. By default, fields with empty 7387 // values are omitted from API requests. However, any field with an 7388 // empty value appearing in NullFields will be sent to the server as 7389 // null. It is an error if a field in this list has a non-empty value. 7390 // This may be used to include null fields in Patch requests. 7391 NullFields []string `json:"-"` 7392} 7393 7394func (s *ManualRuleGroup) MarshalJSON() ([]byte, error) { 7395 type NoMethod ManualRuleGroup 7396 raw := NoMethod(*s) 7397 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7398} 7399 7400// MatchedDeveloperMetadata: A developer metadata entry and the data 7401// filters specified in the original request that matched it. 7402type MatchedDeveloperMetadata struct { 7403 // DataFilters: All filters matching the returned developer metadata. 7404 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 7405 7406 // DeveloperMetadata: The developer metadata matching the specified 7407 // filters. 7408 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 7409 7410 // ForceSendFields is a list of field names (e.g. "DataFilters") to 7411 // unconditionally include in API requests. By default, fields with 7412 // empty or default values are omitted from API requests. However, any 7413 // non-pointer, non-interface field appearing in ForceSendFields will be 7414 // sent to the server regardless of whether the field is empty or not. 7415 // This may be used to include empty fields in Patch requests. 7416 ForceSendFields []string `json:"-"` 7417 7418 // NullFields is a list of field names (e.g. "DataFilters") to include 7419 // in API requests with the JSON null value. By default, fields with 7420 // empty values are omitted from API requests. However, any field with 7421 // an empty value appearing in NullFields will be sent to the server as 7422 // null. It is an error if a field in this list has a non-empty value. 7423 // This may be used to include null fields in Patch requests. 7424 NullFields []string `json:"-"` 7425} 7426 7427func (s *MatchedDeveloperMetadata) MarshalJSON() ([]byte, error) { 7428 type NoMethod MatchedDeveloperMetadata 7429 raw := NoMethod(*s) 7430 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7431} 7432 7433// MatchedValueRange: A value range that was matched by one or more data 7434// filers. 7435type MatchedValueRange struct { 7436 // DataFilters: The DataFilters from the request that matched the range 7437 // of values. 7438 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 7439 7440 // ValueRange: The values matched by the DataFilter. 7441 ValueRange *ValueRange `json:"valueRange,omitempty"` 7442 7443 // ForceSendFields is a list of field names (e.g. "DataFilters") to 7444 // unconditionally include in API requests. By default, fields with 7445 // empty or default values are omitted from API requests. However, any 7446 // non-pointer, non-interface field appearing in ForceSendFields will be 7447 // sent to the server regardless of whether the field is empty or not. 7448 // This may be used to include empty fields in Patch requests. 7449 ForceSendFields []string `json:"-"` 7450 7451 // NullFields is a list of field names (e.g. "DataFilters") to include 7452 // in API requests with the JSON null value. By default, fields with 7453 // empty values are omitted from API requests. However, any field with 7454 // an empty value appearing in NullFields will be sent to the server as 7455 // null. It is an error if a field in this list has a non-empty value. 7456 // This may be used to include null fields in Patch requests. 7457 NullFields []string `json:"-"` 7458} 7459 7460func (s *MatchedValueRange) MarshalJSON() ([]byte, error) { 7461 type NoMethod MatchedValueRange 7462 raw := NoMethod(*s) 7463 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7464} 7465 7466// MergeCellsRequest: Merges all cells in the range. 7467type MergeCellsRequest struct { 7468 // MergeType: How the cells should be merged. 7469 // 7470 // Possible values: 7471 // "MERGE_ALL" - Create a single merge from the range 7472 // "MERGE_COLUMNS" - Create a merge for each column in the range 7473 // "MERGE_ROWS" - Create a merge for each row in the range 7474 MergeType string `json:"mergeType,omitempty"` 7475 7476 // Range: The range of cells to merge. 7477 Range *GridRange `json:"range,omitempty"` 7478 7479 // ForceSendFields is a list of field names (e.g. "MergeType") to 7480 // unconditionally include in API requests. By default, fields with 7481 // empty or default values are omitted from API requests. However, any 7482 // non-pointer, non-interface field appearing in ForceSendFields will be 7483 // sent to the server regardless of whether the field is empty or not. 7484 // This may be used to include empty fields in Patch requests. 7485 ForceSendFields []string `json:"-"` 7486 7487 // NullFields is a list of field names (e.g. "MergeType") to include in 7488 // API requests with the JSON null value. By default, fields with empty 7489 // values are omitted from API requests. However, any field with an 7490 // empty value appearing in NullFields will be sent to the server as 7491 // null. It is an error if a field in this list has a non-empty value. 7492 // This may be used to include null fields in Patch requests. 7493 NullFields []string `json:"-"` 7494} 7495 7496func (s *MergeCellsRequest) MarshalJSON() ([]byte, error) { 7497 type NoMethod MergeCellsRequest 7498 raw := NoMethod(*s) 7499 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7500} 7501 7502// MoveDimensionRequest: Moves one or more rows or columns. 7503type MoveDimensionRequest struct { 7504 // DestinationIndex: The zero-based start index of where to move the 7505 // source data to, based on the coordinates *before* the source data is 7506 // removed from the grid. Existing data will be shifted down or right 7507 // (depending on the dimension) to make room for the moved dimensions. 7508 // The source dimensions are removed from the grid, so the the data may 7509 // end up in a different index than specified. For example, given 7510 // `A1..A5` of `0, 1, 2, 3, 4` and wanting to move "1" and "2" to 7511 // between "3" and "4", the source would be `ROWS [1..3)`,and the 7512 // destination index would be "4" (the zero-based index of row 5). The 7513 // end result would be `A1..A5` of `0, 3, 1, 2, 4`. 7514 DestinationIndex int64 `json:"destinationIndex,omitempty"` 7515 7516 // Source: The source dimensions to move. 7517 Source *DimensionRange `json:"source,omitempty"` 7518 7519 // ForceSendFields is a list of field names (e.g. "DestinationIndex") to 7520 // unconditionally include in API requests. By default, fields with 7521 // empty or default values are omitted from API requests. However, any 7522 // non-pointer, non-interface field appearing in ForceSendFields will be 7523 // sent to the server regardless of whether the field is empty or not. 7524 // This may be used to include empty fields in Patch requests. 7525 ForceSendFields []string `json:"-"` 7526 7527 // NullFields is a list of field names (e.g. "DestinationIndex") to 7528 // include in API requests with the JSON null value. By default, fields 7529 // with empty values are omitted from API requests. However, any field 7530 // with an empty value appearing in NullFields will be sent to the 7531 // server as null. It is an error if a field in this list has a 7532 // non-empty value. This may be used to include null fields in Patch 7533 // requests. 7534 NullFields []string `json:"-"` 7535} 7536 7537func (s *MoveDimensionRequest) MarshalJSON() ([]byte, error) { 7538 type NoMethod MoveDimensionRequest 7539 raw := NoMethod(*s) 7540 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7541} 7542 7543// NamedRange: A named range. 7544type NamedRange struct { 7545 // Name: The name of the named range. 7546 Name string `json:"name,omitempty"` 7547 7548 // NamedRangeId: The ID of the named range. 7549 NamedRangeId string `json:"namedRangeId,omitempty"` 7550 7551 // Range: The range this represents. 7552 Range *GridRange `json:"range,omitempty"` 7553 7554 // ForceSendFields is a list of field names (e.g. "Name") to 7555 // unconditionally include in API requests. By default, fields with 7556 // empty or default values are omitted from API requests. However, any 7557 // non-pointer, non-interface field appearing in ForceSendFields will be 7558 // sent to the server regardless of whether the field is empty or not. 7559 // This may be used to include empty fields in Patch requests. 7560 ForceSendFields []string `json:"-"` 7561 7562 // NullFields is a list of field names (e.g. "Name") to include in API 7563 // requests with the JSON null value. By default, fields with empty 7564 // values are omitted from API requests. However, any field with an 7565 // empty value appearing in NullFields will be sent to the server as 7566 // null. It is an error if a field in this list has a non-empty value. 7567 // This may be used to include null fields in Patch requests. 7568 NullFields []string `json:"-"` 7569} 7570 7571func (s *NamedRange) MarshalJSON() ([]byte, error) { 7572 type NoMethod NamedRange 7573 raw := NoMethod(*s) 7574 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7575} 7576 7577// NumberFormat: The number format of a cell. 7578type NumberFormat struct { 7579 // Pattern: Pattern string used for formatting. If not set, a default 7580 // pattern based on the user's locale will be used if necessary for the 7581 // given type. See the Date and Number Formats guide 7582 // (/sheets/api/guides/formats) for more information about the supported 7583 // patterns. 7584 Pattern string `json:"pattern,omitempty"` 7585 7586 // Type: The type of the number format. When writing, this field must be 7587 // set. 7588 // 7589 // Possible values: 7590 // "NUMBER_FORMAT_TYPE_UNSPECIFIED" - The number format is not 7591 // specified and is based on the contents of the cell. Do not explicitly 7592 // use this. 7593 // "TEXT" - Text formatting, e.g `1000.12` 7594 // "NUMBER" - Number formatting, e.g, `1,000.12` 7595 // "PERCENT" - Percent formatting, e.g `10.12%` 7596 // "CURRENCY" - Currency formatting, e.g `$1,000.12` 7597 // "DATE" - Date formatting, e.g `9/26/2008` 7598 // "TIME" - Time formatting, e.g `3:59:00 PM` 7599 // "DATE_TIME" - Date+Time formatting, e.g `9/26/08 15:59:00` 7600 // "SCIENTIFIC" - Scientific number formatting, e.g `1.01E+03` 7601 Type string `json:"type,omitempty"` 7602 7603 // ForceSendFields is a list of field names (e.g. "Pattern") to 7604 // unconditionally include in API requests. By default, fields with 7605 // empty or default values are omitted from API requests. However, any 7606 // non-pointer, non-interface field appearing in ForceSendFields will be 7607 // sent to the server regardless of whether the field is empty or not. 7608 // This may be used to include empty fields in Patch requests. 7609 ForceSendFields []string `json:"-"` 7610 7611 // NullFields is a list of field names (e.g. "Pattern") to include in 7612 // API requests with the JSON null value. By default, fields with empty 7613 // values are omitted from API requests. However, any field with an 7614 // empty value appearing in NullFields will be sent to the server as 7615 // null. It is an error if a field in this list has a non-empty value. 7616 // This may be used to include null fields in Patch requests. 7617 NullFields []string `json:"-"` 7618} 7619 7620func (s *NumberFormat) MarshalJSON() ([]byte, error) { 7621 type NoMethod NumberFormat 7622 raw := NoMethod(*s) 7623 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7624} 7625 7626// OrgChartSpec: An org chart. Org charts require a unique set of labels 7627// in labels and may optionally include parent_labels and tooltips. 7628// parent_labels contain, for each node, the label identifying the 7629// parent node. tooltips contain, for each node, an optional tooltip. 7630// For example, to describe an OrgChart with Alice as the CEO, Bob as 7631// the President (reporting to Alice) and Cathy as VP of Sales (also 7632// reporting to Alice), have labels contain "Alice", "Bob", "Cathy", 7633// parent_labels contain "", "Alice", "Alice" and tooltips contain 7634// "CEO", "President", "VP Sales". 7635type OrgChartSpec struct { 7636 // Labels: The data containing the labels for all the nodes in the 7637 // chart. Labels must be unique. 7638 Labels *ChartData `json:"labels,omitempty"` 7639 7640 // NodeColor: The color of the org chart nodes. 7641 NodeColor *Color `json:"nodeColor,omitempty"` 7642 7643 // NodeColorStyle: The color of the org chart nodes. If node_color is 7644 // also set, this field takes precedence. 7645 NodeColorStyle *ColorStyle `json:"nodeColorStyle,omitempty"` 7646 7647 // NodeSize: The size of the org chart nodes. 7648 // 7649 // Possible values: 7650 // "ORG_CHART_LABEL_SIZE_UNSPECIFIED" - Default value, do not use. 7651 // "SMALL" - The small org chart node size. 7652 // "MEDIUM" - The medium org chart node size. 7653 // "LARGE" - The large org chart node size. 7654 NodeSize string `json:"nodeSize,omitempty"` 7655 7656 // ParentLabels: The data containing the label of the parent for the 7657 // corresponding node. A blank value indicates that the node has no 7658 // parent and is a top-level node. This field is optional. 7659 ParentLabels *ChartData `json:"parentLabels,omitempty"` 7660 7661 // SelectedNodeColor: The color of the selected org chart nodes. 7662 SelectedNodeColor *Color `json:"selectedNodeColor,omitempty"` 7663 7664 // SelectedNodeColorStyle: The color of the selected org chart nodes. If 7665 // selected_node_color is also set, this field takes precedence. 7666 SelectedNodeColorStyle *ColorStyle `json:"selectedNodeColorStyle,omitempty"` 7667 7668 // Tooltips: The data containing the tooltip for the corresponding node. 7669 // A blank value results in no tooltip being displayed for the node. 7670 // This field is optional. 7671 Tooltips *ChartData `json:"tooltips,omitempty"` 7672 7673 // ForceSendFields is a list of field names (e.g. "Labels") to 7674 // unconditionally include in API requests. By default, fields with 7675 // empty or default values are omitted from API requests. However, any 7676 // non-pointer, non-interface field appearing in ForceSendFields will be 7677 // sent to the server regardless of whether the field is empty or not. 7678 // This may be used to include empty fields in Patch requests. 7679 ForceSendFields []string `json:"-"` 7680 7681 // NullFields is a list of field names (e.g. "Labels") to include in API 7682 // requests with the JSON null value. By default, fields with empty 7683 // values are omitted from API requests. However, any field with an 7684 // empty value appearing in NullFields will be sent to the server as 7685 // null. It is an error if a field in this list has a non-empty value. 7686 // This may be used to include null fields in Patch requests. 7687 NullFields []string `json:"-"` 7688} 7689 7690func (s *OrgChartSpec) MarshalJSON() ([]byte, error) { 7691 type NoMethod OrgChartSpec 7692 raw := NoMethod(*s) 7693 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7694} 7695 7696// OverlayPosition: The location an object is overlaid on top of a grid. 7697type OverlayPosition struct { 7698 // AnchorCell: The cell the object is anchored to. 7699 AnchorCell *GridCoordinate `json:"anchorCell,omitempty"` 7700 7701 // HeightPixels: The height of the object, in pixels. Defaults to 371. 7702 HeightPixels int64 `json:"heightPixels,omitempty"` 7703 7704 // OffsetXPixels: The horizontal offset, in pixels, that the object is 7705 // offset from the anchor cell. 7706 OffsetXPixels int64 `json:"offsetXPixels,omitempty"` 7707 7708 // OffsetYPixels: The vertical offset, in pixels, that the object is 7709 // offset from the anchor cell. 7710 OffsetYPixels int64 `json:"offsetYPixels,omitempty"` 7711 7712 // WidthPixels: The width of the object, in pixels. Defaults to 600. 7713 WidthPixels int64 `json:"widthPixels,omitempty"` 7714 7715 // ForceSendFields is a list of field names (e.g. "AnchorCell") to 7716 // unconditionally include in API requests. By default, fields with 7717 // empty or default values are omitted from API requests. However, any 7718 // non-pointer, non-interface field appearing in ForceSendFields will be 7719 // sent to the server regardless of whether the field is empty or not. 7720 // This may be used to include empty fields in Patch requests. 7721 ForceSendFields []string `json:"-"` 7722 7723 // NullFields is a list of field names (e.g. "AnchorCell") to include in 7724 // API requests with the JSON null value. By default, fields with empty 7725 // values are omitted from API requests. However, any field with an 7726 // empty value appearing in NullFields will be sent to the server as 7727 // null. It is an error if a field in this list has a non-empty value. 7728 // This may be used to include null fields in Patch requests. 7729 NullFields []string `json:"-"` 7730} 7731 7732func (s *OverlayPosition) MarshalJSON() ([]byte, error) { 7733 type NoMethod OverlayPosition 7734 raw := NoMethod(*s) 7735 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7736} 7737 7738// Padding: The amount of padding around the cell, in pixels. When 7739// updating padding, every field must be specified. 7740type Padding struct { 7741 // Bottom: The bottom padding of the cell. 7742 Bottom int64 `json:"bottom,omitempty"` 7743 7744 // Left: The left padding of the cell. 7745 Left int64 `json:"left,omitempty"` 7746 7747 // Right: The right padding of the cell. 7748 Right int64 `json:"right,omitempty"` 7749 7750 // Top: The top padding of the cell. 7751 Top int64 `json:"top,omitempty"` 7752 7753 // ForceSendFields is a list of field names (e.g. "Bottom") to 7754 // unconditionally include in API requests. By default, fields with 7755 // empty or default values are omitted from API requests. However, any 7756 // non-pointer, non-interface field appearing in ForceSendFields will be 7757 // sent to the server regardless of whether the field is empty or not. 7758 // This may be used to include empty fields in Patch requests. 7759 ForceSendFields []string `json:"-"` 7760 7761 // NullFields is a list of field names (e.g. "Bottom") to include in API 7762 // requests with the JSON null value. By default, fields with empty 7763 // values are omitted from API requests. However, any field with an 7764 // empty value appearing in NullFields will be sent to the server as 7765 // null. It is an error if a field in this list has a non-empty value. 7766 // This may be used to include null fields in Patch requests. 7767 NullFields []string `json:"-"` 7768} 7769 7770func (s *Padding) MarshalJSON() ([]byte, error) { 7771 type NoMethod Padding 7772 raw := NoMethod(*s) 7773 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7774} 7775 7776// PasteDataRequest: Inserts data into the spreadsheet starting at the 7777// specified coordinate. 7778type PasteDataRequest struct { 7779 // Coordinate: The coordinate at which the data should start being 7780 // inserted. 7781 Coordinate *GridCoordinate `json:"coordinate,omitempty"` 7782 7783 // Data: The data to insert. 7784 Data string `json:"data,omitempty"` 7785 7786 // Delimiter: The delimiter in the data. 7787 Delimiter string `json:"delimiter,omitempty"` 7788 7789 // Html: True if the data is HTML. 7790 Html bool `json:"html,omitempty"` 7791 7792 // Type: How the data should be pasted. 7793 // 7794 // Possible values: 7795 // "PASTE_NORMAL" - Paste values, formulas, formats, and merges. 7796 // "PASTE_VALUES" - Paste the values ONLY without formats, formulas, 7797 // or merges. 7798 // "PASTE_FORMAT" - Paste the format and data validation only. 7799 // "PASTE_NO_BORDERS" - Like `PASTE_NORMAL` but without borders. 7800 // "PASTE_FORMULA" - Paste the formulas only. 7801 // "PASTE_DATA_VALIDATION" - Paste the data validation only. 7802 // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting 7803 // rules only. 7804 Type string `json:"type,omitempty"` 7805 7806 // ForceSendFields is a list of field names (e.g. "Coordinate") to 7807 // unconditionally include in API requests. By default, fields with 7808 // empty or default values are omitted from API requests. However, any 7809 // non-pointer, non-interface field appearing in ForceSendFields will be 7810 // sent to the server regardless of whether the field is empty or not. 7811 // This may be used to include empty fields in Patch requests. 7812 ForceSendFields []string `json:"-"` 7813 7814 // NullFields is a list of field names (e.g. "Coordinate") to include in 7815 // API requests with the JSON null value. By default, fields with empty 7816 // values are omitted from API requests. However, any field with an 7817 // empty value appearing in NullFields will be sent to the server as 7818 // null. It is an error if a field in this list has a non-empty value. 7819 // This may be used to include null fields in Patch requests. 7820 NullFields []string `json:"-"` 7821} 7822 7823func (s *PasteDataRequest) MarshalJSON() ([]byte, error) { 7824 type NoMethod PasteDataRequest 7825 raw := NoMethod(*s) 7826 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7827} 7828 7829// PieChartSpec: A pie chart. 7830type PieChartSpec struct { 7831 // Domain: The data that covers the domain of the pie chart. 7832 Domain *ChartData `json:"domain,omitempty"` 7833 7834 // LegendPosition: Where the legend of the pie chart should be drawn. 7835 // 7836 // Possible values: 7837 // "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not 7838 // use. 7839 // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the 7840 // chart. 7841 // "LEFT_LEGEND" - The legend is rendered on the left of the chart. 7842 // "RIGHT_LEGEND" - The legend is rendered on the right of the chart. 7843 // "TOP_LEGEND" - The legend is rendered on the top of the chart. 7844 // "NO_LEGEND" - No legend is rendered. 7845 // "LABELED_LEGEND" - Each pie slice has a label attached to it. 7846 LegendPosition string `json:"legendPosition,omitempty"` 7847 7848 // PieHole: The size of the hole in the pie chart. 7849 PieHole float64 `json:"pieHole,omitempty"` 7850 7851 // Series: The data that covers the one and only series of the pie 7852 // chart. 7853 Series *ChartData `json:"series,omitempty"` 7854 7855 // ThreeDimensional: True if the pie is three dimensional. 7856 ThreeDimensional bool `json:"threeDimensional,omitempty"` 7857 7858 // ForceSendFields is a list of field names (e.g. "Domain") to 7859 // unconditionally include in API requests. By default, fields with 7860 // empty or default values are omitted from API requests. However, any 7861 // non-pointer, non-interface field appearing in ForceSendFields will be 7862 // sent to the server regardless of whether the field is empty or not. 7863 // This may be used to include empty fields in Patch requests. 7864 ForceSendFields []string `json:"-"` 7865 7866 // NullFields is a list of field names (e.g. "Domain") to include in API 7867 // requests with the JSON null value. By default, fields with empty 7868 // values are omitted from API requests. However, any field with an 7869 // empty value appearing in NullFields will be sent to the server as 7870 // null. It is an error if a field in this list has a non-empty value. 7871 // This may be used to include null fields in Patch requests. 7872 NullFields []string `json:"-"` 7873} 7874 7875func (s *PieChartSpec) MarshalJSON() ([]byte, error) { 7876 type NoMethod PieChartSpec 7877 raw := NoMethod(*s) 7878 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7879} 7880 7881func (s *PieChartSpec) UnmarshalJSON(data []byte) error { 7882 type NoMethod PieChartSpec 7883 var s1 struct { 7884 PieHole gensupport.JSONFloat64 `json:"pieHole"` 7885 *NoMethod 7886 } 7887 s1.NoMethod = (*NoMethod)(s) 7888 if err := json.Unmarshal(data, &s1); err != nil { 7889 return err 7890 } 7891 s.PieHole = float64(s1.PieHole) 7892 return nil 7893} 7894 7895// PivotFilterCriteria: Criteria for showing/hiding rows in a pivot 7896// table. 7897type PivotFilterCriteria struct { 7898 // Condition: A condition that must be true for values to be shown. 7899 // (`visibleValues` does not override this -- even if a value is listed 7900 // there, it is still hidden if it does not meet the condition.) 7901 // Condition values that refer to ranges in A1-notation are evaluated 7902 // relative to the pivot table sheet. References are treated absolutely, 7903 // so are not filled down the pivot table. For example, a condition 7904 // value of `=A1` on "Pivot Table 1" is treated as `'Pivot Table 7905 // 1'!$A$1`. The source data of the pivot table can be referenced by 7906 // column header name. For example, if the source data has columns named 7907 // "Revenue" and "Cost" and a condition is applied to the "Revenue" 7908 // column with type `NUMBER_GREATER` and value `=Cost`, then only 7909 // columns where "Revenue" > "Cost" are included. 7910 Condition *BooleanCondition `json:"condition,omitempty"` 7911 7912 // VisibleByDefault: Whether values are visible by default. If true, the 7913 // visible_values are ignored, all values that meet condition (if 7914 // specified) are shown. If false, values that are both in 7915 // visible_values and meet condition are shown. 7916 VisibleByDefault bool `json:"visibleByDefault,omitempty"` 7917 7918 // VisibleValues: Values that should be included. Values not listed here 7919 // are excluded. 7920 VisibleValues []string `json:"visibleValues,omitempty"` 7921 7922 // ForceSendFields is a list of field names (e.g. "Condition") to 7923 // unconditionally include in API requests. By default, fields with 7924 // empty or default values are omitted from API requests. However, any 7925 // non-pointer, non-interface field appearing in ForceSendFields will be 7926 // sent to the server regardless of whether the field is empty or not. 7927 // This may be used to include empty fields in Patch requests. 7928 ForceSendFields []string `json:"-"` 7929 7930 // NullFields is a list of field names (e.g. "Condition") to include in 7931 // API requests with the JSON null value. By default, fields with empty 7932 // values are omitted from API requests. However, any field with an 7933 // empty value appearing in NullFields will be sent to the server as 7934 // null. It is an error if a field in this list has a non-empty value. 7935 // This may be used to include null fields in Patch requests. 7936 NullFields []string `json:"-"` 7937} 7938 7939func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) { 7940 type NoMethod PivotFilterCriteria 7941 raw := NoMethod(*s) 7942 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7943} 7944 7945// PivotFilterSpec: The pivot table filter criteria associated with a 7946// specific source column offset. 7947type PivotFilterSpec struct { 7948 // ColumnOffsetIndex: The column offset of the source range. 7949 ColumnOffsetIndex int64 `json:"columnOffsetIndex,omitempty"` 7950 7951 // DataSourceColumnReference: The reference to the data source column. 7952 DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` 7953 7954 // FilterCriteria: The criteria for the column. 7955 FilterCriteria *PivotFilterCriteria `json:"filterCriteria,omitempty"` 7956 7957 // ForceSendFields is a list of field names (e.g. "ColumnOffsetIndex") 7958 // to unconditionally include in API requests. By default, fields with 7959 // empty or default values are omitted from API requests. However, any 7960 // non-pointer, non-interface field appearing in ForceSendFields will be 7961 // sent to the server regardless of whether the field is empty or not. 7962 // This may be used to include empty fields in Patch requests. 7963 ForceSendFields []string `json:"-"` 7964 7965 // NullFields is a list of field names (e.g. "ColumnOffsetIndex") to 7966 // include in API requests with the JSON null value. By default, fields 7967 // with empty values are omitted from API requests. However, any field 7968 // with an empty value appearing in NullFields will be sent to the 7969 // server as null. It is an error if a field in this list has a 7970 // non-empty value. This may be used to include null fields in Patch 7971 // requests. 7972 NullFields []string `json:"-"` 7973} 7974 7975func (s *PivotFilterSpec) MarshalJSON() ([]byte, error) { 7976 type NoMethod PivotFilterSpec 7977 raw := NoMethod(*s) 7978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 7979} 7980 7981// PivotGroup: A single grouping (either row or column) in a pivot 7982// table. 7983type PivotGroup struct { 7984 // DataSourceColumnReference: The reference to the data source column 7985 // this grouping is based on. 7986 DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` 7987 7988 // GroupLimit: The count limit on rows or columns to apply to this pivot 7989 // group. 7990 GroupLimit *PivotGroupLimit `json:"groupLimit,omitempty"` 7991 7992 // GroupRule: The group rule to apply to this row/column group. 7993 GroupRule *PivotGroupRule `json:"groupRule,omitempty"` 7994 7995 // Label: The labels to use for the row/column groups which can be 7996 // customized. For example, in the following pivot table, the row label 7997 // is `Region` (which could be renamed to `State`) and the column label 7998 // is `Product` (which could be renamed `Item`). Pivot tables created 7999 // before December 2017 do not have header labels. If you'd like to add 8000 // header labels to an existing pivot table, please delete the existing 8001 // pivot table and then create a new pivot table with same parameters. 8002 // +--------------+---------+-------+ | SUM of Units | Product | | | 8003 // Region | Pen | Paper | +--------------+---------+-------+ | New York 8004 // | 345 | 98 | | Oregon | 234 | 123 | | Tennessee | 531 | 415 | 8005 // +--------------+---------+-------+ | Grand Total | 1110 | 636 | 8006 // +--------------+---------+-------+ 8007 Label string `json:"label,omitempty"` 8008 8009 // RepeatHeadings: True if the headings in this pivot group should be 8010 // repeated. This is only valid for row groupings and is ignored by 8011 // columns. By default, we minimize repetition of headings by not 8012 // showing higher level headings where they are the same. For example, 8013 // even though the third row below corresponds to "Q1 Mar", "Q1" is not 8014 // shown because it is redundant with previous rows. Setting 8015 // repeat_headings to true would cause "Q1" to be repeated for "Feb" and 8016 // "Mar". +--------------+ | Q1 | Jan | | | Feb | | | Mar | 8017 // +--------+-----+ | Q1 Total | +--------------+ 8018 RepeatHeadings bool `json:"repeatHeadings,omitempty"` 8019 8020 // ShowTotals: True if the pivot table should include the totals for 8021 // this grouping. 8022 ShowTotals bool `json:"showTotals,omitempty"` 8023 8024 // SortOrder: The order the values in this group should be sorted. 8025 // 8026 // Possible values: 8027 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 8028 // "ASCENDING" - Sort ascending. 8029 // "DESCENDING" - Sort descending. 8030 SortOrder string `json:"sortOrder,omitempty"` 8031 8032 // SourceColumnOffset: The column offset of the source range that this 8033 // grouping is based on. For example, if the source was `C10:E15`, a 8034 // `sourceColumnOffset` of `0` means this group refers to column `C`, 8035 // whereas the offset `1` would refer to column `D`. 8036 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 8037 8038 // ValueBucket: The bucket of the opposite pivot group to sort by. If 8039 // not specified, sorting is alphabetical by this group's values. 8040 ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"` 8041 8042 // ValueMetadata: Metadata about values in the grouping. 8043 ValueMetadata []*PivotGroupValueMetadata `json:"valueMetadata,omitempty"` 8044 8045 // ForceSendFields is a list of field names (e.g. 8046 // "DataSourceColumnReference") to unconditionally include in API 8047 // requests. By default, fields with empty or default values are omitted 8048 // from API requests. However, any non-pointer, non-interface field 8049 // appearing in ForceSendFields will be sent to the server regardless of 8050 // whether the field is empty or not. This may be used to include empty 8051 // fields in Patch requests. 8052 ForceSendFields []string `json:"-"` 8053 8054 // NullFields is a list of field names (e.g. 8055 // "DataSourceColumnReference") to include in API requests with the JSON 8056 // null value. By default, fields with empty values are omitted from API 8057 // requests. However, any field with an empty value appearing in 8058 // NullFields will be sent to the server as null. It is an error if a 8059 // field in this list has a non-empty value. This may be used to include 8060 // null fields in Patch requests. 8061 NullFields []string `json:"-"` 8062} 8063 8064func (s *PivotGroup) MarshalJSON() ([]byte, error) { 8065 type NoMethod PivotGroup 8066 raw := NoMethod(*s) 8067 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8068} 8069 8070// PivotGroupLimit: The count limit on rows or columns in the pivot 8071// group. 8072type PivotGroupLimit struct { 8073 // ApplyOrder: The order in which the group limit is applied to the 8074 // pivot table. Pivot group limits are applied from lower to higher 8075 // order number. Order numbers are normalized to consecutive integers 8076 // from 0. For write request, to fully customize the applying orders, 8077 // all pivot group limits should have this field set with an unique 8078 // number. Otherwise, the order is determined by the index in the 8079 // PivotTable.rows list and then the PivotTable.columns list. 8080 ApplyOrder int64 `json:"applyOrder,omitempty"` 8081 8082 // CountLimit: The count limit. 8083 CountLimit int64 `json:"countLimit,omitempty"` 8084 8085 // ForceSendFields is a list of field names (e.g. "ApplyOrder") to 8086 // unconditionally include in API requests. By default, fields with 8087 // empty or default values are omitted from API requests. However, any 8088 // non-pointer, non-interface field appearing in ForceSendFields will be 8089 // sent to the server regardless of whether the field is empty or not. 8090 // This may be used to include empty fields in Patch requests. 8091 ForceSendFields []string `json:"-"` 8092 8093 // NullFields is a list of field names (e.g. "ApplyOrder") to include in 8094 // API requests with the JSON null value. By default, fields with empty 8095 // values are omitted from API requests. However, any field with an 8096 // empty value appearing in NullFields will be sent to the server as 8097 // null. It is an error if a field in this list has a non-empty value. 8098 // This may be used to include null fields in Patch requests. 8099 NullFields []string `json:"-"` 8100} 8101 8102func (s *PivotGroupLimit) MarshalJSON() ([]byte, error) { 8103 type NoMethod PivotGroupLimit 8104 raw := NoMethod(*s) 8105 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8106} 8107 8108// PivotGroupRule: An optional setting on a PivotGroup that defines 8109// buckets for the values in the source data column rather than breaking 8110// out each individual value. Only one PivotGroup with a group rule may 8111// be added for each column in the source data, though on any given 8112// column you may add both a PivotGroup that has a rule and a PivotGroup 8113// that does not. 8114type PivotGroupRule struct { 8115 // DateTimeRule: A DateTimeRule. 8116 DateTimeRule *DateTimeRule `json:"dateTimeRule,omitempty"` 8117 8118 // HistogramRule: A HistogramRule. 8119 HistogramRule *HistogramRule `json:"histogramRule,omitempty"` 8120 8121 // ManualRule: A ManualRule. 8122 ManualRule *ManualRule `json:"manualRule,omitempty"` 8123 8124 // ForceSendFields is a list of field names (e.g. "DateTimeRule") to 8125 // unconditionally include in API requests. By default, fields with 8126 // empty or default values are omitted from API requests. However, any 8127 // non-pointer, non-interface field appearing in ForceSendFields will be 8128 // sent to the server regardless of whether the field is empty or not. 8129 // This may be used to include empty fields in Patch requests. 8130 ForceSendFields []string `json:"-"` 8131 8132 // NullFields is a list of field names (e.g. "DateTimeRule") to include 8133 // in API requests with the JSON null value. By default, fields with 8134 // empty values are omitted from API requests. However, any field with 8135 // an empty value appearing in NullFields will be sent to the server as 8136 // null. It is an error if a field in this list has a non-empty value. 8137 // This may be used to include null fields in Patch requests. 8138 NullFields []string `json:"-"` 8139} 8140 8141func (s *PivotGroupRule) MarshalJSON() ([]byte, error) { 8142 type NoMethod PivotGroupRule 8143 raw := NoMethod(*s) 8144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8145} 8146 8147// PivotGroupSortValueBucket: Information about which values in a pivot 8148// group should be used for sorting. 8149type PivotGroupSortValueBucket struct { 8150 // Buckets: Determines the bucket from which values are chosen to sort. 8151 // For example, in a pivot table with one row group & two column groups, 8152 // the row group can list up to two values. The first value corresponds 8153 // to a value within the first column group, and the second value 8154 // corresponds to a value in the second column group. If no values are 8155 // listed, this would indicate that the row should be sorted according 8156 // to the "Grand Total" over the column groups. If a single value is 8157 // listed, this would correspond to using the "Total" of that bucket. 8158 Buckets []*ExtendedValue `json:"buckets,omitempty"` 8159 8160 // ValuesIndex: The offset in the PivotTable.values list which the 8161 // values in this grouping should be sorted by. 8162 ValuesIndex int64 `json:"valuesIndex,omitempty"` 8163 8164 // ForceSendFields is a list of field names (e.g. "Buckets") to 8165 // unconditionally include in API requests. By default, fields with 8166 // empty or default values are omitted from API requests. However, any 8167 // non-pointer, non-interface field appearing in ForceSendFields will be 8168 // sent to the server regardless of whether the field is empty or not. 8169 // This may be used to include empty fields in Patch requests. 8170 ForceSendFields []string `json:"-"` 8171 8172 // NullFields is a list of field names (e.g. "Buckets") to include in 8173 // API requests with the JSON null value. By default, fields with empty 8174 // values are omitted from API requests. However, any field with an 8175 // empty value appearing in NullFields will be sent to the server as 8176 // null. It is an error if a field in this list has a non-empty value. 8177 // This may be used to include null fields in Patch requests. 8178 NullFields []string `json:"-"` 8179} 8180 8181func (s *PivotGroupSortValueBucket) MarshalJSON() ([]byte, error) { 8182 type NoMethod PivotGroupSortValueBucket 8183 raw := NoMethod(*s) 8184 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8185} 8186 8187// PivotGroupValueMetadata: Metadata about a value in a pivot grouping. 8188type PivotGroupValueMetadata struct { 8189 // Collapsed: True if the data corresponding to the value is collapsed. 8190 Collapsed bool `json:"collapsed,omitempty"` 8191 8192 // Value: The calculated value the metadata corresponds to. (Note that 8193 // formulaValue is not valid, because the values will be calculated.) 8194 Value *ExtendedValue `json:"value,omitempty"` 8195 8196 // ForceSendFields is a list of field names (e.g. "Collapsed") to 8197 // unconditionally include in API requests. By default, fields with 8198 // empty or default values are omitted from API requests. However, any 8199 // non-pointer, non-interface field appearing in ForceSendFields will be 8200 // sent to the server regardless of whether the field is empty or not. 8201 // This may be used to include empty fields in Patch requests. 8202 ForceSendFields []string `json:"-"` 8203 8204 // NullFields is a list of field names (e.g. "Collapsed") to include in 8205 // API requests with the JSON null value. By default, fields with empty 8206 // values are omitted from API requests. However, any field with an 8207 // empty value appearing in NullFields will be sent to the server as 8208 // null. It is an error if a field in this list has a non-empty value. 8209 // This may be used to include null fields in Patch requests. 8210 NullFields []string `json:"-"` 8211} 8212 8213func (s *PivotGroupValueMetadata) MarshalJSON() ([]byte, error) { 8214 type NoMethod PivotGroupValueMetadata 8215 raw := NoMethod(*s) 8216 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8217} 8218 8219// PivotTable: A pivot table. 8220type PivotTable struct { 8221 // Columns: Each column grouping in the pivot table. 8222 Columns []*PivotGroup `json:"columns,omitempty"` 8223 8224 // Criteria: An optional mapping of filters per source column offset. 8225 // The filters are applied before aggregating data into the pivot table. 8226 // The map's key is the column offset of the source range that you want 8227 // to filter, and the value is the criteria for that column. For 8228 // example, if the source was `C10:E15`, a key of `0` will have the 8229 // filter for column `C`, whereas the key `1` is for column `D`. This 8230 // field is deprecated in favor of filter_specs. 8231 Criteria map[string]PivotFilterCriteria `json:"criteria,omitempty"` 8232 8233 // DataExecutionStatus: Output only. The data execution status for data 8234 // source pivot tables. 8235 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 8236 8237 // DataSourceId: The ID of the data source the pivot table is reading 8238 // data from. 8239 DataSourceId string `json:"dataSourceId,omitempty"` 8240 8241 // FilterSpecs: The filters applied to the source columns before 8242 // aggregating data for the pivot table. Both criteria and filter_specs 8243 // are populated in responses. If both fields are specified in an update 8244 // request, this field takes precedence. 8245 FilterSpecs []*PivotFilterSpec `json:"filterSpecs,omitempty"` 8246 8247 // Rows: Each row grouping in the pivot table. 8248 Rows []*PivotGroup `json:"rows,omitempty"` 8249 8250 // Source: The range the pivot table is reading data from. 8251 Source *GridRange `json:"source,omitempty"` 8252 8253 // ValueLayout: Whether values should be listed horizontally (as 8254 // columns) or vertically (as rows). 8255 // 8256 // Possible values: 8257 // "HORIZONTAL" - Values are laid out horizontally (as columns). 8258 // "VERTICAL" - Values are laid out vertically (as rows). 8259 ValueLayout string `json:"valueLayout,omitempty"` 8260 8261 // Values: A list of values to include in the pivot table. 8262 Values []*PivotValue `json:"values,omitempty"` 8263 8264 // ForceSendFields is a list of field names (e.g. "Columns") to 8265 // unconditionally include in API requests. By default, fields with 8266 // empty or default values are omitted from API requests. However, any 8267 // non-pointer, non-interface field appearing in ForceSendFields will be 8268 // sent to the server regardless of whether the field is empty or not. 8269 // This may be used to include empty fields in Patch requests. 8270 ForceSendFields []string `json:"-"` 8271 8272 // NullFields is a list of field names (e.g. "Columns") to include in 8273 // API requests with the JSON null value. By default, fields with empty 8274 // values are omitted from API requests. However, any field with an 8275 // empty value appearing in NullFields will be sent to the server as 8276 // null. It is an error if a field in this list has a non-empty value. 8277 // This may be used to include null fields in Patch requests. 8278 NullFields []string `json:"-"` 8279} 8280 8281func (s *PivotTable) MarshalJSON() ([]byte, error) { 8282 type NoMethod PivotTable 8283 raw := NoMethod(*s) 8284 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8285} 8286 8287// PivotValue: The definition of how a value in a pivot table should be 8288// calculated. 8289type PivotValue struct { 8290 // CalculatedDisplayType: If specified, indicates that pivot values 8291 // should be displayed as the result of a calculation with another pivot 8292 // value. For example, if calculated_display_type is specified as 8293 // PERCENT_OF_GRAND_TOTAL, all the pivot values are displayed as the 8294 // percentage of the grand total. In the Sheets editor, this is referred 8295 // to as "Show As" in the value section of a pivot table. 8296 // 8297 // Possible values: 8298 // "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" - Default value, 8299 // do not use. 8300 // "PERCENT_OF_ROW_TOTAL" - Shows the pivot values as percentage of 8301 // the row total values. 8302 // "PERCENT_OF_COLUMN_TOTAL" - Shows the pivot values as percentage of 8303 // the column total values. 8304 // "PERCENT_OF_GRAND_TOTAL" - Shows the pivot values as percentage of 8305 // the grand total values. 8306 CalculatedDisplayType string `json:"calculatedDisplayType,omitempty"` 8307 8308 // DataSourceColumnReference: The reference to the data source column 8309 // that this value reads from. 8310 DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` 8311 8312 // Formula: A custom formula to calculate the value. The formula must 8313 // start with an `=` character. 8314 Formula string `json:"formula,omitempty"` 8315 8316 // Name: A name to use for the value. 8317 Name string `json:"name,omitempty"` 8318 8319 // SourceColumnOffset: The column offset of the source range that this 8320 // value reads from. For example, if the source was `C10:E15`, a 8321 // `sourceColumnOffset` of `0` means this value refers to column `C`, 8322 // whereas the offset `1` would refer to column `D`. 8323 SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"` 8324 8325 // SummarizeFunction: A function to summarize the value. If formula is 8326 // set, the only supported values are SUM and CUSTOM. If 8327 // sourceColumnOffset is set, then `CUSTOM` is not supported. 8328 // 8329 // Possible values: 8330 // "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" - The default, do not 8331 // use. 8332 // "SUM" - Corresponds to the `SUM` function. 8333 // "COUNTA" - Corresponds to the `COUNTA` function. 8334 // "COUNT" - Corresponds to the `COUNT` function. 8335 // "COUNTUNIQUE" - Corresponds to the `COUNTUNIQUE` function. 8336 // "AVERAGE" - Corresponds to the `AVERAGE` function. 8337 // "MAX" - Corresponds to the `MAX` function. 8338 // "MIN" - Corresponds to the `MIN` function. 8339 // "MEDIAN" - Corresponds to the `MEDIAN` function. 8340 // "PRODUCT" - Corresponds to the `PRODUCT` function. 8341 // "STDEV" - Corresponds to the `STDEV` function. 8342 // "STDEVP" - Corresponds to the `STDEVP` function. 8343 // "VAR" - Corresponds to the `VAR` function. 8344 // "VARP" - Corresponds to the `VARP` function. 8345 // "CUSTOM" - Indicates the formula should be used as-is. Only valid 8346 // if PivotValue.formula was set. 8347 SummarizeFunction string `json:"summarizeFunction,omitempty"` 8348 8349 // ForceSendFields is a list of field names (e.g. 8350 // "CalculatedDisplayType") to unconditionally include in API requests. 8351 // By default, fields with empty or default values are omitted from API 8352 // requests. However, any non-pointer, non-interface field appearing in 8353 // ForceSendFields will be sent to the server regardless of whether the 8354 // field is empty or not. This may be used to include empty fields in 8355 // Patch requests. 8356 ForceSendFields []string `json:"-"` 8357 8358 // NullFields is a list of field names (e.g. "CalculatedDisplayType") to 8359 // include in API requests with the JSON null value. By default, fields 8360 // with empty values are omitted from API requests. However, any field 8361 // with an empty value appearing in NullFields will be sent to the 8362 // server as null. It is an error if a field in this list has a 8363 // non-empty value. This may be used to include null fields in Patch 8364 // requests. 8365 NullFields []string `json:"-"` 8366} 8367 8368func (s *PivotValue) MarshalJSON() ([]byte, error) { 8369 type NoMethod PivotValue 8370 raw := NoMethod(*s) 8371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8372} 8373 8374// PointStyle: The style of a point on the chart. 8375type PointStyle struct { 8376 // Shape: The point shape. If empty or unspecified, a default shape is 8377 // used. 8378 // 8379 // Possible values: 8380 // "POINT_SHAPE_UNSPECIFIED" - Default value. 8381 // "CIRCLE" - A circle shape. 8382 // "DIAMOND" - A diamond shape. 8383 // "HEXAGON" - A hexagon shape. 8384 // "PENTAGON" - A pentagon shape. 8385 // "SQUARE" - A square shape. 8386 // "STAR" - A star shape. 8387 // "TRIANGLE" - A triangle shape. 8388 // "X_MARK" - An x-mark shape. 8389 Shape string `json:"shape,omitempty"` 8390 8391 // Size: The point size. If empty, a default size is used. 8392 Size float64 `json:"size,omitempty"` 8393 8394 // ForceSendFields is a list of field names (e.g. "Shape") to 8395 // unconditionally include in API requests. By default, fields with 8396 // empty or default values are omitted from API requests. However, any 8397 // non-pointer, non-interface field appearing in ForceSendFields will be 8398 // sent to the server regardless of whether the field is empty or not. 8399 // This may be used to include empty fields in Patch requests. 8400 ForceSendFields []string `json:"-"` 8401 8402 // NullFields is a list of field names (e.g. "Shape") to include in API 8403 // requests with the JSON null value. By default, fields with empty 8404 // values are omitted from API requests. However, any field with an 8405 // empty value appearing in NullFields will be sent to the server as 8406 // null. It is an error if a field in this list has a non-empty value. 8407 // This may be used to include null fields in Patch requests. 8408 NullFields []string `json:"-"` 8409} 8410 8411func (s *PointStyle) MarshalJSON() ([]byte, error) { 8412 type NoMethod PointStyle 8413 raw := NoMethod(*s) 8414 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8415} 8416 8417func (s *PointStyle) UnmarshalJSON(data []byte) error { 8418 type NoMethod PointStyle 8419 var s1 struct { 8420 Size gensupport.JSONFloat64 `json:"size"` 8421 *NoMethod 8422 } 8423 s1.NoMethod = (*NoMethod)(s) 8424 if err := json.Unmarshal(data, &s1); err != nil { 8425 return err 8426 } 8427 s.Size = float64(s1.Size) 8428 return nil 8429} 8430 8431// ProtectedRange: A protected range. 8432type ProtectedRange struct { 8433 // Description: The description of this protected range. 8434 Description string `json:"description,omitempty"` 8435 8436 // Editors: The users and groups with edit access to the protected 8437 // range. This field is only visible to users with edit access to the 8438 // protected range and the document. Editors are not supported with 8439 // warning_only protection. 8440 Editors *Editors `json:"editors,omitempty"` 8441 8442 // NamedRangeId: The named range this protected range is backed by, if 8443 // any. When writing, only one of range or named_range_id may be set. 8444 NamedRangeId string `json:"namedRangeId,omitempty"` 8445 8446 // ProtectedRangeId: The ID of the protected range. This field is 8447 // read-only. 8448 ProtectedRangeId int64 `json:"protectedRangeId,omitempty"` 8449 8450 // Range: The range that is being protected. The range may be fully 8451 // unbounded, in which case this is considered a protected sheet. When 8452 // writing, only one of range or named_range_id may be set. 8453 Range *GridRange `json:"range,omitempty"` 8454 8455 // RequestingUserCanEdit: True if the user who requested this protected 8456 // range can edit the protected area. This field is read-only. 8457 RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"` 8458 8459 // UnprotectedRanges: The list of unprotected ranges within a protected 8460 // sheet. Unprotected ranges are only supported on protected sheets. 8461 UnprotectedRanges []*GridRange `json:"unprotectedRanges,omitempty"` 8462 8463 // WarningOnly: True if this protected range will show a warning when 8464 // editing. Warning-based protection means that every user can edit data 8465 // in the protected range, except editing will prompt a warning asking 8466 // the user to confirm the edit. When writing: if this field is true, 8467 // then editors is ignored. Additionally, if this field is changed from 8468 // true to false and the `editors` field is not set (nor included in the 8469 // field mask), then the editors will be set to all the editors in the 8470 // document. 8471 WarningOnly bool `json:"warningOnly,omitempty"` 8472 8473 // ForceSendFields is a list of field names (e.g. "Description") to 8474 // unconditionally include in API requests. By default, fields with 8475 // empty or default values are omitted from API requests. However, any 8476 // non-pointer, non-interface field appearing in ForceSendFields will be 8477 // sent to the server regardless of whether the field is empty or not. 8478 // This may be used to include empty fields in Patch requests. 8479 ForceSendFields []string `json:"-"` 8480 8481 // NullFields is a list of field names (e.g. "Description") to include 8482 // in API requests with the JSON null value. By default, fields with 8483 // empty values are omitted from API requests. However, any field with 8484 // an empty value appearing in NullFields will be sent to the server as 8485 // null. It is an error if a field in this list has a non-empty value. 8486 // This may be used to include null fields in Patch requests. 8487 NullFields []string `json:"-"` 8488} 8489 8490func (s *ProtectedRange) MarshalJSON() ([]byte, error) { 8491 type NoMethod ProtectedRange 8492 raw := NoMethod(*s) 8493 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8494} 8495 8496// RandomizeRangeRequest: Randomizes the order of the rows in a range. 8497type RandomizeRangeRequest struct { 8498 // Range: The range to randomize. 8499 Range *GridRange `json:"range,omitempty"` 8500 8501 // ForceSendFields is a list of field names (e.g. "Range") to 8502 // unconditionally include in API requests. By default, fields with 8503 // empty or default values are omitted from API requests. However, any 8504 // non-pointer, non-interface field appearing in ForceSendFields will be 8505 // sent to the server regardless of whether the field is empty or not. 8506 // This may be used to include empty fields in Patch requests. 8507 ForceSendFields []string `json:"-"` 8508 8509 // NullFields is a list of field names (e.g. "Range") to include in API 8510 // requests with the JSON null value. By default, fields with empty 8511 // values are omitted from API requests. However, any field with an 8512 // empty value appearing in NullFields will be sent to the server as 8513 // null. It is an error if a field in this list has a non-empty value. 8514 // This may be used to include null fields in Patch requests. 8515 NullFields []string `json:"-"` 8516} 8517 8518func (s *RandomizeRangeRequest) MarshalJSON() ([]byte, error) { 8519 type NoMethod RandomizeRangeRequest 8520 raw := NoMethod(*s) 8521 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8522} 8523 8524// RefreshDataSourceObjectExecutionStatus: The execution status of 8525// refreshing one data source object. 8526type RefreshDataSourceObjectExecutionStatus struct { 8527 // DataExecutionStatus: The data execution status. 8528 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 8529 8530 // Reference: Reference to a data source object being refreshed. 8531 Reference *DataSourceObjectReference `json:"reference,omitempty"` 8532 8533 // ForceSendFields is a list of field names (e.g. "DataExecutionStatus") 8534 // to unconditionally include in API requests. By default, fields with 8535 // empty or default values are omitted from API requests. However, any 8536 // non-pointer, non-interface field appearing in ForceSendFields will be 8537 // sent to the server regardless of whether the field is empty or not. 8538 // This may be used to include empty fields in Patch requests. 8539 ForceSendFields []string `json:"-"` 8540 8541 // NullFields is a list of field names (e.g. "DataExecutionStatus") to 8542 // include in API requests with the JSON null value. By default, fields 8543 // with empty values are omitted from API requests. However, any field 8544 // with an empty value appearing in NullFields will be sent to the 8545 // server as null. It is an error if a field in this list has a 8546 // non-empty value. This may be used to include null fields in Patch 8547 // requests. 8548 NullFields []string `json:"-"` 8549} 8550 8551func (s *RefreshDataSourceObjectExecutionStatus) MarshalJSON() ([]byte, error) { 8552 type NoMethod RefreshDataSourceObjectExecutionStatus 8553 raw := NoMethod(*s) 8554 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8555} 8556 8557// RefreshDataSourceRequest: Refreshes one or multiple data source 8558// objects in the spreadsheet by the specified references. The request 8559// requires an additional `bigquery.readonly` OAuth scope. If there are 8560// multiple refresh requests referencing the same data source objects in 8561// one batch, only the last refresh request is processed, and all those 8562// requests will have the same response accordingly. 8563type RefreshDataSourceRequest struct { 8564 // DataSourceId: Reference to a DataSource. If specified, refreshes all 8565 // associated data source objects for the data source. 8566 DataSourceId string `json:"dataSourceId,omitempty"` 8567 8568 // Force: Refreshes the data source objects regardless of the current 8569 // state. If not set and a referenced data source object was in error 8570 // state, the refresh will fail immediately. 8571 Force bool `json:"force,omitempty"` 8572 8573 // IsAll: Refreshes all existing data source objects in the spreadsheet. 8574 IsAll bool `json:"isAll,omitempty"` 8575 8576 // References: References to data source objects to refresh. 8577 References *DataSourceObjectReferences `json:"references,omitempty"` 8578 8579 // ForceSendFields is a list of field names (e.g. "DataSourceId") to 8580 // unconditionally include in API requests. By default, fields with 8581 // empty or default values are omitted from API requests. However, any 8582 // non-pointer, non-interface field appearing in ForceSendFields will be 8583 // sent to the server regardless of whether the field is empty or not. 8584 // This may be used to include empty fields in Patch requests. 8585 ForceSendFields []string `json:"-"` 8586 8587 // NullFields is a list of field names (e.g. "DataSourceId") to include 8588 // in API requests with the JSON null value. By default, fields with 8589 // empty values are omitted from API requests. However, any field with 8590 // an empty value appearing in NullFields will be sent to the server as 8591 // null. It is an error if a field in this list has a non-empty value. 8592 // This may be used to include null fields in Patch requests. 8593 NullFields []string `json:"-"` 8594} 8595 8596func (s *RefreshDataSourceRequest) MarshalJSON() ([]byte, error) { 8597 type NoMethod RefreshDataSourceRequest 8598 raw := NoMethod(*s) 8599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8600} 8601 8602// RefreshDataSourceResponse: The response from refreshing one or 8603// multiple data source objects. 8604type RefreshDataSourceResponse struct { 8605 // Statuses: All the refresh status for the data source object 8606 // references specified in the request. If is_all is specified, the 8607 // field contains only those in failure status. 8608 Statuses []*RefreshDataSourceObjectExecutionStatus `json:"statuses,omitempty"` 8609 8610 // ForceSendFields is a list of field names (e.g. "Statuses") to 8611 // unconditionally include in API requests. By default, fields with 8612 // empty or default values are omitted from API requests. However, any 8613 // non-pointer, non-interface field appearing in ForceSendFields will be 8614 // sent to the server regardless of whether the field is empty or not. 8615 // This may be used to include empty fields in Patch requests. 8616 ForceSendFields []string `json:"-"` 8617 8618 // NullFields is a list of field names (e.g. "Statuses") to include in 8619 // API requests with the JSON null value. By default, fields with empty 8620 // values are omitted from API requests. However, any field with an 8621 // empty value appearing in NullFields will be sent to the server as 8622 // null. It is an error if a field in this list has a non-empty value. 8623 // This may be used to include null fields in Patch requests. 8624 NullFields []string `json:"-"` 8625} 8626 8627func (s *RefreshDataSourceResponse) MarshalJSON() ([]byte, error) { 8628 type NoMethod RefreshDataSourceResponse 8629 raw := NoMethod(*s) 8630 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8631} 8632 8633// RepeatCellRequest: Updates all cells in the range to the values in 8634// the given Cell object. Only the fields listed in the fields field are 8635// updated; others are unchanged. If writing a cell with a formula, the 8636// formula's ranges will automatically increment for each field in the 8637// range. For example, if writing a cell with formula `=A1` into range 8638// B2:C4, B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, C2 8639// would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. To keep the 8640// formula's ranges static, use the `$` indicator. For example, use the 8641// formula `=$A$1` to prevent both the row and the column from 8642// incrementing. 8643type RepeatCellRequest struct { 8644 // Cell: The data to write. 8645 Cell *CellData `json:"cell,omitempty"` 8646 8647 // Fields: The fields that should be updated. At least one field must be 8648 // specified. The root `cell` is implied and should not be specified. A 8649 // single "*" can be used as short-hand for listing every field. 8650 Fields string `json:"fields,omitempty"` 8651 8652 // Range: The range to repeat the cell in. 8653 Range *GridRange `json:"range,omitempty"` 8654 8655 // ForceSendFields is a list of field names (e.g. "Cell") to 8656 // unconditionally include in API requests. By default, fields with 8657 // empty or default values are omitted from API requests. However, any 8658 // non-pointer, non-interface field appearing in ForceSendFields will be 8659 // sent to the server regardless of whether the field is empty or not. 8660 // This may be used to include empty fields in Patch requests. 8661 ForceSendFields []string `json:"-"` 8662 8663 // NullFields is a list of field names (e.g. "Cell") to include in API 8664 // requests with the JSON null value. By default, fields with empty 8665 // values are omitted from API requests. However, any field with an 8666 // empty value appearing in NullFields will be sent to the server as 8667 // null. It is an error if a field in this list has a non-empty value. 8668 // This may be used to include null fields in Patch requests. 8669 NullFields []string `json:"-"` 8670} 8671 8672func (s *RepeatCellRequest) MarshalJSON() ([]byte, error) { 8673 type NoMethod RepeatCellRequest 8674 raw := NoMethod(*s) 8675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8676} 8677 8678// Request: A single kind of update to apply to a spreadsheet. 8679type Request struct { 8680 // AddBanding: Adds a new banded range 8681 AddBanding *AddBandingRequest `json:"addBanding,omitempty"` 8682 8683 // AddChart: Adds a chart. 8684 AddChart *AddChartRequest `json:"addChart,omitempty"` 8685 8686 // AddConditionalFormatRule: Adds a new conditional format rule. 8687 AddConditionalFormatRule *AddConditionalFormatRuleRequest `json:"addConditionalFormatRule,omitempty"` 8688 8689 // AddDataSource: Adds a data source. 8690 AddDataSource *AddDataSourceRequest `json:"addDataSource,omitempty"` 8691 8692 // AddDimensionGroup: Creates a group over the specified range. 8693 AddDimensionGroup *AddDimensionGroupRequest `json:"addDimensionGroup,omitempty"` 8694 8695 // AddFilterView: Adds a filter view. 8696 AddFilterView *AddFilterViewRequest `json:"addFilterView,omitempty"` 8697 8698 // AddNamedRange: Adds a named range. 8699 AddNamedRange *AddNamedRangeRequest `json:"addNamedRange,omitempty"` 8700 8701 // AddProtectedRange: Adds a protected range. 8702 AddProtectedRange *AddProtectedRangeRequest `json:"addProtectedRange,omitempty"` 8703 8704 // AddSheet: Adds a sheet. 8705 AddSheet *AddSheetRequest `json:"addSheet,omitempty"` 8706 8707 // AddSlicer: Adds a slicer. 8708 AddSlicer *AddSlicerRequest `json:"addSlicer,omitempty"` 8709 8710 // AppendCells: Appends cells after the last row with data in a sheet. 8711 AppendCells *AppendCellsRequest `json:"appendCells,omitempty"` 8712 8713 // AppendDimension: Appends dimensions to the end of a sheet. 8714 AppendDimension *AppendDimensionRequest `json:"appendDimension,omitempty"` 8715 8716 // AutoFill: Automatically fills in more data based on existing data. 8717 AutoFill *AutoFillRequest `json:"autoFill,omitempty"` 8718 8719 // AutoResizeDimensions: Automatically resizes one or more dimensions 8720 // based on the contents of the cells in that dimension. 8721 AutoResizeDimensions *AutoResizeDimensionsRequest `json:"autoResizeDimensions,omitempty"` 8722 8723 // ClearBasicFilter: Clears the basic filter on a sheet. 8724 ClearBasicFilter *ClearBasicFilterRequest `json:"clearBasicFilter,omitempty"` 8725 8726 // CopyPaste: Copies data from one area and pastes it to another. 8727 CopyPaste *CopyPasteRequest `json:"copyPaste,omitempty"` 8728 8729 // CreateDeveloperMetadata: Creates new developer metadata 8730 CreateDeveloperMetadata *CreateDeveloperMetadataRequest `json:"createDeveloperMetadata,omitempty"` 8731 8732 // CutPaste: Cuts data from one area and pastes it to another. 8733 CutPaste *CutPasteRequest `json:"cutPaste,omitempty"` 8734 8735 // DeleteBanding: Removes a banded range 8736 DeleteBanding *DeleteBandingRequest `json:"deleteBanding,omitempty"` 8737 8738 // DeleteConditionalFormatRule: Deletes an existing conditional format 8739 // rule. 8740 DeleteConditionalFormatRule *DeleteConditionalFormatRuleRequest `json:"deleteConditionalFormatRule,omitempty"` 8741 8742 // DeleteDataSource: Deletes a data source. 8743 DeleteDataSource *DeleteDataSourceRequest `json:"deleteDataSource,omitempty"` 8744 8745 // DeleteDeveloperMetadata: Deletes developer metadata 8746 DeleteDeveloperMetadata *DeleteDeveloperMetadataRequest `json:"deleteDeveloperMetadata,omitempty"` 8747 8748 // DeleteDimension: Deletes rows or columns in a sheet. 8749 DeleteDimension *DeleteDimensionRequest `json:"deleteDimension,omitempty"` 8750 8751 // DeleteDimensionGroup: Deletes a group over the specified range. 8752 DeleteDimensionGroup *DeleteDimensionGroupRequest `json:"deleteDimensionGroup,omitempty"` 8753 8754 // DeleteDuplicates: Removes rows containing duplicate values in 8755 // specified columns of a cell range. 8756 DeleteDuplicates *DeleteDuplicatesRequest `json:"deleteDuplicates,omitempty"` 8757 8758 // DeleteEmbeddedObject: Deletes an embedded object (e.g, chart, image) 8759 // in a sheet. 8760 DeleteEmbeddedObject *DeleteEmbeddedObjectRequest `json:"deleteEmbeddedObject,omitempty"` 8761 8762 // DeleteFilterView: Deletes a filter view from a sheet. 8763 DeleteFilterView *DeleteFilterViewRequest `json:"deleteFilterView,omitempty"` 8764 8765 // DeleteNamedRange: Deletes a named range. 8766 DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"` 8767 8768 // DeleteProtectedRange: Deletes a protected range. 8769 DeleteProtectedRange *DeleteProtectedRangeRequest `json:"deleteProtectedRange,omitempty"` 8770 8771 // DeleteRange: Deletes a range of cells from a sheet, shifting the 8772 // remaining cells. 8773 DeleteRange *DeleteRangeRequest `json:"deleteRange,omitempty"` 8774 8775 // DeleteSheet: Deletes a sheet. 8776 DeleteSheet *DeleteSheetRequest `json:"deleteSheet,omitempty"` 8777 8778 // DuplicateFilterView: Duplicates a filter view. 8779 DuplicateFilterView *DuplicateFilterViewRequest `json:"duplicateFilterView,omitempty"` 8780 8781 // DuplicateSheet: Duplicates a sheet. 8782 DuplicateSheet *DuplicateSheetRequest `json:"duplicateSheet,omitempty"` 8783 8784 // FindReplace: Finds and replaces occurrences of some text with other 8785 // text. 8786 FindReplace *FindReplaceRequest `json:"findReplace,omitempty"` 8787 8788 // InsertDimension: Inserts new rows or columns in a sheet. 8789 InsertDimension *InsertDimensionRequest `json:"insertDimension,omitempty"` 8790 8791 // InsertRange: Inserts new cells in a sheet, shifting the existing 8792 // cells. 8793 InsertRange *InsertRangeRequest `json:"insertRange,omitempty"` 8794 8795 // MergeCells: Merges cells together. 8796 MergeCells *MergeCellsRequest `json:"mergeCells,omitempty"` 8797 8798 // MoveDimension: Moves rows or columns to another location in a sheet. 8799 MoveDimension *MoveDimensionRequest `json:"moveDimension,omitempty"` 8800 8801 // PasteData: Pastes data (HTML or delimited) into a sheet. 8802 PasteData *PasteDataRequest `json:"pasteData,omitempty"` 8803 8804 // RandomizeRange: Randomizes the order of the rows in a range. 8805 RandomizeRange *RandomizeRangeRequest `json:"randomizeRange,omitempty"` 8806 8807 // RefreshDataSource: Refreshs one or multiple data sources and 8808 // associated dbobjects. 8809 RefreshDataSource *RefreshDataSourceRequest `json:"refreshDataSource,omitempty"` 8810 8811 // RepeatCell: Repeats a single cell across a range. 8812 RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"` 8813 8814 // SetBasicFilter: Sets the basic filter on a sheet. 8815 SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"` 8816 8817 // SetDataValidation: Sets data validation for one or more cells. 8818 SetDataValidation *SetDataValidationRequest `json:"setDataValidation,omitempty"` 8819 8820 // SortRange: Sorts data in a range. 8821 SortRange *SortRangeRequest `json:"sortRange,omitempty"` 8822 8823 // TextToColumns: Converts a column of text into many columns of text. 8824 TextToColumns *TextToColumnsRequest `json:"textToColumns,omitempty"` 8825 8826 // TrimWhitespace: Trims cells of whitespace (such as spaces, tabs, or 8827 // new lines). 8828 TrimWhitespace *TrimWhitespaceRequest `json:"trimWhitespace,omitempty"` 8829 8830 // UnmergeCells: Unmerges merged cells. 8831 UnmergeCells *UnmergeCellsRequest `json:"unmergeCells,omitempty"` 8832 8833 // UpdateBanding: Updates a banded range 8834 UpdateBanding *UpdateBandingRequest `json:"updateBanding,omitempty"` 8835 8836 // UpdateBorders: Updates the borders in a range of cells. 8837 UpdateBorders *UpdateBordersRequest `json:"updateBorders,omitempty"` 8838 8839 // UpdateCells: Updates many cells at once. 8840 UpdateCells *UpdateCellsRequest `json:"updateCells,omitempty"` 8841 8842 // UpdateChartSpec: Updates a chart's specifications. 8843 UpdateChartSpec *UpdateChartSpecRequest `json:"updateChartSpec,omitempty"` 8844 8845 // UpdateConditionalFormatRule: Updates an existing conditional format 8846 // rule. 8847 UpdateConditionalFormatRule *UpdateConditionalFormatRuleRequest `json:"updateConditionalFormatRule,omitempty"` 8848 8849 // UpdateDataSource: Updates a data source. 8850 UpdateDataSource *UpdateDataSourceRequest `json:"updateDataSource,omitempty"` 8851 8852 // UpdateDeveloperMetadata: Updates an existing developer metadata entry 8853 UpdateDeveloperMetadata *UpdateDeveloperMetadataRequest `json:"updateDeveloperMetadata,omitempty"` 8854 8855 // UpdateDimensionGroup: Updates the state of the specified group. 8856 UpdateDimensionGroup *UpdateDimensionGroupRequest `json:"updateDimensionGroup,omitempty"` 8857 8858 // UpdateDimensionProperties: Updates dimensions' properties. 8859 UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"` 8860 8861 // UpdateEmbeddedObjectBorder: Updates an embedded object's border. 8862 UpdateEmbeddedObjectBorder *UpdateEmbeddedObjectBorderRequest `json:"updateEmbeddedObjectBorder,omitempty"` 8863 8864 // UpdateEmbeddedObjectPosition: Updates an embedded object's (e.g. 8865 // chart, image) position. 8866 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionRequest `json:"updateEmbeddedObjectPosition,omitempty"` 8867 8868 // UpdateFilterView: Updates the properties of a filter view. 8869 UpdateFilterView *UpdateFilterViewRequest `json:"updateFilterView,omitempty"` 8870 8871 // UpdateNamedRange: Updates a named range. 8872 UpdateNamedRange *UpdateNamedRangeRequest `json:"updateNamedRange,omitempty"` 8873 8874 // UpdateProtectedRange: Updates a protected range. 8875 UpdateProtectedRange *UpdateProtectedRangeRequest `json:"updateProtectedRange,omitempty"` 8876 8877 // UpdateSheetProperties: Updates a sheet's properties. 8878 UpdateSheetProperties *UpdateSheetPropertiesRequest `json:"updateSheetProperties,omitempty"` 8879 8880 // UpdateSlicerSpec: Updates a slicer's specifications. 8881 UpdateSlicerSpec *UpdateSlicerSpecRequest `json:"updateSlicerSpec,omitempty"` 8882 8883 // UpdateSpreadsheetProperties: Updates the spreadsheet's properties. 8884 UpdateSpreadsheetProperties *UpdateSpreadsheetPropertiesRequest `json:"updateSpreadsheetProperties,omitempty"` 8885 8886 // ForceSendFields is a list of field names (e.g. "AddBanding") to 8887 // unconditionally include in API requests. By default, fields with 8888 // empty or default values are omitted from API requests. However, any 8889 // non-pointer, non-interface field appearing in ForceSendFields will be 8890 // sent to the server regardless of whether the field is empty or not. 8891 // This may be used to include empty fields in Patch requests. 8892 ForceSendFields []string `json:"-"` 8893 8894 // NullFields is a list of field names (e.g. "AddBanding") to include in 8895 // API requests with the JSON null value. By default, fields with empty 8896 // values are omitted from API requests. However, any field with an 8897 // empty value appearing in NullFields will be sent to the server as 8898 // null. It is an error if a field in this list has a non-empty value. 8899 // This may be used to include null fields in Patch requests. 8900 NullFields []string `json:"-"` 8901} 8902 8903func (s *Request) MarshalJSON() ([]byte, error) { 8904 type NoMethod Request 8905 raw := NoMethod(*s) 8906 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 8907} 8908 8909// Response: A single response from an update. 8910type Response struct { 8911 // AddBanding: A reply from adding a banded range. 8912 AddBanding *AddBandingResponse `json:"addBanding,omitempty"` 8913 8914 // AddChart: A reply from adding a chart. 8915 AddChart *AddChartResponse `json:"addChart,omitempty"` 8916 8917 // AddDataSource: A reply from adding a data source. 8918 AddDataSource *AddDataSourceResponse `json:"addDataSource,omitempty"` 8919 8920 // AddDimensionGroup: A reply from adding a dimension group. 8921 AddDimensionGroup *AddDimensionGroupResponse `json:"addDimensionGroup,omitempty"` 8922 8923 // AddFilterView: A reply from adding a filter view. 8924 AddFilterView *AddFilterViewResponse `json:"addFilterView,omitempty"` 8925 8926 // AddNamedRange: A reply from adding a named range. 8927 AddNamedRange *AddNamedRangeResponse `json:"addNamedRange,omitempty"` 8928 8929 // AddProtectedRange: A reply from adding a protected range. 8930 AddProtectedRange *AddProtectedRangeResponse `json:"addProtectedRange,omitempty"` 8931 8932 // AddSheet: A reply from adding a sheet. 8933 AddSheet *AddSheetResponse `json:"addSheet,omitempty"` 8934 8935 // AddSlicer: A reply from adding a slicer. 8936 AddSlicer *AddSlicerResponse `json:"addSlicer,omitempty"` 8937 8938 // CreateDeveloperMetadata: A reply from creating a developer metadata 8939 // entry. 8940 CreateDeveloperMetadata *CreateDeveloperMetadataResponse `json:"createDeveloperMetadata,omitempty"` 8941 8942 // DeleteConditionalFormatRule: A reply from deleting a conditional 8943 // format rule. 8944 DeleteConditionalFormatRule *DeleteConditionalFormatRuleResponse `json:"deleteConditionalFormatRule,omitempty"` 8945 8946 // DeleteDeveloperMetadata: A reply from deleting a developer metadata 8947 // entry. 8948 DeleteDeveloperMetadata *DeleteDeveloperMetadataResponse `json:"deleteDeveloperMetadata,omitempty"` 8949 8950 // DeleteDimensionGroup: A reply from deleting a dimension group. 8951 DeleteDimensionGroup *DeleteDimensionGroupResponse `json:"deleteDimensionGroup,omitempty"` 8952 8953 // DeleteDuplicates: A reply from removing rows containing duplicate 8954 // values. 8955 DeleteDuplicates *DeleteDuplicatesResponse `json:"deleteDuplicates,omitempty"` 8956 8957 // DuplicateFilterView: A reply from duplicating a filter view. 8958 DuplicateFilterView *DuplicateFilterViewResponse `json:"duplicateFilterView,omitempty"` 8959 8960 // DuplicateSheet: A reply from duplicating a sheet. 8961 DuplicateSheet *DuplicateSheetResponse `json:"duplicateSheet,omitempty"` 8962 8963 // FindReplace: A reply from doing a find/replace. 8964 FindReplace *FindReplaceResponse `json:"findReplace,omitempty"` 8965 8966 // RefreshDataSource: A reply from refreshing data source objects. 8967 RefreshDataSource *RefreshDataSourceResponse `json:"refreshDataSource,omitempty"` 8968 8969 // TrimWhitespace: A reply from trimming whitespace. 8970 TrimWhitespace *TrimWhitespaceResponse `json:"trimWhitespace,omitempty"` 8971 8972 // UpdateConditionalFormatRule: A reply from updating a conditional 8973 // format rule. 8974 UpdateConditionalFormatRule *UpdateConditionalFormatRuleResponse `json:"updateConditionalFormatRule,omitempty"` 8975 8976 // UpdateDataSource: A reply from updating a data source. 8977 UpdateDataSource *UpdateDataSourceResponse `json:"updateDataSource,omitempty"` 8978 8979 // UpdateDeveloperMetadata: A reply from updating a developer metadata 8980 // entry. 8981 UpdateDeveloperMetadata *UpdateDeveloperMetadataResponse `json:"updateDeveloperMetadata,omitempty"` 8982 8983 // UpdateEmbeddedObjectPosition: A reply from updating an embedded 8984 // object's position. 8985 UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionResponse `json:"updateEmbeddedObjectPosition,omitempty"` 8986 8987 // ForceSendFields is a list of field names (e.g. "AddBanding") to 8988 // unconditionally include in API requests. By default, fields with 8989 // empty or default values are omitted from API requests. However, any 8990 // non-pointer, non-interface field appearing in ForceSendFields will be 8991 // sent to the server regardless of whether the field is empty or not. 8992 // This may be used to include empty fields in Patch requests. 8993 ForceSendFields []string `json:"-"` 8994 8995 // NullFields is a list of field names (e.g. "AddBanding") to include in 8996 // API requests with the JSON null value. By default, fields with empty 8997 // values are omitted from API requests. However, any field with an 8998 // empty value appearing in NullFields will be sent to the server as 8999 // null. It is an error if a field in this list has a non-empty value. 9000 // This may be used to include null fields in Patch requests. 9001 NullFields []string `json:"-"` 9002} 9003 9004func (s *Response) MarshalJSON() ([]byte, error) { 9005 type NoMethod Response 9006 raw := NoMethod(*s) 9007 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9008} 9009 9010// RowData: Data about each cell in a row. 9011type RowData struct { 9012 // Values: The values in the row, one per column. 9013 Values []*CellData `json:"values,omitempty"` 9014 9015 // ForceSendFields is a list of field names (e.g. "Values") to 9016 // unconditionally include in API requests. By default, fields with 9017 // empty or default values are omitted from API requests. However, any 9018 // non-pointer, non-interface field appearing in ForceSendFields will be 9019 // sent to the server regardless of whether the field is empty or not. 9020 // This may be used to include empty fields in Patch requests. 9021 ForceSendFields []string `json:"-"` 9022 9023 // NullFields is a list of field names (e.g. "Values") to include in API 9024 // requests with the JSON null value. By default, fields with empty 9025 // values are omitted from API requests. However, any field with an 9026 // empty value appearing in NullFields will be sent to the server as 9027 // null. It is an error if a field in this list has a non-empty value. 9028 // This may be used to include null fields in Patch requests. 9029 NullFields []string `json:"-"` 9030} 9031 9032func (s *RowData) MarshalJSON() ([]byte, error) { 9033 type NoMethod RowData 9034 raw := NoMethod(*s) 9035 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9036} 9037 9038// ScorecardChartSpec: A scorecard chart. Scorecard charts are used to 9039// highlight key performance indicators, known as KPIs, on the 9040// spreadsheet. A scorecard chart can represent things like total sales, 9041// average cost, or a top selling item. You can specify a single data 9042// value, or aggregate over a range of data. Percentage or absolute 9043// difference from a baseline value can be highlighted, like changes 9044// over time. 9045type ScorecardChartSpec struct { 9046 // AggregateType: The aggregation type for key and baseline chart data 9047 // in scorecard chart. This field is not supported for data source 9048 // charts. Use the ChartData.aggregateType field of the key_value_data 9049 // or baseline_value_data instead for data source charts. This field is 9050 // optional. 9051 // 9052 // Possible values: 9053 // "CHART_AGGREGATE_TYPE_UNSPECIFIED" - Default value, do not use. 9054 // "AVERAGE" - Average aggregate function. 9055 // "COUNT" - Count aggregate function. 9056 // "MAX" - Maximum aggregate function. 9057 // "MEDIAN" - Median aggregate function. 9058 // "MIN" - Minimum aggregate function. 9059 // "SUM" - Sum aggregate function. 9060 AggregateType string `json:"aggregateType,omitempty"` 9061 9062 // BaselineValueData: The data for scorecard baseline value. This field 9063 // is optional. 9064 BaselineValueData *ChartData `json:"baselineValueData,omitempty"` 9065 9066 // BaselineValueFormat: Formatting options for baseline value. This 9067 // field is needed only if baseline_value_data is specified. 9068 BaselineValueFormat *BaselineValueFormat `json:"baselineValueFormat,omitempty"` 9069 9070 // CustomFormatOptions: Custom formatting options for numeric 9071 // key/baseline values in scorecard chart. This field is used only when 9072 // number_format_source is set to CUSTOM. This field is optional. 9073 CustomFormatOptions *ChartCustomNumberFormatOptions `json:"customFormatOptions,omitempty"` 9074 9075 // KeyValueData: The data for scorecard key value. 9076 KeyValueData *ChartData `json:"keyValueData,omitempty"` 9077 9078 // KeyValueFormat: Formatting options for key value. 9079 KeyValueFormat *KeyValueFormat `json:"keyValueFormat,omitempty"` 9080 9081 // NumberFormatSource: The number format source used in the scorecard 9082 // chart. This field is optional. 9083 // 9084 // Possible values: 9085 // "CHART_NUMBER_FORMAT_SOURCE_UNDEFINED" - Default value, do not use. 9086 // "FROM_DATA" - Inherit number formatting from data. 9087 // "CUSTOM" - Apply custom formatting as specified by 9088 // ChartCustomNumberFormatOptions. 9089 NumberFormatSource string `json:"numberFormatSource,omitempty"` 9090 9091 // ScaleFactor: Value to scale scorecard key and baseline value. For 9092 // example, a factor of 10 can be used to divide all values in the chart 9093 // by 10. This field is optional. 9094 ScaleFactor float64 `json:"scaleFactor,omitempty"` 9095 9096 // ForceSendFields is a list of field names (e.g. "AggregateType") to 9097 // unconditionally include in API requests. By default, fields with 9098 // empty or default values are omitted from API requests. However, any 9099 // non-pointer, non-interface field appearing in ForceSendFields will be 9100 // sent to the server regardless of whether the field is empty or not. 9101 // This may be used to include empty fields in Patch requests. 9102 ForceSendFields []string `json:"-"` 9103 9104 // NullFields is a list of field names (e.g. "AggregateType") to include 9105 // in API requests with the JSON null value. By default, fields with 9106 // empty values are omitted from API requests. However, any field with 9107 // an empty value appearing in NullFields will be sent to the server as 9108 // null. It is an error if a field in this list has a non-empty value. 9109 // This may be used to include null fields in Patch requests. 9110 NullFields []string `json:"-"` 9111} 9112 9113func (s *ScorecardChartSpec) MarshalJSON() ([]byte, error) { 9114 type NoMethod ScorecardChartSpec 9115 raw := NoMethod(*s) 9116 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9117} 9118 9119func (s *ScorecardChartSpec) UnmarshalJSON(data []byte) error { 9120 type NoMethod ScorecardChartSpec 9121 var s1 struct { 9122 ScaleFactor gensupport.JSONFloat64 `json:"scaleFactor"` 9123 *NoMethod 9124 } 9125 s1.NoMethod = (*NoMethod)(s) 9126 if err := json.Unmarshal(data, &s1); err != nil { 9127 return err 9128 } 9129 s.ScaleFactor = float64(s1.ScaleFactor) 9130 return nil 9131} 9132 9133// SearchDeveloperMetadataRequest: A request to retrieve all developer 9134// metadata matching the set of specified criteria. 9135type SearchDeveloperMetadataRequest struct { 9136 // DataFilters: The data filters describing the criteria used to 9137 // determine which DeveloperMetadata entries to return. 9138 // DeveloperMetadata matching any of the specified filters are included 9139 // in the response. 9140 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 9141 9142 // ForceSendFields is a list of field names (e.g. "DataFilters") to 9143 // unconditionally include in API requests. By default, fields with 9144 // empty or default values are omitted from API requests. However, any 9145 // non-pointer, non-interface field appearing in ForceSendFields will be 9146 // sent to the server regardless of whether the field is empty or not. 9147 // This may be used to include empty fields in Patch requests. 9148 ForceSendFields []string `json:"-"` 9149 9150 // NullFields is a list of field names (e.g. "DataFilters") to include 9151 // in API requests with the JSON null value. By default, fields with 9152 // empty values are omitted from API requests. However, any field with 9153 // an empty value appearing in NullFields will be sent to the server as 9154 // null. It is an error if a field in this list has a non-empty value. 9155 // This may be used to include null fields in Patch requests. 9156 NullFields []string `json:"-"` 9157} 9158 9159func (s *SearchDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 9160 type NoMethod SearchDeveloperMetadataRequest 9161 raw := NoMethod(*s) 9162 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9163} 9164 9165// SearchDeveloperMetadataResponse: A reply to a developer metadata 9166// search request. 9167type SearchDeveloperMetadataResponse struct { 9168 // MatchedDeveloperMetadata: The metadata matching the criteria of the 9169 // search request. 9170 MatchedDeveloperMetadata []*MatchedDeveloperMetadata `json:"matchedDeveloperMetadata,omitempty"` 9171 9172 // ServerResponse contains the HTTP response code and headers from the 9173 // server. 9174 googleapi.ServerResponse `json:"-"` 9175 9176 // ForceSendFields is a list of field names (e.g. 9177 // "MatchedDeveloperMetadata") to unconditionally include in API 9178 // requests. By default, fields with empty or default values are omitted 9179 // from API requests. However, any non-pointer, non-interface field 9180 // appearing in ForceSendFields will be sent to the server regardless of 9181 // whether the field is empty or not. This may be used to include empty 9182 // fields in Patch requests. 9183 ForceSendFields []string `json:"-"` 9184 9185 // NullFields is a list of field names (e.g. "MatchedDeveloperMetadata") 9186 // to include in API requests with the JSON null value. By default, 9187 // fields with empty values are omitted from API requests. However, any 9188 // field with an empty value appearing in NullFields will be sent to the 9189 // server as null. It is an error if a field in this list has a 9190 // non-empty value. This may be used to include null fields in Patch 9191 // requests. 9192 NullFields []string `json:"-"` 9193} 9194 9195func (s *SearchDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 9196 type NoMethod SearchDeveloperMetadataResponse 9197 raw := NoMethod(*s) 9198 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9199} 9200 9201// SetBasicFilterRequest: Sets the basic filter associated with a sheet. 9202type SetBasicFilterRequest struct { 9203 // Filter: The filter to set. 9204 Filter *BasicFilter `json:"filter,omitempty"` 9205 9206 // ForceSendFields is a list of field names (e.g. "Filter") to 9207 // unconditionally include in API requests. By default, fields with 9208 // empty or default values are omitted from API requests. However, any 9209 // non-pointer, non-interface field appearing in ForceSendFields will be 9210 // sent to the server regardless of whether the field is empty or not. 9211 // This may be used to include empty fields in Patch requests. 9212 ForceSendFields []string `json:"-"` 9213 9214 // NullFields is a list of field names (e.g. "Filter") to include in API 9215 // requests with the JSON null value. By default, fields with empty 9216 // values are omitted from API requests. However, any field with an 9217 // empty value appearing in NullFields will be sent to the server as 9218 // null. It is an error if a field in this list has a non-empty value. 9219 // This may be used to include null fields in Patch requests. 9220 NullFields []string `json:"-"` 9221} 9222 9223func (s *SetBasicFilterRequest) MarshalJSON() ([]byte, error) { 9224 type NoMethod SetBasicFilterRequest 9225 raw := NoMethod(*s) 9226 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9227} 9228 9229// SetDataValidationRequest: Sets a data validation rule to every cell 9230// in the range. To clear validation in a range, call this with no rule 9231// specified. 9232type SetDataValidationRequest struct { 9233 // Range: The range the data validation rule should apply to. 9234 Range *GridRange `json:"range,omitempty"` 9235 9236 // Rule: The data validation rule to set on each cell in the range, or 9237 // empty to clear the data validation in the range. 9238 Rule *DataValidationRule `json:"rule,omitempty"` 9239 9240 // ForceSendFields is a list of field names (e.g. "Range") to 9241 // unconditionally include in API requests. By default, fields with 9242 // empty or default values are omitted from API requests. However, any 9243 // non-pointer, non-interface field appearing in ForceSendFields will be 9244 // sent to the server regardless of whether the field is empty or not. 9245 // This may be used to include empty fields in Patch requests. 9246 ForceSendFields []string `json:"-"` 9247 9248 // NullFields is a list of field names (e.g. "Range") to include in API 9249 // requests with the JSON null value. By default, fields with empty 9250 // values are omitted from API requests. However, any field with an 9251 // empty value appearing in NullFields will be sent to the server as 9252 // null. It is an error if a field in this list has a non-empty value. 9253 // This may be used to include null fields in Patch requests. 9254 NullFields []string `json:"-"` 9255} 9256 9257func (s *SetDataValidationRequest) MarshalJSON() ([]byte, error) { 9258 type NoMethod SetDataValidationRequest 9259 raw := NoMethod(*s) 9260 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9261} 9262 9263// Sheet: A sheet in a spreadsheet. 9264type Sheet struct { 9265 // BandedRanges: The banded (alternating colors) ranges on this sheet. 9266 BandedRanges []*BandedRange `json:"bandedRanges,omitempty"` 9267 9268 // BasicFilter: The filter on this sheet, if any. 9269 BasicFilter *BasicFilter `json:"basicFilter,omitempty"` 9270 9271 // Charts: The specifications of every chart on this sheet. 9272 Charts []*EmbeddedChart `json:"charts,omitempty"` 9273 9274 // ColumnGroups: All column groups on this sheet, ordered by increasing 9275 // range start index, then by group depth. 9276 ColumnGroups []*DimensionGroup `json:"columnGroups,omitempty"` 9277 9278 // ConditionalFormats: The conditional format rules in this sheet. 9279 ConditionalFormats []*ConditionalFormatRule `json:"conditionalFormats,omitempty"` 9280 9281 // Data: Data in the grid, if this is a grid sheet. The number of 9282 // GridData objects returned is dependent on the number of ranges 9283 // requested on this sheet. For example, if this is representing 9284 // `Sheet1`, and the spreadsheet was requested with ranges 9285 // `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will 9286 // have a startRow/startColumn of `0`, while the second one will have 9287 // `startRow 14` (zero-based row 15), and `startColumn 3` (zero-based 9288 // column D). For a DATA_SOURCE sheet, you can not request a specific 9289 // range, the GridData contains all the values. 9290 Data []*GridData `json:"data,omitempty"` 9291 9292 // DeveloperMetadata: The developer metadata associated with a sheet. 9293 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 9294 9295 // FilterViews: The filter views in this sheet. 9296 FilterViews []*FilterView `json:"filterViews,omitempty"` 9297 9298 // Merges: The ranges that are merged together. 9299 Merges []*GridRange `json:"merges,omitempty"` 9300 9301 // Properties: The properties of the sheet. 9302 Properties *SheetProperties `json:"properties,omitempty"` 9303 9304 // ProtectedRanges: The protected ranges in this sheet. 9305 ProtectedRanges []*ProtectedRange `json:"protectedRanges,omitempty"` 9306 9307 // RowGroups: All row groups on this sheet, ordered by increasing range 9308 // start index, then by group depth. 9309 RowGroups []*DimensionGroup `json:"rowGroups,omitempty"` 9310 9311 // Slicers: The slicers on this sheet. 9312 Slicers []*Slicer `json:"slicers,omitempty"` 9313 9314 // ForceSendFields is a list of field names (e.g. "BandedRanges") to 9315 // unconditionally include in API requests. By default, fields with 9316 // empty or default values are omitted from API requests. However, any 9317 // non-pointer, non-interface field appearing in ForceSendFields will be 9318 // sent to the server regardless of whether the field is empty or not. 9319 // This may be used to include empty fields in Patch requests. 9320 ForceSendFields []string `json:"-"` 9321 9322 // NullFields is a list of field names (e.g. "BandedRanges") to include 9323 // in API requests with the JSON null value. By default, fields with 9324 // empty values are omitted from API requests. However, any field with 9325 // an empty value appearing in NullFields will be sent to the server as 9326 // null. It is an error if a field in this list has a non-empty value. 9327 // This may be used to include null fields in Patch requests. 9328 NullFields []string `json:"-"` 9329} 9330 9331func (s *Sheet) MarshalJSON() ([]byte, error) { 9332 type NoMethod Sheet 9333 raw := NoMethod(*s) 9334 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9335} 9336 9337// SheetProperties: Properties of a sheet. 9338type SheetProperties struct { 9339 // DataSourceSheetProperties: Output only. If present, the field 9340 // contains DATA_SOURCE sheet specific properties. 9341 DataSourceSheetProperties *DataSourceSheetProperties `json:"dataSourceSheetProperties,omitempty"` 9342 9343 // GridProperties: Additional properties of the sheet if this sheet is a 9344 // grid. (If the sheet is an object sheet, containing a chart or image, 9345 // then this field will be absent.) When writing it is an error to set 9346 // any grid properties on non-grid sheets. If this sheet is a 9347 // DATA_SOURCE sheet, this field is output only but contains the 9348 // properties that reflect how a data source sheet is rendered in the 9349 // UI, e.g. row_count. 9350 GridProperties *GridProperties `json:"gridProperties,omitempty"` 9351 9352 // Hidden: True if the sheet is hidden in the UI, false if it's visible. 9353 Hidden bool `json:"hidden,omitempty"` 9354 9355 // Index: The index of the sheet within the spreadsheet. When adding or 9356 // updating sheet properties, if this field is excluded then the sheet 9357 // is added or moved to the end of the sheet list. When updating sheet 9358 // indices or inserting sheets, movement is considered in "before the 9359 // move" indexes. For example, if there were 3 sheets (S1, S2, S3) in 9360 // order to move S1 ahead of S2 the index would have to be set to 2. A 9361 // sheet index update request is ignored if the requested index is 9362 // identical to the sheets current index or if the requested new index 9363 // is equal to the current sheet index + 1. 9364 Index int64 `json:"index,omitempty"` 9365 9366 // RightToLeft: True if the sheet is an RTL sheet instead of an LTR 9367 // sheet. 9368 RightToLeft bool `json:"rightToLeft,omitempty"` 9369 9370 // SheetId: The ID of the sheet. Must be non-negative. This field cannot 9371 // be changed once set. 9372 SheetId int64 `json:"sheetId,omitempty"` 9373 9374 // SheetType: The type of sheet. Defaults to GRID. This field cannot be 9375 // changed once set. 9376 // 9377 // Possible values: 9378 // "SHEET_TYPE_UNSPECIFIED" - Default value, do not use. 9379 // "GRID" - The sheet is a grid. 9380 // "OBJECT" - The sheet has no grid and instead has an object like a 9381 // chart or image. 9382 // "DATA_SOURCE" - The sheet connects with an external DataSource and 9383 // shows the preview of data. 9384 SheetType string `json:"sheetType,omitempty"` 9385 9386 // TabColor: The color of the tab in the UI. 9387 TabColor *Color `json:"tabColor,omitempty"` 9388 9389 // TabColorStyle: The color of the tab in the UI. If tab_color is also 9390 // set, this field takes precedence. 9391 TabColorStyle *ColorStyle `json:"tabColorStyle,omitempty"` 9392 9393 // Title: The name of the sheet. 9394 Title string `json:"title,omitempty"` 9395 9396 // ServerResponse contains the HTTP response code and headers from the 9397 // server. 9398 googleapi.ServerResponse `json:"-"` 9399 9400 // ForceSendFields is a list of field names (e.g. 9401 // "DataSourceSheetProperties") to unconditionally include in API 9402 // requests. By default, fields with empty or default values are omitted 9403 // from API requests. However, any non-pointer, non-interface field 9404 // appearing in ForceSendFields will be sent to the server regardless of 9405 // whether the field is empty or not. This may be used to include empty 9406 // fields in Patch requests. 9407 ForceSendFields []string `json:"-"` 9408 9409 // NullFields is a list of field names (e.g. 9410 // "DataSourceSheetProperties") to include in API requests with the JSON 9411 // null value. By default, fields with empty values are omitted from API 9412 // requests. However, any field with an empty value appearing in 9413 // NullFields will be sent to the server as null. It is an error if a 9414 // field in this list has a non-empty value. This may be used to include 9415 // null fields in Patch requests. 9416 NullFields []string `json:"-"` 9417} 9418 9419func (s *SheetProperties) MarshalJSON() ([]byte, error) { 9420 type NoMethod SheetProperties 9421 raw := NoMethod(*s) 9422 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9423} 9424 9425// Slicer: A slicer in a sheet. 9426type Slicer struct { 9427 // Position: The position of the slicer. Note that slicer can be 9428 // positioned only on existing sheet. Also, width and height of slicer 9429 // can be automatically adjusted to keep it within permitted limits. 9430 Position *EmbeddedObjectPosition `json:"position,omitempty"` 9431 9432 // SlicerId: The ID of the slicer. 9433 SlicerId int64 `json:"slicerId,omitempty"` 9434 9435 // Spec: The specification of the slicer. 9436 Spec *SlicerSpec `json:"spec,omitempty"` 9437 9438 // ForceSendFields is a list of field names (e.g. "Position") to 9439 // unconditionally include in API requests. By default, fields with 9440 // empty or default values are omitted from API requests. However, any 9441 // non-pointer, non-interface field appearing in ForceSendFields will be 9442 // sent to the server regardless of whether the field is empty or not. 9443 // This may be used to include empty fields in Patch requests. 9444 ForceSendFields []string `json:"-"` 9445 9446 // NullFields is a list of field names (e.g. "Position") to include in 9447 // API requests with the JSON null value. By default, fields with empty 9448 // values are omitted from API requests. However, any field with an 9449 // empty value appearing in NullFields will be sent to the server as 9450 // null. It is an error if a field in this list has a non-empty value. 9451 // This may be used to include null fields in Patch requests. 9452 NullFields []string `json:"-"` 9453} 9454 9455func (s *Slicer) MarshalJSON() ([]byte, error) { 9456 type NoMethod Slicer 9457 raw := NoMethod(*s) 9458 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9459} 9460 9461// SlicerSpec: The specifications of a slicer. 9462type SlicerSpec struct { 9463 // ApplyToPivotTables: True if the filter should apply to pivot tables. 9464 // If not set, default to `True`. 9465 ApplyToPivotTables bool `json:"applyToPivotTables,omitempty"` 9466 9467 // BackgroundColor: The background color of the slicer. 9468 BackgroundColor *Color `json:"backgroundColor,omitempty"` 9469 9470 // BackgroundColorStyle: The background color of the slicer. If 9471 // background_color is also set, this field takes precedence. 9472 BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` 9473 9474 // ColumnIndex: The column index in the data table on which the filter 9475 // is applied to. 9476 ColumnIndex int64 `json:"columnIndex,omitempty"` 9477 9478 // DataRange: The data range of the slicer. 9479 DataRange *GridRange `json:"dataRange,omitempty"` 9480 9481 // FilterCriteria: The filtering criteria of the slicer. 9482 FilterCriteria *FilterCriteria `json:"filterCriteria,omitempty"` 9483 9484 // HorizontalAlignment: The horizontal alignment of title in the slicer. 9485 // If unspecified, defaults to `LEFT` 9486 // 9487 // Possible values: 9488 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 9489 // specified. Do not use this. 9490 // "LEFT" - The text is explicitly aligned to the left of the cell. 9491 // "CENTER" - The text is explicitly aligned to the center of the 9492 // cell. 9493 // "RIGHT" - The text is explicitly aligned to the right of the cell. 9494 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 9495 9496 // TextFormat: The text format of title in the slicer. The link field is 9497 // not supported. 9498 TextFormat *TextFormat `json:"textFormat,omitempty"` 9499 9500 // Title: The title of the slicer. 9501 Title string `json:"title,omitempty"` 9502 9503 // ForceSendFields is a list of field names (e.g. "ApplyToPivotTables") 9504 // to unconditionally include in API requests. By default, fields with 9505 // empty or default values are omitted from API requests. However, any 9506 // non-pointer, non-interface field appearing in ForceSendFields will be 9507 // sent to the server regardless of whether the field is empty or not. 9508 // This may be used to include empty fields in Patch requests. 9509 ForceSendFields []string `json:"-"` 9510 9511 // NullFields is a list of field names (e.g. "ApplyToPivotTables") to 9512 // include in API requests with the JSON null value. By default, fields 9513 // with empty values are omitted from API requests. However, any field 9514 // with an empty value appearing in NullFields will be sent to the 9515 // server as null. It is an error if a field in this list has a 9516 // non-empty value. This may be used to include null fields in Patch 9517 // requests. 9518 NullFields []string `json:"-"` 9519} 9520 9521func (s *SlicerSpec) MarshalJSON() ([]byte, error) { 9522 type NoMethod SlicerSpec 9523 raw := NoMethod(*s) 9524 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9525} 9526 9527// SortRangeRequest: Sorts data in rows based on a sort order per 9528// column. 9529type SortRangeRequest struct { 9530 // Range: The range to sort. 9531 Range *GridRange `json:"range,omitempty"` 9532 9533 // SortSpecs: The sort order per column. Later specifications are used 9534 // when values are equal in the earlier specifications. 9535 SortSpecs []*SortSpec `json:"sortSpecs,omitempty"` 9536 9537 // ForceSendFields is a list of field names (e.g. "Range") to 9538 // unconditionally include in API requests. By default, fields with 9539 // empty or default values are omitted from API requests. However, any 9540 // non-pointer, non-interface field appearing in ForceSendFields will be 9541 // sent to the server regardless of whether the field is empty or not. 9542 // This may be used to include empty fields in Patch requests. 9543 ForceSendFields []string `json:"-"` 9544 9545 // NullFields is a list of field names (e.g. "Range") to include in API 9546 // requests with the JSON null value. By default, fields with empty 9547 // values are omitted from API requests. However, any field with an 9548 // empty value appearing in NullFields will be sent to the server as 9549 // null. It is an error if a field in this list has a non-empty value. 9550 // This may be used to include null fields in Patch requests. 9551 NullFields []string `json:"-"` 9552} 9553 9554func (s *SortRangeRequest) MarshalJSON() ([]byte, error) { 9555 type NoMethod SortRangeRequest 9556 raw := NoMethod(*s) 9557 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9558} 9559 9560// SortSpec: A sort order associated with a specific column or row. 9561type SortSpec struct { 9562 // BackgroundColor: The background fill color to sort by; cells with 9563 // this fill color are sorted to the top. Mutually exclusive with 9564 // foreground_color. 9565 BackgroundColor *Color `json:"backgroundColor,omitempty"` 9566 9567 // BackgroundColorStyle: The background fill color to sort by; cells 9568 // with this fill color are sorted to the top. Mutually exclusive with 9569 // foreground_color, and must be an RGB-type color. If background_color 9570 // is also set, this field takes precedence. 9571 BackgroundColorStyle *ColorStyle `json:"backgroundColorStyle,omitempty"` 9572 9573 // DataSourceColumnReference: Reference to a data source column. 9574 DataSourceColumnReference *DataSourceColumnReference `json:"dataSourceColumnReference,omitempty"` 9575 9576 // DimensionIndex: The dimension the sort should be applied to. 9577 DimensionIndex int64 `json:"dimensionIndex,omitempty"` 9578 9579 // ForegroundColor: The foreground color to sort by; cells with this 9580 // foreground color are sorted to the top. Mutually exclusive with 9581 // background_color. 9582 ForegroundColor *Color `json:"foregroundColor,omitempty"` 9583 9584 // ForegroundColorStyle: The foreground color to sort by; cells with 9585 // this foreground color are sorted to the top. Mutually exclusive with 9586 // background_color, and must be an RGB-type color. If foreground_color 9587 // is also set, this field takes precedence. 9588 ForegroundColorStyle *ColorStyle `json:"foregroundColorStyle,omitempty"` 9589 9590 // SortOrder: The order data should be sorted. 9591 // 9592 // Possible values: 9593 // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this. 9594 // "ASCENDING" - Sort ascending. 9595 // "DESCENDING" - Sort descending. 9596 SortOrder string `json:"sortOrder,omitempty"` 9597 9598 // ForceSendFields is a list of field names (e.g. "BackgroundColor") to 9599 // unconditionally include in API requests. By default, fields with 9600 // empty or default values are omitted from API requests. However, any 9601 // non-pointer, non-interface field appearing in ForceSendFields will be 9602 // sent to the server regardless of whether the field is empty or not. 9603 // This may be used to include empty fields in Patch requests. 9604 ForceSendFields []string `json:"-"` 9605 9606 // NullFields is a list of field names (e.g. "BackgroundColor") to 9607 // include in API requests with the JSON null value. By default, fields 9608 // with empty values are omitted from API requests. However, any field 9609 // with an empty value appearing in NullFields will be sent to the 9610 // server as null. It is an error if a field in this list has a 9611 // non-empty value. This may be used to include null fields in Patch 9612 // requests. 9613 NullFields []string `json:"-"` 9614} 9615 9616func (s *SortSpec) MarshalJSON() ([]byte, error) { 9617 type NoMethod SortSpec 9618 raw := NoMethod(*s) 9619 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9620} 9621 9622// SourceAndDestination: A combination of a source range and how to 9623// extend that source. 9624type SourceAndDestination struct { 9625 // Dimension: The dimension that data should be filled into. 9626 // 9627 // Possible values: 9628 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 9629 // "ROWS" - Operates on the rows of a sheet. 9630 // "COLUMNS" - Operates on the columns of a sheet. 9631 Dimension string `json:"dimension,omitempty"` 9632 9633 // FillLength: The number of rows or columns that data should be filled 9634 // into. Positive numbers expand beyond the last row or last column of 9635 // the source. Negative numbers expand before the first row or first 9636 // column of the source. 9637 FillLength int64 `json:"fillLength,omitempty"` 9638 9639 // Source: The location of the data to use as the source of the 9640 // autofill. 9641 Source *GridRange `json:"source,omitempty"` 9642 9643 // ForceSendFields is a list of field names (e.g. "Dimension") to 9644 // unconditionally include in API requests. By default, fields with 9645 // empty or default values are omitted from API requests. However, any 9646 // non-pointer, non-interface field appearing in ForceSendFields will be 9647 // sent to the server regardless of whether the field is empty or not. 9648 // This may be used to include empty fields in Patch requests. 9649 ForceSendFields []string `json:"-"` 9650 9651 // NullFields is a list of field names (e.g. "Dimension") to include in 9652 // API requests with the JSON null value. By default, fields with empty 9653 // values are omitted from API requests. However, any field with an 9654 // empty value appearing in NullFields will be sent to the server as 9655 // null. It is an error if a field in this list has a non-empty value. 9656 // This may be used to include null fields in Patch requests. 9657 NullFields []string `json:"-"` 9658} 9659 9660func (s *SourceAndDestination) MarshalJSON() ([]byte, error) { 9661 type NoMethod SourceAndDestination 9662 raw := NoMethod(*s) 9663 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9664} 9665 9666// Spreadsheet: Resource that represents a spreadsheet. 9667type Spreadsheet struct { 9668 // DataSourceSchedules: Output only. A list of data source refresh 9669 // schedules. 9670 DataSourceSchedules []*DataSourceRefreshSchedule `json:"dataSourceSchedules,omitempty"` 9671 9672 // DataSources: A list of external data sources connected with the 9673 // spreadsheet. 9674 DataSources []*DataSource `json:"dataSources,omitempty"` 9675 9676 // DeveloperMetadata: The developer metadata associated with a 9677 // spreadsheet. 9678 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 9679 9680 // NamedRanges: The named ranges defined in a spreadsheet. 9681 NamedRanges []*NamedRange `json:"namedRanges,omitempty"` 9682 9683 // Properties: Overall properties of a spreadsheet. 9684 Properties *SpreadsheetProperties `json:"properties,omitempty"` 9685 9686 // Sheets: The sheets that are part of a spreadsheet. 9687 Sheets []*Sheet `json:"sheets,omitempty"` 9688 9689 // SpreadsheetId: The ID of the spreadsheet. This field is read-only. 9690 SpreadsheetId string `json:"spreadsheetId,omitempty"` 9691 9692 // SpreadsheetUrl: The url of the spreadsheet. This field is read-only. 9693 SpreadsheetUrl string `json:"spreadsheetUrl,omitempty"` 9694 9695 // ServerResponse contains the HTTP response code and headers from the 9696 // server. 9697 googleapi.ServerResponse `json:"-"` 9698 9699 // ForceSendFields is a list of field names (e.g. "DataSourceSchedules") 9700 // to unconditionally include in API requests. By default, fields with 9701 // empty or default values are omitted from API requests. However, any 9702 // non-pointer, non-interface field appearing in ForceSendFields will be 9703 // sent to the server regardless of whether the field is empty or not. 9704 // This may be used to include empty fields in Patch requests. 9705 ForceSendFields []string `json:"-"` 9706 9707 // NullFields is a list of field names (e.g. "DataSourceSchedules") to 9708 // include in API requests with the JSON null value. By default, fields 9709 // with empty values are omitted from API requests. However, any field 9710 // with an empty value appearing in NullFields will be sent to the 9711 // server as null. It is an error if a field in this list has a 9712 // non-empty value. This may be used to include null fields in Patch 9713 // requests. 9714 NullFields []string `json:"-"` 9715} 9716 9717func (s *Spreadsheet) MarshalJSON() ([]byte, error) { 9718 type NoMethod Spreadsheet 9719 raw := NoMethod(*s) 9720 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9721} 9722 9723// SpreadsheetProperties: Properties of a spreadsheet. 9724type SpreadsheetProperties struct { 9725 // AutoRecalc: The amount of time to wait before volatile functions are 9726 // recalculated. 9727 // 9728 // Possible values: 9729 // "RECALCULATION_INTERVAL_UNSPECIFIED" - Default value. This value 9730 // must not be used. 9731 // "ON_CHANGE" - Volatile functions are updated on every change. 9732 // "MINUTE" - Volatile functions are updated on every change and every 9733 // minute. 9734 // "HOUR" - Volatile functions are updated on every change and hourly. 9735 AutoRecalc string `json:"autoRecalc,omitempty"` 9736 9737 // DefaultFormat: The default format of all cells in the spreadsheet. 9738 // CellData.effectiveFormat will not be set if the cell's format is 9739 // equal to this default format. This field is read-only. 9740 DefaultFormat *CellFormat `json:"defaultFormat,omitempty"` 9741 9742 // IterativeCalculationSettings: Determines whether and how circular 9743 // references are resolved with iterative calculation. Absence of this 9744 // field means that circular references result in calculation errors. 9745 IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"` 9746 9747 // Locale: The locale of the spreadsheet in one of the following 9748 // formats: * an ISO 639-1 language code such as `en` * an ISO 639-2 9749 // language code such as `fil`, if no 639-1 code exists * a combination 9750 // of the ISO language code and country code, such as `en_US` Note: when 9751 // updating this field, not all locales/languages are supported. 9752 Locale string `json:"locale,omitempty"` 9753 9754 // SpreadsheetTheme: Theme applied to the spreadsheet. 9755 SpreadsheetTheme *SpreadsheetTheme `json:"spreadsheetTheme,omitempty"` 9756 9757 // TimeZone: The time zone of the spreadsheet, in CLDR format such as 9758 // `America/New_York`. If the time zone isn't recognized, this may be a 9759 // custom time zone such as `GMT-07:00`. 9760 TimeZone string `json:"timeZone,omitempty"` 9761 9762 // Title: The title of the spreadsheet. 9763 Title string `json:"title,omitempty"` 9764 9765 // ForceSendFields is a list of field names (e.g. "AutoRecalc") to 9766 // unconditionally include in API requests. By default, fields with 9767 // empty or default values are omitted from API requests. However, any 9768 // non-pointer, non-interface field appearing in ForceSendFields will be 9769 // sent to the server regardless of whether the field is empty or not. 9770 // This may be used to include empty fields in Patch requests. 9771 ForceSendFields []string `json:"-"` 9772 9773 // NullFields is a list of field names (e.g. "AutoRecalc") to include in 9774 // API requests with the JSON null value. By default, fields with empty 9775 // values are omitted from API requests. However, any field with an 9776 // empty value appearing in NullFields will be sent to the server as 9777 // null. It is an error if a field in this list has a non-empty value. 9778 // This may be used to include null fields in Patch requests. 9779 NullFields []string `json:"-"` 9780} 9781 9782func (s *SpreadsheetProperties) MarshalJSON() ([]byte, error) { 9783 type NoMethod SpreadsheetProperties 9784 raw := NoMethod(*s) 9785 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9786} 9787 9788// SpreadsheetTheme: Represents spreadsheet theme 9789type SpreadsheetTheme struct { 9790 // PrimaryFontFamily: Name of the primary font family. 9791 PrimaryFontFamily string `json:"primaryFontFamily,omitempty"` 9792 9793 // ThemeColors: The spreadsheet theme color pairs. To update you must 9794 // provide all theme color pairs. 9795 ThemeColors []*ThemeColorPair `json:"themeColors,omitempty"` 9796 9797 // ForceSendFields is a list of field names (e.g. "PrimaryFontFamily") 9798 // to unconditionally include in API requests. By default, fields with 9799 // empty or default values are omitted from API requests. However, any 9800 // non-pointer, non-interface field appearing in ForceSendFields will be 9801 // sent to the server regardless of whether the field is empty or not. 9802 // This may be used to include empty fields in Patch requests. 9803 ForceSendFields []string `json:"-"` 9804 9805 // NullFields is a list of field names (e.g. "PrimaryFontFamily") to 9806 // include in API requests with the JSON null value. By default, fields 9807 // with empty values are omitted from API requests. However, any field 9808 // with an empty value appearing in NullFields will be sent to the 9809 // server as null. It is an error if a field in this list has a 9810 // non-empty value. This may be used to include null fields in Patch 9811 // requests. 9812 NullFields []string `json:"-"` 9813} 9814 9815func (s *SpreadsheetTheme) MarshalJSON() ([]byte, error) { 9816 type NoMethod SpreadsheetTheme 9817 raw := NoMethod(*s) 9818 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9819} 9820 9821// TextFormat: The format of a run of text in a cell. Absent values 9822// indicate that the field isn't specified. 9823type TextFormat struct { 9824 // Bold: True if the text is bold. 9825 Bold bool `json:"bold,omitempty"` 9826 9827 // FontFamily: The font family. 9828 FontFamily string `json:"fontFamily,omitempty"` 9829 9830 // FontSize: The size of the font. 9831 FontSize int64 `json:"fontSize,omitempty"` 9832 9833 // ForegroundColor: The foreground color of the text. 9834 ForegroundColor *Color `json:"foregroundColor,omitempty"` 9835 9836 // ForegroundColorStyle: The foreground color of the text. If 9837 // foreground_color is also set, this field takes precedence. 9838 ForegroundColorStyle *ColorStyle `json:"foregroundColorStyle,omitempty"` 9839 9840 // Italic: True if the text is italicized. 9841 Italic bool `json:"italic,omitempty"` 9842 9843 // Link: The link destination of the text, if any. Setting the link 9844 // field in a TextFormatRun will clear the cell's existing links or a 9845 // cell-level link set in the same request. When a link is set, the text 9846 // foreground color will be set to the default link color and the text 9847 // will be underlined. If these fields are modified in the same request, 9848 // those values will be used instead of the link defaults. 9849 Link *Link `json:"link,omitempty"` 9850 9851 // Strikethrough: True if the text has a strikethrough. 9852 Strikethrough bool `json:"strikethrough,omitempty"` 9853 9854 // Underline: True if the text is underlined. 9855 Underline bool `json:"underline,omitempty"` 9856 9857 // ForceSendFields is a list of field names (e.g. "Bold") to 9858 // unconditionally include in API requests. By default, fields with 9859 // empty or default values are omitted from API requests. However, any 9860 // non-pointer, non-interface field appearing in ForceSendFields will be 9861 // sent to the server regardless of whether the field is empty or not. 9862 // This may be used to include empty fields in Patch requests. 9863 ForceSendFields []string `json:"-"` 9864 9865 // NullFields is a list of field names (e.g. "Bold") to include in API 9866 // requests with the JSON null value. By default, fields with empty 9867 // values are omitted from API requests. However, any field with an 9868 // empty value appearing in NullFields will be sent to the server as 9869 // null. It is an error if a field in this list has a non-empty value. 9870 // This may be used to include null fields in Patch requests. 9871 NullFields []string `json:"-"` 9872} 9873 9874func (s *TextFormat) MarshalJSON() ([]byte, error) { 9875 type NoMethod TextFormat 9876 raw := NoMethod(*s) 9877 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9878} 9879 9880// TextFormatRun: A run of a text format. The format of this run 9881// continues until the start index of the next run. When updating, all 9882// fields must be set. 9883type TextFormatRun struct { 9884 // Format: The format of this run. Absent values inherit the cell's 9885 // format. 9886 Format *TextFormat `json:"format,omitempty"` 9887 9888 // StartIndex: The character index where this run starts. 9889 StartIndex int64 `json:"startIndex,omitempty"` 9890 9891 // ForceSendFields is a list of field names (e.g. "Format") to 9892 // unconditionally include in API requests. By default, fields with 9893 // empty or default values are omitted from API requests. However, any 9894 // non-pointer, non-interface field appearing in ForceSendFields will be 9895 // sent to the server regardless of whether the field is empty or not. 9896 // This may be used to include empty fields in Patch requests. 9897 ForceSendFields []string `json:"-"` 9898 9899 // NullFields is a list of field names (e.g. "Format") to include in API 9900 // requests with the JSON null value. By default, fields with empty 9901 // values are omitted from API requests. However, any field with an 9902 // empty value appearing in NullFields will be sent to the server as 9903 // null. It is an error if a field in this list has a non-empty value. 9904 // This may be used to include null fields in Patch requests. 9905 NullFields []string `json:"-"` 9906} 9907 9908func (s *TextFormatRun) MarshalJSON() ([]byte, error) { 9909 type NoMethod TextFormatRun 9910 raw := NoMethod(*s) 9911 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9912} 9913 9914// TextPosition: Position settings for text. 9915type TextPosition struct { 9916 // HorizontalAlignment: Horizontal alignment setting for the piece of 9917 // text. 9918 // 9919 // Possible values: 9920 // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not 9921 // specified. Do not use this. 9922 // "LEFT" - The text is explicitly aligned to the left of the cell. 9923 // "CENTER" - The text is explicitly aligned to the center of the 9924 // cell. 9925 // "RIGHT" - The text is explicitly aligned to the right of the cell. 9926 HorizontalAlignment string `json:"horizontalAlignment,omitempty"` 9927 9928 // ForceSendFields is a list of field names (e.g. "HorizontalAlignment") 9929 // to unconditionally include in API requests. By default, fields with 9930 // empty or default values are omitted from API requests. However, any 9931 // non-pointer, non-interface field appearing in ForceSendFields will be 9932 // sent to the server regardless of whether the field is empty or not. 9933 // This may be used to include empty fields in Patch requests. 9934 ForceSendFields []string `json:"-"` 9935 9936 // NullFields is a list of field names (e.g. "HorizontalAlignment") to 9937 // include in API requests with the JSON null value. By default, fields 9938 // with empty values are omitted from API requests. However, any field 9939 // with an empty value appearing in NullFields will be sent to the 9940 // server as null. It is an error if a field in this list has a 9941 // non-empty value. This may be used to include null fields in Patch 9942 // requests. 9943 NullFields []string `json:"-"` 9944} 9945 9946func (s *TextPosition) MarshalJSON() ([]byte, error) { 9947 type NoMethod TextPosition 9948 raw := NoMethod(*s) 9949 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9950} 9951 9952// TextRotation: The rotation applied to text in a cell. 9953type TextRotation struct { 9954 // Angle: The angle between the standard orientation and the desired 9955 // orientation. Measured in degrees. Valid values are between -90 and 9956 // 90. Positive angles are angled upwards, negative are angled 9957 // downwards. Note: For LTR text direction positive angles are in the 9958 // counterclockwise direction, whereas for RTL they are in the clockwise 9959 // direction 9960 Angle int64 `json:"angle,omitempty"` 9961 9962 // Vertical: If true, text reads top to bottom, but the orientation of 9963 // individual characters is unchanged. For example: | V | | e | | r | | 9964 // t | | i | | c | | a | | l | 9965 Vertical bool `json:"vertical,omitempty"` 9966 9967 // ForceSendFields is a list of field names (e.g. "Angle") to 9968 // unconditionally include in API requests. By default, fields with 9969 // empty or default values are omitted from API requests. However, any 9970 // non-pointer, non-interface field appearing in ForceSendFields will be 9971 // sent to the server regardless of whether the field is empty or not. 9972 // This may be used to include empty fields in Patch requests. 9973 ForceSendFields []string `json:"-"` 9974 9975 // NullFields is a list of field names (e.g. "Angle") to include in API 9976 // requests with the JSON null value. By default, fields with empty 9977 // values are omitted from API requests. However, any field with an 9978 // empty value appearing in NullFields will be sent to the server as 9979 // null. It is an error if a field in this list has a non-empty value. 9980 // This may be used to include null fields in Patch requests. 9981 NullFields []string `json:"-"` 9982} 9983 9984func (s *TextRotation) MarshalJSON() ([]byte, error) { 9985 type NoMethod TextRotation 9986 raw := NoMethod(*s) 9987 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 9988} 9989 9990// TextToColumnsRequest: Splits a column of text into multiple columns, 9991// based on a delimiter in each cell. 9992type TextToColumnsRequest struct { 9993 // Delimiter: The delimiter to use. Used only if delimiterType is 9994 // CUSTOM. 9995 Delimiter string `json:"delimiter,omitempty"` 9996 9997 // DelimiterType: The delimiter type to use. 9998 // 9999 // Possible values: 10000 // "DELIMITER_TYPE_UNSPECIFIED" - Default value. This value must not 10001 // be used. 10002 // "COMMA" - "," 10003 // "SEMICOLON" - ";" 10004 // "PERIOD" - "." 10005 // "SPACE" - " " 10006 // "CUSTOM" - A custom value as defined in delimiter. 10007 // "AUTODETECT" - Automatically detect columns. 10008 DelimiterType string `json:"delimiterType,omitempty"` 10009 10010 // Source: The source data range. This must span exactly one column. 10011 Source *GridRange `json:"source,omitempty"` 10012 10013 // ForceSendFields is a list of field names (e.g. "Delimiter") to 10014 // unconditionally include in API requests. By default, fields with 10015 // empty or default values are omitted from API requests. However, any 10016 // non-pointer, non-interface field appearing in ForceSendFields will be 10017 // sent to the server regardless of whether the field is empty or not. 10018 // This may be used to include empty fields in Patch requests. 10019 ForceSendFields []string `json:"-"` 10020 10021 // NullFields is a list of field names (e.g. "Delimiter") to include in 10022 // API requests with the JSON null value. By default, fields with empty 10023 // values are omitted from API requests. However, any field with an 10024 // empty value appearing in NullFields will be sent to the server as 10025 // null. It is an error if a field in this list has a non-empty value. 10026 // This may be used to include null fields in Patch requests. 10027 NullFields []string `json:"-"` 10028} 10029 10030func (s *TextToColumnsRequest) MarshalJSON() ([]byte, error) { 10031 type NoMethod TextToColumnsRequest 10032 raw := NoMethod(*s) 10033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10034} 10035 10036// ThemeColorPair: A pair mapping a spreadsheet theme color type to the 10037// concrete color it represents. 10038type ThemeColorPair struct { 10039 // Color: The concrete color corresponding to the theme color type. 10040 Color *ColorStyle `json:"color,omitempty"` 10041 10042 // ColorType: The type of the spreadsheet theme color. 10043 // 10044 // Possible values: 10045 // "THEME_COLOR_TYPE_UNSPECIFIED" - Unspecified theme color 10046 // "TEXT" - Represents the primary text color 10047 // "BACKGROUND" - Represents the primary background color 10048 // "ACCENT1" - Represents the first accent color 10049 // "ACCENT2" - Represents the second accent color 10050 // "ACCENT3" - Represents the third accent color 10051 // "ACCENT4" - Represents the fourth accent color 10052 // "ACCENT5" - Represents the fifth accent color 10053 // "ACCENT6" - Represents the sixth accent color 10054 // "LINK" - Represents the color to use for hyperlinks 10055 ColorType string `json:"colorType,omitempty"` 10056 10057 // ForceSendFields is a list of field names (e.g. "Color") to 10058 // unconditionally include in API requests. By default, fields with 10059 // empty or default values are omitted from API requests. However, any 10060 // non-pointer, non-interface field appearing in ForceSendFields will be 10061 // sent to the server regardless of whether the field is empty or not. 10062 // This may be used to include empty fields in Patch requests. 10063 ForceSendFields []string `json:"-"` 10064 10065 // NullFields is a list of field names (e.g. "Color") to include in API 10066 // requests with the JSON null value. By default, fields with empty 10067 // values are omitted from API requests. However, any field with an 10068 // empty value appearing in NullFields will be sent to the server as 10069 // null. It is an error if a field in this list has a non-empty value. 10070 // This may be used to include null fields in Patch requests. 10071 NullFields []string `json:"-"` 10072} 10073 10074func (s *ThemeColorPair) MarshalJSON() ([]byte, error) { 10075 type NoMethod ThemeColorPair 10076 raw := NoMethod(*s) 10077 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10078} 10079 10080// TimeOfDay: Represents a time of day. The date and time zone are 10081// either not significant or are specified elsewhere. An API may choose 10082// to allow leap seconds. Related types are google.type.Date and 10083// `google.protobuf.Timestamp`. 10084type TimeOfDay struct { 10085 // Hours: Hours of day in 24 hour format. Should be from 0 to 23. An API 10086 // may choose to allow the value "24:00:00" for scenarios like business 10087 // closing time. 10088 Hours int64 `json:"hours,omitempty"` 10089 10090 // Minutes: Minutes of hour of day. Must be from 0 to 59. 10091 Minutes int64 `json:"minutes,omitempty"` 10092 10093 // Nanos: Fractions of seconds in nanoseconds. Must be from 0 to 10094 // 999,999,999. 10095 Nanos int64 `json:"nanos,omitempty"` 10096 10097 // Seconds: Seconds of minutes of the time. Must normally be from 0 to 10098 // 59. An API may allow the value 60 if it allows leap-seconds. 10099 Seconds int64 `json:"seconds,omitempty"` 10100 10101 // ForceSendFields is a list of field names (e.g. "Hours") to 10102 // unconditionally include in API requests. By default, fields with 10103 // empty or default values are omitted from API requests. However, any 10104 // non-pointer, non-interface field appearing in ForceSendFields will be 10105 // sent to the server regardless of whether the field is empty or not. 10106 // This may be used to include empty fields in Patch requests. 10107 ForceSendFields []string `json:"-"` 10108 10109 // NullFields is a list of field names (e.g. "Hours") to include in API 10110 // requests with the JSON null value. By default, fields with empty 10111 // values are omitted from API requests. However, any field with an 10112 // empty value appearing in NullFields will be sent to the server as 10113 // null. It is an error if a field in this list has a non-empty value. 10114 // This may be used to include null fields in Patch requests. 10115 NullFields []string `json:"-"` 10116} 10117 10118func (s *TimeOfDay) MarshalJSON() ([]byte, error) { 10119 type NoMethod TimeOfDay 10120 raw := NoMethod(*s) 10121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10122} 10123 10124// TreemapChartColorScale: A color scale for a treemap chart. 10125type TreemapChartColorScale struct { 10126 // MaxValueColor: The background color for cells with a color value 10127 // greater than or equal to maxValue. Defaults to #109618 if not 10128 // specified. 10129 MaxValueColor *Color `json:"maxValueColor,omitempty"` 10130 10131 // MaxValueColorStyle: The background color for cells with a color value 10132 // greater than or equal to maxValue. Defaults to #109618 if not 10133 // specified. If max_value_color is also set, this field takes 10134 // precedence. 10135 MaxValueColorStyle *ColorStyle `json:"maxValueColorStyle,omitempty"` 10136 10137 // MidValueColor: The background color for cells with a color value at 10138 // the midpoint between minValue and maxValue. Defaults to #efe6dc if 10139 // not specified. 10140 MidValueColor *Color `json:"midValueColor,omitempty"` 10141 10142 // MidValueColorStyle: The background color for cells with a color value 10143 // at the midpoint between minValue and maxValue. Defaults to #efe6dc if 10144 // not specified. If mid_value_color is also set, this field takes 10145 // precedence. 10146 MidValueColorStyle *ColorStyle `json:"midValueColorStyle,omitempty"` 10147 10148 // MinValueColor: The background color for cells with a color value less 10149 // than or equal to minValue. Defaults to #dc3912 if not specified. 10150 MinValueColor *Color `json:"minValueColor,omitempty"` 10151 10152 // MinValueColorStyle: The background color for cells with a color value 10153 // less than or equal to minValue. Defaults to #dc3912 if not specified. 10154 // If min_value_color is also set, this field takes precedence. 10155 MinValueColorStyle *ColorStyle `json:"minValueColorStyle,omitempty"` 10156 10157 // NoDataColor: The background color for cells that have no color data 10158 // associated with them. Defaults to #000000 if not specified. 10159 NoDataColor *Color `json:"noDataColor,omitempty"` 10160 10161 // NoDataColorStyle: The background color for cells that have no color 10162 // data associated with them. Defaults to #000000 if not specified. If 10163 // no_data_color is also set, this field takes precedence. 10164 NoDataColorStyle *ColorStyle `json:"noDataColorStyle,omitempty"` 10165 10166 // ForceSendFields is a list of field names (e.g. "MaxValueColor") to 10167 // unconditionally include in API requests. By default, fields with 10168 // empty or default values are omitted from API requests. However, any 10169 // non-pointer, non-interface field appearing in ForceSendFields will be 10170 // sent to the server regardless of whether the field is empty or not. 10171 // This may be used to include empty fields in Patch requests. 10172 ForceSendFields []string `json:"-"` 10173 10174 // NullFields is a list of field names (e.g. "MaxValueColor") to include 10175 // in API requests with the JSON null value. By default, fields with 10176 // empty values are omitted from API requests. However, any field with 10177 // an empty value appearing in NullFields will be sent to the server as 10178 // null. It is an error if a field in this list has a non-empty value. 10179 // This may be used to include null fields in Patch requests. 10180 NullFields []string `json:"-"` 10181} 10182 10183func (s *TreemapChartColorScale) MarshalJSON() ([]byte, error) { 10184 type NoMethod TreemapChartColorScale 10185 raw := NoMethod(*s) 10186 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10187} 10188 10189// TreemapChartSpec: A Treemap chart. 10190type TreemapChartSpec struct { 10191 // ColorData: The data that determines the background color of each 10192 // treemap data cell. This field is optional. If not specified, 10193 // size_data is used to determine background colors. If specified, the 10194 // data is expected to be numeric. color_scale will determine how the 10195 // values in this data map to data cell background colors. 10196 ColorData *ChartData `json:"colorData,omitempty"` 10197 10198 // ColorScale: The color scale for data cells in the treemap chart. Data 10199 // cells are assigned colors based on their color values. These color 10200 // values come from color_data, or from size_data if color_data is not 10201 // specified. Cells with color values less than or equal to min_value 10202 // will have minValueColor as their background color. Cells with color 10203 // values greater than or equal to max_value will have maxValueColor as 10204 // their background color. Cells with color values between min_value and 10205 // max_value will have background colors on a gradient between 10206 // minValueColor and maxValueColor, the midpoint of the gradient being 10207 // midValueColor. Cells with missing or non-numeric color values will 10208 // have noDataColor as their background color. 10209 ColorScale *TreemapChartColorScale `json:"colorScale,omitempty"` 10210 10211 // HeaderColor: The background color for header cells. 10212 HeaderColor *Color `json:"headerColor,omitempty"` 10213 10214 // HeaderColorStyle: The background color for header cells. If 10215 // header_color is also set, this field takes precedence. 10216 HeaderColorStyle *ColorStyle `json:"headerColorStyle,omitempty"` 10217 10218 // HideTooltips: True to hide tooltips. 10219 HideTooltips bool `json:"hideTooltips,omitempty"` 10220 10221 // HintedLevels: The number of additional data levels beyond the labeled 10222 // levels to be shown on the treemap chart. These levels are not 10223 // interactive and are shown without their labels. Defaults to 0 if not 10224 // specified. 10225 HintedLevels int64 `json:"hintedLevels,omitempty"` 10226 10227 // Labels: The data that contains the treemap cell labels. 10228 Labels *ChartData `json:"labels,omitempty"` 10229 10230 // Levels: The number of data levels to show on the treemap chart. These 10231 // levels are interactive and are shown with their labels. Defaults to 2 10232 // if not specified. 10233 Levels int64 `json:"levels,omitempty"` 10234 10235 // MaxValue: The maximum possible data value. Cells with values greater 10236 // than this will have the same color as cells with this value. If not 10237 // specified, defaults to the actual maximum value from color_data, or 10238 // the maximum value from size_data if color_data is not specified. 10239 MaxValue float64 `json:"maxValue,omitempty"` 10240 10241 // MinValue: The minimum possible data value. Cells with values less 10242 // than this will have the same color as cells with this value. If not 10243 // specified, defaults to the actual minimum value from color_data, or 10244 // the minimum value from size_data if color_data is not specified. 10245 MinValue float64 `json:"minValue,omitempty"` 10246 10247 // ParentLabels: The data the contains the treemap cells' parent labels. 10248 ParentLabels *ChartData `json:"parentLabels,omitempty"` 10249 10250 // SizeData: The data that determines the size of each treemap data 10251 // cell. This data is expected to be numeric. The cells corresponding to 10252 // non-numeric or missing data will not be rendered. If color_data is 10253 // not specified, this data is used to determine data cell background 10254 // colors as well. 10255 SizeData *ChartData `json:"sizeData,omitempty"` 10256 10257 // TextFormat: The text format for all labels on the chart. The link 10258 // field is not supported. 10259 TextFormat *TextFormat `json:"textFormat,omitempty"` 10260 10261 // ForceSendFields is a list of field names (e.g. "ColorData") to 10262 // unconditionally include in API requests. By default, fields with 10263 // empty or default values are omitted from API requests. However, any 10264 // non-pointer, non-interface field appearing in ForceSendFields will be 10265 // sent to the server regardless of whether the field is empty or not. 10266 // This may be used to include empty fields in Patch requests. 10267 ForceSendFields []string `json:"-"` 10268 10269 // NullFields is a list of field names (e.g. "ColorData") to include in 10270 // API requests with the JSON null value. By default, fields with empty 10271 // values are omitted from API requests. However, any field with an 10272 // empty value appearing in NullFields will be sent to the server as 10273 // null. It is an error if a field in this list has a non-empty value. 10274 // This may be used to include null fields in Patch requests. 10275 NullFields []string `json:"-"` 10276} 10277 10278func (s *TreemapChartSpec) MarshalJSON() ([]byte, error) { 10279 type NoMethod TreemapChartSpec 10280 raw := NoMethod(*s) 10281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10282} 10283 10284func (s *TreemapChartSpec) UnmarshalJSON(data []byte) error { 10285 type NoMethod TreemapChartSpec 10286 var s1 struct { 10287 MaxValue gensupport.JSONFloat64 `json:"maxValue"` 10288 MinValue gensupport.JSONFloat64 `json:"minValue"` 10289 *NoMethod 10290 } 10291 s1.NoMethod = (*NoMethod)(s) 10292 if err := json.Unmarshal(data, &s1); err != nil { 10293 return err 10294 } 10295 s.MaxValue = float64(s1.MaxValue) 10296 s.MinValue = float64(s1.MinValue) 10297 return nil 10298} 10299 10300// TrimWhitespaceRequest: Trims the whitespace (such as spaces, tabs, or 10301// new lines) in every cell in the specified range. This request removes 10302// all whitespace from the start and end of each cell's text, and 10303// reduces any subsequence of remaining whitespace characters to a 10304// single space. If the resulting trimmed text starts with a '+' or '=' 10305// character, the text remains as a string value and isn't interpreted 10306// as a formula. 10307type TrimWhitespaceRequest struct { 10308 // Range: The range whose cells to trim. 10309 Range *GridRange `json:"range,omitempty"` 10310 10311 // ForceSendFields is a list of field names (e.g. "Range") to 10312 // unconditionally include in API requests. By default, fields with 10313 // empty or default values are omitted from API requests. However, any 10314 // non-pointer, non-interface field appearing in ForceSendFields will be 10315 // sent to the server regardless of whether the field is empty or not. 10316 // This may be used to include empty fields in Patch requests. 10317 ForceSendFields []string `json:"-"` 10318 10319 // NullFields is a list of field names (e.g. "Range") to include in API 10320 // requests with the JSON null value. By default, fields with empty 10321 // values are omitted from API requests. However, any field with an 10322 // empty value appearing in NullFields will be sent to the server as 10323 // null. It is an error if a field in this list has a non-empty value. 10324 // This may be used to include null fields in Patch requests. 10325 NullFields []string `json:"-"` 10326} 10327 10328func (s *TrimWhitespaceRequest) MarshalJSON() ([]byte, error) { 10329 type NoMethod TrimWhitespaceRequest 10330 raw := NoMethod(*s) 10331 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10332} 10333 10334// TrimWhitespaceResponse: The result of trimming whitespace in cells. 10335type TrimWhitespaceResponse struct { 10336 // CellsChangedCount: The number of cells that were trimmed of 10337 // whitespace. 10338 CellsChangedCount int64 `json:"cellsChangedCount,omitempty"` 10339 10340 // ForceSendFields is a list of field names (e.g. "CellsChangedCount") 10341 // to unconditionally include in API requests. By default, fields with 10342 // empty or default values are omitted from API requests. However, any 10343 // non-pointer, non-interface field appearing in ForceSendFields will be 10344 // sent to the server regardless of whether the field is empty or not. 10345 // This may be used to include empty fields in Patch requests. 10346 ForceSendFields []string `json:"-"` 10347 10348 // NullFields is a list of field names (e.g. "CellsChangedCount") to 10349 // include in API requests with the JSON null value. By default, fields 10350 // with empty values are omitted from API requests. However, any field 10351 // with an empty value appearing in NullFields will be sent to the 10352 // server as null. It is an error if a field in this list has a 10353 // non-empty value. This may be used to include null fields in Patch 10354 // requests. 10355 NullFields []string `json:"-"` 10356} 10357 10358func (s *TrimWhitespaceResponse) MarshalJSON() ([]byte, error) { 10359 type NoMethod TrimWhitespaceResponse 10360 raw := NoMethod(*s) 10361 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10362} 10363 10364// UnmergeCellsRequest: Unmerges cells in the given range. 10365type UnmergeCellsRequest struct { 10366 // Range: The range within which all cells should be unmerged. If the 10367 // range spans multiple merges, all will be unmerged. The range must not 10368 // partially span any merge. 10369 Range *GridRange `json:"range,omitempty"` 10370 10371 // ForceSendFields is a list of field names (e.g. "Range") to 10372 // unconditionally include in API requests. By default, fields with 10373 // empty or default values are omitted from API requests. However, any 10374 // non-pointer, non-interface field appearing in ForceSendFields will be 10375 // sent to the server regardless of whether the field is empty or not. 10376 // This may be used to include empty fields in Patch requests. 10377 ForceSendFields []string `json:"-"` 10378 10379 // NullFields is a list of field names (e.g. "Range") to include in API 10380 // requests with the JSON null value. By default, fields with empty 10381 // values are omitted from API requests. However, any field with an 10382 // empty value appearing in NullFields will be sent to the server as 10383 // null. It is an error if a field in this list has a non-empty value. 10384 // This may be used to include null fields in Patch requests. 10385 NullFields []string `json:"-"` 10386} 10387 10388func (s *UnmergeCellsRequest) MarshalJSON() ([]byte, error) { 10389 type NoMethod UnmergeCellsRequest 10390 raw := NoMethod(*s) 10391 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10392} 10393 10394// UpdateBandingRequest: Updates properties of the supplied banded 10395// range. 10396type UpdateBandingRequest struct { 10397 // BandedRange: The banded range to update with the new properties. 10398 BandedRange *BandedRange `json:"bandedRange,omitempty"` 10399 10400 // Fields: The fields that should be updated. At least one field must be 10401 // specified. The root `bandedRange` is implied and should not be 10402 // specified. A single "*" can be used as short-hand for listing every 10403 // field. 10404 Fields string `json:"fields,omitempty"` 10405 10406 // ForceSendFields is a list of field names (e.g. "BandedRange") to 10407 // unconditionally include in API requests. By default, fields with 10408 // empty or default values are omitted from API requests. However, any 10409 // non-pointer, non-interface field appearing in ForceSendFields will be 10410 // sent to the server regardless of whether the field is empty or not. 10411 // This may be used to include empty fields in Patch requests. 10412 ForceSendFields []string `json:"-"` 10413 10414 // NullFields is a list of field names (e.g. "BandedRange") to include 10415 // in API requests with the JSON null value. By default, fields with 10416 // empty values are omitted from API requests. However, any field with 10417 // an empty value appearing in NullFields will be sent to the server as 10418 // null. It is an error if a field in this list has a non-empty value. 10419 // This may be used to include null fields in Patch requests. 10420 NullFields []string `json:"-"` 10421} 10422 10423func (s *UpdateBandingRequest) MarshalJSON() ([]byte, error) { 10424 type NoMethod UpdateBandingRequest 10425 raw := NoMethod(*s) 10426 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10427} 10428 10429// UpdateBordersRequest: Updates the borders of a range. If a field is 10430// not set in the request, that means the border remains as-is. For 10431// example, with two subsequent UpdateBordersRequest: 1. range: A1:A5 `{ 10432// top: RED, bottom: WHITE }` 2. range: A1:A5 `{ left: BLUE }` That 10433// would result in A1:A5 having a borders of `{ top: RED, bottom: WHITE, 10434// left: BLUE }`. If you want to clear a border, explicitly set the 10435// style to NONE. 10436type UpdateBordersRequest struct { 10437 // Bottom: The border to put at the bottom of the range. 10438 Bottom *Border `json:"bottom,omitempty"` 10439 10440 // InnerHorizontal: The horizontal border to put within the range. 10441 InnerHorizontal *Border `json:"innerHorizontal,omitempty"` 10442 10443 // InnerVertical: The vertical border to put within the range. 10444 InnerVertical *Border `json:"innerVertical,omitempty"` 10445 10446 // Left: The border to put at the left of the range. 10447 Left *Border `json:"left,omitempty"` 10448 10449 // Range: The range whose borders should be updated. 10450 Range *GridRange `json:"range,omitempty"` 10451 10452 // Right: The border to put at the right of the range. 10453 Right *Border `json:"right,omitempty"` 10454 10455 // Top: The border to put at the top of the range. 10456 Top *Border `json:"top,omitempty"` 10457 10458 // ForceSendFields is a list of field names (e.g. "Bottom") to 10459 // unconditionally include in API requests. By default, fields with 10460 // empty or default values are omitted from API requests. However, any 10461 // non-pointer, non-interface field appearing in ForceSendFields will be 10462 // sent to the server regardless of whether the field is empty or not. 10463 // This may be used to include empty fields in Patch requests. 10464 ForceSendFields []string `json:"-"` 10465 10466 // NullFields is a list of field names (e.g. "Bottom") to include in API 10467 // requests with the JSON null value. By default, fields with empty 10468 // values are omitted from API requests. However, any field with an 10469 // empty value appearing in NullFields will be sent to the server as 10470 // null. It is an error if a field in this list has a non-empty value. 10471 // This may be used to include null fields in Patch requests. 10472 NullFields []string `json:"-"` 10473} 10474 10475func (s *UpdateBordersRequest) MarshalJSON() ([]byte, error) { 10476 type NoMethod UpdateBordersRequest 10477 raw := NoMethod(*s) 10478 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10479} 10480 10481// UpdateCellsRequest: Updates all cells in a range with new data. 10482type UpdateCellsRequest struct { 10483 // Fields: The fields of CellData that should be updated. At least one 10484 // field must be specified. The root is the CellData; 'row.values.' 10485 // should not be specified. A single "*" can be used as short-hand for 10486 // listing every field. 10487 Fields string `json:"fields,omitempty"` 10488 10489 // Range: The range to write data to. If the data in rows does not cover 10490 // the entire requested range, the fields matching those set in fields 10491 // will be cleared. 10492 Range *GridRange `json:"range,omitempty"` 10493 10494 // Rows: The data to write. 10495 Rows []*RowData `json:"rows,omitempty"` 10496 10497 // Start: The coordinate to start writing data at. Any number of rows 10498 // and columns (including a different number of columns per row) may be 10499 // written. 10500 Start *GridCoordinate `json:"start,omitempty"` 10501 10502 // ForceSendFields is a list of field names (e.g. "Fields") to 10503 // unconditionally include in API requests. By default, fields with 10504 // empty or default values are omitted from API requests. However, any 10505 // non-pointer, non-interface field appearing in ForceSendFields will be 10506 // sent to the server regardless of whether the field is empty or not. 10507 // This may be used to include empty fields in Patch requests. 10508 ForceSendFields []string `json:"-"` 10509 10510 // NullFields is a list of field names (e.g. "Fields") to include in API 10511 // requests with the JSON null value. By default, fields with empty 10512 // values are omitted from API requests. However, any field with an 10513 // empty value appearing in NullFields will be sent to the server as 10514 // null. It is an error if a field in this list has a non-empty value. 10515 // This may be used to include null fields in Patch requests. 10516 NullFields []string `json:"-"` 10517} 10518 10519func (s *UpdateCellsRequest) MarshalJSON() ([]byte, error) { 10520 type NoMethod UpdateCellsRequest 10521 raw := NoMethod(*s) 10522 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10523} 10524 10525// UpdateChartSpecRequest: Updates a chart's specifications. (This does 10526// not move or resize a chart. To move or resize a chart, use 10527// UpdateEmbeddedObjectPositionRequest.) 10528type UpdateChartSpecRequest struct { 10529 // ChartId: The ID of the chart to update. 10530 ChartId int64 `json:"chartId,omitempty"` 10531 10532 // Spec: The specification to apply to the chart. 10533 Spec *ChartSpec `json:"spec,omitempty"` 10534 10535 // ForceSendFields is a list of field names (e.g. "ChartId") to 10536 // unconditionally include in API requests. By default, fields with 10537 // empty or default values are omitted from API requests. However, any 10538 // non-pointer, non-interface field appearing in ForceSendFields will be 10539 // sent to the server regardless of whether the field is empty or not. 10540 // This may be used to include empty fields in Patch requests. 10541 ForceSendFields []string `json:"-"` 10542 10543 // NullFields is a list of field names (e.g. "ChartId") to include in 10544 // API requests with the JSON null value. By default, fields with empty 10545 // values are omitted from API requests. However, any field with an 10546 // empty value appearing in NullFields will be sent to the server as 10547 // null. It is an error if a field in this list has a non-empty value. 10548 // This may be used to include null fields in Patch requests. 10549 NullFields []string `json:"-"` 10550} 10551 10552func (s *UpdateChartSpecRequest) MarshalJSON() ([]byte, error) { 10553 type NoMethod UpdateChartSpecRequest 10554 raw := NoMethod(*s) 10555 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10556} 10557 10558// UpdateConditionalFormatRuleRequest: Updates a conditional format rule 10559// at the given index, or moves a conditional format rule to another 10560// index. 10561type UpdateConditionalFormatRuleRequest struct { 10562 // Index: The zero-based index of the rule that should be replaced or 10563 // moved. 10564 Index int64 `json:"index,omitempty"` 10565 10566 // NewIndex: The zero-based new index the rule should end up at. 10567 NewIndex int64 `json:"newIndex,omitempty"` 10568 10569 // Rule: The rule that should replace the rule at the given index. 10570 Rule *ConditionalFormatRule `json:"rule,omitempty"` 10571 10572 // SheetId: The sheet of the rule to move. Required if new_index is set, 10573 // unused otherwise. 10574 SheetId int64 `json:"sheetId,omitempty"` 10575 10576 // ForceSendFields is a list of field names (e.g. "Index") to 10577 // unconditionally include in API requests. By default, fields with 10578 // empty or default values are omitted from API requests. However, any 10579 // non-pointer, non-interface field appearing in ForceSendFields will be 10580 // sent to the server regardless of whether the field is empty or not. 10581 // This may be used to include empty fields in Patch requests. 10582 ForceSendFields []string `json:"-"` 10583 10584 // NullFields is a list of field names (e.g. "Index") to include in API 10585 // requests with the JSON null value. By default, fields with empty 10586 // values are omitted from API requests. However, any field with an 10587 // empty value appearing in NullFields will be sent to the server as 10588 // null. It is an error if a field in this list has a non-empty value. 10589 // This may be used to include null fields in Patch requests. 10590 NullFields []string `json:"-"` 10591} 10592 10593func (s *UpdateConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) { 10594 type NoMethod UpdateConditionalFormatRuleRequest 10595 raw := NoMethod(*s) 10596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10597} 10598 10599// UpdateConditionalFormatRuleResponse: The result of updating a 10600// conditional format rule. 10601type UpdateConditionalFormatRuleResponse struct { 10602 // NewIndex: The index of the new rule. 10603 NewIndex int64 `json:"newIndex,omitempty"` 10604 10605 // NewRule: The new rule that replaced the old rule (if replacing), or 10606 // the rule that was moved (if moved) 10607 NewRule *ConditionalFormatRule `json:"newRule,omitempty"` 10608 10609 // OldIndex: The old index of the rule. Not set if a rule was replaced 10610 // (because it is the same as new_index). 10611 OldIndex int64 `json:"oldIndex,omitempty"` 10612 10613 // OldRule: The old (deleted) rule. Not set if a rule was moved (because 10614 // it is the same as new_rule). 10615 OldRule *ConditionalFormatRule `json:"oldRule,omitempty"` 10616 10617 // ForceSendFields is a list of field names (e.g. "NewIndex") to 10618 // unconditionally include in API requests. By default, fields with 10619 // empty or default values are omitted from API requests. However, any 10620 // non-pointer, non-interface field appearing in ForceSendFields will be 10621 // sent to the server regardless of whether the field is empty or not. 10622 // This may be used to include empty fields in Patch requests. 10623 ForceSendFields []string `json:"-"` 10624 10625 // NullFields is a list of field names (e.g. "NewIndex") to include in 10626 // API requests with the JSON null value. By default, fields with empty 10627 // values are omitted from API requests. However, any field with an 10628 // empty value appearing in NullFields will be sent to the server as 10629 // null. It is an error if a field in this list has a non-empty value. 10630 // This may be used to include null fields in Patch requests. 10631 NullFields []string `json:"-"` 10632} 10633 10634func (s *UpdateConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) { 10635 type NoMethod UpdateConditionalFormatRuleResponse 10636 raw := NoMethod(*s) 10637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10638} 10639 10640// UpdateDataSourceRequest: Updates a data source. After the data source 10641// is updated successfully, an execution is triggered to refresh the 10642// associated DATA_SOURCE sheet to read data from the updated data 10643// source. The request requires an additional `bigquery.readonly` OAuth 10644// scope. 10645type UpdateDataSourceRequest struct { 10646 // DataSource: The data source to update. 10647 DataSource *DataSource `json:"dataSource,omitempty"` 10648 10649 // Fields: The fields that should be updated. At least one field must be 10650 // specified. The root `dataSource` is implied and should not be 10651 // specified. A single "*" can be used as short-hand for listing every 10652 // field. 10653 Fields string `json:"fields,omitempty"` 10654 10655 // ForceSendFields is a list of field names (e.g. "DataSource") to 10656 // unconditionally include in API requests. By default, fields with 10657 // empty or default values are omitted from API requests. However, any 10658 // non-pointer, non-interface field appearing in ForceSendFields will be 10659 // sent to the server regardless of whether the field is empty or not. 10660 // This may be used to include empty fields in Patch requests. 10661 ForceSendFields []string `json:"-"` 10662 10663 // NullFields is a list of field names (e.g. "DataSource") to include in 10664 // API requests with the JSON null value. By default, fields with empty 10665 // values are omitted from API requests. However, any field with an 10666 // empty value appearing in NullFields will be sent to the server as 10667 // null. It is an error if a field in this list has a non-empty value. 10668 // This may be used to include null fields in Patch requests. 10669 NullFields []string `json:"-"` 10670} 10671 10672func (s *UpdateDataSourceRequest) MarshalJSON() ([]byte, error) { 10673 type NoMethod UpdateDataSourceRequest 10674 raw := NoMethod(*s) 10675 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10676} 10677 10678// UpdateDataSourceResponse: The response from updating data source. 10679type UpdateDataSourceResponse struct { 10680 // DataExecutionStatus: The data execution status. 10681 DataExecutionStatus *DataExecutionStatus `json:"dataExecutionStatus,omitempty"` 10682 10683 // DataSource: The updated data source. 10684 DataSource *DataSource `json:"dataSource,omitempty"` 10685 10686 // ForceSendFields is a list of field names (e.g. "DataExecutionStatus") 10687 // to unconditionally include in API requests. By default, fields with 10688 // empty or default values are omitted from API requests. However, any 10689 // non-pointer, non-interface field appearing in ForceSendFields will be 10690 // sent to the server regardless of whether the field is empty or not. 10691 // This may be used to include empty fields in Patch requests. 10692 ForceSendFields []string `json:"-"` 10693 10694 // NullFields is a list of field names (e.g. "DataExecutionStatus") to 10695 // include in API requests with the JSON null value. By default, fields 10696 // with empty values are omitted from API requests. However, any field 10697 // with an empty value appearing in NullFields will be sent to the 10698 // server as null. It is an error if a field in this list has a 10699 // non-empty value. This may be used to include null fields in Patch 10700 // requests. 10701 NullFields []string `json:"-"` 10702} 10703 10704func (s *UpdateDataSourceResponse) MarshalJSON() ([]byte, error) { 10705 type NoMethod UpdateDataSourceResponse 10706 raw := NoMethod(*s) 10707 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10708} 10709 10710// UpdateDeveloperMetadataRequest: A request to update properties of 10711// developer metadata. Updates the properties of the developer metadata 10712// selected by the filters to the values provided in the 10713// DeveloperMetadata resource. Callers must specify the properties they 10714// wish to update in the fields parameter, as well as specify at least 10715// one DataFilter matching the metadata they wish to update. 10716type UpdateDeveloperMetadataRequest struct { 10717 // DataFilters: The filters matching the developer metadata entries to 10718 // update. 10719 DataFilters []*DataFilter `json:"dataFilters,omitempty"` 10720 10721 // DeveloperMetadata: The value that all metadata matched by the data 10722 // filters will be updated to. 10723 DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"` 10724 10725 // Fields: The fields that should be updated. At least one field must be 10726 // specified. The root `developerMetadata` is implied and should not be 10727 // specified. A single "*" can be used as short-hand for listing every 10728 // field. 10729 Fields string `json:"fields,omitempty"` 10730 10731 // ForceSendFields is a list of field names (e.g. "DataFilters") to 10732 // unconditionally include in API requests. By default, fields with 10733 // empty or default values are omitted from API requests. However, any 10734 // non-pointer, non-interface field appearing in ForceSendFields will be 10735 // sent to the server regardless of whether the field is empty or not. 10736 // This may be used to include empty fields in Patch requests. 10737 ForceSendFields []string `json:"-"` 10738 10739 // NullFields is a list of field names (e.g. "DataFilters") to include 10740 // in API requests with the JSON null value. By default, fields with 10741 // empty values are omitted from API requests. However, any field with 10742 // an empty value appearing in NullFields will be sent to the server as 10743 // null. It is an error if a field in this list has a non-empty value. 10744 // This may be used to include null fields in Patch requests. 10745 NullFields []string `json:"-"` 10746} 10747 10748func (s *UpdateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) { 10749 type NoMethod UpdateDeveloperMetadataRequest 10750 raw := NoMethod(*s) 10751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10752} 10753 10754// UpdateDeveloperMetadataResponse: The response from updating developer 10755// metadata. 10756type UpdateDeveloperMetadataResponse struct { 10757 // DeveloperMetadata: The updated developer metadata. 10758 DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"` 10759 10760 // ForceSendFields is a list of field names (e.g. "DeveloperMetadata") 10761 // to unconditionally include in API requests. By default, fields with 10762 // empty or default values are omitted from API requests. However, any 10763 // non-pointer, non-interface field appearing in ForceSendFields will be 10764 // sent to the server regardless of whether the field is empty or not. 10765 // This may be used to include empty fields in Patch requests. 10766 ForceSendFields []string `json:"-"` 10767 10768 // NullFields is a list of field names (e.g. "DeveloperMetadata") to 10769 // include in API requests with the JSON null value. By default, fields 10770 // with empty values are omitted from API requests. However, any field 10771 // with an empty value appearing in NullFields will be sent to the 10772 // server as null. It is an error if a field in this list has a 10773 // non-empty value. This may be used to include null fields in Patch 10774 // requests. 10775 NullFields []string `json:"-"` 10776} 10777 10778func (s *UpdateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) { 10779 type NoMethod UpdateDeveloperMetadataResponse 10780 raw := NoMethod(*s) 10781 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10782} 10783 10784// UpdateDimensionGroupRequest: Updates the state of the specified 10785// group. 10786type UpdateDimensionGroupRequest struct { 10787 // DimensionGroup: The group whose state should be updated. The range 10788 // and depth of the group should specify a valid group on the sheet, and 10789 // all other fields updated. 10790 DimensionGroup *DimensionGroup `json:"dimensionGroup,omitempty"` 10791 10792 // Fields: The fields that should be updated. At least one field must be 10793 // specified. The root `dimensionGroup` is implied and should not be 10794 // specified. A single "*" can be used as short-hand for listing every 10795 // field. 10796 Fields string `json:"fields,omitempty"` 10797 10798 // ForceSendFields is a list of field names (e.g. "DimensionGroup") to 10799 // unconditionally include in API requests. By default, fields with 10800 // empty or default values are omitted from API requests. However, any 10801 // non-pointer, non-interface field appearing in ForceSendFields will be 10802 // sent to the server regardless of whether the field is empty or not. 10803 // This may be used to include empty fields in Patch requests. 10804 ForceSendFields []string `json:"-"` 10805 10806 // NullFields is a list of field names (e.g. "DimensionGroup") to 10807 // include in API requests with the JSON null value. By default, fields 10808 // with empty values are omitted from API requests. However, any field 10809 // with an empty value appearing in NullFields will be sent to the 10810 // server as null. It is an error if a field in this list has a 10811 // non-empty value. This may be used to include null fields in Patch 10812 // requests. 10813 NullFields []string `json:"-"` 10814} 10815 10816func (s *UpdateDimensionGroupRequest) MarshalJSON() ([]byte, error) { 10817 type NoMethod UpdateDimensionGroupRequest 10818 raw := NoMethod(*s) 10819 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10820} 10821 10822// UpdateDimensionPropertiesRequest: Updates properties of dimensions 10823// within the specified range. 10824type UpdateDimensionPropertiesRequest struct { 10825 // DataSourceSheetRange: The columns on a data source sheet to update. 10826 DataSourceSheetRange *DataSourceSheetDimensionRange `json:"dataSourceSheetRange,omitempty"` 10827 10828 // Fields: The fields that should be updated. At least one field must be 10829 // specified. The root `properties` is implied and should not be 10830 // specified. A single "*" can be used as short-hand for listing every 10831 // field. 10832 Fields string `json:"fields,omitempty"` 10833 10834 // Properties: Properties to update. 10835 Properties *DimensionProperties `json:"properties,omitempty"` 10836 10837 // Range: The rows or columns to update. 10838 Range *DimensionRange `json:"range,omitempty"` 10839 10840 // ForceSendFields is a list of field names (e.g. 10841 // "DataSourceSheetRange") to unconditionally include in API requests. 10842 // By default, fields with empty or default values are omitted from API 10843 // requests. However, any non-pointer, non-interface field appearing in 10844 // ForceSendFields will be sent to the server regardless of whether the 10845 // field is empty or not. This may be used to include empty fields in 10846 // Patch requests. 10847 ForceSendFields []string `json:"-"` 10848 10849 // NullFields is a list of field names (e.g. "DataSourceSheetRange") to 10850 // include in API requests with the JSON null value. By default, fields 10851 // with empty values are omitted from API requests. However, any field 10852 // with an empty value appearing in NullFields will be sent to the 10853 // server as null. It is an error if a field in this list has a 10854 // non-empty value. This may be used to include null fields in Patch 10855 // requests. 10856 NullFields []string `json:"-"` 10857} 10858 10859func (s *UpdateDimensionPropertiesRequest) MarshalJSON() ([]byte, error) { 10860 type NoMethod UpdateDimensionPropertiesRequest 10861 raw := NoMethod(*s) 10862 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10863} 10864 10865// UpdateEmbeddedObjectBorderRequest: Updates an embedded object's 10866// border property. 10867type UpdateEmbeddedObjectBorderRequest struct { 10868 // Border: The border that applies to the embedded object. 10869 Border *EmbeddedObjectBorder `json:"border,omitempty"` 10870 10871 // Fields: The fields that should be updated. At least one field must be 10872 // specified. The root `border` is implied and should not be specified. 10873 // A single "*" can be used as short-hand for listing every field. 10874 Fields string `json:"fields,omitempty"` 10875 10876 // ObjectId: The ID of the embedded object to update. 10877 ObjectId int64 `json:"objectId,omitempty"` 10878 10879 // ForceSendFields is a list of field names (e.g. "Border") to 10880 // unconditionally include in API requests. By default, fields with 10881 // empty or default values are omitted from API requests. However, any 10882 // non-pointer, non-interface field appearing in ForceSendFields will be 10883 // sent to the server regardless of whether the field is empty or not. 10884 // This may be used to include empty fields in Patch requests. 10885 ForceSendFields []string `json:"-"` 10886 10887 // NullFields is a list of field names (e.g. "Border") to include in API 10888 // requests with the JSON null value. By default, fields with empty 10889 // values are omitted from API requests. However, any field with an 10890 // empty value appearing in NullFields will be sent to the server as 10891 // null. It is an error if a field in this list has a non-empty value. 10892 // This may be used to include null fields in Patch requests. 10893 NullFields []string `json:"-"` 10894} 10895 10896func (s *UpdateEmbeddedObjectBorderRequest) MarshalJSON() ([]byte, error) { 10897 type NoMethod UpdateEmbeddedObjectBorderRequest 10898 raw := NoMethod(*s) 10899 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10900} 10901 10902// UpdateEmbeddedObjectPositionRequest: Update an embedded object's 10903// position (such as a moving or resizing a chart or image). 10904type UpdateEmbeddedObjectPositionRequest struct { 10905 // Fields: The fields of OverlayPosition that should be updated when 10906 // setting a new position. Used only if newPosition.overlayPosition is 10907 // set, in which case at least one field must be specified. The root 10908 // `newPosition.overlayPosition` is implied and should not be specified. 10909 // A single "*" can be used as short-hand for listing every field. 10910 Fields string `json:"fields,omitempty"` 10911 10912 // NewPosition: An explicit position to move the embedded object to. If 10913 // newPosition.sheetId is set, a new sheet with that ID will be created. 10914 // If newPosition.newSheet is set to true, a new sheet will be created 10915 // with an ID that will be chosen for you. 10916 NewPosition *EmbeddedObjectPosition `json:"newPosition,omitempty"` 10917 10918 // ObjectId: The ID of the object to moved. 10919 ObjectId int64 `json:"objectId,omitempty"` 10920 10921 // ForceSendFields is a list of field names (e.g. "Fields") to 10922 // unconditionally include in API requests. By default, fields with 10923 // empty or default values are omitted from API requests. However, any 10924 // non-pointer, non-interface field appearing in ForceSendFields will be 10925 // sent to the server regardless of whether the field is empty or not. 10926 // This may be used to include empty fields in Patch requests. 10927 ForceSendFields []string `json:"-"` 10928 10929 // NullFields is a list of field names (e.g. "Fields") to include in API 10930 // requests with the JSON null value. By default, fields with empty 10931 // values are omitted from API requests. However, any field with an 10932 // empty value appearing in NullFields will be sent to the server as 10933 // null. It is an error if a field in this list has a non-empty value. 10934 // This may be used to include null fields in Patch requests. 10935 NullFields []string `json:"-"` 10936} 10937 10938func (s *UpdateEmbeddedObjectPositionRequest) MarshalJSON() ([]byte, error) { 10939 type NoMethod UpdateEmbeddedObjectPositionRequest 10940 raw := NoMethod(*s) 10941 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10942} 10943 10944// UpdateEmbeddedObjectPositionResponse: The result of updating an 10945// embedded object's position. 10946type UpdateEmbeddedObjectPositionResponse struct { 10947 // Position: The new position of the embedded object. 10948 Position *EmbeddedObjectPosition `json:"position,omitempty"` 10949 10950 // ForceSendFields is a list of field names (e.g. "Position") to 10951 // unconditionally include in API requests. By default, fields with 10952 // empty or default values are omitted from API requests. However, any 10953 // non-pointer, non-interface field appearing in ForceSendFields will be 10954 // sent to the server regardless of whether the field is empty or not. 10955 // This may be used to include empty fields in Patch requests. 10956 ForceSendFields []string `json:"-"` 10957 10958 // NullFields is a list of field names (e.g. "Position") to include in 10959 // API requests with the JSON null value. By default, fields with empty 10960 // values are omitted from API requests. However, any field with an 10961 // empty value appearing in NullFields will be sent to the server as 10962 // null. It is an error if a field in this list has a non-empty value. 10963 // This may be used to include null fields in Patch requests. 10964 NullFields []string `json:"-"` 10965} 10966 10967func (s *UpdateEmbeddedObjectPositionResponse) MarshalJSON() ([]byte, error) { 10968 type NoMethod UpdateEmbeddedObjectPositionResponse 10969 raw := NoMethod(*s) 10970 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 10971} 10972 10973// UpdateFilterViewRequest: Updates properties of the filter view. 10974type UpdateFilterViewRequest struct { 10975 // Fields: The fields that should be updated. At least one field must be 10976 // specified. The root `filter` is implied and should not be specified. 10977 // A single "*" can be used as short-hand for listing every field. 10978 Fields string `json:"fields,omitempty"` 10979 10980 // Filter: The new properties of the filter view. 10981 Filter *FilterView `json:"filter,omitempty"` 10982 10983 // ForceSendFields is a list of field names (e.g. "Fields") to 10984 // unconditionally include in API requests. By default, fields with 10985 // empty or default values are omitted from API requests. However, any 10986 // non-pointer, non-interface field appearing in ForceSendFields will be 10987 // sent to the server regardless of whether the field is empty or not. 10988 // This may be used to include empty fields in Patch requests. 10989 ForceSendFields []string `json:"-"` 10990 10991 // NullFields is a list of field names (e.g. "Fields") to include in API 10992 // requests with the JSON null value. By default, fields with empty 10993 // values are omitted from API requests. However, any field with an 10994 // empty value appearing in NullFields will be sent to the server as 10995 // null. It is an error if a field in this list has a non-empty value. 10996 // This may be used to include null fields in Patch requests. 10997 NullFields []string `json:"-"` 10998} 10999 11000func (s *UpdateFilterViewRequest) MarshalJSON() ([]byte, error) { 11001 type NoMethod UpdateFilterViewRequest 11002 raw := NoMethod(*s) 11003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11004} 11005 11006// UpdateNamedRangeRequest: Updates properties of the named range with 11007// the specified namedRangeId. 11008type UpdateNamedRangeRequest struct { 11009 // Fields: The fields that should be updated. At least one field must be 11010 // specified. The root `namedRange` is implied and should not be 11011 // specified. A single "*" can be used as short-hand for listing every 11012 // field. 11013 Fields string `json:"fields,omitempty"` 11014 11015 // NamedRange: The named range to update with the new properties. 11016 NamedRange *NamedRange `json:"namedRange,omitempty"` 11017 11018 // ForceSendFields is a list of field names (e.g. "Fields") to 11019 // unconditionally include in API requests. By default, fields with 11020 // empty or default values are omitted from API requests. However, any 11021 // non-pointer, non-interface field appearing in ForceSendFields will be 11022 // sent to the server regardless of whether the field is empty or not. 11023 // This may be used to include empty fields in Patch requests. 11024 ForceSendFields []string `json:"-"` 11025 11026 // NullFields is a list of field names (e.g. "Fields") to include in API 11027 // requests with the JSON null value. By default, fields with empty 11028 // values are omitted from API requests. However, any field with an 11029 // empty value appearing in NullFields will be sent to the server as 11030 // null. It is an error if a field in this list has a non-empty value. 11031 // This may be used to include null fields in Patch requests. 11032 NullFields []string `json:"-"` 11033} 11034 11035func (s *UpdateNamedRangeRequest) MarshalJSON() ([]byte, error) { 11036 type NoMethod UpdateNamedRangeRequest 11037 raw := NoMethod(*s) 11038 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11039} 11040 11041// UpdateProtectedRangeRequest: Updates an existing protected range with 11042// the specified protectedRangeId. 11043type UpdateProtectedRangeRequest struct { 11044 // Fields: The fields that should be updated. At least one field must be 11045 // specified. The root `protectedRange` is implied and should not be 11046 // specified. A single "*" can be used as short-hand for listing every 11047 // field. 11048 Fields string `json:"fields,omitempty"` 11049 11050 // ProtectedRange: The protected range to update with the new 11051 // properties. 11052 ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"` 11053 11054 // ForceSendFields is a list of field names (e.g. "Fields") to 11055 // unconditionally include in API requests. By default, fields with 11056 // empty or default values are omitted from API requests. However, any 11057 // non-pointer, non-interface field appearing in ForceSendFields will be 11058 // sent to the server regardless of whether the field is empty or not. 11059 // This may be used to include empty fields in Patch requests. 11060 ForceSendFields []string `json:"-"` 11061 11062 // NullFields is a list of field names (e.g. "Fields") to include in API 11063 // requests with the JSON null value. By default, fields with empty 11064 // values are omitted from API requests. However, any field with an 11065 // empty value appearing in NullFields will be sent to the server as 11066 // null. It is an error if a field in this list has a non-empty value. 11067 // This may be used to include null fields in Patch requests. 11068 NullFields []string `json:"-"` 11069} 11070 11071func (s *UpdateProtectedRangeRequest) MarshalJSON() ([]byte, error) { 11072 type NoMethod UpdateProtectedRangeRequest 11073 raw := NoMethod(*s) 11074 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11075} 11076 11077// UpdateSheetPropertiesRequest: Updates properties of the sheet with 11078// the specified sheetId. 11079type UpdateSheetPropertiesRequest struct { 11080 // Fields: The fields that should be updated. At least one field must be 11081 // specified. The root `properties` is implied and should not be 11082 // specified. A single "*" can be used as short-hand for listing every 11083 // field. 11084 Fields string `json:"fields,omitempty"` 11085 11086 // Properties: The properties to update. 11087 Properties *SheetProperties `json:"properties,omitempty"` 11088 11089 // ForceSendFields is a list of field names (e.g. "Fields") to 11090 // unconditionally include in API requests. By default, fields with 11091 // empty or default values are omitted from API requests. However, any 11092 // non-pointer, non-interface field appearing in ForceSendFields will be 11093 // sent to the server regardless of whether the field is empty or not. 11094 // This may be used to include empty fields in Patch requests. 11095 ForceSendFields []string `json:"-"` 11096 11097 // NullFields is a list of field names (e.g. "Fields") to include in API 11098 // requests with the JSON null value. By default, fields with empty 11099 // values are omitted from API requests. However, any field with an 11100 // empty value appearing in NullFields will be sent to the server as 11101 // null. It is an error if a field in this list has a non-empty value. 11102 // This may be used to include null fields in Patch requests. 11103 NullFields []string `json:"-"` 11104} 11105 11106func (s *UpdateSheetPropertiesRequest) MarshalJSON() ([]byte, error) { 11107 type NoMethod UpdateSheetPropertiesRequest 11108 raw := NoMethod(*s) 11109 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11110} 11111 11112// UpdateSlicerSpecRequest: Updates a slicer's specifications. (This 11113// does not move or resize a slicer. To move or resize a slicer use 11114// UpdateEmbeddedObjectPositionRequest. 11115type UpdateSlicerSpecRequest struct { 11116 // Fields: The fields that should be updated. At least one field must be 11117 // specified. The root `SlicerSpec` is implied and should not be 11118 // specified. A single "*" can be used as short-hand for listing every 11119 // field. 11120 Fields string `json:"fields,omitempty"` 11121 11122 // SlicerId: The id of the slicer to update. 11123 SlicerId int64 `json:"slicerId,omitempty"` 11124 11125 // Spec: The specification to apply to the slicer. 11126 Spec *SlicerSpec `json:"spec,omitempty"` 11127 11128 // ForceSendFields is a list of field names (e.g. "Fields") to 11129 // unconditionally include in API requests. By default, fields with 11130 // empty or default values are omitted from API requests. However, any 11131 // non-pointer, non-interface field appearing in ForceSendFields will be 11132 // sent to the server regardless of whether the field is empty or not. 11133 // This may be used to include empty fields in Patch requests. 11134 ForceSendFields []string `json:"-"` 11135 11136 // NullFields is a list of field names (e.g. "Fields") to include in API 11137 // requests with the JSON null value. By default, fields with empty 11138 // values are omitted from API requests. However, any field with an 11139 // empty value appearing in NullFields will be sent to the server as 11140 // null. It is an error if a field in this list has a non-empty value. 11141 // This may be used to include null fields in Patch requests. 11142 NullFields []string `json:"-"` 11143} 11144 11145func (s *UpdateSlicerSpecRequest) MarshalJSON() ([]byte, error) { 11146 type NoMethod UpdateSlicerSpecRequest 11147 raw := NoMethod(*s) 11148 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11149} 11150 11151// UpdateSpreadsheetPropertiesRequest: Updates properties of a 11152// spreadsheet. 11153type UpdateSpreadsheetPropertiesRequest struct { 11154 // Fields: The fields that should be updated. At least one field must be 11155 // specified. The root 'properties' is implied and should not be 11156 // specified. A single "*" can be used as short-hand for listing every 11157 // field. 11158 Fields string `json:"fields,omitempty"` 11159 11160 // Properties: The properties to update. 11161 Properties *SpreadsheetProperties `json:"properties,omitempty"` 11162 11163 // ForceSendFields is a list of field names (e.g. "Fields") to 11164 // unconditionally include in API requests. By default, fields with 11165 // empty or default values are omitted from API requests. However, any 11166 // non-pointer, non-interface field appearing in ForceSendFields will be 11167 // sent to the server regardless of whether the field is empty or not. 11168 // This may be used to include empty fields in Patch requests. 11169 ForceSendFields []string `json:"-"` 11170 11171 // NullFields is a list of field names (e.g. "Fields") to include in API 11172 // requests with the JSON null value. By default, fields with empty 11173 // values are omitted from API requests. However, any field with an 11174 // empty value appearing in NullFields will be sent to the server as 11175 // null. It is an error if a field in this list has a non-empty value. 11176 // This may be used to include null fields in Patch requests. 11177 NullFields []string `json:"-"` 11178} 11179 11180func (s *UpdateSpreadsheetPropertiesRequest) MarshalJSON() ([]byte, error) { 11181 type NoMethod UpdateSpreadsheetPropertiesRequest 11182 raw := NoMethod(*s) 11183 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11184} 11185 11186// UpdateValuesByDataFilterResponse: The response when updating a range 11187// of values by a data filter in a spreadsheet. 11188type UpdateValuesByDataFilterResponse struct { 11189 // DataFilter: The data filter that selected the range that was updated. 11190 DataFilter *DataFilter `json:"dataFilter,omitempty"` 11191 11192 // UpdatedCells: The number of cells updated. 11193 UpdatedCells int64 `json:"updatedCells,omitempty"` 11194 11195 // UpdatedColumns: The number of columns where at least one cell in the 11196 // column was updated. 11197 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 11198 11199 // UpdatedData: The values of the cells in the range matched by the 11200 // dataFilter after all updates were applied. This is only included if 11201 // the request's `includeValuesInResponse` field was `true`. 11202 UpdatedData *ValueRange `json:"updatedData,omitempty"` 11203 11204 // UpdatedRange: The range (in A1 notation) that updates were applied 11205 // to. 11206 UpdatedRange string `json:"updatedRange,omitempty"` 11207 11208 // UpdatedRows: The number of rows where at least one cell in the row 11209 // was updated. 11210 UpdatedRows int64 `json:"updatedRows,omitempty"` 11211 11212 // ForceSendFields is a list of field names (e.g. "DataFilter") to 11213 // unconditionally include in API requests. By default, fields with 11214 // empty or default values are omitted from API requests. However, any 11215 // non-pointer, non-interface field appearing in ForceSendFields will be 11216 // sent to the server regardless of whether the field is empty or not. 11217 // This may be used to include empty fields in Patch requests. 11218 ForceSendFields []string `json:"-"` 11219 11220 // NullFields is a list of field names (e.g. "DataFilter") to include in 11221 // API requests with the JSON null value. By default, fields with empty 11222 // values are omitted from API requests. However, any field with an 11223 // empty value appearing in NullFields will be sent to the server as 11224 // null. It is an error if a field in this list has a non-empty value. 11225 // This may be used to include null fields in Patch requests. 11226 NullFields []string `json:"-"` 11227} 11228 11229func (s *UpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) { 11230 type NoMethod UpdateValuesByDataFilterResponse 11231 raw := NoMethod(*s) 11232 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11233} 11234 11235// UpdateValuesResponse: The response when updating a range of values in 11236// a spreadsheet. 11237type UpdateValuesResponse struct { 11238 // SpreadsheetId: The spreadsheet the updates were applied to. 11239 SpreadsheetId string `json:"spreadsheetId,omitempty"` 11240 11241 // UpdatedCells: The number of cells updated. 11242 UpdatedCells int64 `json:"updatedCells,omitempty"` 11243 11244 // UpdatedColumns: The number of columns where at least one cell in the 11245 // column was updated. 11246 UpdatedColumns int64 `json:"updatedColumns,omitempty"` 11247 11248 // UpdatedData: The values of the cells after updates were applied. This 11249 // is only included if the request's `includeValuesInResponse` field was 11250 // `true`. 11251 UpdatedData *ValueRange `json:"updatedData,omitempty"` 11252 11253 // UpdatedRange: The range (in A1 notation) that updates were applied 11254 // to. 11255 UpdatedRange string `json:"updatedRange,omitempty"` 11256 11257 // UpdatedRows: The number of rows where at least one cell in the row 11258 // was updated. 11259 UpdatedRows int64 `json:"updatedRows,omitempty"` 11260 11261 // ServerResponse contains the HTTP response code and headers from the 11262 // server. 11263 googleapi.ServerResponse `json:"-"` 11264 11265 // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to 11266 // unconditionally include in API requests. By default, fields with 11267 // empty or default values are omitted from API requests. However, any 11268 // non-pointer, non-interface field appearing in ForceSendFields will be 11269 // sent to the server regardless of whether the field is empty or not. 11270 // This may be used to include empty fields in Patch requests. 11271 ForceSendFields []string `json:"-"` 11272 11273 // NullFields is a list of field names (e.g. "SpreadsheetId") to include 11274 // in API requests with the JSON null value. By default, fields with 11275 // empty values are omitted from API requests. However, any field with 11276 // an empty value appearing in NullFields will be sent to the server as 11277 // null. It is an error if a field in this list has a non-empty value. 11278 // This may be used to include null fields in Patch requests. 11279 NullFields []string `json:"-"` 11280} 11281 11282func (s *UpdateValuesResponse) MarshalJSON() ([]byte, error) { 11283 type NoMethod UpdateValuesResponse 11284 raw := NoMethod(*s) 11285 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11286} 11287 11288// ValueRange: Data within a range of the spreadsheet. 11289type ValueRange struct { 11290 // MajorDimension: The major dimension of the values. For output, if the 11291 // spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting 11292 // `range=A1:B2,majorDimension=ROWS` will return `[[1,2],[3,4]]`, 11293 // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return 11294 // `[[1,3],[2,4]]`. For input, with `range=A1:B2,majorDimension=ROWS` 11295 // then `[[1,2],[3,4]]` will set `A1=1,B1=2,A2=3,B2=4`. With 11296 // `range=A1:B2,majorDimension=COLUMNS` then `[[1,2],[3,4]]` will set 11297 // `A1=1,B1=3,A2=2,B2=4`. When writing, if this field is not set, it 11298 // defaults to ROWS. 11299 // 11300 // Possible values: 11301 // "DIMENSION_UNSPECIFIED" - The default value, do not use. 11302 // "ROWS" - Operates on the rows of a sheet. 11303 // "COLUMNS" - Operates on the columns of a sheet. 11304 MajorDimension string `json:"majorDimension,omitempty"` 11305 11306 // Range: The range the values cover, in A1 notation. For output, this 11307 // range indicates the entire requested range, even though the values 11308 // will exclude trailing rows and columns. When appending values, this 11309 // field represents the range to search for a table, after which values 11310 // will be appended. 11311 Range string `json:"range,omitempty"` 11312 11313 // Values: The data that was read or to be written. This is an array of 11314 // arrays, the outer array representing all the data and each inner 11315 // array representing a major dimension. Each item in the inner array 11316 // corresponds with one cell. For output, empty trailing rows and 11317 // columns will not be included. For input, supported value types are: 11318 // bool, string, and double. Null values will be skipped. To set a cell 11319 // to an empty value, set the string value to an empty string. 11320 Values [][]interface{} `json:"values,omitempty"` 11321 11322 // ServerResponse contains the HTTP response code and headers from the 11323 // server. 11324 googleapi.ServerResponse `json:"-"` 11325 11326 // ForceSendFields is a list of field names (e.g. "MajorDimension") to 11327 // unconditionally include in API requests. By default, fields with 11328 // empty or default values are omitted from API requests. However, any 11329 // non-pointer, non-interface field appearing in ForceSendFields will be 11330 // sent to the server regardless of whether the field is empty or not. 11331 // This may be used to include empty fields in Patch requests. 11332 ForceSendFields []string `json:"-"` 11333 11334 // NullFields is a list of field names (e.g. "MajorDimension") to 11335 // include in API requests with the JSON null value. By default, fields 11336 // with empty values are omitted from API requests. However, any field 11337 // with an empty value appearing in NullFields will be sent to the 11338 // server as null. It is an error if a field in this list has a 11339 // non-empty value. This may be used to include null fields in Patch 11340 // requests. 11341 NullFields []string `json:"-"` 11342} 11343 11344func (s *ValueRange) MarshalJSON() ([]byte, error) { 11345 type NoMethod ValueRange 11346 raw := NoMethod(*s) 11347 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11348} 11349 11350// WaterfallChartColumnStyle: Styles for a waterfall chart column. 11351type WaterfallChartColumnStyle struct { 11352 // Color: The color of the column. 11353 Color *Color `json:"color,omitempty"` 11354 11355 // ColorStyle: The color of the column. If color is also set, this field 11356 // takes precedence. 11357 ColorStyle *ColorStyle `json:"colorStyle,omitempty"` 11358 11359 // Label: The label of the column's legend. 11360 Label string `json:"label,omitempty"` 11361 11362 // ForceSendFields is a list of field names (e.g. "Color") to 11363 // unconditionally include in API requests. By default, fields with 11364 // empty or default values are omitted from API requests. However, any 11365 // non-pointer, non-interface field appearing in ForceSendFields will be 11366 // sent to the server regardless of whether the field is empty or not. 11367 // This may be used to include empty fields in Patch requests. 11368 ForceSendFields []string `json:"-"` 11369 11370 // NullFields is a list of field names (e.g. "Color") to include in API 11371 // requests with the JSON null value. By default, fields with empty 11372 // values are omitted from API requests. However, any field with an 11373 // empty value appearing in NullFields will be sent to the server as 11374 // null. It is an error if a field in this list has a non-empty value. 11375 // This may be used to include null fields in Patch requests. 11376 NullFields []string `json:"-"` 11377} 11378 11379func (s *WaterfallChartColumnStyle) MarshalJSON() ([]byte, error) { 11380 type NoMethod WaterfallChartColumnStyle 11381 raw := NoMethod(*s) 11382 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11383} 11384 11385// WaterfallChartCustomSubtotal: A custom subtotal column for a 11386// waterfall chart series. 11387type WaterfallChartCustomSubtotal struct { 11388 // DataIsSubtotal: True if the data point at subtotal_index is the 11389 // subtotal. If false, the subtotal will be computed and appear after 11390 // the data point. 11391 DataIsSubtotal bool `json:"dataIsSubtotal,omitempty"` 11392 11393 // Label: A label for the subtotal column. 11394 Label string `json:"label,omitempty"` 11395 11396 // SubtotalIndex: The 0-based index of a data point within the series. 11397 // If data_is_subtotal is true, the data point at this index is the 11398 // subtotal. Otherwise, the subtotal appears after the data point with 11399 // this index. A series can have multiple subtotals at arbitrary 11400 // indices, but subtotals do not affect the indices of the data points. 11401 // For example, if a series has three data points, their indices will 11402 // always be 0, 1, and 2, regardless of how many subtotals exist on the 11403 // series or what data points they are associated with. 11404 SubtotalIndex int64 `json:"subtotalIndex,omitempty"` 11405 11406 // ForceSendFields is a list of field names (e.g. "DataIsSubtotal") to 11407 // unconditionally include in API requests. By default, fields with 11408 // empty or default values are omitted from API requests. However, any 11409 // non-pointer, non-interface field appearing in ForceSendFields will be 11410 // sent to the server regardless of whether the field is empty or not. 11411 // This may be used to include empty fields in Patch requests. 11412 ForceSendFields []string `json:"-"` 11413 11414 // NullFields is a list of field names (e.g. "DataIsSubtotal") to 11415 // include in API requests with the JSON null value. By default, fields 11416 // with empty values are omitted from API requests. However, any field 11417 // with an empty value appearing in NullFields will be sent to the 11418 // server as null. It is an error if a field in this list has a 11419 // non-empty value. This may be used to include null fields in Patch 11420 // requests. 11421 NullFields []string `json:"-"` 11422} 11423 11424func (s *WaterfallChartCustomSubtotal) MarshalJSON() ([]byte, error) { 11425 type NoMethod WaterfallChartCustomSubtotal 11426 raw := NoMethod(*s) 11427 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11428} 11429 11430// WaterfallChartDomain: The domain of a waterfall chart. 11431type WaterfallChartDomain struct { 11432 // Data: The data of the WaterfallChartDomain. 11433 Data *ChartData `json:"data,omitempty"` 11434 11435 // Reversed: True to reverse the order of the domain values (horizontal 11436 // axis). 11437 Reversed bool `json:"reversed,omitempty"` 11438 11439 // ForceSendFields is a list of field names (e.g. "Data") to 11440 // unconditionally include in API requests. By default, fields with 11441 // empty or default values are omitted from API requests. However, any 11442 // non-pointer, non-interface field appearing in ForceSendFields will be 11443 // sent to the server regardless of whether the field is empty or not. 11444 // This may be used to include empty fields in Patch requests. 11445 ForceSendFields []string `json:"-"` 11446 11447 // NullFields is a list of field names (e.g. "Data") to include in API 11448 // requests with the JSON null value. By default, fields with empty 11449 // values are omitted from API requests. However, any field with an 11450 // empty value appearing in NullFields will be sent to the server as 11451 // null. It is an error if a field in this list has a non-empty value. 11452 // This may be used to include null fields in Patch requests. 11453 NullFields []string `json:"-"` 11454} 11455 11456func (s *WaterfallChartDomain) MarshalJSON() ([]byte, error) { 11457 type NoMethod WaterfallChartDomain 11458 raw := NoMethod(*s) 11459 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11460} 11461 11462// WaterfallChartSeries: A single series of data for a waterfall chart. 11463type WaterfallChartSeries struct { 11464 // CustomSubtotals: Custom subtotal columns appearing in this series. 11465 // The order in which subtotals are defined is not significant. Only one 11466 // subtotal may be defined for each data point. 11467 CustomSubtotals []*WaterfallChartCustomSubtotal `json:"customSubtotals,omitempty"` 11468 11469 // Data: The data being visualized in this series. 11470 Data *ChartData `json:"data,omitempty"` 11471 11472 // DataLabel: Information about the data labels for this series. 11473 DataLabel *DataLabel `json:"dataLabel,omitempty"` 11474 11475 // HideTrailingSubtotal: True to hide the subtotal column from the end 11476 // of the series. By default, a subtotal column will appear at the end 11477 // of each series. Setting this field to true will hide that subtotal 11478 // column for this series. 11479 HideTrailingSubtotal bool `json:"hideTrailingSubtotal,omitempty"` 11480 11481 // NegativeColumnsStyle: Styles for all columns in this series with 11482 // negative values. 11483 NegativeColumnsStyle *WaterfallChartColumnStyle `json:"negativeColumnsStyle,omitempty"` 11484 11485 // PositiveColumnsStyle: Styles for all columns in this series with 11486 // positive values. 11487 PositiveColumnsStyle *WaterfallChartColumnStyle `json:"positiveColumnsStyle,omitempty"` 11488 11489 // SubtotalColumnsStyle: Styles for all subtotal columns in this series. 11490 SubtotalColumnsStyle *WaterfallChartColumnStyle `json:"subtotalColumnsStyle,omitempty"` 11491 11492 // ForceSendFields is a list of field names (e.g. "CustomSubtotals") to 11493 // unconditionally include in API requests. By default, fields with 11494 // empty or default values are omitted from API requests. However, any 11495 // non-pointer, non-interface field appearing in ForceSendFields will be 11496 // sent to the server regardless of whether the field is empty or not. 11497 // This may be used to include empty fields in Patch requests. 11498 ForceSendFields []string `json:"-"` 11499 11500 // NullFields is a list of field names (e.g. "CustomSubtotals") to 11501 // include in API requests with the JSON null value. By default, fields 11502 // with empty values are omitted from API requests. However, any field 11503 // with an empty value appearing in NullFields will be sent to the 11504 // server as null. It is an error if a field in this list has a 11505 // non-empty value. This may be used to include null fields in Patch 11506 // requests. 11507 NullFields []string `json:"-"` 11508} 11509 11510func (s *WaterfallChartSeries) MarshalJSON() ([]byte, error) { 11511 type NoMethod WaterfallChartSeries 11512 raw := NoMethod(*s) 11513 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11514} 11515 11516// WaterfallChartSpec: A waterfall chart. 11517type WaterfallChartSpec struct { 11518 // ConnectorLineStyle: The line style for the connector lines. 11519 ConnectorLineStyle *LineStyle `json:"connectorLineStyle,omitempty"` 11520 11521 // Domain: The domain data (horizontal axis) for the waterfall chart. 11522 Domain *WaterfallChartDomain `json:"domain,omitempty"` 11523 11524 // FirstValueIsTotal: True to interpret the first value as a total. 11525 FirstValueIsTotal bool `json:"firstValueIsTotal,omitempty"` 11526 11527 // HideConnectorLines: True to hide connector lines between columns. 11528 HideConnectorLines bool `json:"hideConnectorLines,omitempty"` 11529 11530 // Series: The data this waterfall chart is visualizing. 11531 Series []*WaterfallChartSeries `json:"series,omitempty"` 11532 11533 // StackedType: The stacked type. 11534 // 11535 // Possible values: 11536 // "WATERFALL_STACKED_TYPE_UNSPECIFIED" - Default value, do not use. 11537 // "STACKED" - Values corresponding to the same domain (horizontal 11538 // axis) value will be stacked vertically. 11539 // "SEQUENTIAL" - Series will spread out along the horizontal axis. 11540 StackedType string `json:"stackedType,omitempty"` 11541 11542 // TotalDataLabel: Controls whether to display additional data labels on 11543 // stacked charts which sum the total value of all stacked values at 11544 // each value along the domain axis. stacked_type must be STACKED and 11545 // neither CUSTOM nor placement can be set on the total_data_label. 11546 TotalDataLabel *DataLabel `json:"totalDataLabel,omitempty"` 11547 11548 // ForceSendFields is a list of field names (e.g. "ConnectorLineStyle") 11549 // to unconditionally include in API requests. By default, fields with 11550 // empty or default values are omitted from API requests. However, any 11551 // non-pointer, non-interface field appearing in ForceSendFields will be 11552 // sent to the server regardless of whether the field is empty or not. 11553 // This may be used to include empty fields in Patch requests. 11554 ForceSendFields []string `json:"-"` 11555 11556 // NullFields is a list of field names (e.g. "ConnectorLineStyle") to 11557 // include in API requests with the JSON null value. By default, fields 11558 // with empty values are omitted from API requests. However, any field 11559 // with an empty value appearing in NullFields will be sent to the 11560 // server as null. It is an error if a field in this list has a 11561 // non-empty value. This may be used to include null fields in Patch 11562 // requests. 11563 NullFields []string `json:"-"` 11564} 11565 11566func (s *WaterfallChartSpec) MarshalJSON() ([]byte, error) { 11567 type NoMethod WaterfallChartSpec 11568 raw := NoMethod(*s) 11569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 11570} 11571 11572// method id "sheets.spreadsheets.batchUpdate": 11573 11574type SpreadsheetsBatchUpdateCall struct { 11575 s *Service 11576 spreadsheetId string 11577 batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest 11578 urlParams_ gensupport.URLParams 11579 ctx_ context.Context 11580 header_ http.Header 11581} 11582 11583// BatchUpdate: Applies one or more updates to the spreadsheet. Each 11584// request is validated before being applied. If any request is not 11585// valid then the entire request will fail and nothing will be applied. 11586// Some requests have replies to give you some information about how 11587// they are applied. The replies will mirror the requests. For example, 11588// if you applied 4 updates and the 3rd one had a reply, then the 11589// response will have 2 empty replies, the actual reply, and another 11590// empty reply, in that order. Due to the collaborative nature of 11591// spreadsheets, it is not guaranteed that the spreadsheet will reflect 11592// exactly your changes after this completes, however it is guaranteed 11593// that the updates in the request will be applied together atomically. 11594// Your changes may be altered with respect to collaborator changes. If 11595// there are no collaborators, the spreadsheet should reflect your 11596// changes. 11597// 11598// - spreadsheetId: The spreadsheet to apply the updates to. 11599func (r *SpreadsheetsService) BatchUpdate(spreadsheetId string, batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest) *SpreadsheetsBatchUpdateCall { 11600 c := &SpreadsheetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11601 c.spreadsheetId = spreadsheetId 11602 c.batchupdatespreadsheetrequest = batchupdatespreadsheetrequest 11603 return c 11604} 11605 11606// Fields allows partial responses to be retrieved. See 11607// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11608// for more information. 11609func (c *SpreadsheetsBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsBatchUpdateCall { 11610 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11611 return c 11612} 11613 11614// Context sets the context to be used in this call's Do method. Any 11615// pending HTTP request will be aborted if the provided context is 11616// canceled. 11617func (c *SpreadsheetsBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsBatchUpdateCall { 11618 c.ctx_ = ctx 11619 return c 11620} 11621 11622// Header returns an http.Header that can be modified by the caller to 11623// add HTTP headers to the request. 11624func (c *SpreadsheetsBatchUpdateCall) Header() http.Header { 11625 if c.header_ == nil { 11626 c.header_ = make(http.Header) 11627 } 11628 return c.header_ 11629} 11630 11631func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 11632 reqHeaders := make(http.Header) 11633 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 11634 for k, v := range c.header_ { 11635 reqHeaders[k] = v 11636 } 11637 reqHeaders.Set("User-Agent", c.s.userAgent()) 11638 var body io.Reader = nil 11639 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatespreadsheetrequest) 11640 if err != nil { 11641 return nil, err 11642 } 11643 reqHeaders.Set("Content-Type", "application/json") 11644 c.urlParams_.Set("alt", alt) 11645 c.urlParams_.Set("prettyPrint", "false") 11646 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate") 11647 urls += "?" + c.urlParams_.Encode() 11648 req, err := http.NewRequest("POST", urls, body) 11649 if err != nil { 11650 return nil, err 11651 } 11652 req.Header = reqHeaders 11653 googleapi.Expand(req.URL, map[string]string{ 11654 "spreadsheetId": c.spreadsheetId, 11655 }) 11656 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11657} 11658 11659// Do executes the "sheets.spreadsheets.batchUpdate" call. 11660// Exactly one of *BatchUpdateSpreadsheetResponse or error will be 11661// non-nil. Any non-2xx status code is an error. Response headers are in 11662// either *BatchUpdateSpreadsheetResponse.ServerResponse.Header or (if a 11663// response was returned at all) in error.(*googleapi.Error).Header. Use 11664// googleapi.IsNotModified to check whether the returned error was 11665// because http.StatusNotModified was returned. 11666func (c *SpreadsheetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateSpreadsheetResponse, error) { 11667 gensupport.SetOptions(c.urlParams_, opts...) 11668 res, err := c.doRequest("json") 11669 if res != nil && res.StatusCode == http.StatusNotModified { 11670 if res.Body != nil { 11671 res.Body.Close() 11672 } 11673 return nil, &googleapi.Error{ 11674 Code: res.StatusCode, 11675 Header: res.Header, 11676 } 11677 } 11678 if err != nil { 11679 return nil, err 11680 } 11681 defer googleapi.CloseBody(res) 11682 if err := googleapi.CheckResponse(res); err != nil { 11683 return nil, err 11684 } 11685 ret := &BatchUpdateSpreadsheetResponse{ 11686 ServerResponse: googleapi.ServerResponse{ 11687 Header: res.Header, 11688 HTTPStatusCode: res.StatusCode, 11689 }, 11690 } 11691 target := &ret 11692 if err := gensupport.DecodeResponse(target, res); err != nil { 11693 return nil, err 11694 } 11695 return ret, nil 11696 // { 11697 // "description": "Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the requests. For example, if you applied 4 updates and the 3rd one had a reply, then the response will have 2 empty replies, the actual reply, and another empty reply, in that order. Due to the collaborative nature of spreadsheets, it is not guaranteed that the spreadsheet will reflect exactly your changes after this completes, however it is guaranteed that the updates in the request will be applied together atomically. Your changes may be altered with respect to collaborator changes. If there are no collaborators, the spreadsheet should reflect your changes.", 11698 // "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 11699 // "httpMethod": "POST", 11700 // "id": "sheets.spreadsheets.batchUpdate", 11701 // "parameterOrder": [ 11702 // "spreadsheetId" 11703 // ], 11704 // "parameters": { 11705 // "spreadsheetId": { 11706 // "description": "The spreadsheet to apply the updates to.", 11707 // "location": "path", 11708 // "required": true, 11709 // "type": "string" 11710 // } 11711 // }, 11712 // "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", 11713 // "request": { 11714 // "$ref": "BatchUpdateSpreadsheetRequest" 11715 // }, 11716 // "response": { 11717 // "$ref": "BatchUpdateSpreadsheetResponse" 11718 // }, 11719 // "scopes": [ 11720 // "https://www.googleapis.com/auth/drive", 11721 // "https://www.googleapis.com/auth/drive.file", 11722 // "https://www.googleapis.com/auth/spreadsheets" 11723 // ] 11724 // } 11725 11726} 11727 11728// method id "sheets.spreadsheets.create": 11729 11730type SpreadsheetsCreateCall struct { 11731 s *Service 11732 spreadsheet *Spreadsheet 11733 urlParams_ gensupport.URLParams 11734 ctx_ context.Context 11735 header_ http.Header 11736} 11737 11738// Create: Creates a spreadsheet, returning the newly created 11739// spreadsheet. 11740func (r *SpreadsheetsService) Create(spreadsheet *Spreadsheet) *SpreadsheetsCreateCall { 11741 c := &SpreadsheetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11742 c.spreadsheet = spreadsheet 11743 return c 11744} 11745 11746// Fields allows partial responses to be retrieved. See 11747// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11748// for more information. 11749func (c *SpreadsheetsCreateCall) Fields(s ...googleapi.Field) *SpreadsheetsCreateCall { 11750 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11751 return c 11752} 11753 11754// Context sets the context to be used in this call's Do method. Any 11755// pending HTTP request will be aborted if the provided context is 11756// canceled. 11757func (c *SpreadsheetsCreateCall) Context(ctx context.Context) *SpreadsheetsCreateCall { 11758 c.ctx_ = ctx 11759 return c 11760} 11761 11762// Header returns an http.Header that can be modified by the caller to 11763// add HTTP headers to the request. 11764func (c *SpreadsheetsCreateCall) Header() http.Header { 11765 if c.header_ == nil { 11766 c.header_ = make(http.Header) 11767 } 11768 return c.header_ 11769} 11770 11771func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) { 11772 reqHeaders := make(http.Header) 11773 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 11774 for k, v := range c.header_ { 11775 reqHeaders[k] = v 11776 } 11777 reqHeaders.Set("User-Agent", c.s.userAgent()) 11778 var body io.Reader = nil 11779 body, err := googleapi.WithoutDataWrapper.JSONReader(c.spreadsheet) 11780 if err != nil { 11781 return nil, err 11782 } 11783 reqHeaders.Set("Content-Type", "application/json") 11784 c.urlParams_.Set("alt", alt) 11785 c.urlParams_.Set("prettyPrint", "false") 11786 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets") 11787 urls += "?" + c.urlParams_.Encode() 11788 req, err := http.NewRequest("POST", urls, body) 11789 if err != nil { 11790 return nil, err 11791 } 11792 req.Header = reqHeaders 11793 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11794} 11795 11796// Do executes the "sheets.spreadsheets.create" call. 11797// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 11798// status code is an error. Response headers are in either 11799// *Spreadsheet.ServerResponse.Header or (if a response was returned at 11800// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11801// to check whether the returned error was because 11802// http.StatusNotModified was returned. 11803func (c *SpreadsheetsCreateCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 11804 gensupport.SetOptions(c.urlParams_, opts...) 11805 res, err := c.doRequest("json") 11806 if res != nil && res.StatusCode == http.StatusNotModified { 11807 if res.Body != nil { 11808 res.Body.Close() 11809 } 11810 return nil, &googleapi.Error{ 11811 Code: res.StatusCode, 11812 Header: res.Header, 11813 } 11814 } 11815 if err != nil { 11816 return nil, err 11817 } 11818 defer googleapi.CloseBody(res) 11819 if err := googleapi.CheckResponse(res); err != nil { 11820 return nil, err 11821 } 11822 ret := &Spreadsheet{ 11823 ServerResponse: googleapi.ServerResponse{ 11824 Header: res.Header, 11825 HTTPStatusCode: res.StatusCode, 11826 }, 11827 } 11828 target := &ret 11829 if err := gensupport.DecodeResponse(target, res); err != nil { 11830 return nil, err 11831 } 11832 return ret, nil 11833 // { 11834 // "description": "Creates a spreadsheet, returning the newly created spreadsheet.", 11835 // "flatPath": "v4/spreadsheets", 11836 // "httpMethod": "POST", 11837 // "id": "sheets.spreadsheets.create", 11838 // "parameterOrder": [], 11839 // "parameters": {}, 11840 // "path": "v4/spreadsheets", 11841 // "request": { 11842 // "$ref": "Spreadsheet" 11843 // }, 11844 // "response": { 11845 // "$ref": "Spreadsheet" 11846 // }, 11847 // "scopes": [ 11848 // "https://www.googleapis.com/auth/drive", 11849 // "https://www.googleapis.com/auth/drive.file", 11850 // "https://www.googleapis.com/auth/spreadsheets" 11851 // ] 11852 // } 11853 11854} 11855 11856// method id "sheets.spreadsheets.get": 11857 11858type SpreadsheetsGetCall struct { 11859 s *Service 11860 spreadsheetId string 11861 urlParams_ gensupport.URLParams 11862 ifNoneMatch_ string 11863 ctx_ context.Context 11864 header_ http.Header 11865} 11866 11867// Get: Returns the spreadsheet at the given ID. The caller must specify 11868// the spreadsheet ID. By default, data within grids will not be 11869// returned. You can include grid data one of two ways: * Specify a 11870// field mask listing your desired fields using the `fields` URL 11871// parameter in HTTP * Set the includeGridData URL parameter to true. If 11872// a field mask is set, the `includeGridData` parameter is ignored For 11873// large spreadsheets, it is recommended to retrieve only the specific 11874// fields of the spreadsheet that you want. To retrieve only subsets of 11875// the spreadsheet, use the ranges URL parameter. Multiple ranges can be 11876// specified. Limiting the range will return only the portions of the 11877// spreadsheet that intersect the requested ranges. Ranges are specified 11878// using A1 notation. 11879// 11880// - spreadsheetId: The spreadsheet to request. 11881func (r *SpreadsheetsService) Get(spreadsheetId string) *SpreadsheetsGetCall { 11882 c := &SpreadsheetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 11883 c.spreadsheetId = spreadsheetId 11884 return c 11885} 11886 11887// IncludeGridData sets the optional parameter "includeGridData": True 11888// if grid data should be returned. This parameter is ignored if a field 11889// mask was set in the request. 11890func (c *SpreadsheetsGetCall) IncludeGridData(includeGridData bool) *SpreadsheetsGetCall { 11891 c.urlParams_.Set("includeGridData", fmt.Sprint(includeGridData)) 11892 return c 11893} 11894 11895// Ranges sets the optional parameter "ranges": The ranges to retrieve 11896// from the spreadsheet. 11897func (c *SpreadsheetsGetCall) Ranges(ranges ...string) *SpreadsheetsGetCall { 11898 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 11899 return c 11900} 11901 11902// Fields allows partial responses to be retrieved. See 11903// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 11904// for more information. 11905func (c *SpreadsheetsGetCall) Fields(s ...googleapi.Field) *SpreadsheetsGetCall { 11906 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 11907 return c 11908} 11909 11910// IfNoneMatch sets the optional parameter which makes the operation 11911// fail if the object's ETag matches the given value. This is useful for 11912// getting updates only after the object has changed since the last 11913// request. Use googleapi.IsNotModified to check whether the response 11914// error from Do is the result of In-None-Match. 11915func (c *SpreadsheetsGetCall) IfNoneMatch(entityTag string) *SpreadsheetsGetCall { 11916 c.ifNoneMatch_ = entityTag 11917 return c 11918} 11919 11920// Context sets the context to be used in this call's Do method. Any 11921// pending HTTP request will be aborted if the provided context is 11922// canceled. 11923func (c *SpreadsheetsGetCall) Context(ctx context.Context) *SpreadsheetsGetCall { 11924 c.ctx_ = ctx 11925 return c 11926} 11927 11928// Header returns an http.Header that can be modified by the caller to 11929// add HTTP headers to the request. 11930func (c *SpreadsheetsGetCall) Header() http.Header { 11931 if c.header_ == nil { 11932 c.header_ = make(http.Header) 11933 } 11934 return c.header_ 11935} 11936 11937func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) { 11938 reqHeaders := make(http.Header) 11939 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 11940 for k, v := range c.header_ { 11941 reqHeaders[k] = v 11942 } 11943 reqHeaders.Set("User-Agent", c.s.userAgent()) 11944 if c.ifNoneMatch_ != "" { 11945 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 11946 } 11947 var body io.Reader = nil 11948 c.urlParams_.Set("alt", alt) 11949 c.urlParams_.Set("prettyPrint", "false") 11950 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}") 11951 urls += "?" + c.urlParams_.Encode() 11952 req, err := http.NewRequest("GET", urls, body) 11953 if err != nil { 11954 return nil, err 11955 } 11956 req.Header = reqHeaders 11957 googleapi.Expand(req.URL, map[string]string{ 11958 "spreadsheetId": c.spreadsheetId, 11959 }) 11960 return gensupport.SendRequest(c.ctx_, c.s.client, req) 11961} 11962 11963// Do executes the "sheets.spreadsheets.get" call. 11964// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 11965// status code is an error. Response headers are in either 11966// *Spreadsheet.ServerResponse.Header or (if a response was returned at 11967// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 11968// to check whether the returned error was because 11969// http.StatusNotModified was returned. 11970func (c *SpreadsheetsGetCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 11971 gensupport.SetOptions(c.urlParams_, opts...) 11972 res, err := c.doRequest("json") 11973 if res != nil && res.StatusCode == http.StatusNotModified { 11974 if res.Body != nil { 11975 res.Body.Close() 11976 } 11977 return nil, &googleapi.Error{ 11978 Code: res.StatusCode, 11979 Header: res.Header, 11980 } 11981 } 11982 if err != nil { 11983 return nil, err 11984 } 11985 defer googleapi.CloseBody(res) 11986 if err := googleapi.CheckResponse(res); err != nil { 11987 return nil, err 11988 } 11989 ret := &Spreadsheet{ 11990 ServerResponse: googleapi.ServerResponse{ 11991 Header: res.Header, 11992 HTTPStatusCode: res.StatusCode, 11993 }, 11994 } 11995 target := &ret 11996 if err := gensupport.DecodeResponse(target, res); err != nil { 11997 return nil, err 11998 } 11999 return ret, nil 12000 // { 12001 // "description": "Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids will not be returned. You can include grid data one of two ways: * Specify a field mask listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData URL parameter to true. If a field mask is set, the `includeGridData` parameter is ignored For large spreadsheets, it is recommended to retrieve only the specific fields of the spreadsheet that you want. To retrieve only subsets of the spreadsheet, use the ranges URL parameter. Multiple ranges can be specified. Limiting the range will return only the portions of the spreadsheet that intersect the requested ranges. Ranges are specified using A1 notation.", 12002 // "flatPath": "v4/spreadsheets/{spreadsheetId}", 12003 // "httpMethod": "GET", 12004 // "id": "sheets.spreadsheets.get", 12005 // "parameterOrder": [ 12006 // "spreadsheetId" 12007 // ], 12008 // "parameters": { 12009 // "includeGridData": { 12010 // "description": "True if grid data should be returned. This parameter is ignored if a field mask was set in the request.", 12011 // "location": "query", 12012 // "type": "boolean" 12013 // }, 12014 // "ranges": { 12015 // "description": "The ranges to retrieve from the spreadsheet.", 12016 // "location": "query", 12017 // "repeated": true, 12018 // "type": "string" 12019 // }, 12020 // "spreadsheetId": { 12021 // "description": "The spreadsheet to request.", 12022 // "location": "path", 12023 // "required": true, 12024 // "type": "string" 12025 // } 12026 // }, 12027 // "path": "v4/spreadsheets/{spreadsheetId}", 12028 // "response": { 12029 // "$ref": "Spreadsheet" 12030 // }, 12031 // "scopes": [ 12032 // "https://www.googleapis.com/auth/drive", 12033 // "https://www.googleapis.com/auth/drive.file", 12034 // "https://www.googleapis.com/auth/drive.readonly", 12035 // "https://www.googleapis.com/auth/spreadsheets", 12036 // "https://www.googleapis.com/auth/spreadsheets.readonly" 12037 // ] 12038 // } 12039 12040} 12041 12042// method id "sheets.spreadsheets.getByDataFilter": 12043 12044type SpreadsheetsGetByDataFilterCall struct { 12045 s *Service 12046 spreadsheetId string 12047 getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest 12048 urlParams_ gensupport.URLParams 12049 ctx_ context.Context 12050 header_ http.Header 12051} 12052 12053// GetByDataFilter: Returns the spreadsheet at the given ID. The caller 12054// must specify the spreadsheet ID. This method differs from 12055// GetSpreadsheet in that it allows selecting which subsets of 12056// spreadsheet data to return by specifying a dataFilters parameter. 12057// Multiple DataFilters can be specified. Specifying one or more data 12058// filters will return the portions of the spreadsheet that intersect 12059// ranges matched by any of the filters. By default, data within grids 12060// will not be returned. You can include grid data one of two ways: * 12061// Specify a field mask listing your desired fields using the `fields` 12062// URL parameter in HTTP * Set the includeGridData parameter to true. If 12063// a field mask is set, the `includeGridData` parameter is ignored For 12064// large spreadsheets, it is recommended to retrieve only the specific 12065// fields of the spreadsheet that you want. 12066// 12067// - spreadsheetId: The spreadsheet to request. 12068func (r *SpreadsheetsService) GetByDataFilter(spreadsheetId string, getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest) *SpreadsheetsGetByDataFilterCall { 12069 c := &SpreadsheetsGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12070 c.spreadsheetId = spreadsheetId 12071 c.getspreadsheetbydatafilterrequest = getspreadsheetbydatafilterrequest 12072 return c 12073} 12074 12075// Fields allows partial responses to be retrieved. See 12076// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12077// for more information. 12078func (c *SpreadsheetsGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsGetByDataFilterCall { 12079 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12080 return c 12081} 12082 12083// Context sets the context to be used in this call's Do method. Any 12084// pending HTTP request will be aborted if the provided context is 12085// canceled. 12086func (c *SpreadsheetsGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsGetByDataFilterCall { 12087 c.ctx_ = ctx 12088 return c 12089} 12090 12091// Header returns an http.Header that can be modified by the caller to 12092// add HTTP headers to the request. 12093func (c *SpreadsheetsGetByDataFilterCall) Header() http.Header { 12094 if c.header_ == nil { 12095 c.header_ = make(http.Header) 12096 } 12097 return c.header_ 12098} 12099 12100func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 12101 reqHeaders := make(http.Header) 12102 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12103 for k, v := range c.header_ { 12104 reqHeaders[k] = v 12105 } 12106 reqHeaders.Set("User-Agent", c.s.userAgent()) 12107 var body io.Reader = nil 12108 body, err := googleapi.WithoutDataWrapper.JSONReader(c.getspreadsheetbydatafilterrequest) 12109 if err != nil { 12110 return nil, err 12111 } 12112 reqHeaders.Set("Content-Type", "application/json") 12113 c.urlParams_.Set("alt", alt) 12114 c.urlParams_.Set("prettyPrint", "false") 12115 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter") 12116 urls += "?" + c.urlParams_.Encode() 12117 req, err := http.NewRequest("POST", urls, body) 12118 if err != nil { 12119 return nil, err 12120 } 12121 req.Header = reqHeaders 12122 googleapi.Expand(req.URL, map[string]string{ 12123 "spreadsheetId": c.spreadsheetId, 12124 }) 12125 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12126} 12127 12128// Do executes the "sheets.spreadsheets.getByDataFilter" call. 12129// Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx 12130// status code is an error. Response headers are in either 12131// *Spreadsheet.ServerResponse.Header or (if a response was returned at 12132// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 12133// to check whether the returned error was because 12134// http.StatusNotModified was returned. 12135func (c *SpreadsheetsGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) { 12136 gensupport.SetOptions(c.urlParams_, opts...) 12137 res, err := c.doRequest("json") 12138 if res != nil && res.StatusCode == http.StatusNotModified { 12139 if res.Body != nil { 12140 res.Body.Close() 12141 } 12142 return nil, &googleapi.Error{ 12143 Code: res.StatusCode, 12144 Header: res.Header, 12145 } 12146 } 12147 if err != nil { 12148 return nil, err 12149 } 12150 defer googleapi.CloseBody(res) 12151 if err := googleapi.CheckResponse(res); err != nil { 12152 return nil, err 12153 } 12154 ret := &Spreadsheet{ 12155 ServerResponse: googleapi.ServerResponse{ 12156 Header: res.Header, 12157 HTTPStatusCode: res.StatusCode, 12158 }, 12159 } 12160 target := &ret 12161 if err := gensupport.DecodeResponse(target, res); err != nil { 12162 return nil, err 12163 } 12164 return ret, nil 12165 // { 12166 // "description": "Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. This method differs from GetSpreadsheet in that it allows selecting which subsets of spreadsheet data to return by specifying a dataFilters parameter. Multiple DataFilters can be specified. Specifying one or more data filters will return the portions of the spreadsheet that intersect ranges matched by any of the filters. By default, data within grids will not be returned. You can include grid data one of two ways: * Specify a field mask listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData parameter to true. If a field mask is set, the `includeGridData` parameter is ignored For large spreadsheets, it is recommended to retrieve only the specific fields of the spreadsheet that you want.", 12167 // "flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 12168 // "httpMethod": "POST", 12169 // "id": "sheets.spreadsheets.getByDataFilter", 12170 // "parameterOrder": [ 12171 // "spreadsheetId" 12172 // ], 12173 // "parameters": { 12174 // "spreadsheetId": { 12175 // "description": "The spreadsheet to request.", 12176 // "location": "path", 12177 // "required": true, 12178 // "type": "string" 12179 // } 12180 // }, 12181 // "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", 12182 // "request": { 12183 // "$ref": "GetSpreadsheetByDataFilterRequest" 12184 // }, 12185 // "response": { 12186 // "$ref": "Spreadsheet" 12187 // }, 12188 // "scopes": [ 12189 // "https://www.googleapis.com/auth/drive", 12190 // "https://www.googleapis.com/auth/drive.file", 12191 // "https://www.googleapis.com/auth/spreadsheets" 12192 // ] 12193 // } 12194 12195} 12196 12197// method id "sheets.spreadsheets.developerMetadata.get": 12198 12199type SpreadsheetsDeveloperMetadataGetCall struct { 12200 s *Service 12201 spreadsheetId string 12202 metadataId int64 12203 urlParams_ gensupport.URLParams 12204 ifNoneMatch_ string 12205 ctx_ context.Context 12206 header_ http.Header 12207} 12208 12209// Get: Returns the developer metadata with the specified ID. The caller 12210// must specify the spreadsheet ID and the developer metadata's unique 12211// metadataId. 12212// 12213// - metadataId: The ID of the developer metadata to retrieve. 12214// - spreadsheetId: The ID of the spreadsheet to retrieve metadata from. 12215func (r *SpreadsheetsDeveloperMetadataService) Get(spreadsheetId string, metadataId int64) *SpreadsheetsDeveloperMetadataGetCall { 12216 c := &SpreadsheetsDeveloperMetadataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12217 c.spreadsheetId = spreadsheetId 12218 c.metadataId = metadataId 12219 return c 12220} 12221 12222// Fields allows partial responses to be retrieved. See 12223// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12224// for more information. 12225func (c *SpreadsheetsDeveloperMetadataGetCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataGetCall { 12226 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12227 return c 12228} 12229 12230// IfNoneMatch sets the optional parameter which makes the operation 12231// fail if the object's ETag matches the given value. This is useful for 12232// getting updates only after the object has changed since the last 12233// request. Use googleapi.IsNotModified to check whether the response 12234// error from Do is the result of In-None-Match. 12235func (c *SpreadsheetsDeveloperMetadataGetCall) IfNoneMatch(entityTag string) *SpreadsheetsDeveloperMetadataGetCall { 12236 c.ifNoneMatch_ = entityTag 12237 return c 12238} 12239 12240// Context sets the context to be used in this call's Do method. Any 12241// pending HTTP request will be aborted if the provided context is 12242// canceled. 12243func (c *SpreadsheetsDeveloperMetadataGetCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataGetCall { 12244 c.ctx_ = ctx 12245 return c 12246} 12247 12248// Header returns an http.Header that can be modified by the caller to 12249// add HTTP headers to the request. 12250func (c *SpreadsheetsDeveloperMetadataGetCall) Header() http.Header { 12251 if c.header_ == nil { 12252 c.header_ = make(http.Header) 12253 } 12254 return c.header_ 12255} 12256 12257func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Response, error) { 12258 reqHeaders := make(http.Header) 12259 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12260 for k, v := range c.header_ { 12261 reqHeaders[k] = v 12262 } 12263 reqHeaders.Set("User-Agent", c.s.userAgent()) 12264 if c.ifNoneMatch_ != "" { 12265 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 12266 } 12267 var body io.Reader = nil 12268 c.urlParams_.Set("alt", alt) 12269 c.urlParams_.Set("prettyPrint", "false") 12270 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}") 12271 urls += "?" + c.urlParams_.Encode() 12272 req, err := http.NewRequest("GET", urls, body) 12273 if err != nil { 12274 return nil, err 12275 } 12276 req.Header = reqHeaders 12277 googleapi.Expand(req.URL, map[string]string{ 12278 "spreadsheetId": c.spreadsheetId, 12279 "metadataId": strconv.FormatInt(c.metadataId, 10), 12280 }) 12281 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12282} 12283 12284// Do executes the "sheets.spreadsheets.developerMetadata.get" call. 12285// Exactly one of *DeveloperMetadata or error will be non-nil. Any 12286// non-2xx status code is an error. Response headers are in either 12287// *DeveloperMetadata.ServerResponse.Header or (if a response was 12288// returned at all) in error.(*googleapi.Error).Header. Use 12289// googleapi.IsNotModified to check whether the returned error was 12290// because http.StatusNotModified was returned. 12291func (c *SpreadsheetsDeveloperMetadataGetCall) Do(opts ...googleapi.CallOption) (*DeveloperMetadata, error) { 12292 gensupport.SetOptions(c.urlParams_, opts...) 12293 res, err := c.doRequest("json") 12294 if res != nil && res.StatusCode == http.StatusNotModified { 12295 if res.Body != nil { 12296 res.Body.Close() 12297 } 12298 return nil, &googleapi.Error{ 12299 Code: res.StatusCode, 12300 Header: res.Header, 12301 } 12302 } 12303 if err != nil { 12304 return nil, err 12305 } 12306 defer googleapi.CloseBody(res) 12307 if err := googleapi.CheckResponse(res); err != nil { 12308 return nil, err 12309 } 12310 ret := &DeveloperMetadata{ 12311 ServerResponse: googleapi.ServerResponse{ 12312 Header: res.Header, 12313 HTTPStatusCode: res.StatusCode, 12314 }, 12315 } 12316 target := &ret 12317 if err := gensupport.DecodeResponse(target, res); err != nil { 12318 return nil, err 12319 } 12320 return ret, nil 12321 // { 12322 // "description": "Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId.", 12323 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 12324 // "httpMethod": "GET", 12325 // "id": "sheets.spreadsheets.developerMetadata.get", 12326 // "parameterOrder": [ 12327 // "spreadsheetId", 12328 // "metadataId" 12329 // ], 12330 // "parameters": { 12331 // "metadataId": { 12332 // "description": "The ID of the developer metadata to retrieve.", 12333 // "format": "int32", 12334 // "location": "path", 12335 // "required": true, 12336 // "type": "integer" 12337 // }, 12338 // "spreadsheetId": { 12339 // "description": "The ID of the spreadsheet to retrieve metadata from.", 12340 // "location": "path", 12341 // "required": true, 12342 // "type": "string" 12343 // } 12344 // }, 12345 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", 12346 // "response": { 12347 // "$ref": "DeveloperMetadata" 12348 // }, 12349 // "scopes": [ 12350 // "https://www.googleapis.com/auth/drive", 12351 // "https://www.googleapis.com/auth/drive.file", 12352 // "https://www.googleapis.com/auth/spreadsheets" 12353 // ] 12354 // } 12355 12356} 12357 12358// method id "sheets.spreadsheets.developerMetadata.search": 12359 12360type SpreadsheetsDeveloperMetadataSearchCall struct { 12361 s *Service 12362 spreadsheetId string 12363 searchdevelopermetadatarequest *SearchDeveloperMetadataRequest 12364 urlParams_ gensupport.URLParams 12365 ctx_ context.Context 12366 header_ http.Header 12367} 12368 12369// Search: Returns all developer metadata matching the specified 12370// DataFilter. If the provided DataFilter represents a 12371// DeveloperMetadataLookup object, this will return all 12372// DeveloperMetadata entries selected by it. If the DataFilter 12373// represents a location in a spreadsheet, this will return all 12374// developer metadata associated with locations intersecting that 12375// region. 12376// 12377// - spreadsheetId: The ID of the spreadsheet to retrieve metadata from. 12378func (r *SpreadsheetsDeveloperMetadataService) Search(spreadsheetId string, searchdevelopermetadatarequest *SearchDeveloperMetadataRequest) *SpreadsheetsDeveloperMetadataSearchCall { 12379 c := &SpreadsheetsDeveloperMetadataSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12380 c.spreadsheetId = spreadsheetId 12381 c.searchdevelopermetadatarequest = searchdevelopermetadatarequest 12382 return c 12383} 12384 12385// Fields allows partial responses to be retrieved. See 12386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12387// for more information. 12388func (c *SpreadsheetsDeveloperMetadataSearchCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataSearchCall { 12389 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12390 return c 12391} 12392 12393// Context sets the context to be used in this call's Do method. Any 12394// pending HTTP request will be aborted if the provided context is 12395// canceled. 12396func (c *SpreadsheetsDeveloperMetadataSearchCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataSearchCall { 12397 c.ctx_ = ctx 12398 return c 12399} 12400 12401// Header returns an http.Header that can be modified by the caller to 12402// add HTTP headers to the request. 12403func (c *SpreadsheetsDeveloperMetadataSearchCall) Header() http.Header { 12404 if c.header_ == nil { 12405 c.header_ = make(http.Header) 12406 } 12407 return c.header_ 12408} 12409 12410func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.Response, error) { 12411 reqHeaders := make(http.Header) 12412 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12413 for k, v := range c.header_ { 12414 reqHeaders[k] = v 12415 } 12416 reqHeaders.Set("User-Agent", c.s.userAgent()) 12417 var body io.Reader = nil 12418 body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchdevelopermetadatarequest) 12419 if err != nil { 12420 return nil, err 12421 } 12422 reqHeaders.Set("Content-Type", "application/json") 12423 c.urlParams_.Set("alt", alt) 12424 c.urlParams_.Set("prettyPrint", "false") 12425 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search") 12426 urls += "?" + c.urlParams_.Encode() 12427 req, err := http.NewRequest("POST", urls, body) 12428 if err != nil { 12429 return nil, err 12430 } 12431 req.Header = reqHeaders 12432 googleapi.Expand(req.URL, map[string]string{ 12433 "spreadsheetId": c.spreadsheetId, 12434 }) 12435 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12436} 12437 12438// Do executes the "sheets.spreadsheets.developerMetadata.search" call. 12439// Exactly one of *SearchDeveloperMetadataResponse or error will be 12440// non-nil. Any non-2xx status code is an error. Response headers are in 12441// either *SearchDeveloperMetadataResponse.ServerResponse.Header or (if 12442// a response was returned at all) in error.(*googleapi.Error).Header. 12443// Use googleapi.IsNotModified to check whether the returned error was 12444// because http.StatusNotModified was returned. 12445func (c *SpreadsheetsDeveloperMetadataSearchCall) Do(opts ...googleapi.CallOption) (*SearchDeveloperMetadataResponse, error) { 12446 gensupport.SetOptions(c.urlParams_, opts...) 12447 res, err := c.doRequest("json") 12448 if res != nil && res.StatusCode == http.StatusNotModified { 12449 if res.Body != nil { 12450 res.Body.Close() 12451 } 12452 return nil, &googleapi.Error{ 12453 Code: res.StatusCode, 12454 Header: res.Header, 12455 } 12456 } 12457 if err != nil { 12458 return nil, err 12459 } 12460 defer googleapi.CloseBody(res) 12461 if err := googleapi.CheckResponse(res); err != nil { 12462 return nil, err 12463 } 12464 ret := &SearchDeveloperMetadataResponse{ 12465 ServerResponse: googleapi.ServerResponse{ 12466 Header: res.Header, 12467 HTTPStatusCode: res.StatusCode, 12468 }, 12469 } 12470 target := &ret 12471 if err := gensupport.DecodeResponse(target, res); err != nil { 12472 return nil, err 12473 } 12474 return ret, nil 12475 // { 12476 // "description": "Returns all developer metadata matching the specified DataFilter. If the provided DataFilter represents a DeveloperMetadataLookup object, this will return all DeveloperMetadata entries selected by it. If the DataFilter represents a location in a spreadsheet, this will return all developer metadata associated with locations intersecting that region.", 12477 // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 12478 // "httpMethod": "POST", 12479 // "id": "sheets.spreadsheets.developerMetadata.search", 12480 // "parameterOrder": [ 12481 // "spreadsheetId" 12482 // ], 12483 // "parameters": { 12484 // "spreadsheetId": { 12485 // "description": "The ID of the spreadsheet to retrieve metadata from.", 12486 // "location": "path", 12487 // "required": true, 12488 // "type": "string" 12489 // } 12490 // }, 12491 // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", 12492 // "request": { 12493 // "$ref": "SearchDeveloperMetadataRequest" 12494 // }, 12495 // "response": { 12496 // "$ref": "SearchDeveloperMetadataResponse" 12497 // }, 12498 // "scopes": [ 12499 // "https://www.googleapis.com/auth/drive", 12500 // "https://www.googleapis.com/auth/drive.file", 12501 // "https://www.googleapis.com/auth/spreadsheets" 12502 // ] 12503 // } 12504 12505} 12506 12507// method id "sheets.spreadsheets.sheets.copyTo": 12508 12509type SpreadsheetsSheetsCopyToCall struct { 12510 s *Service 12511 spreadsheetId string 12512 sheetId int64 12513 copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest 12514 urlParams_ gensupport.URLParams 12515 ctx_ context.Context 12516 header_ http.Header 12517} 12518 12519// CopyTo: Copies a single sheet from a spreadsheet to another 12520// spreadsheet. Returns the properties of the newly created sheet. 12521// 12522// - sheetId: The ID of the sheet to copy. 12523// - spreadsheetId: The ID of the spreadsheet containing the sheet to 12524// copy. 12525func (r *SpreadsheetsSheetsService) CopyTo(spreadsheetId string, sheetId int64, copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest) *SpreadsheetsSheetsCopyToCall { 12526 c := &SpreadsheetsSheetsCopyToCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12527 c.spreadsheetId = spreadsheetId 12528 c.sheetId = sheetId 12529 c.copysheettoanotherspreadsheetrequest = copysheettoanotherspreadsheetrequest 12530 return c 12531} 12532 12533// Fields allows partial responses to be retrieved. See 12534// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12535// for more information. 12536func (c *SpreadsheetsSheetsCopyToCall) Fields(s ...googleapi.Field) *SpreadsheetsSheetsCopyToCall { 12537 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12538 return c 12539} 12540 12541// Context sets the context to be used in this call's Do method. Any 12542// pending HTTP request will be aborted if the provided context is 12543// canceled. 12544func (c *SpreadsheetsSheetsCopyToCall) Context(ctx context.Context) *SpreadsheetsSheetsCopyToCall { 12545 c.ctx_ = ctx 12546 return c 12547} 12548 12549// Header returns an http.Header that can be modified by the caller to 12550// add HTTP headers to the request. 12551func (c *SpreadsheetsSheetsCopyToCall) Header() http.Header { 12552 if c.header_ == nil { 12553 c.header_ = make(http.Header) 12554 } 12555 return c.header_ 12556} 12557 12558func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, error) { 12559 reqHeaders := make(http.Header) 12560 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12561 for k, v := range c.header_ { 12562 reqHeaders[k] = v 12563 } 12564 reqHeaders.Set("User-Agent", c.s.userAgent()) 12565 var body io.Reader = nil 12566 body, err := googleapi.WithoutDataWrapper.JSONReader(c.copysheettoanotherspreadsheetrequest) 12567 if err != nil { 12568 return nil, err 12569 } 12570 reqHeaders.Set("Content-Type", "application/json") 12571 c.urlParams_.Set("alt", alt) 12572 c.urlParams_.Set("prettyPrint", "false") 12573 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo") 12574 urls += "?" + c.urlParams_.Encode() 12575 req, err := http.NewRequest("POST", urls, body) 12576 if err != nil { 12577 return nil, err 12578 } 12579 req.Header = reqHeaders 12580 googleapi.Expand(req.URL, map[string]string{ 12581 "spreadsheetId": c.spreadsheetId, 12582 "sheetId": strconv.FormatInt(c.sheetId, 10), 12583 }) 12584 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12585} 12586 12587// Do executes the "sheets.spreadsheets.sheets.copyTo" call. 12588// Exactly one of *SheetProperties or error will be non-nil. Any non-2xx 12589// status code is an error. Response headers are in either 12590// *SheetProperties.ServerResponse.Header or (if a response was returned 12591// at all) in error.(*googleapi.Error).Header. Use 12592// googleapi.IsNotModified to check whether the returned error was 12593// because http.StatusNotModified was returned. 12594func (c *SpreadsheetsSheetsCopyToCall) Do(opts ...googleapi.CallOption) (*SheetProperties, error) { 12595 gensupport.SetOptions(c.urlParams_, opts...) 12596 res, err := c.doRequest("json") 12597 if res != nil && res.StatusCode == http.StatusNotModified { 12598 if res.Body != nil { 12599 res.Body.Close() 12600 } 12601 return nil, &googleapi.Error{ 12602 Code: res.StatusCode, 12603 Header: res.Header, 12604 } 12605 } 12606 if err != nil { 12607 return nil, err 12608 } 12609 defer googleapi.CloseBody(res) 12610 if err := googleapi.CheckResponse(res); err != nil { 12611 return nil, err 12612 } 12613 ret := &SheetProperties{ 12614 ServerResponse: googleapi.ServerResponse{ 12615 Header: res.Header, 12616 HTTPStatusCode: res.StatusCode, 12617 }, 12618 } 12619 target := &ret 12620 if err := gensupport.DecodeResponse(target, res); err != nil { 12621 return nil, err 12622 } 12623 return ret, nil 12624 // { 12625 // "description": "Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.", 12626 // "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 12627 // "httpMethod": "POST", 12628 // "id": "sheets.spreadsheets.sheets.copyTo", 12629 // "parameterOrder": [ 12630 // "spreadsheetId", 12631 // "sheetId" 12632 // ], 12633 // "parameters": { 12634 // "sheetId": { 12635 // "description": "The ID of the sheet to copy.", 12636 // "format": "int32", 12637 // "location": "path", 12638 // "required": true, 12639 // "type": "integer" 12640 // }, 12641 // "spreadsheetId": { 12642 // "description": "The ID of the spreadsheet containing the sheet to copy.", 12643 // "location": "path", 12644 // "required": true, 12645 // "type": "string" 12646 // } 12647 // }, 12648 // "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", 12649 // "request": { 12650 // "$ref": "CopySheetToAnotherSpreadsheetRequest" 12651 // }, 12652 // "response": { 12653 // "$ref": "SheetProperties" 12654 // }, 12655 // "scopes": [ 12656 // "https://www.googleapis.com/auth/drive", 12657 // "https://www.googleapis.com/auth/drive.file", 12658 // "https://www.googleapis.com/auth/spreadsheets" 12659 // ] 12660 // } 12661 12662} 12663 12664// method id "sheets.spreadsheets.values.append": 12665 12666type SpreadsheetsValuesAppendCall struct { 12667 s *Service 12668 spreadsheetId string 12669 range_ string 12670 valuerange *ValueRange 12671 urlParams_ gensupport.URLParams 12672 ctx_ context.Context 12673 header_ http.Header 12674} 12675 12676// Append: Appends values to a spreadsheet. The input range is used to 12677// search for existing data and find a "table" within that range. Values 12678// will be appended to the next row of the table, starting with the 12679// first column of the table. See the guide 12680// (/sheets/api/guides/values#appending_values) and sample code 12681// (/sheets/api/samples/writing#append_values) for specific details of 12682// how tables are detected and data is appended. The caller must specify 12683// the spreadsheet ID, range, and a valueInputOption. The 12684// `valueInputOption` only controls how the input data will be added to 12685// the sheet (column-wise or row-wise), it does not influence what cell 12686// the data starts being written to. 12687// 12688// - range: The A1 notation of a range to search for a logical table of 12689// data. Values are appended after the last row of the table. 12690// - spreadsheetId: The ID of the spreadsheet to update. 12691func (r *SpreadsheetsValuesService) Append(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesAppendCall { 12692 c := &SpreadsheetsValuesAppendCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12693 c.spreadsheetId = spreadsheetId 12694 c.range_ = range_ 12695 c.valuerange = valuerange 12696 return c 12697} 12698 12699// IncludeValuesInResponse sets the optional parameter 12700// "includeValuesInResponse": Determines if the update response should 12701// include the values of the cells that were appended. By default, 12702// responses do not include the updated values. 12703func (c *SpreadsheetsValuesAppendCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesAppendCall { 12704 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 12705 return c 12706} 12707 12708// InsertDataOption sets the optional parameter "insertDataOption": How 12709// the input data should be inserted. 12710// 12711// Possible values: 12712// "OVERWRITE" - The new data overwrites existing data in the areas it 12713// is written. (Note: adding data to the end of the sheet will still 12714// insert new rows or columns so the data can be written.) 12715// "INSERT_ROWS" - Rows are inserted for the new data. 12716func (c *SpreadsheetsValuesAppendCall) InsertDataOption(insertDataOption string) *SpreadsheetsValuesAppendCall { 12717 c.urlParams_.Set("insertDataOption", insertDataOption) 12718 return c 12719} 12720 12721// ResponseDateTimeRenderOption sets the optional parameter 12722// "responseDateTimeRenderOption": Determines how dates, times, and 12723// durations in the response should be rendered. This is ignored if 12724// response_value_render_option is FORMATTED_VALUE. The default dateTime 12725// render option is SERIAL_NUMBER. 12726// 12727// Possible values: 12728// "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 12729// fields to be output as doubles in "serial number" format, as 12730// popularized by Lotus 1-2-3. The whole number portion of the value 12731// (left of the decimal) counts the days since December 30th 1899. The 12732// fractional portion (right of the decimal) counts the time as a 12733// fraction of the day. For example, January 1st 1900 at noon would be 12734// 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 12735// noon is half a day. February 1st 1900 at 3pm would be 33.625. This 12736// correctly treats the year 1900 as not a leap year. 12737// "FORMATTED_STRING" - Instructs date, time, datetime, and duration 12738// fields to be output as strings in their given number format (which is 12739// dependent on the spreadsheet locale). 12740func (c *SpreadsheetsValuesAppendCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesAppendCall { 12741 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 12742 return c 12743} 12744 12745// ResponseValueRenderOption sets the optional parameter 12746// "responseValueRenderOption": Determines how values in the response 12747// should be rendered. The default render option is FORMATTED_VALUE. 12748// 12749// Possible values: 12750// "FORMATTED_VALUE" - Values will be calculated & formatted in the 12751// reply according to the cell's formatting. Formatting is based on the 12752// spreadsheet's locale, not the requesting user's locale. For example, 12753// if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 12754// `A2` would return "$1.23". 12755// "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 12756// in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 12757// formatted as currency, then `A2` would return the number `1.23`. 12758// "FORMULA" - Values will not be calculated. The reply will include 12759// the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 12760// formatted as currency, then A2 would return "=A1". 12761func (c *SpreadsheetsValuesAppendCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesAppendCall { 12762 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 12763 return c 12764} 12765 12766// ValueInputOption sets the optional parameter "valueInputOption": How 12767// the input data should be interpreted. 12768// 12769// Possible values: 12770// "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 12771// must not be used. 12772// "RAW" - The values the user has entered will not be parsed and will 12773// be stored as-is. 12774// "USER_ENTERED" - The values will be parsed as if the user typed 12775// them into the UI. Numbers will stay as numbers, but strings may be 12776// converted to numbers, dates, etc. following the same rules that are 12777// applied when entering text into a cell via the Google Sheets UI. 12778func (c *SpreadsheetsValuesAppendCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesAppendCall { 12779 c.urlParams_.Set("valueInputOption", valueInputOption) 12780 return c 12781} 12782 12783// Fields allows partial responses to be retrieved. See 12784// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 12785// for more information. 12786func (c *SpreadsheetsValuesAppendCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesAppendCall { 12787 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 12788 return c 12789} 12790 12791// Context sets the context to be used in this call's Do method. Any 12792// pending HTTP request will be aborted if the provided context is 12793// canceled. 12794func (c *SpreadsheetsValuesAppendCall) Context(ctx context.Context) *SpreadsheetsValuesAppendCall { 12795 c.ctx_ = ctx 12796 return c 12797} 12798 12799// Header returns an http.Header that can be modified by the caller to 12800// add HTTP headers to the request. 12801func (c *SpreadsheetsValuesAppendCall) Header() http.Header { 12802 if c.header_ == nil { 12803 c.header_ = make(http.Header) 12804 } 12805 return c.header_ 12806} 12807 12808func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, error) { 12809 reqHeaders := make(http.Header) 12810 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 12811 for k, v := range c.header_ { 12812 reqHeaders[k] = v 12813 } 12814 reqHeaders.Set("User-Agent", c.s.userAgent()) 12815 var body io.Reader = nil 12816 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 12817 if err != nil { 12818 return nil, err 12819 } 12820 reqHeaders.Set("Content-Type", "application/json") 12821 c.urlParams_.Set("alt", alt) 12822 c.urlParams_.Set("prettyPrint", "false") 12823 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append") 12824 urls += "?" + c.urlParams_.Encode() 12825 req, err := http.NewRequest("POST", urls, body) 12826 if err != nil { 12827 return nil, err 12828 } 12829 req.Header = reqHeaders 12830 googleapi.Expand(req.URL, map[string]string{ 12831 "spreadsheetId": c.spreadsheetId, 12832 "range": c.range_, 12833 }) 12834 return gensupport.SendRequest(c.ctx_, c.s.client, req) 12835} 12836 12837// Do executes the "sheets.spreadsheets.values.append" call. 12838// Exactly one of *AppendValuesResponse or error will be non-nil. Any 12839// non-2xx status code is an error. Response headers are in either 12840// *AppendValuesResponse.ServerResponse.Header or (if a response was 12841// returned at all) in error.(*googleapi.Error).Header. Use 12842// googleapi.IsNotModified to check whether the returned error was 12843// because http.StatusNotModified was returned. 12844func (c *SpreadsheetsValuesAppendCall) Do(opts ...googleapi.CallOption) (*AppendValuesResponse, error) { 12845 gensupport.SetOptions(c.urlParams_, opts...) 12846 res, err := c.doRequest("json") 12847 if res != nil && res.StatusCode == http.StatusNotModified { 12848 if res.Body != nil { 12849 res.Body.Close() 12850 } 12851 return nil, &googleapi.Error{ 12852 Code: res.StatusCode, 12853 Header: res.Header, 12854 } 12855 } 12856 if err != nil { 12857 return nil, err 12858 } 12859 defer googleapi.CloseBody(res) 12860 if err := googleapi.CheckResponse(res); err != nil { 12861 return nil, err 12862 } 12863 ret := &AppendValuesResponse{ 12864 ServerResponse: googleapi.ServerResponse{ 12865 Header: res.Header, 12866 HTTPStatusCode: res.StatusCode, 12867 }, 12868 } 12869 target := &ret 12870 if err := gensupport.DecodeResponse(target, res); err != nil { 12871 return nil, err 12872 } 12873 return ret, nil 12874 // { 12875 // "description": "Appends values to a spreadsheet. The input range is used to search for existing data and find a \"table\" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the [guide](/sheets/api/guides/values#appending_values) and [sample code](/sheets/api/samples/writing#append_values) for specific details of how tables are detected and data is appended. The caller must specify the spreadsheet ID, range, and a valueInputOption. The `valueInputOption` only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to.", 12876 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 12877 // "httpMethod": "POST", 12878 // "id": "sheets.spreadsheets.values.append", 12879 // "parameterOrder": [ 12880 // "spreadsheetId", 12881 // "range" 12882 // ], 12883 // "parameters": { 12884 // "includeValuesInResponse": { 12885 // "description": "Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.", 12886 // "location": "query", 12887 // "type": "boolean" 12888 // }, 12889 // "insertDataOption": { 12890 // "description": "How the input data should be inserted.", 12891 // "enum": [ 12892 // "OVERWRITE", 12893 // "INSERT_ROWS" 12894 // ], 12895 // "enumDescriptions": [ 12896 // "The new data overwrites existing data in the areas it is written. (Note: adding data to the end of the sheet will still insert new rows or columns so the data can be written.)", 12897 // "Rows are inserted for the new data." 12898 // ], 12899 // "location": "query", 12900 // "type": "string" 12901 // }, 12902 // "range": { 12903 // "description": "The A1 notation of a range to search for a logical table of data. Values are appended after the last row of the table.", 12904 // "location": "path", 12905 // "required": true, 12906 // "type": "string" 12907 // }, 12908 // "responseDateTimeRenderOption": { 12909 // "description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", 12910 // "enum": [ 12911 // "SERIAL_NUMBER", 12912 // "FORMATTED_STRING" 12913 // ], 12914 // "enumDescriptions": [ 12915 // "Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", 12916 // "Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale)." 12917 // ], 12918 // "location": "query", 12919 // "type": "string" 12920 // }, 12921 // "responseValueRenderOption": { 12922 // "description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.", 12923 // "enum": [ 12924 // "FORMATTED_VALUE", 12925 // "UNFORMATTED_VALUE", 12926 // "FORMULA" 12927 // ], 12928 // "enumDescriptions": [ 12929 // "Values will be calculated \u0026 formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", 12930 // "Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", 12931 // "Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`." 12932 // ], 12933 // "location": "query", 12934 // "type": "string" 12935 // }, 12936 // "spreadsheetId": { 12937 // "description": "The ID of the spreadsheet to update.", 12938 // "location": "path", 12939 // "required": true, 12940 // "type": "string" 12941 // }, 12942 // "valueInputOption": { 12943 // "description": "How the input data should be interpreted.", 12944 // "enum": [ 12945 // "INPUT_VALUE_OPTION_UNSPECIFIED", 12946 // "RAW", 12947 // "USER_ENTERED" 12948 // ], 12949 // "enumDescriptions": [ 12950 // "Default input value. This value must not be used.", 12951 // "The values the user has entered will not be parsed and will be stored as-is.", 12952 // "The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI." 12953 // ], 12954 // "location": "query", 12955 // "type": "string" 12956 // } 12957 // }, 12958 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", 12959 // "request": { 12960 // "$ref": "ValueRange" 12961 // }, 12962 // "response": { 12963 // "$ref": "AppendValuesResponse" 12964 // }, 12965 // "scopes": [ 12966 // "https://www.googleapis.com/auth/drive", 12967 // "https://www.googleapis.com/auth/drive.file", 12968 // "https://www.googleapis.com/auth/spreadsheets" 12969 // ] 12970 // } 12971 12972} 12973 12974// method id "sheets.spreadsheets.values.batchClear": 12975 12976type SpreadsheetsValuesBatchClearCall struct { 12977 s *Service 12978 spreadsheetId string 12979 batchclearvaluesrequest *BatchClearValuesRequest 12980 urlParams_ gensupport.URLParams 12981 ctx_ context.Context 12982 header_ http.Header 12983} 12984 12985// BatchClear: Clears one or more ranges of values from a spreadsheet. 12986// The caller must specify the spreadsheet ID and one or more ranges. 12987// Only values are cleared -- all other properties of the cell (such as 12988// formatting, data validation, etc..) are kept. 12989// 12990// - spreadsheetId: The ID of the spreadsheet to update. 12991func (r *SpreadsheetsValuesService) BatchClear(spreadsheetId string, batchclearvaluesrequest *BatchClearValuesRequest) *SpreadsheetsValuesBatchClearCall { 12992 c := &SpreadsheetsValuesBatchClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 12993 c.spreadsheetId = spreadsheetId 12994 c.batchclearvaluesrequest = batchclearvaluesrequest 12995 return c 12996} 12997 12998// Fields allows partial responses to be retrieved. See 12999// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13000// for more information. 13001func (c *SpreadsheetsValuesBatchClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearCall { 13002 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13003 return c 13004} 13005 13006// Context sets the context to be used in this call's Do method. Any 13007// pending HTTP request will be aborted if the provided context is 13008// canceled. 13009func (c *SpreadsheetsValuesBatchClearCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearCall { 13010 c.ctx_ = ctx 13011 return c 13012} 13013 13014// Header returns an http.Header that can be modified by the caller to 13015// add HTTP headers to the request. 13016func (c *SpreadsheetsValuesBatchClearCall) Header() http.Header { 13017 if c.header_ == nil { 13018 c.header_ = make(http.Header) 13019 } 13020 return c.header_ 13021} 13022 13023func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response, error) { 13024 reqHeaders := make(http.Header) 13025 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13026 for k, v := range c.header_ { 13027 reqHeaders[k] = v 13028 } 13029 reqHeaders.Set("User-Agent", c.s.userAgent()) 13030 var body io.Reader = nil 13031 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesrequest) 13032 if err != nil { 13033 return nil, err 13034 } 13035 reqHeaders.Set("Content-Type", "application/json") 13036 c.urlParams_.Set("alt", alt) 13037 c.urlParams_.Set("prettyPrint", "false") 13038 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear") 13039 urls += "?" + c.urlParams_.Encode() 13040 req, err := http.NewRequest("POST", urls, body) 13041 if err != nil { 13042 return nil, err 13043 } 13044 req.Header = reqHeaders 13045 googleapi.Expand(req.URL, map[string]string{ 13046 "spreadsheetId": c.spreadsheetId, 13047 }) 13048 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13049} 13050 13051// Do executes the "sheets.spreadsheets.values.batchClear" call. 13052// Exactly one of *BatchClearValuesResponse or error will be non-nil. 13053// Any non-2xx status code is an error. Response headers are in either 13054// *BatchClearValuesResponse.ServerResponse.Header or (if a response was 13055// returned at all) in error.(*googleapi.Error).Header. Use 13056// googleapi.IsNotModified to check whether the returned error was 13057// because http.StatusNotModified was returned. 13058func (c *SpreadsheetsValuesBatchClearCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesResponse, error) { 13059 gensupport.SetOptions(c.urlParams_, opts...) 13060 res, err := c.doRequest("json") 13061 if res != nil && res.StatusCode == http.StatusNotModified { 13062 if res.Body != nil { 13063 res.Body.Close() 13064 } 13065 return nil, &googleapi.Error{ 13066 Code: res.StatusCode, 13067 Header: res.Header, 13068 } 13069 } 13070 if err != nil { 13071 return nil, err 13072 } 13073 defer googleapi.CloseBody(res) 13074 if err := googleapi.CheckResponse(res); err != nil { 13075 return nil, err 13076 } 13077 ret := &BatchClearValuesResponse{ 13078 ServerResponse: googleapi.ServerResponse{ 13079 Header: res.Header, 13080 HTTPStatusCode: res.StatusCode, 13081 }, 13082 } 13083 target := &ret 13084 if err := gensupport.DecodeResponse(target, res); err != nil { 13085 return nil, err 13086 } 13087 return ret, nil 13088 // { 13089 // "description": "Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.", 13090 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 13091 // "httpMethod": "POST", 13092 // "id": "sheets.spreadsheets.values.batchClear", 13093 // "parameterOrder": [ 13094 // "spreadsheetId" 13095 // ], 13096 // "parameters": { 13097 // "spreadsheetId": { 13098 // "description": "The ID of the spreadsheet to update.", 13099 // "location": "path", 13100 // "required": true, 13101 // "type": "string" 13102 // } 13103 // }, 13104 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", 13105 // "request": { 13106 // "$ref": "BatchClearValuesRequest" 13107 // }, 13108 // "response": { 13109 // "$ref": "BatchClearValuesResponse" 13110 // }, 13111 // "scopes": [ 13112 // "https://www.googleapis.com/auth/drive", 13113 // "https://www.googleapis.com/auth/drive.file", 13114 // "https://www.googleapis.com/auth/spreadsheets" 13115 // ] 13116 // } 13117 13118} 13119 13120// method id "sheets.spreadsheets.values.batchClearByDataFilter": 13121 13122type SpreadsheetsValuesBatchClearByDataFilterCall struct { 13123 s *Service 13124 spreadsheetId string 13125 batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest 13126 urlParams_ gensupport.URLParams 13127 ctx_ context.Context 13128 header_ http.Header 13129} 13130 13131// BatchClearByDataFilter: Clears one or more ranges of values from a 13132// spreadsheet. The caller must specify the spreadsheet ID and one or 13133// more DataFilters. Ranges matching any of the specified data filters 13134// will be cleared. Only values are cleared -- all other properties of 13135// the cell (such as formatting, data validation, etc..) are kept. 13136// 13137// - spreadsheetId: The ID of the spreadsheet to update. 13138func (r *SpreadsheetsValuesService) BatchClearByDataFilter(spreadsheetId string, batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest) *SpreadsheetsValuesBatchClearByDataFilterCall { 13139 c := &SpreadsheetsValuesBatchClearByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13140 c.spreadsheetId = spreadsheetId 13141 c.batchclearvaluesbydatafilterrequest = batchclearvaluesbydatafilterrequest 13142 return c 13143} 13144 13145// Fields allows partial responses to be retrieved. See 13146// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13147// for more information. 13148func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearByDataFilterCall { 13149 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13150 return c 13151} 13152 13153// Context sets the context to be used in this call's Do method. Any 13154// pending HTTP request will be aborted if the provided context is 13155// canceled. 13156func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearByDataFilterCall { 13157 c.ctx_ = ctx 13158 return c 13159} 13160 13161// Header returns an http.Header that can be modified by the caller to 13162// add HTTP headers to the request. 13163func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Header() http.Header { 13164 if c.header_ == nil { 13165 c.header_ = make(http.Header) 13166 } 13167 return c.header_ 13168} 13169 13170func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*http.Response, error) { 13171 reqHeaders := make(http.Header) 13172 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13173 for k, v := range c.header_ { 13174 reqHeaders[k] = v 13175 } 13176 reqHeaders.Set("User-Agent", c.s.userAgent()) 13177 var body io.Reader = nil 13178 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesbydatafilterrequest) 13179 if err != nil { 13180 return nil, err 13181 } 13182 reqHeaders.Set("Content-Type", "application/json") 13183 c.urlParams_.Set("alt", alt) 13184 c.urlParams_.Set("prettyPrint", "false") 13185 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter") 13186 urls += "?" + c.urlParams_.Encode() 13187 req, err := http.NewRequest("POST", urls, body) 13188 if err != nil { 13189 return nil, err 13190 } 13191 req.Header = reqHeaders 13192 googleapi.Expand(req.URL, map[string]string{ 13193 "spreadsheetId": c.spreadsheetId, 13194 }) 13195 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13196} 13197 13198// Do executes the "sheets.spreadsheets.values.batchClearByDataFilter" call. 13199// Exactly one of *BatchClearValuesByDataFilterResponse or error will be 13200// non-nil. Any non-2xx status code is an error. Response headers are in 13201// either *BatchClearValuesByDataFilterResponse.ServerResponse.Header or 13202// (if a response was returned at all) in 13203// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13204// whether the returned error was because http.StatusNotModified was 13205// returned. 13206func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesByDataFilterResponse, error) { 13207 gensupport.SetOptions(c.urlParams_, opts...) 13208 res, err := c.doRequest("json") 13209 if res != nil && res.StatusCode == http.StatusNotModified { 13210 if res.Body != nil { 13211 res.Body.Close() 13212 } 13213 return nil, &googleapi.Error{ 13214 Code: res.StatusCode, 13215 Header: res.Header, 13216 } 13217 } 13218 if err != nil { 13219 return nil, err 13220 } 13221 defer googleapi.CloseBody(res) 13222 if err := googleapi.CheckResponse(res); err != nil { 13223 return nil, err 13224 } 13225 ret := &BatchClearValuesByDataFilterResponse{ 13226 ServerResponse: googleapi.ServerResponse{ 13227 Header: res.Header, 13228 HTTPStatusCode: res.StatusCode, 13229 }, 13230 } 13231 target := &ret 13232 if err := gensupport.DecodeResponse(target, res); err != nil { 13233 return nil, err 13234 } 13235 return ret, nil 13236 // { 13237 // "description": "Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.", 13238 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 13239 // "httpMethod": "POST", 13240 // "id": "sheets.spreadsheets.values.batchClearByDataFilter", 13241 // "parameterOrder": [ 13242 // "spreadsheetId" 13243 // ], 13244 // "parameters": { 13245 // "spreadsheetId": { 13246 // "description": "The ID of the spreadsheet to update.", 13247 // "location": "path", 13248 // "required": true, 13249 // "type": "string" 13250 // } 13251 // }, 13252 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", 13253 // "request": { 13254 // "$ref": "BatchClearValuesByDataFilterRequest" 13255 // }, 13256 // "response": { 13257 // "$ref": "BatchClearValuesByDataFilterResponse" 13258 // }, 13259 // "scopes": [ 13260 // "https://www.googleapis.com/auth/drive", 13261 // "https://www.googleapis.com/auth/drive.file", 13262 // "https://www.googleapis.com/auth/spreadsheets" 13263 // ] 13264 // } 13265 13266} 13267 13268// method id "sheets.spreadsheets.values.batchGet": 13269 13270type SpreadsheetsValuesBatchGetCall struct { 13271 s *Service 13272 spreadsheetId string 13273 urlParams_ gensupport.URLParams 13274 ifNoneMatch_ string 13275 ctx_ context.Context 13276 header_ http.Header 13277} 13278 13279// BatchGet: Returns one or more ranges of values from a spreadsheet. 13280// The caller must specify the spreadsheet ID and one or more ranges. 13281// 13282// - spreadsheetId: The ID of the spreadsheet to retrieve data from. 13283func (r *SpreadsheetsValuesService) BatchGet(spreadsheetId string) *SpreadsheetsValuesBatchGetCall { 13284 c := &SpreadsheetsValuesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13285 c.spreadsheetId = spreadsheetId 13286 return c 13287} 13288 13289// DateTimeRenderOption sets the optional parameter 13290// "dateTimeRenderOption": How dates, times, and durations should be 13291// represented in the output. This is ignored if value_render_option is 13292// FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER. 13293// 13294// Possible values: 13295// "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 13296// fields to be output as doubles in "serial number" format, as 13297// popularized by Lotus 1-2-3. The whole number portion of the value 13298// (left of the decimal) counts the days since December 30th 1899. The 13299// fractional portion (right of the decimal) counts the time as a 13300// fraction of the day. For example, January 1st 1900 at noon would be 13301// 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 13302// noon is half a day. February 1st 1900 at 3pm would be 33.625. This 13303// correctly treats the year 1900 as not a leap year. 13304// "FORMATTED_STRING" - Instructs date, time, datetime, and duration 13305// fields to be output as strings in their given number format (which is 13306// dependent on the spreadsheet locale). 13307func (c *SpreadsheetsValuesBatchGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesBatchGetCall { 13308 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 13309 return c 13310} 13311 13312// MajorDimension sets the optional parameter "majorDimension": The 13313// major dimension that results should use. For example, if the 13314// spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting 13315// `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas 13316// requesting `range=A1:B2,majorDimension=COLUMNS` returns 13317// `[[1,3],[2,4]]`. 13318// 13319// Possible values: 13320// "DIMENSION_UNSPECIFIED" - The default value, do not use. 13321// "ROWS" - Operates on the rows of a sheet. 13322// "COLUMNS" - Operates on the columns of a sheet. 13323func (c *SpreadsheetsValuesBatchGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesBatchGetCall { 13324 c.urlParams_.Set("majorDimension", majorDimension) 13325 return c 13326} 13327 13328// Ranges sets the optional parameter "ranges": The A1 notation or R1C1 13329// notation of the range to retrieve values from. 13330func (c *SpreadsheetsValuesBatchGetCall) Ranges(ranges ...string) *SpreadsheetsValuesBatchGetCall { 13331 c.urlParams_.SetMulti("ranges", append([]string{}, ranges...)) 13332 return c 13333} 13334 13335// ValueRenderOption sets the optional parameter "valueRenderOption": 13336// How values should be represented in the output. The default render 13337// option is ValueRenderOption.FORMATTED_VALUE. 13338// 13339// Possible values: 13340// "FORMATTED_VALUE" - Values will be calculated & formatted in the 13341// reply according to the cell's formatting. Formatting is based on the 13342// spreadsheet's locale, not the requesting user's locale. For example, 13343// if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 13344// `A2` would return "$1.23". 13345// "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 13346// in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 13347// formatted as currency, then `A2` would return the number `1.23`. 13348// "FORMULA" - Values will not be calculated. The reply will include 13349// the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 13350// formatted as currency, then A2 would return "=A1". 13351func (c *SpreadsheetsValuesBatchGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesBatchGetCall { 13352 c.urlParams_.Set("valueRenderOption", valueRenderOption) 13353 return c 13354} 13355 13356// Fields allows partial responses to be retrieved. See 13357// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13358// for more information. 13359func (c *SpreadsheetsValuesBatchGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetCall { 13360 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13361 return c 13362} 13363 13364// IfNoneMatch sets the optional parameter which makes the operation 13365// fail if the object's ETag matches the given value. This is useful for 13366// getting updates only after the object has changed since the last 13367// request. Use googleapi.IsNotModified to check whether the response 13368// error from Do is the result of In-None-Match. 13369func (c *SpreadsheetsValuesBatchGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesBatchGetCall { 13370 c.ifNoneMatch_ = entityTag 13371 return c 13372} 13373 13374// Context sets the context to be used in this call's Do method. Any 13375// pending HTTP request will be aborted if the provided context is 13376// canceled. 13377func (c *SpreadsheetsValuesBatchGetCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetCall { 13378 c.ctx_ = ctx 13379 return c 13380} 13381 13382// Header returns an http.Header that can be modified by the caller to 13383// add HTTP headers to the request. 13384func (c *SpreadsheetsValuesBatchGetCall) Header() http.Header { 13385 if c.header_ == nil { 13386 c.header_ = make(http.Header) 13387 } 13388 return c.header_ 13389} 13390 13391func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, error) { 13392 reqHeaders := make(http.Header) 13393 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13394 for k, v := range c.header_ { 13395 reqHeaders[k] = v 13396 } 13397 reqHeaders.Set("User-Agent", c.s.userAgent()) 13398 if c.ifNoneMatch_ != "" { 13399 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 13400 } 13401 var body io.Reader = nil 13402 c.urlParams_.Set("alt", alt) 13403 c.urlParams_.Set("prettyPrint", "false") 13404 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet") 13405 urls += "?" + c.urlParams_.Encode() 13406 req, err := http.NewRequest("GET", urls, body) 13407 if err != nil { 13408 return nil, err 13409 } 13410 req.Header = reqHeaders 13411 googleapi.Expand(req.URL, map[string]string{ 13412 "spreadsheetId": c.spreadsheetId, 13413 }) 13414 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13415} 13416 13417// Do executes the "sheets.spreadsheets.values.batchGet" call. 13418// Exactly one of *BatchGetValuesResponse or error will be non-nil. Any 13419// non-2xx status code is an error. Response headers are in either 13420// *BatchGetValuesResponse.ServerResponse.Header or (if a response was 13421// returned at all) in error.(*googleapi.Error).Header. Use 13422// googleapi.IsNotModified to check whether the returned error was 13423// because http.StatusNotModified was returned. 13424func (c *SpreadsheetsValuesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesResponse, error) { 13425 gensupport.SetOptions(c.urlParams_, opts...) 13426 res, err := c.doRequest("json") 13427 if res != nil && res.StatusCode == http.StatusNotModified { 13428 if res.Body != nil { 13429 res.Body.Close() 13430 } 13431 return nil, &googleapi.Error{ 13432 Code: res.StatusCode, 13433 Header: res.Header, 13434 } 13435 } 13436 if err != nil { 13437 return nil, err 13438 } 13439 defer googleapi.CloseBody(res) 13440 if err := googleapi.CheckResponse(res); err != nil { 13441 return nil, err 13442 } 13443 ret := &BatchGetValuesResponse{ 13444 ServerResponse: googleapi.ServerResponse{ 13445 Header: res.Header, 13446 HTTPStatusCode: res.StatusCode, 13447 }, 13448 } 13449 target := &ret 13450 if err := gensupport.DecodeResponse(target, res); err != nil { 13451 return nil, err 13452 } 13453 return ret, nil 13454 // { 13455 // "description": "Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.", 13456 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 13457 // "httpMethod": "GET", 13458 // "id": "sheets.spreadsheets.values.batchGet", 13459 // "parameterOrder": [ 13460 // "spreadsheetId" 13461 // ], 13462 // "parameters": { 13463 // "dateTimeRenderOption": { 13464 // "description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", 13465 // "enum": [ 13466 // "SERIAL_NUMBER", 13467 // "FORMATTED_STRING" 13468 // ], 13469 // "enumDescriptions": [ 13470 // "Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", 13471 // "Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale)." 13472 // ], 13473 // "location": "query", 13474 // "type": "string" 13475 // }, 13476 // "majorDimension": { 13477 // "description": "The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.", 13478 // "enum": [ 13479 // "DIMENSION_UNSPECIFIED", 13480 // "ROWS", 13481 // "COLUMNS" 13482 // ], 13483 // "enumDescriptions": [ 13484 // "The default value, do not use.", 13485 // "Operates on the rows of a sheet.", 13486 // "Operates on the columns of a sheet." 13487 // ], 13488 // "location": "query", 13489 // "type": "string" 13490 // }, 13491 // "ranges": { 13492 // "description": "The A1 notation or R1C1 notation of the range to retrieve values from.", 13493 // "location": "query", 13494 // "repeated": true, 13495 // "type": "string" 13496 // }, 13497 // "spreadsheetId": { 13498 // "description": "The ID of the spreadsheet to retrieve data from.", 13499 // "location": "path", 13500 // "required": true, 13501 // "type": "string" 13502 // }, 13503 // "valueRenderOption": { 13504 // "description": "How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.", 13505 // "enum": [ 13506 // "FORMATTED_VALUE", 13507 // "UNFORMATTED_VALUE", 13508 // "FORMULA" 13509 // ], 13510 // "enumDescriptions": [ 13511 // "Values will be calculated \u0026 formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", 13512 // "Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", 13513 // "Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`." 13514 // ], 13515 // "location": "query", 13516 // "type": "string" 13517 // } 13518 // }, 13519 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", 13520 // "response": { 13521 // "$ref": "BatchGetValuesResponse" 13522 // }, 13523 // "scopes": [ 13524 // "https://www.googleapis.com/auth/drive", 13525 // "https://www.googleapis.com/auth/drive.file", 13526 // "https://www.googleapis.com/auth/drive.readonly", 13527 // "https://www.googleapis.com/auth/spreadsheets", 13528 // "https://www.googleapis.com/auth/spreadsheets.readonly" 13529 // ] 13530 // } 13531 13532} 13533 13534// method id "sheets.spreadsheets.values.batchGetByDataFilter": 13535 13536type SpreadsheetsValuesBatchGetByDataFilterCall struct { 13537 s *Service 13538 spreadsheetId string 13539 batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest 13540 urlParams_ gensupport.URLParams 13541 ctx_ context.Context 13542 header_ http.Header 13543} 13544 13545// BatchGetByDataFilter: Returns one or more ranges of values that match 13546// the specified data filters. The caller must specify the spreadsheet 13547// ID and one or more DataFilters. Ranges that match any of the data 13548// filters in the request will be returned. 13549// 13550// - spreadsheetId: The ID of the spreadsheet to retrieve data from. 13551func (r *SpreadsheetsValuesService) BatchGetByDataFilter(spreadsheetId string, batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest) *SpreadsheetsValuesBatchGetByDataFilterCall { 13552 c := &SpreadsheetsValuesBatchGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13553 c.spreadsheetId = spreadsheetId 13554 c.batchgetvaluesbydatafilterrequest = batchgetvaluesbydatafilterrequest 13555 return c 13556} 13557 13558// Fields allows partial responses to be retrieved. See 13559// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13560// for more information. 13561func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetByDataFilterCall { 13562 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13563 return c 13564} 13565 13566// Context sets the context to be used in this call's Do method. Any 13567// pending HTTP request will be aborted if the provided context is 13568// canceled. 13569func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetByDataFilterCall { 13570 c.ctx_ = ctx 13571 return c 13572} 13573 13574// Header returns an http.Header that can be modified by the caller to 13575// add HTTP headers to the request. 13576func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Header() http.Header { 13577 if c.header_ == nil { 13578 c.header_ = make(http.Header) 13579 } 13580 return c.header_ 13581} 13582 13583func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*http.Response, error) { 13584 reqHeaders := make(http.Header) 13585 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13586 for k, v := range c.header_ { 13587 reqHeaders[k] = v 13588 } 13589 reqHeaders.Set("User-Agent", c.s.userAgent()) 13590 var body io.Reader = nil 13591 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetvaluesbydatafilterrequest) 13592 if err != nil { 13593 return nil, err 13594 } 13595 reqHeaders.Set("Content-Type", "application/json") 13596 c.urlParams_.Set("alt", alt) 13597 c.urlParams_.Set("prettyPrint", "false") 13598 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter") 13599 urls += "?" + c.urlParams_.Encode() 13600 req, err := http.NewRequest("POST", urls, body) 13601 if err != nil { 13602 return nil, err 13603 } 13604 req.Header = reqHeaders 13605 googleapi.Expand(req.URL, map[string]string{ 13606 "spreadsheetId": c.spreadsheetId, 13607 }) 13608 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13609} 13610 13611// Do executes the "sheets.spreadsheets.values.batchGetByDataFilter" call. 13612// Exactly one of *BatchGetValuesByDataFilterResponse or error will be 13613// non-nil. Any non-2xx status code is an error. Response headers are in 13614// either *BatchGetValuesByDataFilterResponse.ServerResponse.Header or 13615// (if a response was returned at all) in 13616// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 13617// whether the returned error was because http.StatusNotModified was 13618// returned. 13619func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesByDataFilterResponse, error) { 13620 gensupport.SetOptions(c.urlParams_, opts...) 13621 res, err := c.doRequest("json") 13622 if res != nil && res.StatusCode == http.StatusNotModified { 13623 if res.Body != nil { 13624 res.Body.Close() 13625 } 13626 return nil, &googleapi.Error{ 13627 Code: res.StatusCode, 13628 Header: res.Header, 13629 } 13630 } 13631 if err != nil { 13632 return nil, err 13633 } 13634 defer googleapi.CloseBody(res) 13635 if err := googleapi.CheckResponse(res); err != nil { 13636 return nil, err 13637 } 13638 ret := &BatchGetValuesByDataFilterResponse{ 13639 ServerResponse: googleapi.ServerResponse{ 13640 Header: res.Header, 13641 HTTPStatusCode: res.StatusCode, 13642 }, 13643 } 13644 target := &ret 13645 if err := gensupport.DecodeResponse(target, res); err != nil { 13646 return nil, err 13647 } 13648 return ret, nil 13649 // { 13650 // "description": "Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any of the data filters in the request will be returned.", 13651 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 13652 // "httpMethod": "POST", 13653 // "id": "sheets.spreadsheets.values.batchGetByDataFilter", 13654 // "parameterOrder": [ 13655 // "spreadsheetId" 13656 // ], 13657 // "parameters": { 13658 // "spreadsheetId": { 13659 // "description": "The ID of the spreadsheet to retrieve data from.", 13660 // "location": "path", 13661 // "required": true, 13662 // "type": "string" 13663 // } 13664 // }, 13665 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", 13666 // "request": { 13667 // "$ref": "BatchGetValuesByDataFilterRequest" 13668 // }, 13669 // "response": { 13670 // "$ref": "BatchGetValuesByDataFilterResponse" 13671 // }, 13672 // "scopes": [ 13673 // "https://www.googleapis.com/auth/drive", 13674 // "https://www.googleapis.com/auth/drive.file", 13675 // "https://www.googleapis.com/auth/spreadsheets" 13676 // ] 13677 // } 13678 13679} 13680 13681// method id "sheets.spreadsheets.values.batchUpdate": 13682 13683type SpreadsheetsValuesBatchUpdateCall struct { 13684 s *Service 13685 spreadsheetId string 13686 batchupdatevaluesrequest *BatchUpdateValuesRequest 13687 urlParams_ gensupport.URLParams 13688 ctx_ context.Context 13689 header_ http.Header 13690} 13691 13692// BatchUpdate: Sets values in one or more ranges of a spreadsheet. The 13693// caller must specify the spreadsheet ID, a valueInputOption, and one 13694// or more ValueRanges. 13695// 13696// - spreadsheetId: The ID of the spreadsheet to update. 13697func (r *SpreadsheetsValuesService) BatchUpdate(spreadsheetId string, batchupdatevaluesrequest *BatchUpdateValuesRequest) *SpreadsheetsValuesBatchUpdateCall { 13698 c := &SpreadsheetsValuesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13699 c.spreadsheetId = spreadsheetId 13700 c.batchupdatevaluesrequest = batchupdatevaluesrequest 13701 return c 13702} 13703 13704// Fields allows partial responses to be retrieved. See 13705// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13706// for more information. 13707func (c *SpreadsheetsValuesBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateCall { 13708 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13709 return c 13710} 13711 13712// Context sets the context to be used in this call's Do method. Any 13713// pending HTTP request will be aborted if the provided context is 13714// canceled. 13715func (c *SpreadsheetsValuesBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateCall { 13716 c.ctx_ = ctx 13717 return c 13718} 13719 13720// Header returns an http.Header that can be modified by the caller to 13721// add HTTP headers to the request. 13722func (c *SpreadsheetsValuesBatchUpdateCall) Header() http.Header { 13723 if c.header_ == nil { 13724 c.header_ = make(http.Header) 13725 } 13726 return c.header_ 13727} 13728 13729func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Response, error) { 13730 reqHeaders := make(http.Header) 13731 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13732 for k, v := range c.header_ { 13733 reqHeaders[k] = v 13734 } 13735 reqHeaders.Set("User-Agent", c.s.userAgent()) 13736 var body io.Reader = nil 13737 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesrequest) 13738 if err != nil { 13739 return nil, err 13740 } 13741 reqHeaders.Set("Content-Type", "application/json") 13742 c.urlParams_.Set("alt", alt) 13743 c.urlParams_.Set("prettyPrint", "false") 13744 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate") 13745 urls += "?" + c.urlParams_.Encode() 13746 req, err := http.NewRequest("POST", urls, body) 13747 if err != nil { 13748 return nil, err 13749 } 13750 req.Header = reqHeaders 13751 googleapi.Expand(req.URL, map[string]string{ 13752 "spreadsheetId": c.spreadsheetId, 13753 }) 13754 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13755} 13756 13757// Do executes the "sheets.spreadsheets.values.batchUpdate" call. 13758// Exactly one of *BatchUpdateValuesResponse or error will be non-nil. 13759// Any non-2xx status code is an error. Response headers are in either 13760// *BatchUpdateValuesResponse.ServerResponse.Header or (if a response 13761// was returned at all) in error.(*googleapi.Error).Header. Use 13762// googleapi.IsNotModified to check whether the returned error was 13763// because http.StatusNotModified was returned. 13764func (c *SpreadsheetsValuesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesResponse, error) { 13765 gensupport.SetOptions(c.urlParams_, opts...) 13766 res, err := c.doRequest("json") 13767 if res != nil && res.StatusCode == http.StatusNotModified { 13768 if res.Body != nil { 13769 res.Body.Close() 13770 } 13771 return nil, &googleapi.Error{ 13772 Code: res.StatusCode, 13773 Header: res.Header, 13774 } 13775 } 13776 if err != nil { 13777 return nil, err 13778 } 13779 defer googleapi.CloseBody(res) 13780 if err := googleapi.CheckResponse(res); err != nil { 13781 return nil, err 13782 } 13783 ret := &BatchUpdateValuesResponse{ 13784 ServerResponse: googleapi.ServerResponse{ 13785 Header: res.Header, 13786 HTTPStatusCode: res.StatusCode, 13787 }, 13788 } 13789 target := &ret 13790 if err := gensupport.DecodeResponse(target, res); err != nil { 13791 return nil, err 13792 } 13793 return ret, nil 13794 // { 13795 // "description": "Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.", 13796 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 13797 // "httpMethod": "POST", 13798 // "id": "sheets.spreadsheets.values.batchUpdate", 13799 // "parameterOrder": [ 13800 // "spreadsheetId" 13801 // ], 13802 // "parameters": { 13803 // "spreadsheetId": { 13804 // "description": "The ID of the spreadsheet to update.", 13805 // "location": "path", 13806 // "required": true, 13807 // "type": "string" 13808 // } 13809 // }, 13810 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", 13811 // "request": { 13812 // "$ref": "BatchUpdateValuesRequest" 13813 // }, 13814 // "response": { 13815 // "$ref": "BatchUpdateValuesResponse" 13816 // }, 13817 // "scopes": [ 13818 // "https://www.googleapis.com/auth/drive", 13819 // "https://www.googleapis.com/auth/drive.file", 13820 // "https://www.googleapis.com/auth/spreadsheets" 13821 // ] 13822 // } 13823 13824} 13825 13826// method id "sheets.spreadsheets.values.batchUpdateByDataFilter": 13827 13828type SpreadsheetsValuesBatchUpdateByDataFilterCall struct { 13829 s *Service 13830 spreadsheetId string 13831 batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest 13832 urlParams_ gensupport.URLParams 13833 ctx_ context.Context 13834 header_ http.Header 13835} 13836 13837// BatchUpdateByDataFilter: Sets values in one or more ranges of a 13838// spreadsheet. The caller must specify the spreadsheet ID, a 13839// valueInputOption, and one or more DataFilterValueRanges. 13840// 13841// - spreadsheetId: The ID of the spreadsheet to update. 13842func (r *SpreadsheetsValuesService) BatchUpdateByDataFilter(spreadsheetId string, batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 13843 c := &SpreadsheetsValuesBatchUpdateByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13844 c.spreadsheetId = spreadsheetId 13845 c.batchupdatevaluesbydatafilterrequest = batchupdatevaluesbydatafilterrequest 13846 return c 13847} 13848 13849// Fields allows partial responses to be retrieved. See 13850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 13851// for more information. 13852func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 13853 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 13854 return c 13855} 13856 13857// Context sets the context to be used in this call's Do method. Any 13858// pending HTTP request will be aborted if the provided context is 13859// canceled. 13860func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateByDataFilterCall { 13861 c.ctx_ = ctx 13862 return c 13863} 13864 13865// Header returns an http.Header that can be modified by the caller to 13866// add HTTP headers to the request. 13867func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Header() http.Header { 13868 if c.header_ == nil { 13869 c.header_ = make(http.Header) 13870 } 13871 return c.header_ 13872} 13873 13874func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (*http.Response, error) { 13875 reqHeaders := make(http.Header) 13876 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 13877 for k, v := range c.header_ { 13878 reqHeaders[k] = v 13879 } 13880 reqHeaders.Set("User-Agent", c.s.userAgent()) 13881 var body io.Reader = nil 13882 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesbydatafilterrequest) 13883 if err != nil { 13884 return nil, err 13885 } 13886 reqHeaders.Set("Content-Type", "application/json") 13887 c.urlParams_.Set("alt", alt) 13888 c.urlParams_.Set("prettyPrint", "false") 13889 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter") 13890 urls += "?" + c.urlParams_.Encode() 13891 req, err := http.NewRequest("POST", urls, body) 13892 if err != nil { 13893 return nil, err 13894 } 13895 req.Header = reqHeaders 13896 googleapi.Expand(req.URL, map[string]string{ 13897 "spreadsheetId": c.spreadsheetId, 13898 }) 13899 return gensupport.SendRequest(c.ctx_, c.s.client, req) 13900} 13901 13902// Do executes the "sheets.spreadsheets.values.batchUpdateByDataFilter" call. 13903// Exactly one of *BatchUpdateValuesByDataFilterResponse or error will 13904// be non-nil. Any non-2xx status code is an error. Response headers are 13905// in either 13906// *BatchUpdateValuesByDataFilterResponse.ServerResponse.Header or (if a 13907// response was returned at all) in error.(*googleapi.Error).Header. Use 13908// googleapi.IsNotModified to check whether the returned error was 13909// because http.StatusNotModified was returned. 13910func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesByDataFilterResponse, error) { 13911 gensupport.SetOptions(c.urlParams_, opts...) 13912 res, err := c.doRequest("json") 13913 if res != nil && res.StatusCode == http.StatusNotModified { 13914 if res.Body != nil { 13915 res.Body.Close() 13916 } 13917 return nil, &googleapi.Error{ 13918 Code: res.StatusCode, 13919 Header: res.Header, 13920 } 13921 } 13922 if err != nil { 13923 return nil, err 13924 } 13925 defer googleapi.CloseBody(res) 13926 if err := googleapi.CheckResponse(res); err != nil { 13927 return nil, err 13928 } 13929 ret := &BatchUpdateValuesByDataFilterResponse{ 13930 ServerResponse: googleapi.ServerResponse{ 13931 Header: res.Header, 13932 HTTPStatusCode: res.StatusCode, 13933 }, 13934 } 13935 target := &ret 13936 if err := gensupport.DecodeResponse(target, res); err != nil { 13937 return nil, err 13938 } 13939 return ret, nil 13940 // { 13941 // "description": "Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.", 13942 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 13943 // "httpMethod": "POST", 13944 // "id": "sheets.spreadsheets.values.batchUpdateByDataFilter", 13945 // "parameterOrder": [ 13946 // "spreadsheetId" 13947 // ], 13948 // "parameters": { 13949 // "spreadsheetId": { 13950 // "description": "The ID of the spreadsheet to update.", 13951 // "location": "path", 13952 // "required": true, 13953 // "type": "string" 13954 // } 13955 // }, 13956 // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", 13957 // "request": { 13958 // "$ref": "BatchUpdateValuesByDataFilterRequest" 13959 // }, 13960 // "response": { 13961 // "$ref": "BatchUpdateValuesByDataFilterResponse" 13962 // }, 13963 // "scopes": [ 13964 // "https://www.googleapis.com/auth/drive", 13965 // "https://www.googleapis.com/auth/drive.file", 13966 // "https://www.googleapis.com/auth/spreadsheets" 13967 // ] 13968 // } 13969 13970} 13971 13972// method id "sheets.spreadsheets.values.clear": 13973 13974type SpreadsheetsValuesClearCall struct { 13975 s *Service 13976 spreadsheetId string 13977 range_ string 13978 clearvaluesrequest *ClearValuesRequest 13979 urlParams_ gensupport.URLParams 13980 ctx_ context.Context 13981 header_ http.Header 13982} 13983 13984// Clear: Clears values from a spreadsheet. The caller must specify the 13985// spreadsheet ID and range. Only values are cleared -- all other 13986// properties of the cell (such as formatting, data validation, etc..) 13987// are kept. 13988// 13989// - range: The A1 notation or R1C1 notation of the values to clear. 13990// - spreadsheetId: The ID of the spreadsheet to update. 13991func (r *SpreadsheetsValuesService) Clear(spreadsheetId string, range_ string, clearvaluesrequest *ClearValuesRequest) *SpreadsheetsValuesClearCall { 13992 c := &SpreadsheetsValuesClearCall{s: r.s, urlParams_: make(gensupport.URLParams)} 13993 c.spreadsheetId = spreadsheetId 13994 c.range_ = range_ 13995 c.clearvaluesrequest = clearvaluesrequest 13996 return c 13997} 13998 13999// Fields allows partial responses to be retrieved. See 14000// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14001// for more information. 14002func (c *SpreadsheetsValuesClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesClearCall { 14003 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14004 return c 14005} 14006 14007// Context sets the context to be used in this call's Do method. Any 14008// pending HTTP request will be aborted if the provided context is 14009// canceled. 14010func (c *SpreadsheetsValuesClearCall) Context(ctx context.Context) *SpreadsheetsValuesClearCall { 14011 c.ctx_ = ctx 14012 return c 14013} 14014 14015// Header returns an http.Header that can be modified by the caller to 14016// add HTTP headers to the request. 14017func (c *SpreadsheetsValuesClearCall) Header() http.Header { 14018 if c.header_ == nil { 14019 c.header_ = make(http.Header) 14020 } 14021 return c.header_ 14022} 14023 14024func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, error) { 14025 reqHeaders := make(http.Header) 14026 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14027 for k, v := range c.header_ { 14028 reqHeaders[k] = v 14029 } 14030 reqHeaders.Set("User-Agent", c.s.userAgent()) 14031 var body io.Reader = nil 14032 body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearvaluesrequest) 14033 if err != nil { 14034 return nil, err 14035 } 14036 reqHeaders.Set("Content-Type", "application/json") 14037 c.urlParams_.Set("alt", alt) 14038 c.urlParams_.Set("prettyPrint", "false") 14039 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear") 14040 urls += "?" + c.urlParams_.Encode() 14041 req, err := http.NewRequest("POST", urls, body) 14042 if err != nil { 14043 return nil, err 14044 } 14045 req.Header = reqHeaders 14046 googleapi.Expand(req.URL, map[string]string{ 14047 "spreadsheetId": c.spreadsheetId, 14048 "range": c.range_, 14049 }) 14050 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14051} 14052 14053// Do executes the "sheets.spreadsheets.values.clear" call. 14054// Exactly one of *ClearValuesResponse or error will be non-nil. Any 14055// non-2xx status code is an error. Response headers are in either 14056// *ClearValuesResponse.ServerResponse.Header or (if a response was 14057// returned at all) in error.(*googleapi.Error).Header. Use 14058// googleapi.IsNotModified to check whether the returned error was 14059// because http.StatusNotModified was returned. 14060func (c *SpreadsheetsValuesClearCall) Do(opts ...googleapi.CallOption) (*ClearValuesResponse, error) { 14061 gensupport.SetOptions(c.urlParams_, opts...) 14062 res, err := c.doRequest("json") 14063 if res != nil && res.StatusCode == http.StatusNotModified { 14064 if res.Body != nil { 14065 res.Body.Close() 14066 } 14067 return nil, &googleapi.Error{ 14068 Code: res.StatusCode, 14069 Header: res.Header, 14070 } 14071 } 14072 if err != nil { 14073 return nil, err 14074 } 14075 defer googleapi.CloseBody(res) 14076 if err := googleapi.CheckResponse(res); err != nil { 14077 return nil, err 14078 } 14079 ret := &ClearValuesResponse{ 14080 ServerResponse: googleapi.ServerResponse{ 14081 Header: res.Header, 14082 HTTPStatusCode: res.StatusCode, 14083 }, 14084 } 14085 target := &ret 14086 if err := gensupport.DecodeResponse(target, res); err != nil { 14087 return nil, err 14088 } 14089 return ret, nil 14090 // { 14091 // "description": "Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.", 14092 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 14093 // "httpMethod": "POST", 14094 // "id": "sheets.spreadsheets.values.clear", 14095 // "parameterOrder": [ 14096 // "spreadsheetId", 14097 // "range" 14098 // ], 14099 // "parameters": { 14100 // "range": { 14101 // "description": "The A1 notation or R1C1 notation of the values to clear.", 14102 // "location": "path", 14103 // "required": true, 14104 // "type": "string" 14105 // }, 14106 // "spreadsheetId": { 14107 // "description": "The ID of the spreadsheet to update.", 14108 // "location": "path", 14109 // "required": true, 14110 // "type": "string" 14111 // } 14112 // }, 14113 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", 14114 // "request": { 14115 // "$ref": "ClearValuesRequest" 14116 // }, 14117 // "response": { 14118 // "$ref": "ClearValuesResponse" 14119 // }, 14120 // "scopes": [ 14121 // "https://www.googleapis.com/auth/drive", 14122 // "https://www.googleapis.com/auth/drive.file", 14123 // "https://www.googleapis.com/auth/spreadsheets" 14124 // ] 14125 // } 14126 14127} 14128 14129// method id "sheets.spreadsheets.values.get": 14130 14131type SpreadsheetsValuesGetCall struct { 14132 s *Service 14133 spreadsheetId string 14134 range_ string 14135 urlParams_ gensupport.URLParams 14136 ifNoneMatch_ string 14137 ctx_ context.Context 14138 header_ http.Header 14139} 14140 14141// Get: Returns a range of values from a spreadsheet. The caller must 14142// specify the spreadsheet ID and a range. 14143// 14144// - range: The A1 notation or R1C1 notation of the range to retrieve 14145// values from. 14146// - spreadsheetId: The ID of the spreadsheet to retrieve data from. 14147func (r *SpreadsheetsValuesService) Get(spreadsheetId string, range_ string) *SpreadsheetsValuesGetCall { 14148 c := &SpreadsheetsValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14149 c.spreadsheetId = spreadsheetId 14150 c.range_ = range_ 14151 return c 14152} 14153 14154// DateTimeRenderOption sets the optional parameter 14155// "dateTimeRenderOption": How dates, times, and durations should be 14156// represented in the output. This is ignored if value_render_option is 14157// FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER. 14158// 14159// Possible values: 14160// "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 14161// fields to be output as doubles in "serial number" format, as 14162// popularized by Lotus 1-2-3. The whole number portion of the value 14163// (left of the decimal) counts the days since December 30th 1899. The 14164// fractional portion (right of the decimal) counts the time as a 14165// fraction of the day. For example, January 1st 1900 at noon would be 14166// 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 14167// noon is half a day. February 1st 1900 at 3pm would be 33.625. This 14168// correctly treats the year 1900 as not a leap year. 14169// "FORMATTED_STRING" - Instructs date, time, datetime, and duration 14170// fields to be output as strings in their given number format (which is 14171// dependent on the spreadsheet locale). 14172func (c *SpreadsheetsValuesGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesGetCall { 14173 c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption) 14174 return c 14175} 14176 14177// MajorDimension sets the optional parameter "majorDimension": The 14178// major dimension that results should use. For example, if the 14179// spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting 14180// `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas 14181// requesting `range=A1:B2,majorDimension=COLUMNS` returns 14182// `[[1,3],[2,4]]`. 14183// 14184// Possible values: 14185// "DIMENSION_UNSPECIFIED" - The default value, do not use. 14186// "ROWS" - Operates on the rows of a sheet. 14187// "COLUMNS" - Operates on the columns of a sheet. 14188func (c *SpreadsheetsValuesGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesGetCall { 14189 c.urlParams_.Set("majorDimension", majorDimension) 14190 return c 14191} 14192 14193// ValueRenderOption sets the optional parameter "valueRenderOption": 14194// How values should be represented in the output. The default render 14195// option is FORMATTED_VALUE. 14196// 14197// Possible values: 14198// "FORMATTED_VALUE" - Values will be calculated & formatted in the 14199// reply according to the cell's formatting. Formatting is based on the 14200// spreadsheet's locale, not the requesting user's locale. For example, 14201// if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 14202// `A2` would return "$1.23". 14203// "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 14204// in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 14205// formatted as currency, then `A2` would return the number `1.23`. 14206// "FORMULA" - Values will not be calculated. The reply will include 14207// the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 14208// formatted as currency, then A2 would return "=A1". 14209func (c *SpreadsheetsValuesGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesGetCall { 14210 c.urlParams_.Set("valueRenderOption", valueRenderOption) 14211 return c 14212} 14213 14214// Fields allows partial responses to be retrieved. See 14215// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14216// for more information. 14217func (c *SpreadsheetsValuesGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesGetCall { 14218 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14219 return c 14220} 14221 14222// IfNoneMatch sets the optional parameter which makes the operation 14223// fail if the object's ETag matches the given value. This is useful for 14224// getting updates only after the object has changed since the last 14225// request. Use googleapi.IsNotModified to check whether the response 14226// error from Do is the result of In-None-Match. 14227func (c *SpreadsheetsValuesGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesGetCall { 14228 c.ifNoneMatch_ = entityTag 14229 return c 14230} 14231 14232// Context sets the context to be used in this call's Do method. Any 14233// pending HTTP request will be aborted if the provided context is 14234// canceled. 14235func (c *SpreadsheetsValuesGetCall) Context(ctx context.Context) *SpreadsheetsValuesGetCall { 14236 c.ctx_ = ctx 14237 return c 14238} 14239 14240// Header returns an http.Header that can be modified by the caller to 14241// add HTTP headers to the request. 14242func (c *SpreadsheetsValuesGetCall) Header() http.Header { 14243 if c.header_ == nil { 14244 c.header_ = make(http.Header) 14245 } 14246 return c.header_ 14247} 14248 14249func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error) { 14250 reqHeaders := make(http.Header) 14251 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14252 for k, v := range c.header_ { 14253 reqHeaders[k] = v 14254 } 14255 reqHeaders.Set("User-Agent", c.s.userAgent()) 14256 if c.ifNoneMatch_ != "" { 14257 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 14258 } 14259 var body io.Reader = nil 14260 c.urlParams_.Set("alt", alt) 14261 c.urlParams_.Set("prettyPrint", "false") 14262 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 14263 urls += "?" + c.urlParams_.Encode() 14264 req, err := http.NewRequest("GET", urls, body) 14265 if err != nil { 14266 return nil, err 14267 } 14268 req.Header = reqHeaders 14269 googleapi.Expand(req.URL, map[string]string{ 14270 "spreadsheetId": c.spreadsheetId, 14271 "range": c.range_, 14272 }) 14273 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14274} 14275 14276// Do executes the "sheets.spreadsheets.values.get" call. 14277// Exactly one of *ValueRange or error will be non-nil. Any non-2xx 14278// status code is an error. Response headers are in either 14279// *ValueRange.ServerResponse.Header or (if a response was returned at 14280// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 14281// to check whether the returned error was because 14282// http.StatusNotModified was returned. 14283func (c *SpreadsheetsValuesGetCall) Do(opts ...googleapi.CallOption) (*ValueRange, error) { 14284 gensupport.SetOptions(c.urlParams_, opts...) 14285 res, err := c.doRequest("json") 14286 if res != nil && res.StatusCode == http.StatusNotModified { 14287 if res.Body != nil { 14288 res.Body.Close() 14289 } 14290 return nil, &googleapi.Error{ 14291 Code: res.StatusCode, 14292 Header: res.Header, 14293 } 14294 } 14295 if err != nil { 14296 return nil, err 14297 } 14298 defer googleapi.CloseBody(res) 14299 if err := googleapi.CheckResponse(res); err != nil { 14300 return nil, err 14301 } 14302 ret := &ValueRange{ 14303 ServerResponse: googleapi.ServerResponse{ 14304 Header: res.Header, 14305 HTTPStatusCode: res.StatusCode, 14306 }, 14307 } 14308 target := &ret 14309 if err := gensupport.DecodeResponse(target, res); err != nil { 14310 return nil, err 14311 } 14312 return ret, nil 14313 // { 14314 // "description": "Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.", 14315 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 14316 // "httpMethod": "GET", 14317 // "id": "sheets.spreadsheets.values.get", 14318 // "parameterOrder": [ 14319 // "spreadsheetId", 14320 // "range" 14321 // ], 14322 // "parameters": { 14323 // "dateTimeRenderOption": { 14324 // "description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", 14325 // "enum": [ 14326 // "SERIAL_NUMBER", 14327 // "FORMATTED_STRING" 14328 // ], 14329 // "enumDescriptions": [ 14330 // "Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", 14331 // "Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale)." 14332 // ], 14333 // "location": "query", 14334 // "type": "string" 14335 // }, 14336 // "majorDimension": { 14337 // "description": "The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.", 14338 // "enum": [ 14339 // "DIMENSION_UNSPECIFIED", 14340 // "ROWS", 14341 // "COLUMNS" 14342 // ], 14343 // "enumDescriptions": [ 14344 // "The default value, do not use.", 14345 // "Operates on the rows of a sheet.", 14346 // "Operates on the columns of a sheet." 14347 // ], 14348 // "location": "query", 14349 // "type": "string" 14350 // }, 14351 // "range": { 14352 // "description": "The A1 notation or R1C1 notation of the range to retrieve values from.", 14353 // "location": "path", 14354 // "required": true, 14355 // "type": "string" 14356 // }, 14357 // "spreadsheetId": { 14358 // "description": "The ID of the spreadsheet to retrieve data from.", 14359 // "location": "path", 14360 // "required": true, 14361 // "type": "string" 14362 // }, 14363 // "valueRenderOption": { 14364 // "description": "How values should be represented in the output. The default render option is FORMATTED_VALUE.", 14365 // "enum": [ 14366 // "FORMATTED_VALUE", 14367 // "UNFORMATTED_VALUE", 14368 // "FORMULA" 14369 // ], 14370 // "enumDescriptions": [ 14371 // "Values will be calculated \u0026 formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", 14372 // "Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", 14373 // "Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`." 14374 // ], 14375 // "location": "query", 14376 // "type": "string" 14377 // } 14378 // }, 14379 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 14380 // "response": { 14381 // "$ref": "ValueRange" 14382 // }, 14383 // "scopes": [ 14384 // "https://www.googleapis.com/auth/drive", 14385 // "https://www.googleapis.com/auth/drive.file", 14386 // "https://www.googleapis.com/auth/drive.readonly", 14387 // "https://www.googleapis.com/auth/spreadsheets", 14388 // "https://www.googleapis.com/auth/spreadsheets.readonly" 14389 // ] 14390 // } 14391 14392} 14393 14394// method id "sheets.spreadsheets.values.update": 14395 14396type SpreadsheetsValuesUpdateCall struct { 14397 s *Service 14398 spreadsheetId string 14399 range_ string 14400 valuerange *ValueRange 14401 urlParams_ gensupport.URLParams 14402 ctx_ context.Context 14403 header_ http.Header 14404} 14405 14406// Update: Sets values in a range of a spreadsheet. The caller must 14407// specify the spreadsheet ID, range, and a valueInputOption. 14408// 14409// - range: The A1 notation of the values to update. 14410// - spreadsheetId: The ID of the spreadsheet to update. 14411func (r *SpreadsheetsValuesService) Update(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesUpdateCall { 14412 c := &SpreadsheetsValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 14413 c.spreadsheetId = spreadsheetId 14414 c.range_ = range_ 14415 c.valuerange = valuerange 14416 return c 14417} 14418 14419// IncludeValuesInResponse sets the optional parameter 14420// "includeValuesInResponse": Determines if the update response should 14421// include the values of the cells that were updated. By default, 14422// responses do not include the updated values. If the range to write 14423// was larger than the range actually written, the response includes all 14424// values in the requested range (excluding trailing empty rows and 14425// columns). 14426func (c *SpreadsheetsValuesUpdateCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesUpdateCall { 14427 c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse)) 14428 return c 14429} 14430 14431// ResponseDateTimeRenderOption sets the optional parameter 14432// "responseDateTimeRenderOption": Determines how dates, times, and 14433// durations in the response should be rendered. This is ignored if 14434// response_value_render_option is FORMATTED_VALUE. The default dateTime 14435// render option is SERIAL_NUMBER. 14436// 14437// Possible values: 14438// "SERIAL_NUMBER" - Instructs date, time, datetime, and duration 14439// fields to be output as doubles in "serial number" format, as 14440// popularized by Lotus 1-2-3. The whole number portion of the value 14441// (left of the decimal) counts the days since December 30th 1899. The 14442// fractional portion (right of the decimal) counts the time as a 14443// fraction of the day. For example, January 1st 1900 at noon would be 14444// 2.5, 2 because it's 2 days after December 30st 1899, and .5 because 14445// noon is half a day. February 1st 1900 at 3pm would be 33.625. This 14446// correctly treats the year 1900 as not a leap year. 14447// "FORMATTED_STRING" - Instructs date, time, datetime, and duration 14448// fields to be output as strings in their given number format (which is 14449// dependent on the spreadsheet locale). 14450func (c *SpreadsheetsValuesUpdateCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesUpdateCall { 14451 c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption) 14452 return c 14453} 14454 14455// ResponseValueRenderOption sets the optional parameter 14456// "responseValueRenderOption": Determines how values in the response 14457// should be rendered. The default render option is FORMATTED_VALUE. 14458// 14459// Possible values: 14460// "FORMATTED_VALUE" - Values will be calculated & formatted in the 14461// reply according to the cell's formatting. Formatting is based on the 14462// spreadsheet's locale, not the requesting user's locale. For example, 14463// if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then 14464// `A2` would return "$1.23". 14465// "UNFORMATTED_VALUE" - Values will be calculated, but not formatted 14466// in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and 14467// formatted as currency, then `A2` would return the number `1.23`. 14468// "FORMULA" - Values will not be calculated. The reply will include 14469// the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and 14470// formatted as currency, then A2 would return "=A1". 14471func (c *SpreadsheetsValuesUpdateCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesUpdateCall { 14472 c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption) 14473 return c 14474} 14475 14476// ValueInputOption sets the optional parameter "valueInputOption": How 14477// the input data should be interpreted. 14478// 14479// Possible values: 14480// "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value 14481// must not be used. 14482// "RAW" - The values the user has entered will not be parsed and will 14483// be stored as-is. 14484// "USER_ENTERED" - The values will be parsed as if the user typed 14485// them into the UI. Numbers will stay as numbers, but strings may be 14486// converted to numbers, dates, etc. following the same rules that are 14487// applied when entering text into a cell via the Google Sheets UI. 14488func (c *SpreadsheetsValuesUpdateCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesUpdateCall { 14489 c.urlParams_.Set("valueInputOption", valueInputOption) 14490 return c 14491} 14492 14493// Fields allows partial responses to be retrieved. See 14494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 14495// for more information. 14496func (c *SpreadsheetsValuesUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesUpdateCall { 14497 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 14498 return c 14499} 14500 14501// Context sets the context to be used in this call's Do method. Any 14502// pending HTTP request will be aborted if the provided context is 14503// canceled. 14504func (c *SpreadsheetsValuesUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesUpdateCall { 14505 c.ctx_ = ctx 14506 return c 14507} 14508 14509// Header returns an http.Header that can be modified by the caller to 14510// add HTTP headers to the request. 14511func (c *SpreadsheetsValuesUpdateCall) Header() http.Header { 14512 if c.header_ == nil { 14513 c.header_ = make(http.Header) 14514 } 14515 return c.header_ 14516} 14517 14518func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, error) { 14519 reqHeaders := make(http.Header) 14520 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210915") 14521 for k, v := range c.header_ { 14522 reqHeaders[k] = v 14523 } 14524 reqHeaders.Set("User-Agent", c.s.userAgent()) 14525 var body io.Reader = nil 14526 body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange) 14527 if err != nil { 14528 return nil, err 14529 } 14530 reqHeaders.Set("Content-Type", "application/json") 14531 c.urlParams_.Set("alt", alt) 14532 c.urlParams_.Set("prettyPrint", "false") 14533 urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}") 14534 urls += "?" + c.urlParams_.Encode() 14535 req, err := http.NewRequest("PUT", urls, body) 14536 if err != nil { 14537 return nil, err 14538 } 14539 req.Header = reqHeaders 14540 googleapi.Expand(req.URL, map[string]string{ 14541 "spreadsheetId": c.spreadsheetId, 14542 "range": c.range_, 14543 }) 14544 return gensupport.SendRequest(c.ctx_, c.s.client, req) 14545} 14546 14547// Do executes the "sheets.spreadsheets.values.update" call. 14548// Exactly one of *UpdateValuesResponse or error will be non-nil. Any 14549// non-2xx status code is an error. Response headers are in either 14550// *UpdateValuesResponse.ServerResponse.Header or (if a response was 14551// returned at all) in error.(*googleapi.Error).Header. Use 14552// googleapi.IsNotModified to check whether the returned error was 14553// because http.StatusNotModified was returned. 14554func (c *SpreadsheetsValuesUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateValuesResponse, error) { 14555 gensupport.SetOptions(c.urlParams_, opts...) 14556 res, err := c.doRequest("json") 14557 if res != nil && res.StatusCode == http.StatusNotModified { 14558 if res.Body != nil { 14559 res.Body.Close() 14560 } 14561 return nil, &googleapi.Error{ 14562 Code: res.StatusCode, 14563 Header: res.Header, 14564 } 14565 } 14566 if err != nil { 14567 return nil, err 14568 } 14569 defer googleapi.CloseBody(res) 14570 if err := googleapi.CheckResponse(res); err != nil { 14571 return nil, err 14572 } 14573 ret := &UpdateValuesResponse{ 14574 ServerResponse: googleapi.ServerResponse{ 14575 Header: res.Header, 14576 HTTPStatusCode: res.StatusCode, 14577 }, 14578 } 14579 target := &ret 14580 if err := gensupport.DecodeResponse(target, res); err != nil { 14581 return nil, err 14582 } 14583 return ret, nil 14584 // { 14585 // "description": "Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.", 14586 // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", 14587 // "httpMethod": "PUT", 14588 // "id": "sheets.spreadsheets.values.update", 14589 // "parameterOrder": [ 14590 // "spreadsheetId", 14591 // "range" 14592 // ], 14593 // "parameters": { 14594 // "includeValuesInResponse": { 14595 // "description": "Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).", 14596 // "location": "query", 14597 // "type": "boolean" 14598 // }, 14599 // "range": { 14600 // "description": "The A1 notation of the values to update.", 14601 // "location": "path", 14602 // "required": true, 14603 // "type": "string" 14604 // }, 14605 // "responseDateTimeRenderOption": { 14606 // "description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", 14607 // "enum": [ 14608 // "SERIAL_NUMBER", 14609 // "FORMATTED_STRING" 14610 // ], 14611 // "enumDescriptions": [ 14612 // "Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30st 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", 14613 // "Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which is dependent on the spreadsheet locale)." 14614 // ], 14615 // "location": "query", 14616 // "type": "string" 14617 // }, 14618 // "responseValueRenderOption": { 14619 // "description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.", 14620 // "enum": [ 14621 // "FORMATTED_VALUE", 14622 // "UNFORMATTED_VALUE", 14623 // "FORMULA" 14624 // ], 14625 // "enumDescriptions": [ 14626 // "Values will be calculated \u0026 formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", 14627 // "Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", 14628 // "Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`." 14629 // ], 14630 // "location": "query", 14631 // "type": "string" 14632 // }, 14633 // "spreadsheetId": { 14634 // "description": "The ID of the spreadsheet to update.", 14635 // "location": "path", 14636 // "required": true, 14637 // "type": "string" 14638 // }, 14639 // "valueInputOption": { 14640 // "description": "How the input data should be interpreted.", 14641 // "enum": [ 14642 // "INPUT_VALUE_OPTION_UNSPECIFIED", 14643 // "RAW", 14644 // "USER_ENTERED" 14645 // ], 14646 // "enumDescriptions": [ 14647 // "Default input value. This value must not be used.", 14648 // "The values the user has entered will not be parsed and will be stored as-is.", 14649 // "The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI." 14650 // ], 14651 // "location": "query", 14652 // "type": "string" 14653 // } 14654 // }, 14655 // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}", 14656 // "request": { 14657 // "$ref": "ValueRange" 14658 // }, 14659 // "response": { 14660 // "$ref": "UpdateValuesResponse" 14661 // }, 14662 // "scopes": [ 14663 // "https://www.googleapis.com/auth/drive", 14664 // "https://www.googleapis.com/auth/drive.file", 14665 // "https://www.googleapis.com/auth/spreadsheets" 14666 // ] 14667 // } 14668 14669} 14670