Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

12593 rindas
497 KiB

  1. // Copyright 2019 Google LLC.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Code generated file. DO NOT EDIT.
  5. // Package sheets provides access to the Google Sheets API.
  6. //
  7. // For product documentation, see: https://developers.google.com/sheets/
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/sheets/v4"
  14. // ...
  15. // ctx := context.Background()
  16. // sheetsService, err := sheets.NewService(ctx)
  17. //
  18. // In this example, Google Application Default Credentials are used for authentication.
  19. //
  20. // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
  21. //
  22. // Other authentication options
  23. //
  24. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // sheetsService, err := sheets.NewService(ctx, option.WithScopes(sheets.SpreadsheetsReadonlyScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // sheetsService, err := sheets.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // sheetsService, err := sheets.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package sheets // import "google.golang.org/api/sheets/v4"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "sheets:v4"
  71. const apiName = "sheets"
  72. const apiVersion = "v4"
  73. const basePath = "https://sheets.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // See, edit, create, and delete all of your Google Drive files
  77. DriveScope = "https://www.googleapis.com/auth/drive"
  78. // View and manage Google Drive files and folders that you have opened
  79. // or created with this app
  80. DriveFileScope = "https://www.googleapis.com/auth/drive.file"
  81. // See and download all your Google Drive files
  82. DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
  83. // See, edit, create, and delete your spreadsheets in Google Drive
  84. SpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets"
  85. // View your Google Spreadsheets
  86. SpreadsheetsReadonlyScope = "https://www.googleapis.com/auth/spreadsheets.readonly"
  87. )
  88. // NewService creates a new Service.
  89. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  90. scopesOption := option.WithScopes(
  91. "https://www.googleapis.com/auth/drive",
  92. "https://www.googleapis.com/auth/drive.file",
  93. "https://www.googleapis.com/auth/drive.readonly",
  94. "https://www.googleapis.com/auth/spreadsheets",
  95. "https://www.googleapis.com/auth/spreadsheets.readonly",
  96. )
  97. // NOTE: prepend, so we don't override user-specified scopes.
  98. opts = append([]option.ClientOption{scopesOption}, opts...)
  99. client, endpoint, err := htransport.NewClient(ctx, opts...)
  100. if err != nil {
  101. return nil, err
  102. }
  103. s, err := New(client)
  104. if err != nil {
  105. return nil, err
  106. }
  107. if endpoint != "" {
  108. s.BasePath = endpoint
  109. }
  110. return s, nil
  111. }
  112. // New creates a new Service. It uses the provided http.Client for requests.
  113. //
  114. // Deprecated: please use NewService instead.
  115. // To provide a custom HTTP client, use option.WithHTTPClient.
  116. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  117. func New(client *http.Client) (*Service, error) {
  118. if client == nil {
  119. return nil, errors.New("client is nil")
  120. }
  121. s := &Service{client: client, BasePath: basePath}
  122. s.Spreadsheets = NewSpreadsheetsService(s)
  123. return s, nil
  124. }
  125. type Service struct {
  126. client *http.Client
  127. BasePath string // API endpoint base URL
  128. UserAgent string // optional additional User-Agent fragment
  129. Spreadsheets *SpreadsheetsService
  130. }
  131. func (s *Service) userAgent() string {
  132. if s.UserAgent == "" {
  133. return googleapi.UserAgent
  134. }
  135. return googleapi.UserAgent + " " + s.UserAgent
  136. }
  137. func NewSpreadsheetsService(s *Service) *SpreadsheetsService {
  138. rs := &SpreadsheetsService{s: s}
  139. rs.DeveloperMetadata = NewSpreadsheetsDeveloperMetadataService(s)
  140. rs.Sheets = NewSpreadsheetsSheetsService(s)
  141. rs.Values = NewSpreadsheetsValuesService(s)
  142. return rs
  143. }
  144. type SpreadsheetsService struct {
  145. s *Service
  146. DeveloperMetadata *SpreadsheetsDeveloperMetadataService
  147. Sheets *SpreadsheetsSheetsService
  148. Values *SpreadsheetsValuesService
  149. }
  150. func NewSpreadsheetsDeveloperMetadataService(s *Service) *SpreadsheetsDeveloperMetadataService {
  151. rs := &SpreadsheetsDeveloperMetadataService{s: s}
  152. return rs
  153. }
  154. type SpreadsheetsDeveloperMetadataService struct {
  155. s *Service
  156. }
  157. func NewSpreadsheetsSheetsService(s *Service) *SpreadsheetsSheetsService {
  158. rs := &SpreadsheetsSheetsService{s: s}
  159. return rs
  160. }
  161. type SpreadsheetsSheetsService struct {
  162. s *Service
  163. }
  164. func NewSpreadsheetsValuesService(s *Service) *SpreadsheetsValuesService {
  165. rs := &SpreadsheetsValuesService{s: s}
  166. return rs
  167. }
  168. type SpreadsheetsValuesService struct {
  169. s *Service
  170. }
  171. // AddBandingRequest: Adds a new banded range to the spreadsheet.
  172. type AddBandingRequest struct {
  173. // BandedRange: The banded range to add. The bandedRangeId
  174. // field is optional; if one is not set, an id will be randomly
  175. // generated. (It
  176. // is an error to specify the ID of a range that already exists.)
  177. BandedRange *BandedRange `json:"bandedRange,omitempty"`
  178. // ForceSendFields is a list of field names (e.g. "BandedRange") to
  179. // unconditionally include in API requests. By default, fields with
  180. // empty values are omitted from API requests. However, any non-pointer,
  181. // non-interface field appearing in ForceSendFields will be sent to the
  182. // server regardless of whether the field is empty or not. This may be
  183. // used to include empty fields in Patch requests.
  184. ForceSendFields []string `json:"-"`
  185. // NullFields is a list of field names (e.g. "BandedRange") to include
  186. // in API requests with the JSON null value. By default, fields with
  187. // empty values are omitted from API requests. However, any field with
  188. // an empty value appearing in NullFields will be sent to the server as
  189. // null. It is an error if a field in this list has a non-empty value.
  190. // This may be used to include null fields in Patch requests.
  191. NullFields []string `json:"-"`
  192. }
  193. func (s *AddBandingRequest) MarshalJSON() ([]byte, error) {
  194. type NoMethod AddBandingRequest
  195. raw := NoMethod(*s)
  196. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  197. }
  198. // AddBandingResponse: The result of adding a banded range.
  199. type AddBandingResponse struct {
  200. // BandedRange: The banded range that was added.
  201. BandedRange *BandedRange `json:"bandedRange,omitempty"`
  202. // ForceSendFields is a list of field names (e.g. "BandedRange") to
  203. // unconditionally include in API requests. By default, fields with
  204. // empty values are omitted from API requests. However, any non-pointer,
  205. // non-interface field appearing in ForceSendFields will be sent to the
  206. // server regardless of whether the field is empty or not. This may be
  207. // used to include empty fields in Patch requests.
  208. ForceSendFields []string `json:"-"`
  209. // NullFields is a list of field names (e.g. "BandedRange") to include
  210. // in API requests with the JSON null value. By default, fields with
  211. // empty values are omitted from API requests. However, any field with
  212. // an empty value appearing in NullFields will be sent to the server as
  213. // null. It is an error if a field in this list has a non-empty value.
  214. // This may be used to include null fields in Patch requests.
  215. NullFields []string `json:"-"`
  216. }
  217. func (s *AddBandingResponse) MarshalJSON() ([]byte, error) {
  218. type NoMethod AddBandingResponse
  219. raw := NoMethod(*s)
  220. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  221. }
  222. // AddChartRequest: Adds a chart to a sheet in the spreadsheet.
  223. type AddChartRequest struct {
  224. // Chart: The chart that should be added to the spreadsheet, including
  225. // the position
  226. // where it should be placed. The chartId
  227. // field is optional; if one is not set, an id will be randomly
  228. // generated. (It
  229. // is an error to specify the ID of a chart that already exists.)
  230. Chart *EmbeddedChart `json:"chart,omitempty"`
  231. // ForceSendFields is a list of field names (e.g. "Chart") to
  232. // unconditionally include in API requests. By default, fields with
  233. // empty values are omitted from API requests. However, any non-pointer,
  234. // non-interface field appearing in ForceSendFields will be sent to the
  235. // server regardless of whether the field is empty or not. This may be
  236. // used to include empty fields in Patch requests.
  237. ForceSendFields []string `json:"-"`
  238. // NullFields is a list of field names (e.g. "Chart") to include in API
  239. // requests with the JSON null value. By default, fields with empty
  240. // values are omitted from API requests. However, any field with an
  241. // empty value appearing in NullFields will be sent to the server as
  242. // null. It is an error if a field in this list has a non-empty value.
  243. // This may be used to include null fields in Patch requests.
  244. NullFields []string `json:"-"`
  245. }
  246. func (s *AddChartRequest) MarshalJSON() ([]byte, error) {
  247. type NoMethod AddChartRequest
  248. raw := NoMethod(*s)
  249. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  250. }
  251. // AddChartResponse: The result of adding a chart to a spreadsheet.
  252. type AddChartResponse struct {
  253. // Chart: The newly added chart.
  254. Chart *EmbeddedChart `json:"chart,omitempty"`
  255. // ForceSendFields is a list of field names (e.g. "Chart") to
  256. // unconditionally include in API requests. By default, fields with
  257. // empty values are omitted from API requests. However, any non-pointer,
  258. // non-interface field appearing in ForceSendFields will be sent to the
  259. // server regardless of whether the field is empty or not. This may be
  260. // used to include empty fields in Patch requests.
  261. ForceSendFields []string `json:"-"`
  262. // NullFields is a list of field names (e.g. "Chart") to include in API
  263. // requests with the JSON null value. By default, fields with empty
  264. // values are omitted from API requests. However, any field with an
  265. // empty value appearing in NullFields will be sent to the server as
  266. // null. It is an error if a field in this list has a non-empty value.
  267. // This may be used to include null fields in Patch requests.
  268. NullFields []string `json:"-"`
  269. }
  270. func (s *AddChartResponse) MarshalJSON() ([]byte, error) {
  271. type NoMethod AddChartResponse
  272. raw := NoMethod(*s)
  273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  274. }
  275. // AddConditionalFormatRuleRequest: Adds a new conditional format rule
  276. // at the given index.
  277. // All subsequent rules' indexes are incremented.
  278. type AddConditionalFormatRuleRequest struct {
  279. // Index: The zero-based index where the rule should be inserted.
  280. Index int64 `json:"index,omitempty"`
  281. // Rule: The rule to add.
  282. Rule *ConditionalFormatRule `json:"rule,omitempty"`
  283. // ForceSendFields is a list of field names (e.g. "Index") to
  284. // unconditionally include in API requests. By default, fields with
  285. // empty values are omitted from API requests. However, any non-pointer,
  286. // non-interface field appearing in ForceSendFields will be sent to the
  287. // server regardless of whether the field is empty or not. This may be
  288. // used to include empty fields in Patch requests.
  289. ForceSendFields []string `json:"-"`
  290. // NullFields is a list of field names (e.g. "Index") to include in API
  291. // requests with the JSON null value. By default, fields with empty
  292. // values are omitted from API requests. However, any field with an
  293. // empty value appearing in NullFields will be sent to the server as
  294. // null. It is an error if a field in this list has a non-empty value.
  295. // This may be used to include null fields in Patch requests.
  296. NullFields []string `json:"-"`
  297. }
  298. func (s *AddConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
  299. type NoMethod AddConditionalFormatRuleRequest
  300. raw := NoMethod(*s)
  301. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  302. }
  303. // AddDimensionGroupRequest: Creates a group over the specified
  304. // range.
  305. //
  306. // If the requested range is a superset of the range of an existing
  307. // group G,
  308. // then the depth of G is incremented and this new group G' has
  309. // the
  310. // depth of that group. For example, a group [C:D, depth 1] + [B:E]
  311. // results in
  312. // groups [B:E, depth 1] and [C:D, depth 2].
  313. // If the requested range is a subset of the range of an existing group
  314. // G,
  315. // then the depth of the new group G' becomes one greater than the depth
  316. // of G.
  317. // For example, a group [B:E, depth 1] + [C:D] results in groups [B:E,
  318. // depth 1]
  319. // and [C:D, depth 2].
  320. // If the requested range starts before and ends within, or starts
  321. // within and
  322. // ends after, the range of an existing group G, then the range of the
  323. // existing
  324. // group G becomes the union of the ranges, and the new group G'
  325. // has
  326. // depth one greater than the depth of G and range as the intersection
  327. // of the
  328. // ranges. For example, a group [B:D, depth 1] + [C:E] results in groups
  329. // [B:E,
  330. // depth 1] and [C:D, depth 2].
  331. type AddDimensionGroupRequest struct {
  332. // Range: The range over which to create a group.
  333. Range *DimensionRange `json:"range,omitempty"`
  334. // ForceSendFields is a list of field names (e.g. "Range") to
  335. // unconditionally include in API requests. By default, fields with
  336. // empty values are omitted from API requests. However, any non-pointer,
  337. // non-interface field appearing in ForceSendFields will be sent to the
  338. // server regardless of whether the field is empty or not. This may be
  339. // used to include empty fields in Patch requests.
  340. ForceSendFields []string `json:"-"`
  341. // NullFields is a list of field names (e.g. "Range") to include in API
  342. // requests with the JSON null value. By default, fields with empty
  343. // values are omitted from API requests. However, any field with an
  344. // empty value appearing in NullFields will be sent to the server as
  345. // null. It is an error if a field in this list has a non-empty value.
  346. // This may be used to include null fields in Patch requests.
  347. NullFields []string `json:"-"`
  348. }
  349. func (s *AddDimensionGroupRequest) MarshalJSON() ([]byte, error) {
  350. type NoMethod AddDimensionGroupRequest
  351. raw := NoMethod(*s)
  352. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  353. }
  354. // AddDimensionGroupResponse: The result of adding a group.
  355. type AddDimensionGroupResponse struct {
  356. // DimensionGroups: All groups of a dimension after adding a group to
  357. // that dimension.
  358. DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"`
  359. // ForceSendFields is a list of field names (e.g. "DimensionGroups") to
  360. // unconditionally include in API requests. By default, fields with
  361. // empty values are omitted from API requests. However, any non-pointer,
  362. // non-interface field appearing in ForceSendFields will be sent to the
  363. // server regardless of whether the field is empty or not. This may be
  364. // used to include empty fields in Patch requests.
  365. ForceSendFields []string `json:"-"`
  366. // NullFields is a list of field names (e.g. "DimensionGroups") to
  367. // include in API requests with the JSON null value. By default, fields
  368. // with empty values are omitted from API requests. However, any field
  369. // with an empty value appearing in NullFields will be sent to the
  370. // server as null. It is an error if a field in this list has a
  371. // non-empty value. This may be used to include null fields in Patch
  372. // requests.
  373. NullFields []string `json:"-"`
  374. }
  375. func (s *AddDimensionGroupResponse) MarshalJSON() ([]byte, error) {
  376. type NoMethod AddDimensionGroupResponse
  377. raw := NoMethod(*s)
  378. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  379. }
  380. // AddFilterViewRequest: Adds a filter view.
  381. type AddFilterViewRequest struct {
  382. // Filter: The filter to add. The filterViewId
  383. // field is optional; if one is not set, an id will be randomly
  384. // generated. (It
  385. // is an error to specify the ID of a filter that already exists.)
  386. Filter *FilterView `json:"filter,omitempty"`
  387. // ForceSendFields is a list of field names (e.g. "Filter") to
  388. // unconditionally include in API requests. By default, fields with
  389. // empty values are omitted from API requests. However, any non-pointer,
  390. // non-interface field appearing in ForceSendFields will be sent to the
  391. // server regardless of whether the field is empty or not. This may be
  392. // used to include empty fields in Patch requests.
  393. ForceSendFields []string `json:"-"`
  394. // NullFields is a list of field names (e.g. "Filter") to include in API
  395. // requests with the JSON null value. By default, fields with empty
  396. // values are omitted from API requests. However, any field with an
  397. // empty value appearing in NullFields will be sent to the server as
  398. // null. It is an error if a field in this list has a non-empty value.
  399. // This may be used to include null fields in Patch requests.
  400. NullFields []string `json:"-"`
  401. }
  402. func (s *AddFilterViewRequest) MarshalJSON() ([]byte, error) {
  403. type NoMethod AddFilterViewRequest
  404. raw := NoMethod(*s)
  405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  406. }
  407. // AddFilterViewResponse: The result of adding a filter view.
  408. type AddFilterViewResponse struct {
  409. // Filter: The newly added filter view.
  410. Filter *FilterView `json:"filter,omitempty"`
  411. // ForceSendFields is a list of field names (e.g. "Filter") to
  412. // unconditionally include in API requests. By default, fields with
  413. // empty values are omitted from API requests. However, any non-pointer,
  414. // non-interface field appearing in ForceSendFields will be sent to the
  415. // server regardless of whether the field is empty or not. This may be
  416. // used to include empty fields in Patch requests.
  417. ForceSendFields []string `json:"-"`
  418. // NullFields is a list of field names (e.g. "Filter") to include in API
  419. // requests with the JSON null value. By default, fields with empty
  420. // values are omitted from API requests. However, any field with an
  421. // empty value appearing in NullFields will be sent to the server as
  422. // null. It is an error if a field in this list has a non-empty value.
  423. // This may be used to include null fields in Patch requests.
  424. NullFields []string `json:"-"`
  425. }
  426. func (s *AddFilterViewResponse) MarshalJSON() ([]byte, error) {
  427. type NoMethod AddFilterViewResponse
  428. raw := NoMethod(*s)
  429. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  430. }
  431. // AddNamedRangeRequest: Adds a named range to the spreadsheet.
  432. type AddNamedRangeRequest struct {
  433. // NamedRange: The named range to add. The namedRangeId
  434. // field is optional; if one is not set, an id will be randomly
  435. // generated. (It
  436. // is an error to specify the ID of a range that already exists.)
  437. NamedRange *NamedRange `json:"namedRange,omitempty"`
  438. // ForceSendFields is a list of field names (e.g. "NamedRange") to
  439. // unconditionally include in API requests. By default, fields with
  440. // empty values are omitted from API requests. However, any non-pointer,
  441. // non-interface field appearing in ForceSendFields will be sent to the
  442. // server regardless of whether the field is empty or not. This may be
  443. // used to include empty fields in Patch requests.
  444. ForceSendFields []string `json:"-"`
  445. // NullFields is a list of field names (e.g. "NamedRange") to include in
  446. // API 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. func (s *AddNamedRangeRequest) MarshalJSON() ([]byte, error) {
  454. type NoMethod AddNamedRangeRequest
  455. raw := NoMethod(*s)
  456. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  457. }
  458. // AddNamedRangeResponse: The result of adding a named range.
  459. type AddNamedRangeResponse struct {
  460. // NamedRange: The named range to add.
  461. NamedRange *NamedRange `json:"namedRange,omitempty"`
  462. // ForceSendFields is a list of field names (e.g. "NamedRange") to
  463. // unconditionally include in API requests. By default, fields with
  464. // empty values are omitted from API requests. However, any non-pointer,
  465. // non-interface field appearing in ForceSendFields will be sent to the
  466. // server regardless of whether the field is empty or not. This may be
  467. // used to include empty fields in Patch requests.
  468. ForceSendFields []string `json:"-"`
  469. // NullFields is a list of field names (e.g. "NamedRange") to include in
  470. // API requests with the JSON null value. By default, fields with empty
  471. // values are omitted from API requests. However, any field with an
  472. // empty value appearing in NullFields will be sent to the server as
  473. // null. It is an error if a field in this list has a non-empty value.
  474. // This may be used to include null fields in Patch requests.
  475. NullFields []string `json:"-"`
  476. }
  477. func (s *AddNamedRangeResponse) MarshalJSON() ([]byte, error) {
  478. type NoMethod AddNamedRangeResponse
  479. raw := NoMethod(*s)
  480. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  481. }
  482. // AddProtectedRangeRequest: Adds a new protected range.
  483. type AddProtectedRangeRequest struct {
  484. // ProtectedRange: The protected range to be added. The
  485. // protectedRangeId field is optional; if
  486. // one is not set, an id will be randomly generated. (It is an error
  487. // to
  488. // specify the ID of a range that already exists.)
  489. ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
  490. // ForceSendFields is a list of field names (e.g. "ProtectedRange") to
  491. // unconditionally include in API requests. By default, fields with
  492. // empty values are omitted from API requests. However, any non-pointer,
  493. // non-interface field appearing in ForceSendFields will be sent to the
  494. // server regardless of whether the field is empty or not. This may be
  495. // used to include empty fields in Patch requests.
  496. ForceSendFields []string `json:"-"`
  497. // NullFields is a list of field names (e.g. "ProtectedRange") to
  498. // include in API requests with the JSON null value. By default, fields
  499. // with empty values are omitted from API requests. However, any field
  500. // with an empty value appearing in NullFields will be sent to the
  501. // server as null. It is an error if a field in this list has a
  502. // non-empty value. This may be used to include null fields in Patch
  503. // requests.
  504. NullFields []string `json:"-"`
  505. }
  506. func (s *AddProtectedRangeRequest) MarshalJSON() ([]byte, error) {
  507. type NoMethod AddProtectedRangeRequest
  508. raw := NoMethod(*s)
  509. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  510. }
  511. // AddProtectedRangeResponse: The result of adding a new protected
  512. // range.
  513. type AddProtectedRangeResponse struct {
  514. // ProtectedRange: The newly added protected range.
  515. ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
  516. // ForceSendFields is a list of field names (e.g. "ProtectedRange") to
  517. // unconditionally include in API requests. By default, fields with
  518. // empty values are omitted from API requests. However, any non-pointer,
  519. // non-interface field appearing in ForceSendFields will be sent to the
  520. // server regardless of whether the field is empty or not. This may be
  521. // used to include empty fields in Patch requests.
  522. ForceSendFields []string `json:"-"`
  523. // NullFields is a list of field names (e.g. "ProtectedRange") to
  524. // include in API requests with the JSON null value. By default, fields
  525. // with empty values are omitted from API requests. However, any field
  526. // with an empty value appearing in NullFields will be sent to the
  527. // server as null. It is an error if a field in this list has a
  528. // non-empty value. This may be used to include null fields in Patch
  529. // requests.
  530. NullFields []string `json:"-"`
  531. }
  532. func (s *AddProtectedRangeResponse) MarshalJSON() ([]byte, error) {
  533. type NoMethod AddProtectedRangeResponse
  534. raw := NoMethod(*s)
  535. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  536. }
  537. // AddSheetRequest: Adds a new sheet.
  538. // When a sheet is added at a given index,
  539. // all subsequent sheets' indexes are incremented.
  540. // To add an object sheet, use AddChartRequest instead and
  541. // specify
  542. // EmbeddedObjectPosition.sheetId or
  543. // EmbeddedObjectPosition.newSheet.
  544. type AddSheetRequest struct {
  545. // Properties: The properties the new sheet should have.
  546. // All properties are optional.
  547. // The sheetId field is optional; if one is not
  548. // set, an id will be randomly generated. (It is an error to specify the
  549. // ID
  550. // of a sheet that already exists.)
  551. Properties *SheetProperties `json:"properties,omitempty"`
  552. // ForceSendFields is a list of field names (e.g. "Properties") to
  553. // unconditionally include in API requests. By default, fields with
  554. // empty values are omitted from API requests. However, any non-pointer,
  555. // non-interface field appearing in ForceSendFields will be sent to the
  556. // server regardless of whether the field is empty or not. This may be
  557. // used to include empty fields in Patch requests.
  558. ForceSendFields []string `json:"-"`
  559. // NullFields is a list of field names (e.g. "Properties") to include in
  560. // API requests with the JSON null value. By default, fields with empty
  561. // values are omitted from API requests. However, any field with an
  562. // empty value appearing in NullFields will be sent to the server as
  563. // null. It is an error if a field in this list has a non-empty value.
  564. // This may be used to include null fields in Patch requests.
  565. NullFields []string `json:"-"`
  566. }
  567. func (s *AddSheetRequest) MarshalJSON() ([]byte, error) {
  568. type NoMethod AddSheetRequest
  569. raw := NoMethod(*s)
  570. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  571. }
  572. // AddSheetResponse: The result of adding a sheet.
  573. type AddSheetResponse struct {
  574. // Properties: The properties of the newly added sheet.
  575. Properties *SheetProperties `json:"properties,omitempty"`
  576. // ForceSendFields is a list of field names (e.g. "Properties") to
  577. // unconditionally include in API requests. By default, fields with
  578. // empty values are omitted from API requests. However, any non-pointer,
  579. // non-interface field appearing in ForceSendFields will be sent to the
  580. // server regardless of whether the field is empty or not. This may be
  581. // used to include empty fields in Patch requests.
  582. ForceSendFields []string `json:"-"`
  583. // NullFields is a list of field names (e.g. "Properties") to include in
  584. // API requests with the JSON null value. By default, fields with empty
  585. // values are omitted from API requests. However, any field with an
  586. // empty value appearing in NullFields will be sent to the server as
  587. // null. It is an error if a field in this list has a non-empty value.
  588. // This may be used to include null fields in Patch requests.
  589. NullFields []string `json:"-"`
  590. }
  591. func (s *AddSheetResponse) MarshalJSON() ([]byte, error) {
  592. type NoMethod AddSheetResponse
  593. raw := NoMethod(*s)
  594. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  595. }
  596. // AppendCellsRequest: Adds new cells after the last row with data in a
  597. // sheet,
  598. // inserting new rows into the sheet if necessary.
  599. type AppendCellsRequest struct {
  600. // Fields: The fields of CellData that should be updated.
  601. // At least one field must be specified.
  602. // The root is the CellData; 'row.values.' should not be specified.
  603. // A single "*" can be used as short-hand for listing every field.
  604. Fields string `json:"fields,omitempty"`
  605. // Rows: The data to append.
  606. Rows []*RowData `json:"rows,omitempty"`
  607. // SheetId: The sheet ID to append the data to.
  608. SheetId int64 `json:"sheetId,omitempty"`
  609. // ForceSendFields is a list of field names (e.g. "Fields") to
  610. // unconditionally include in API requests. By default, fields with
  611. // empty values are omitted from API requests. However, any non-pointer,
  612. // non-interface field appearing in ForceSendFields will be sent to the
  613. // server regardless of whether the field is empty or not. This may be
  614. // used to include empty fields in Patch requests.
  615. ForceSendFields []string `json:"-"`
  616. // NullFields is a list of field names (e.g. "Fields") to include in API
  617. // requests with the JSON null value. By default, fields with empty
  618. // values are omitted from API requests. However, any field with an
  619. // empty value appearing in NullFields will be sent to the server as
  620. // null. It is an error if a field in this list has a non-empty value.
  621. // This may be used to include null fields in Patch requests.
  622. NullFields []string `json:"-"`
  623. }
  624. func (s *AppendCellsRequest) MarshalJSON() ([]byte, error) {
  625. type NoMethod AppendCellsRequest
  626. raw := NoMethod(*s)
  627. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  628. }
  629. // AppendDimensionRequest: Appends rows or columns to the end of a
  630. // sheet.
  631. type AppendDimensionRequest struct {
  632. // Dimension: Whether rows or columns should be appended.
  633. //
  634. // Possible values:
  635. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  636. // "ROWS" - Operates on the rows of a sheet.
  637. // "COLUMNS" - Operates on the columns of a sheet.
  638. Dimension string `json:"dimension,omitempty"`
  639. // Length: The number of rows or columns to append.
  640. Length int64 `json:"length,omitempty"`
  641. // SheetId: The sheet to append rows or columns to.
  642. SheetId int64 `json:"sheetId,omitempty"`
  643. // ForceSendFields is a list of field names (e.g. "Dimension") to
  644. // unconditionally include in API requests. By default, fields with
  645. // empty values are omitted from API requests. However, any non-pointer,
  646. // non-interface field appearing in ForceSendFields will be sent to the
  647. // server regardless of whether the field is empty or not. This may be
  648. // used to include empty fields in Patch requests.
  649. ForceSendFields []string `json:"-"`
  650. // NullFields is a list of field names (e.g. "Dimension") to include in
  651. // API requests with the JSON null value. By default, fields with empty
  652. // values are omitted from API requests. However, any field with an
  653. // empty value appearing in NullFields will be sent to the server as
  654. // null. It is an error if a field in this list has a non-empty value.
  655. // This may be used to include null fields in Patch requests.
  656. NullFields []string `json:"-"`
  657. }
  658. func (s *AppendDimensionRequest) MarshalJSON() ([]byte, error) {
  659. type NoMethod AppendDimensionRequest
  660. raw := NoMethod(*s)
  661. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  662. }
  663. // AppendValuesResponse: The response when updating a range of values in
  664. // a spreadsheet.
  665. type AppendValuesResponse struct {
  666. // SpreadsheetId: The spreadsheet the updates were applied to.
  667. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  668. // TableRange: The range (in A1 notation) of the table that values are
  669. // being appended to
  670. // (before the values were appended).
  671. // Empty if no table was found.
  672. TableRange string `json:"tableRange,omitempty"`
  673. // Updates: Information about the updates that were applied.
  674. Updates *UpdateValuesResponse `json:"updates,omitempty"`
  675. // ServerResponse contains the HTTP response code and headers from the
  676. // server.
  677. googleapi.ServerResponse `json:"-"`
  678. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  679. // unconditionally include in API requests. By default, fields with
  680. // empty values are omitted from API requests. However, any non-pointer,
  681. // non-interface field appearing in ForceSendFields will be sent to the
  682. // server regardless of whether the field is empty or not. This may be
  683. // used to include empty fields in Patch requests.
  684. ForceSendFields []string `json:"-"`
  685. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  686. // in API requests with the JSON null value. By default, fields with
  687. // empty values are omitted from API requests. However, any field with
  688. // an empty value appearing in NullFields will be sent to the server as
  689. // null. It is an error if a field in this list has a non-empty value.
  690. // This may be used to include null fields in Patch requests.
  691. NullFields []string `json:"-"`
  692. }
  693. func (s *AppendValuesResponse) MarshalJSON() ([]byte, error) {
  694. type NoMethod AppendValuesResponse
  695. raw := NoMethod(*s)
  696. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  697. }
  698. // AutoFillRequest: Fills in more data based on existing data.
  699. type AutoFillRequest struct {
  700. // Range: The range to autofill. This will examine the range and
  701. // detect
  702. // the location that has data and automatically fill that data
  703. // in to the rest of the range.
  704. Range *GridRange `json:"range,omitempty"`
  705. // SourceAndDestination: The source and destination areas to
  706. // autofill.
  707. // This explicitly lists the source of the autofill and where to
  708. // extend that data.
  709. SourceAndDestination *SourceAndDestination `json:"sourceAndDestination,omitempty"`
  710. // UseAlternateSeries: True if we should generate data with the
  711. // "alternate" series.
  712. // This differs based on the type and amount of source data.
  713. UseAlternateSeries bool `json:"useAlternateSeries,omitempty"`
  714. // ForceSendFields is a list of field names (e.g. "Range") to
  715. // unconditionally include in API requests. By default, fields with
  716. // empty values are omitted from API requests. However, any non-pointer,
  717. // non-interface field appearing in ForceSendFields will be sent to the
  718. // server regardless of whether the field is empty or not. This may be
  719. // used to include empty fields in Patch requests.
  720. ForceSendFields []string `json:"-"`
  721. // NullFields is a list of field names (e.g. "Range") to include in API
  722. // requests with the JSON null value. By default, fields with empty
  723. // values are omitted from API requests. However, any field with an
  724. // empty value appearing in NullFields will be sent to the server as
  725. // null. It is an error if a field in this list has a non-empty value.
  726. // This may be used to include null fields in Patch requests.
  727. NullFields []string `json:"-"`
  728. }
  729. func (s *AutoFillRequest) MarshalJSON() ([]byte, error) {
  730. type NoMethod AutoFillRequest
  731. raw := NoMethod(*s)
  732. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  733. }
  734. // AutoResizeDimensionsRequest: Automatically resizes one or more
  735. // dimensions based on the contents
  736. // of the cells in that dimension.
  737. type AutoResizeDimensionsRequest struct {
  738. // Dimensions: The dimensions to automatically resize.
  739. Dimensions *DimensionRange `json:"dimensions,omitempty"`
  740. // ForceSendFields is a list of field names (e.g. "Dimensions") to
  741. // unconditionally include in API requests. By default, fields with
  742. // empty values are omitted from API requests. However, any non-pointer,
  743. // non-interface field appearing in ForceSendFields will be sent to the
  744. // server regardless of whether the field is empty or not. This may be
  745. // used to include empty fields in Patch requests.
  746. ForceSendFields []string `json:"-"`
  747. // NullFields is a list of field names (e.g. "Dimensions") to include in
  748. // API requests with the JSON null value. By default, fields with empty
  749. // values are omitted from API requests. However, any field with an
  750. // empty value appearing in NullFields will be sent to the server as
  751. // null. It is an error if a field in this list has a non-empty value.
  752. // This may be used to include null fields in Patch requests.
  753. NullFields []string `json:"-"`
  754. }
  755. func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) {
  756. type NoMethod AutoResizeDimensionsRequest
  757. raw := NoMethod(*s)
  758. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  759. }
  760. // BandedRange: A banded (alternating colors) range in a sheet.
  761. type BandedRange struct {
  762. // BandedRangeId: The id of the banded range.
  763. BandedRangeId int64 `json:"bandedRangeId,omitempty"`
  764. // ColumnProperties: Properties for column bands. These properties are
  765. // applied on a column-
  766. // by-column basis throughout all the columns in the range. At least one
  767. // of
  768. // row_properties or column_properties must be specified.
  769. ColumnProperties *BandingProperties `json:"columnProperties,omitempty"`
  770. // Range: The range over which these properties are applied.
  771. Range *GridRange `json:"range,omitempty"`
  772. // RowProperties: Properties for row bands. These properties are applied
  773. // on a row-by-row
  774. // basis throughout all the rows in the range. At least one
  775. // of
  776. // row_properties or column_properties must be specified.
  777. RowProperties *BandingProperties `json:"rowProperties,omitempty"`
  778. // ForceSendFields is a list of field names (e.g. "BandedRangeId") to
  779. // unconditionally include in API requests. By default, fields with
  780. // empty values are omitted from API requests. However, any non-pointer,
  781. // non-interface field appearing in ForceSendFields will be sent to the
  782. // server regardless of whether the field is empty or not. This may be
  783. // used to include empty fields in Patch requests.
  784. ForceSendFields []string `json:"-"`
  785. // NullFields is a list of field names (e.g. "BandedRangeId") to include
  786. // in API requests with the JSON null value. By default, fields with
  787. // empty values are omitted from API requests. However, any field with
  788. // an empty value appearing in NullFields will be sent to the server as
  789. // null. It is an error if a field in this list has a non-empty value.
  790. // This may be used to include null fields in Patch requests.
  791. NullFields []string `json:"-"`
  792. }
  793. func (s *BandedRange) MarshalJSON() ([]byte, error) {
  794. type NoMethod BandedRange
  795. raw := NoMethod(*s)
  796. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  797. }
  798. // BandingProperties: Properties referring a single dimension (either
  799. // row or column). If both
  800. // BandedRange.row_properties and BandedRange.column_properties are
  801. // set, the fill colors are applied to cells according to the following
  802. // rules:
  803. //
  804. // * header_color and footer_color take priority over band colors.
  805. // * first_band_color takes priority over second_band_color.
  806. // * row_properties takes priority over column_properties.
  807. //
  808. // For example, the first row color takes priority over the first
  809. // column
  810. // color, but the first column color takes priority over the second row
  811. // color.
  812. // Similarly, the row header takes priority over the column header in
  813. // the
  814. // top left cell, but the column header takes priority over the first
  815. // row
  816. // color if the row header is not set.
  817. type BandingProperties struct {
  818. // FirstBandColor: The first color that is alternating. (Required)
  819. FirstBandColor *Color `json:"firstBandColor,omitempty"`
  820. // FooterColor: The color of the last row or column. If this field is
  821. // not set, the last
  822. // row or column will be filled with either first_band_color
  823. // or
  824. // second_band_color, depending on the color of the previous row
  825. // or
  826. // column.
  827. FooterColor *Color `json:"footerColor,omitempty"`
  828. // HeaderColor: The color of the first row or column. If this field is
  829. // set, the first
  830. // row or column will be filled with this color and the colors
  831. // will
  832. // alternate between first_band_color and second_band_color
  833. // starting
  834. // from the second row or column. Otherwise, the first row or column
  835. // will be
  836. // filled with first_band_color and the colors will proceed to
  837. // alternate
  838. // as they normally would.
  839. HeaderColor *Color `json:"headerColor,omitempty"`
  840. // SecondBandColor: The second color that is alternating. (Required)
  841. SecondBandColor *Color `json:"secondBandColor,omitempty"`
  842. // ForceSendFields is a list of field names (e.g. "FirstBandColor") to
  843. // unconditionally include in API requests. By default, fields with
  844. // empty values are omitted from API requests. However, any non-pointer,
  845. // non-interface field appearing in ForceSendFields will be sent to the
  846. // server regardless of whether the field is empty or not. This may be
  847. // used to include empty fields in Patch requests.
  848. ForceSendFields []string `json:"-"`
  849. // NullFields is a list of field names (e.g. "FirstBandColor") to
  850. // include in API requests with the JSON null value. By default, fields
  851. // with empty values are omitted from API requests. However, any field
  852. // with an empty value appearing in NullFields will be sent to the
  853. // server as null. It is an error if a field in this list has a
  854. // non-empty value. This may be used to include null fields in Patch
  855. // requests.
  856. NullFields []string `json:"-"`
  857. }
  858. func (s *BandingProperties) MarshalJSON() ([]byte, error) {
  859. type NoMethod BandingProperties
  860. raw := NoMethod(*s)
  861. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  862. }
  863. // BasicChartAxis: An axis of the chart.
  864. // A chart may not have more than one axis per
  865. // axis position.
  866. type BasicChartAxis struct {
  867. // Format: The format of the title.
  868. // Only valid if the axis is not associated with the domain.
  869. Format *TextFormat `json:"format,omitempty"`
  870. // Position: The position of this axis.
  871. //
  872. // Possible values:
  873. // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not
  874. // use.
  875. // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart.
  876. // For most charts, this is the standard major axis.
  877. // For bar charts, this is a minor axis.
  878. // "LEFT_AXIS" - The axis rendered at the left of a chart.
  879. // For most charts, this is a minor axis.
  880. // For bar charts, this is the standard major axis.
  881. // "RIGHT_AXIS" - The axis rendered at the right of a chart.
  882. // For most charts, this is a minor axis.
  883. // For bar charts, this is an unusual major axis.
  884. Position string `json:"position,omitempty"`
  885. // Title: The title of this axis. If set, this overrides any title
  886. // inferred
  887. // from headers of the data.
  888. Title string `json:"title,omitempty"`
  889. // TitleTextPosition: The axis title text position.
  890. TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"`
  891. // ForceSendFields is a list of field names (e.g. "Format") to
  892. // unconditionally include in API requests. By default, fields with
  893. // empty values are omitted from API requests. However, any non-pointer,
  894. // non-interface field appearing in ForceSendFields will be sent to the
  895. // server regardless of whether the field is empty or not. This may be
  896. // used to include empty fields in Patch requests.
  897. ForceSendFields []string `json:"-"`
  898. // NullFields is a list of field names (e.g. "Format") to include in API
  899. // requests with the JSON null value. By default, fields with empty
  900. // values are omitted from API requests. However, any field with an
  901. // empty value appearing in NullFields will be sent to the server as
  902. // null. It is an error if a field in this list has a non-empty value.
  903. // This may be used to include null fields in Patch requests.
  904. NullFields []string `json:"-"`
  905. }
  906. func (s *BasicChartAxis) MarshalJSON() ([]byte, error) {
  907. type NoMethod BasicChartAxis
  908. raw := NoMethod(*s)
  909. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  910. }
  911. // BasicChartDomain: The domain of a chart.
  912. // For example, if charting stock prices over time, this would be the
  913. // date.
  914. type BasicChartDomain struct {
  915. // Domain: The data of the domain. For example, if charting stock prices
  916. // over time,
  917. // this is the data representing the dates.
  918. Domain *ChartData `json:"domain,omitempty"`
  919. // Reversed: True to reverse the order of the domain values (horizontal
  920. // axis).
  921. Reversed bool `json:"reversed,omitempty"`
  922. // ForceSendFields is a list of field names (e.g. "Domain") to
  923. // unconditionally include in API requests. By default, fields with
  924. // empty values are omitted from API requests. However, any non-pointer,
  925. // non-interface field appearing in ForceSendFields will be sent to the
  926. // server regardless of whether the field is empty or not. This may be
  927. // used to include empty fields in Patch requests.
  928. ForceSendFields []string `json:"-"`
  929. // NullFields is a list of field names (e.g. "Domain") to include in API
  930. // requests with the JSON null value. By default, fields with empty
  931. // values are omitted from API requests. However, any field with an
  932. // empty value appearing in NullFields will be sent to the server as
  933. // null. It is an error if a field in this list has a non-empty value.
  934. // This may be used to include null fields in Patch requests.
  935. NullFields []string `json:"-"`
  936. }
  937. func (s *BasicChartDomain) MarshalJSON() ([]byte, error) {
  938. type NoMethod BasicChartDomain
  939. raw := NoMethod(*s)
  940. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  941. }
  942. // BasicChartSeries: A single series of data in a chart.
  943. // For example, if charting stock prices over time, multiple series may
  944. // exist,
  945. // one for the "Open Price", "High Price", "Low Price" and "Close
  946. // Price".
  947. type BasicChartSeries struct {
  948. // Color: The color for elements (i.e. bars, lines, points) associated
  949. // with this
  950. // series. If empty, a default color is used.
  951. Color *Color `json:"color,omitempty"`
  952. // LineStyle: The line style of this series. Valid only if the
  953. // chartType is AREA,
  954. // LINE, or SCATTER.
  955. // COMBO charts are also supported if the
  956. // series chart type is
  957. // AREA or LINE.
  958. LineStyle *LineStyle `json:"lineStyle,omitempty"`
  959. // Series: The data being visualized in this chart series.
  960. Series *ChartData `json:"series,omitempty"`
  961. // TargetAxis: The minor axis that will specify the range of values for
  962. // this series.
  963. // For example, if charting stocks over time, the "Volume" series
  964. // may want to be pinned to the right with the prices pinned to the
  965. // left,
  966. // because the scale of trading volume is different than the scale
  967. // of
  968. // prices.
  969. // It is an error to specify an axis that isn't a valid minor axis
  970. // for the chart's type.
  971. //
  972. // Possible values:
  973. // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not
  974. // use.
  975. // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart.
  976. // For most charts, this is the standard major axis.
  977. // For bar charts, this is a minor axis.
  978. // "LEFT_AXIS" - The axis rendered at the left of a chart.
  979. // For most charts, this is a minor axis.
  980. // For bar charts, this is the standard major axis.
  981. // "RIGHT_AXIS" - The axis rendered at the right of a chart.
  982. // For most charts, this is a minor axis.
  983. // For bar charts, this is an unusual major axis.
  984. TargetAxis string `json:"targetAxis,omitempty"`
  985. // Type: The type of this series. Valid only if the
  986. // chartType is
  987. // COMBO.
  988. // Different types will change the way the series is visualized.
  989. // Only LINE, AREA,
  990. // and COLUMN are supported.
  991. //
  992. // Possible values:
  993. // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use.
  994. // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar
  995. // chart</a>.
  996. // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line
  997. // chart</a>.
  998. // "AREA" - An <a
  999. // href="/chart/interactive/docs/gallery/areachart">area chart</a>.
  1000. // "COLUMN" - A <a
  1001. // href="/chart/interactive/docs/gallery/columnchart">column chart</a>.
  1002. // "SCATTER" - A <a
  1003. // href="/chart/interactive/docs/gallery/scatterchart">scatter
  1004. // chart</a>.
  1005. // "COMBO" - A <a
  1006. // href="/chart/interactive/docs/gallery/combochart">combo chart</a>.
  1007. // "STEPPED_AREA" - A <a
  1008. // href="/chart/interactive/docs/gallery/steppedareachart">stepped
  1009. // area
  1010. // chart</a>.
  1011. Type string `json:"type,omitempty"`
  1012. // ForceSendFields is a list of field names (e.g. "Color") to
  1013. // unconditionally include in API requests. By default, fields with
  1014. // empty values are omitted from API requests. However, any non-pointer,
  1015. // non-interface field appearing in ForceSendFields will be sent to the
  1016. // server regardless of whether the field is empty or not. This may be
  1017. // used to include empty fields in Patch requests.
  1018. ForceSendFields []string `json:"-"`
  1019. // NullFields is a list of field names (e.g. "Color") to include in API
  1020. // requests with the JSON null value. By default, fields with empty
  1021. // values are omitted from API requests. However, any field with an
  1022. // empty value appearing in NullFields will be sent to the server as
  1023. // null. It is an error if a field in this list has a non-empty value.
  1024. // This may be used to include null fields in Patch requests.
  1025. NullFields []string `json:"-"`
  1026. }
  1027. func (s *BasicChartSeries) MarshalJSON() ([]byte, error) {
  1028. type NoMethod BasicChartSeries
  1029. raw := NoMethod(*s)
  1030. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1031. }
  1032. // BasicChartSpec: The specification for a basic chart. See
  1033. // BasicChartType for the list
  1034. // of charts this supports.
  1035. type BasicChartSpec struct {
  1036. // Axis: The axis on the chart.
  1037. Axis []*BasicChartAxis `json:"axis,omitempty"`
  1038. // ChartType: The type of the chart.
  1039. //
  1040. // Possible values:
  1041. // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use.
  1042. // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar
  1043. // chart</a>.
  1044. // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line
  1045. // chart</a>.
  1046. // "AREA" - An <a
  1047. // href="/chart/interactive/docs/gallery/areachart">area chart</a>.
  1048. // "COLUMN" - A <a
  1049. // href="/chart/interactive/docs/gallery/columnchart">column chart</a>.
  1050. // "SCATTER" - A <a
  1051. // href="/chart/interactive/docs/gallery/scatterchart">scatter
  1052. // chart</a>.
  1053. // "COMBO" - A <a
  1054. // href="/chart/interactive/docs/gallery/combochart">combo chart</a>.
  1055. // "STEPPED_AREA" - A <a
  1056. // href="/chart/interactive/docs/gallery/steppedareachart">stepped
  1057. // area
  1058. // chart</a>.
  1059. ChartType string `json:"chartType,omitempty"`
  1060. // CompareMode: The behavior of tooltips and data highlighting when
  1061. // hovering on data and
  1062. // chart area.
  1063. //
  1064. // Possible values:
  1065. // "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" - Default value, do not use.
  1066. // "DATUM" - Only the focused data element is highlighted and shown in
  1067. // the tooltip.
  1068. // "CATEGORY" - All data elements with the same category (e.g., domain
  1069. // value) are
  1070. // highlighted and shown in the tooltip.
  1071. CompareMode string `json:"compareMode,omitempty"`
  1072. // Domains: The domain of data this is charting.
  1073. // Only a single domain is supported.
  1074. Domains []*BasicChartDomain `json:"domains,omitempty"`
  1075. // HeaderCount: The number of rows or columns in the data that are
  1076. // "headers".
  1077. // If not set, Google Sheets will guess how many rows are headers
  1078. // based
  1079. // on the data.
  1080. //
  1081. // (Note that BasicChartAxis.title may override the axis title
  1082. // inferred from the header values.)
  1083. HeaderCount int64 `json:"headerCount,omitempty"`
  1084. // InterpolateNulls: If some values in a series are missing, gaps may
  1085. // appear in the chart (e.g,
  1086. // segments of lines in a line chart will be missing). To eliminate
  1087. // these
  1088. // gaps set this to true.
  1089. // Applies to Line, Area, and Combo charts.
  1090. InterpolateNulls bool `json:"interpolateNulls,omitempty"`
  1091. // LegendPosition: The position of the chart legend.
  1092. //
  1093. // Possible values:
  1094. // "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
  1095. // use.
  1096. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  1097. // chart.
  1098. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  1099. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  1100. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  1101. // "NO_LEGEND" - No legend is rendered.
  1102. LegendPosition string `json:"legendPosition,omitempty"`
  1103. // LineSmoothing: Gets whether all lines should be rendered smooth or
  1104. // straight by default.
  1105. // Applies to Line charts.
  1106. LineSmoothing bool `json:"lineSmoothing,omitempty"`
  1107. // Series: The data this chart is visualizing.
  1108. Series []*BasicChartSeries `json:"series,omitempty"`
  1109. // StackedType: The stacked type for charts that support vertical
  1110. // stacking.
  1111. // Applies to Area, Bar, Column, Combo, and Stepped Area charts.
  1112. //
  1113. // Possible values:
  1114. // "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" - Default value, do not use.
  1115. // "NOT_STACKED" - Series are not stacked.
  1116. // "STACKED" - Series values are stacked, each value is rendered
  1117. // vertically beginning
  1118. // from the top of the value below it.
  1119. // "PERCENT_STACKED" - Vertical stacks are stretched to reach the top
  1120. // of the chart, with
  1121. // values laid out as percentages of each other.
  1122. StackedType string `json:"stackedType,omitempty"`
  1123. // ThreeDimensional: True to make the chart 3D.
  1124. // Applies to Bar and Column charts.
  1125. ThreeDimensional bool `json:"threeDimensional,omitempty"`
  1126. // ForceSendFields is a list of field names (e.g. "Axis") to
  1127. // unconditionally include in API requests. By default, fields with
  1128. // empty values are omitted from API requests. However, any non-pointer,
  1129. // non-interface field appearing in ForceSendFields will be sent to the
  1130. // server regardless of whether the field is empty or not. This may be
  1131. // used to include empty fields in Patch requests.
  1132. ForceSendFields []string `json:"-"`
  1133. // NullFields is a list of field names (e.g. "Axis") to include in API
  1134. // requests with the JSON null value. By default, fields with empty
  1135. // values are omitted from API requests. However, any field with an
  1136. // empty value appearing in NullFields will be sent to the server as
  1137. // null. It is an error if a field in this list has a non-empty value.
  1138. // This may be used to include null fields in Patch requests.
  1139. NullFields []string `json:"-"`
  1140. }
  1141. func (s *BasicChartSpec) MarshalJSON() ([]byte, error) {
  1142. type NoMethod BasicChartSpec
  1143. raw := NoMethod(*s)
  1144. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1145. }
  1146. // BasicFilter: The default filter associated with a sheet.
  1147. type BasicFilter struct {
  1148. // Criteria: The criteria for showing/hiding values per column.
  1149. // The map's key is the column index, and the value is the criteria
  1150. // for
  1151. // that column.
  1152. Criteria map[string]FilterCriteria `json:"criteria,omitempty"`
  1153. // Range: The range the filter covers.
  1154. Range *GridRange `json:"range,omitempty"`
  1155. // SortSpecs: The sort order per column. Later specifications are used
  1156. // when values
  1157. // are equal in the earlier specifications.
  1158. SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
  1159. // ForceSendFields is a list of field names (e.g. "Criteria") to
  1160. // unconditionally include in API requests. By default, fields with
  1161. // empty values are omitted from API requests. However, any non-pointer,
  1162. // non-interface field appearing in ForceSendFields will be sent to the
  1163. // server regardless of whether the field is empty or not. This may be
  1164. // used to include empty fields in Patch requests.
  1165. ForceSendFields []string `json:"-"`
  1166. // NullFields is a list of field names (e.g. "Criteria") to include in
  1167. // API requests with the JSON null value. By default, fields with empty
  1168. // values are omitted from API requests. However, any field with an
  1169. // empty value appearing in NullFields will be sent to the server as
  1170. // null. It is an error if a field in this list has a non-empty value.
  1171. // This may be used to include null fields in Patch requests.
  1172. NullFields []string `json:"-"`
  1173. }
  1174. func (s *BasicFilter) MarshalJSON() ([]byte, error) {
  1175. type NoMethod BasicFilter
  1176. raw := NoMethod(*s)
  1177. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1178. }
  1179. // BatchClearValuesByDataFilterRequest: The request for clearing more
  1180. // than one range selected by a
  1181. // DataFilter in a spreadsheet.
  1182. type BatchClearValuesByDataFilterRequest struct {
  1183. // DataFilters: The DataFilters used to determine which ranges to clear.
  1184. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  1185. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  1186. // unconditionally include in API requests. By default, fields with
  1187. // empty values are omitted from API requests. However, any non-pointer,
  1188. // non-interface field appearing in ForceSendFields will be sent to the
  1189. // server regardless of whether the field is empty or not. This may be
  1190. // used to include empty fields in Patch requests.
  1191. ForceSendFields []string `json:"-"`
  1192. // NullFields is a list of field names (e.g. "DataFilters") to include
  1193. // in API requests with the JSON null value. By default, fields with
  1194. // empty values are omitted from API requests. However, any field with
  1195. // an empty value appearing in NullFields will be sent to the server as
  1196. // null. It is an error if a field in this list has a non-empty value.
  1197. // This may be used to include null fields in Patch requests.
  1198. NullFields []string `json:"-"`
  1199. }
  1200. func (s *BatchClearValuesByDataFilterRequest) MarshalJSON() ([]byte, error) {
  1201. type NoMethod BatchClearValuesByDataFilterRequest
  1202. raw := NoMethod(*s)
  1203. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1204. }
  1205. // BatchClearValuesByDataFilterResponse: The response when clearing a
  1206. // range of values selected with
  1207. // DataFilters in a spreadsheet.
  1208. type BatchClearValuesByDataFilterResponse struct {
  1209. // ClearedRanges: The ranges that were cleared, in A1 notation.
  1210. // (If the requests were for an unbounded range or a ranger larger
  1211. // than the bounds of the sheet, this will be the actual ranges
  1212. // that were cleared, bounded to the sheet's limits.)
  1213. ClearedRanges []string `json:"clearedRanges,omitempty"`
  1214. // SpreadsheetId: The spreadsheet the updates were applied to.
  1215. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1216. // ServerResponse contains the HTTP response code and headers from the
  1217. // server.
  1218. googleapi.ServerResponse `json:"-"`
  1219. // ForceSendFields is a list of field names (e.g. "ClearedRanges") to
  1220. // unconditionally include in API requests. By default, fields with
  1221. // empty values are omitted from API requests. However, any non-pointer,
  1222. // non-interface field appearing in ForceSendFields will be sent to the
  1223. // server regardless of whether the field is empty or not. This may be
  1224. // used to include empty fields in Patch requests.
  1225. ForceSendFields []string `json:"-"`
  1226. // NullFields is a list of field names (e.g. "ClearedRanges") to include
  1227. // in API requests with the JSON null value. By default, fields with
  1228. // empty values are omitted from API requests. However, any field with
  1229. // an empty value appearing in NullFields will be sent to the server as
  1230. // null. It is an error if a field in this list has a non-empty value.
  1231. // This may be used to include null fields in Patch requests.
  1232. NullFields []string `json:"-"`
  1233. }
  1234. func (s *BatchClearValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  1235. type NoMethod BatchClearValuesByDataFilterResponse
  1236. raw := NoMethod(*s)
  1237. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1238. }
  1239. // BatchClearValuesRequest: The request for clearing more than one range
  1240. // of values in a spreadsheet.
  1241. type BatchClearValuesRequest struct {
  1242. // Ranges: The ranges to clear, in A1 notation.
  1243. Ranges []string `json:"ranges,omitempty"`
  1244. // ForceSendFields is a list of field names (e.g. "Ranges") to
  1245. // unconditionally include in API requests. By default, fields with
  1246. // empty values are omitted from API requests. However, any non-pointer,
  1247. // non-interface field appearing in ForceSendFields will be sent to the
  1248. // server regardless of whether the field is empty or not. This may be
  1249. // used to include empty fields in Patch requests.
  1250. ForceSendFields []string `json:"-"`
  1251. // NullFields is a list of field names (e.g. "Ranges") to include in API
  1252. // requests with the JSON null value. By default, fields with empty
  1253. // values are omitted from API requests. However, any field with an
  1254. // empty value appearing in NullFields will be sent to the server as
  1255. // null. It is an error if a field in this list has a non-empty value.
  1256. // This may be used to include null fields in Patch requests.
  1257. NullFields []string `json:"-"`
  1258. }
  1259. func (s *BatchClearValuesRequest) MarshalJSON() ([]byte, error) {
  1260. type NoMethod BatchClearValuesRequest
  1261. raw := NoMethod(*s)
  1262. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1263. }
  1264. // BatchClearValuesResponse: The response when clearing a range of
  1265. // values in a spreadsheet.
  1266. type BatchClearValuesResponse struct {
  1267. // ClearedRanges: The ranges that were cleared, in A1 notation.
  1268. // (If the requests were for an unbounded range or a ranger larger
  1269. // than the bounds of the sheet, this will be the actual ranges
  1270. // that were cleared, bounded to the sheet's limits.)
  1271. ClearedRanges []string `json:"clearedRanges,omitempty"`
  1272. // SpreadsheetId: The spreadsheet the updates were applied to.
  1273. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1274. // ServerResponse contains the HTTP response code and headers from the
  1275. // server.
  1276. googleapi.ServerResponse `json:"-"`
  1277. // ForceSendFields is a list of field names (e.g. "ClearedRanges") to
  1278. // unconditionally include in API requests. By default, fields with
  1279. // empty values are omitted from API requests. However, any non-pointer,
  1280. // non-interface field appearing in ForceSendFields will be sent to the
  1281. // server regardless of whether the field is empty or not. This may be
  1282. // used to include empty fields in Patch requests.
  1283. ForceSendFields []string `json:"-"`
  1284. // NullFields is a list of field names (e.g. "ClearedRanges") to include
  1285. // in API requests with the JSON null value. By default, fields with
  1286. // empty values are omitted from API requests. However, any field with
  1287. // an empty value appearing in NullFields will be sent to the server as
  1288. // null. It is an error if a field in this list has a non-empty value.
  1289. // This may be used to include null fields in Patch requests.
  1290. NullFields []string `json:"-"`
  1291. }
  1292. func (s *BatchClearValuesResponse) MarshalJSON() ([]byte, error) {
  1293. type NoMethod BatchClearValuesResponse
  1294. raw := NoMethod(*s)
  1295. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1296. }
  1297. // BatchGetValuesByDataFilterRequest: The request for retrieving a range
  1298. // of values in a spreadsheet selected by a
  1299. // set of DataFilters.
  1300. type BatchGetValuesByDataFilterRequest struct {
  1301. // DataFilters: The data filters used to match the ranges of values to
  1302. // retrieve. Ranges
  1303. // that match any of the specified data filters will be included in
  1304. // the
  1305. // response.
  1306. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  1307. // DateTimeRenderOption: How dates, times, and durations should be
  1308. // represented in the output.
  1309. // This is ignored if value_render_option is
  1310. // FORMATTED_VALUE.
  1311. // The default dateTime render option is
  1312. // [DateTimeRenderOption.SERIAL_NUMBER].
  1313. //
  1314. // Possible values:
  1315. // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration
  1316. // fields to be output
  1317. // as doubles in "serial number" format, as popularized by Lotus
  1318. // 1-2-3.
  1319. // The whole number portion of the value (left of the decimal)
  1320. // counts
  1321. // the days since December 30th 1899. The fractional portion (right
  1322. // of
  1323. // the decimal) counts the time as a fraction of the day. For
  1324. // example,
  1325. // January 1st 1900 at noon would be 2.5, 2 because it's 2 days
  1326. // after
  1327. // December 30st 1899, and .5 because noon is half a day. February
  1328. // 1st
  1329. // 1900 at 3pm would be 33.625. This correctly treats the year 1900
  1330. // as
  1331. // not a leap year.
  1332. // "FORMATTED_STRING" - Instructs date, time, datetime, and duration
  1333. // fields to be output
  1334. // as strings in their given number format (which is dependent
  1335. // on the spreadsheet locale).
  1336. DateTimeRenderOption string `json:"dateTimeRenderOption,omitempty"`
  1337. // MajorDimension: The major dimension that results should use.
  1338. //
  1339. // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  1340. // then a request that selects that range and sets `majorDimension=ROWS`
  1341. // will
  1342. // return `[[1,2],[3,4]]`,
  1343. // whereas a request that sets `majorDimension=COLUMNS` will
  1344. // return
  1345. // `[[1,3],[2,4]]`.
  1346. //
  1347. // Possible values:
  1348. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  1349. // "ROWS" - Operates on the rows of a sheet.
  1350. // "COLUMNS" - Operates on the columns of a sheet.
  1351. MajorDimension string `json:"majorDimension,omitempty"`
  1352. // ValueRenderOption: How values should be represented in the
  1353. // output.
  1354. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  1355. //
  1356. // Possible values:
  1357. // "FORMATTED_VALUE" - Values will be calculated & formatted in the
  1358. // reply according to the
  1359. // cell's formatting. Formatting is based on the spreadsheet's
  1360. // locale,
  1361. // not the requesting user's locale.
  1362. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1363. // currency,
  1364. // then `A2` would return "$1.23".
  1365. // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted
  1366. // in the reply.
  1367. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1368. // currency,
  1369. // then `A2` would return the number `1.23`.
  1370. // "FORMULA" - Values will not be calculated. The reply will include
  1371. // the formulas.
  1372. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1373. // currency,
  1374. // then A2 would return "=A1".
  1375. ValueRenderOption string `json:"valueRenderOption,omitempty"`
  1376. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  1377. // unconditionally include in API requests. By default, fields with
  1378. // empty values are omitted from API requests. However, any non-pointer,
  1379. // non-interface field appearing in ForceSendFields will be sent to the
  1380. // server regardless of whether the field is empty or not. This may be
  1381. // used to include empty fields in Patch requests.
  1382. ForceSendFields []string `json:"-"`
  1383. // NullFields is a list of field names (e.g. "DataFilters") to include
  1384. // in API requests with the JSON null value. By default, fields with
  1385. // empty values are omitted from API requests. However, any field with
  1386. // an empty value appearing in NullFields will be sent to the server as
  1387. // null. It is an error if a field in this list has a non-empty value.
  1388. // This may be used to include null fields in Patch requests.
  1389. NullFields []string `json:"-"`
  1390. }
  1391. func (s *BatchGetValuesByDataFilterRequest) MarshalJSON() ([]byte, error) {
  1392. type NoMethod BatchGetValuesByDataFilterRequest
  1393. raw := NoMethod(*s)
  1394. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1395. }
  1396. // BatchGetValuesByDataFilterResponse: The response when retrieving more
  1397. // than one range of values in a spreadsheet
  1398. // selected by DataFilters.
  1399. type BatchGetValuesByDataFilterResponse struct {
  1400. // SpreadsheetId: The ID of the spreadsheet the data was retrieved from.
  1401. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1402. // ValueRanges: The requested values with the list of data filters that
  1403. // matched them.
  1404. ValueRanges []*MatchedValueRange `json:"valueRanges,omitempty"`
  1405. // ServerResponse contains the HTTP response code and headers from the
  1406. // server.
  1407. googleapi.ServerResponse `json:"-"`
  1408. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  1409. // unconditionally include in API requests. By default, fields with
  1410. // empty values are omitted from API requests. However, any non-pointer,
  1411. // non-interface field appearing in ForceSendFields will be sent to the
  1412. // server regardless of whether the field is empty or not. This may be
  1413. // used to include empty fields in Patch requests.
  1414. ForceSendFields []string `json:"-"`
  1415. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  1416. // in API requests with the JSON null value. By default, fields with
  1417. // empty values are omitted from API requests. However, any field with
  1418. // an empty value appearing in NullFields will be sent to the server as
  1419. // null. It is an error if a field in this list has a non-empty value.
  1420. // This may be used to include null fields in Patch requests.
  1421. NullFields []string `json:"-"`
  1422. }
  1423. func (s *BatchGetValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  1424. type NoMethod BatchGetValuesByDataFilterResponse
  1425. raw := NoMethod(*s)
  1426. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1427. }
  1428. // BatchGetValuesResponse: The response when retrieving more than one
  1429. // range of values in a spreadsheet.
  1430. type BatchGetValuesResponse struct {
  1431. // SpreadsheetId: The ID of the spreadsheet the data was retrieved from.
  1432. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1433. // ValueRanges: The requested values. The order of the ValueRanges is
  1434. // the same as the
  1435. // order of the requested ranges.
  1436. ValueRanges []*ValueRange `json:"valueRanges,omitempty"`
  1437. // ServerResponse contains the HTTP response code and headers from the
  1438. // server.
  1439. googleapi.ServerResponse `json:"-"`
  1440. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  1441. // unconditionally include in API requests. By default, fields with
  1442. // empty values are omitted from API requests. However, any non-pointer,
  1443. // non-interface field appearing in ForceSendFields will be sent to the
  1444. // server regardless of whether the field is empty or not. This may be
  1445. // used to include empty fields in Patch requests.
  1446. ForceSendFields []string `json:"-"`
  1447. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  1448. // in API requests with the JSON null value. By default, fields with
  1449. // empty values are omitted from API requests. However, any field with
  1450. // an empty value appearing in NullFields will be sent to the server as
  1451. // null. It is an error if a field in this list has a non-empty value.
  1452. // This may be used to include null fields in Patch requests.
  1453. NullFields []string `json:"-"`
  1454. }
  1455. func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) {
  1456. type NoMethod BatchGetValuesResponse
  1457. raw := NoMethod(*s)
  1458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1459. }
  1460. // BatchUpdateSpreadsheetRequest: The request for updating any aspect of
  1461. // a spreadsheet.
  1462. type BatchUpdateSpreadsheetRequest struct {
  1463. // IncludeSpreadsheetInResponse: Determines if the update response
  1464. // should include the spreadsheet
  1465. // resource.
  1466. IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"`
  1467. // Requests: A list of updates to apply to the spreadsheet.
  1468. // Requests will be applied in the order they are specified.
  1469. // If any request is not valid, no requests will be applied.
  1470. Requests []*Request `json:"requests,omitempty"`
  1471. // ResponseIncludeGridData: True if grid data should be returned.
  1472. // Meaningful only if
  1473. // if include_spreadsheet_in_response is 'true'.
  1474. // This parameter is ignored if a field mask was set in the request.
  1475. ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"`
  1476. // ResponseRanges: Limits the ranges included in the response
  1477. // spreadsheet.
  1478. // Meaningful only if include_spreadsheet_response is 'true'.
  1479. ResponseRanges []string `json:"responseRanges,omitempty"`
  1480. // ForceSendFields is a list of field names (e.g.
  1481. // "IncludeSpreadsheetInResponse") to unconditionally include in API
  1482. // requests. By default, fields with empty values are omitted from API
  1483. // requests. However, any non-pointer, non-interface field appearing in
  1484. // ForceSendFields will be sent to the server regardless of whether the
  1485. // field is empty or not. This may be used to include empty fields in
  1486. // Patch requests.
  1487. ForceSendFields []string `json:"-"`
  1488. // NullFields is a list of field names (e.g.
  1489. // "IncludeSpreadsheetInResponse") to include in API requests with the
  1490. // JSON null value. By default, fields with empty values are omitted
  1491. // from API requests. However, any field with an empty value appearing
  1492. // in NullFields will be sent to the server as null. It is an error if a
  1493. // field in this list has a non-empty value. This may be used to include
  1494. // null fields in Patch requests.
  1495. NullFields []string `json:"-"`
  1496. }
  1497. func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) {
  1498. type NoMethod BatchUpdateSpreadsheetRequest
  1499. raw := NoMethod(*s)
  1500. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1501. }
  1502. // BatchUpdateSpreadsheetResponse: The reply for batch updating a
  1503. // spreadsheet.
  1504. type BatchUpdateSpreadsheetResponse struct {
  1505. // Replies: The reply of the updates. This maps 1:1 with the updates,
  1506. // although
  1507. // replies to some requests may be empty.
  1508. Replies []*Response `json:"replies,omitempty"`
  1509. // SpreadsheetId: The spreadsheet the updates were applied to.
  1510. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1511. // UpdatedSpreadsheet: The spreadsheet after updates were applied. This
  1512. // is only set
  1513. // if
  1514. // [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is
  1515. // `true`.
  1516. UpdatedSpreadsheet *Spreadsheet `json:"updatedSpreadsheet,omitempty"`
  1517. // ServerResponse contains the HTTP response code and headers from the
  1518. // server.
  1519. googleapi.ServerResponse `json:"-"`
  1520. // ForceSendFields is a list of field names (e.g. "Replies") to
  1521. // unconditionally include in API requests. By default, fields with
  1522. // empty values are omitted from API requests. However, any non-pointer,
  1523. // non-interface field appearing in ForceSendFields will be sent to the
  1524. // server regardless of whether the field is empty or not. This may be
  1525. // used to include empty fields in Patch requests.
  1526. ForceSendFields []string `json:"-"`
  1527. // NullFields is a list of field names (e.g. "Replies") to include in
  1528. // API requests with the JSON null value. By default, fields with empty
  1529. // values are omitted from API requests. However, any field with an
  1530. // empty value appearing in NullFields will be sent to the server as
  1531. // null. It is an error if a field in this list has a non-empty value.
  1532. // This may be used to include null fields in Patch requests.
  1533. NullFields []string `json:"-"`
  1534. }
  1535. func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) {
  1536. type NoMethod BatchUpdateSpreadsheetResponse
  1537. raw := NoMethod(*s)
  1538. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1539. }
  1540. // BatchUpdateValuesByDataFilterRequest: The request for updating more
  1541. // than one range of values in a spreadsheet.
  1542. type BatchUpdateValuesByDataFilterRequest struct {
  1543. // Data: The new values to apply to the spreadsheet. If more than one
  1544. // range is
  1545. // matched by the specified DataFilter the specified values will
  1546. // be
  1547. // applied to all of those ranges.
  1548. Data []*DataFilterValueRange `json:"data,omitempty"`
  1549. // IncludeValuesInResponse: Determines if the update response should
  1550. // include the values
  1551. // of the cells that were updated. By default, responses
  1552. // do not include the updated values. The `updatedData` field
  1553. // within
  1554. // each of the BatchUpdateValuesResponse.responses will contain
  1555. // the updated values. If the range to write was larger than than the
  1556. // range
  1557. // actually written, the response will include all values in the
  1558. // requested
  1559. // range (excluding trailing empty rows and columns).
  1560. IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"`
  1561. // ResponseDateTimeRenderOption: Determines how dates, times, and
  1562. // durations in the response should be
  1563. // rendered. This is ignored if response_value_render_option
  1564. // is
  1565. // FORMATTED_VALUE.
  1566. // The default dateTime render option
  1567. // is
  1568. // DateTimeRenderOption.SERIAL_NUMBER.
  1569. //
  1570. // Possible values:
  1571. // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration
  1572. // fields to be output
  1573. // as doubles in "serial number" format, as popularized by Lotus
  1574. // 1-2-3.
  1575. // The whole number portion of the value (left of the decimal)
  1576. // counts
  1577. // the days since December 30th 1899. The fractional portion (right
  1578. // of
  1579. // the decimal) counts the time as a fraction of the day. For
  1580. // example,
  1581. // January 1st 1900 at noon would be 2.5, 2 because it's 2 days
  1582. // after
  1583. // December 30st 1899, and .5 because noon is half a day. February
  1584. // 1st
  1585. // 1900 at 3pm would be 33.625. This correctly treats the year 1900
  1586. // as
  1587. // not a leap year.
  1588. // "FORMATTED_STRING" - Instructs date, time, datetime, and duration
  1589. // fields to be output
  1590. // as strings in their given number format (which is dependent
  1591. // on the spreadsheet locale).
  1592. ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"`
  1593. // ResponseValueRenderOption: Determines how values in the response
  1594. // should be rendered.
  1595. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  1596. //
  1597. // Possible values:
  1598. // "FORMATTED_VALUE" - Values will be calculated & formatted in the
  1599. // reply according to the
  1600. // cell's formatting. Formatting is based on the spreadsheet's
  1601. // locale,
  1602. // not the requesting user's locale.
  1603. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1604. // currency,
  1605. // then `A2` would return "$1.23".
  1606. // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted
  1607. // in the reply.
  1608. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1609. // currency,
  1610. // then `A2` would return the number `1.23`.
  1611. // "FORMULA" - Values will not be calculated. The reply will include
  1612. // the formulas.
  1613. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1614. // currency,
  1615. // then A2 would return "=A1".
  1616. ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"`
  1617. // ValueInputOption: How the input data should be interpreted.
  1618. //
  1619. // Possible values:
  1620. // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value
  1621. // must not be used.
  1622. // "RAW" - The values the user has entered will not be parsed and will
  1623. // be stored
  1624. // as-is.
  1625. // "USER_ENTERED" - The values will be parsed as if the user typed
  1626. // them into the UI.
  1627. // Numbers will stay as numbers, but strings may be converted to
  1628. // numbers,
  1629. // dates, etc. following the same rules that are applied when
  1630. // entering
  1631. // text into a cell via the Google Sheets UI.
  1632. ValueInputOption string `json:"valueInputOption,omitempty"`
  1633. // ForceSendFields is a list of field names (e.g. "Data") to
  1634. // unconditionally include in API requests. By default, fields with
  1635. // empty values are omitted from API requests. However, any non-pointer,
  1636. // non-interface field appearing in ForceSendFields will be sent to the
  1637. // server regardless of whether the field is empty or not. This may be
  1638. // used to include empty fields in Patch requests.
  1639. ForceSendFields []string `json:"-"`
  1640. // NullFields is a list of field names (e.g. "Data") to include in API
  1641. // requests with the JSON null value. By default, fields with empty
  1642. // values are omitted from API requests. However, any field with an
  1643. // empty value appearing in NullFields will be sent to the server as
  1644. // null. It is an error if a field in this list has a non-empty value.
  1645. // This may be used to include null fields in Patch requests.
  1646. NullFields []string `json:"-"`
  1647. }
  1648. func (s *BatchUpdateValuesByDataFilterRequest) MarshalJSON() ([]byte, error) {
  1649. type NoMethod BatchUpdateValuesByDataFilterRequest
  1650. raw := NoMethod(*s)
  1651. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1652. }
  1653. // BatchUpdateValuesByDataFilterResponse: The response when updating a
  1654. // range of values in a spreadsheet.
  1655. type BatchUpdateValuesByDataFilterResponse struct {
  1656. // Responses: The response for each range updated.
  1657. Responses []*UpdateValuesByDataFilterResponse `json:"responses,omitempty"`
  1658. // SpreadsheetId: The spreadsheet the updates were applied to.
  1659. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1660. // TotalUpdatedCells: The total number of cells updated.
  1661. TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"`
  1662. // TotalUpdatedColumns: The total number of columns where at least one
  1663. // cell in the column was
  1664. // updated.
  1665. TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"`
  1666. // TotalUpdatedRows: The total number of rows where at least one cell in
  1667. // the row was updated.
  1668. TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"`
  1669. // TotalUpdatedSheets: The total number of sheets where at least one
  1670. // cell in the sheet was
  1671. // updated.
  1672. TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"`
  1673. // ServerResponse contains the HTTP response code and headers from the
  1674. // server.
  1675. googleapi.ServerResponse `json:"-"`
  1676. // ForceSendFields is a list of field names (e.g. "Responses") to
  1677. // unconditionally include in API requests. By default, fields with
  1678. // empty values are omitted from API requests. However, any non-pointer,
  1679. // non-interface field appearing in ForceSendFields will be sent to the
  1680. // server regardless of whether the field is empty or not. This may be
  1681. // used to include empty fields in Patch requests.
  1682. ForceSendFields []string `json:"-"`
  1683. // NullFields is a list of field names (e.g. "Responses") to include in
  1684. // API requests with the JSON null value. By default, fields with empty
  1685. // values are omitted from API requests. However, any field with an
  1686. // empty value appearing in NullFields will be sent to the server as
  1687. // null. It is an error if a field in this list has a non-empty value.
  1688. // This may be used to include null fields in Patch requests.
  1689. NullFields []string `json:"-"`
  1690. }
  1691. func (s *BatchUpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  1692. type NoMethod BatchUpdateValuesByDataFilterResponse
  1693. raw := NoMethod(*s)
  1694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1695. }
  1696. // BatchUpdateValuesRequest: The request for updating more than one
  1697. // range of values in a spreadsheet.
  1698. type BatchUpdateValuesRequest struct {
  1699. // Data: The new values to apply to the spreadsheet.
  1700. Data []*ValueRange `json:"data,omitempty"`
  1701. // IncludeValuesInResponse: Determines if the update response should
  1702. // include the values
  1703. // of the cells that were updated. By default, responses
  1704. // do not include the updated values. The `updatedData` field
  1705. // within
  1706. // each of the BatchUpdateValuesResponse.responses will contain
  1707. // the updated values. If the range to write was larger than than the
  1708. // range
  1709. // actually written, the response will include all values in the
  1710. // requested
  1711. // range (excluding trailing empty rows and columns).
  1712. IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"`
  1713. // ResponseDateTimeRenderOption: Determines how dates, times, and
  1714. // durations in the response should be
  1715. // rendered. This is ignored if response_value_render_option
  1716. // is
  1717. // FORMATTED_VALUE.
  1718. // The default dateTime render option
  1719. // is
  1720. // DateTimeRenderOption.SERIAL_NUMBER.
  1721. //
  1722. // Possible values:
  1723. // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration
  1724. // fields to be output
  1725. // as doubles in "serial number" format, as popularized by Lotus
  1726. // 1-2-3.
  1727. // The whole number portion of the value (left of the decimal)
  1728. // counts
  1729. // the days since December 30th 1899. The fractional portion (right
  1730. // of
  1731. // the decimal) counts the time as a fraction of the day. For
  1732. // example,
  1733. // January 1st 1900 at noon would be 2.5, 2 because it's 2 days
  1734. // after
  1735. // December 30st 1899, and .5 because noon is half a day. February
  1736. // 1st
  1737. // 1900 at 3pm would be 33.625. This correctly treats the year 1900
  1738. // as
  1739. // not a leap year.
  1740. // "FORMATTED_STRING" - Instructs date, time, datetime, and duration
  1741. // fields to be output
  1742. // as strings in their given number format (which is dependent
  1743. // on the spreadsheet locale).
  1744. ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"`
  1745. // ResponseValueRenderOption: Determines how values in the response
  1746. // should be rendered.
  1747. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  1748. //
  1749. // Possible values:
  1750. // "FORMATTED_VALUE" - Values will be calculated & formatted in the
  1751. // reply according to the
  1752. // cell's formatting. Formatting is based on the spreadsheet's
  1753. // locale,
  1754. // not the requesting user's locale.
  1755. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1756. // currency,
  1757. // then `A2` would return "$1.23".
  1758. // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted
  1759. // in the reply.
  1760. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1761. // currency,
  1762. // then `A2` would return the number `1.23`.
  1763. // "FORMULA" - Values will not be calculated. The reply will include
  1764. // the formulas.
  1765. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1766. // currency,
  1767. // then A2 would return "=A1".
  1768. ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"`
  1769. // ValueInputOption: How the input data should be interpreted.
  1770. //
  1771. // Possible values:
  1772. // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value
  1773. // must not be used.
  1774. // "RAW" - The values the user has entered will not be parsed and will
  1775. // be stored
  1776. // as-is.
  1777. // "USER_ENTERED" - The values will be parsed as if the user typed
  1778. // them into the UI.
  1779. // Numbers will stay as numbers, but strings may be converted to
  1780. // numbers,
  1781. // dates, etc. following the same rules that are applied when
  1782. // entering
  1783. // text into a cell via the Google Sheets UI.
  1784. ValueInputOption string `json:"valueInputOption,omitempty"`
  1785. // ForceSendFields is a list of field names (e.g. "Data") to
  1786. // unconditionally include in API requests. By default, fields with
  1787. // empty values are omitted from API requests. However, any non-pointer,
  1788. // non-interface field appearing in ForceSendFields will be sent to the
  1789. // server regardless of whether the field is empty or not. This may be
  1790. // used to include empty fields in Patch requests.
  1791. ForceSendFields []string `json:"-"`
  1792. // NullFields is a list of field names (e.g. "Data") to include in API
  1793. // requests with the JSON null value. By default, fields with empty
  1794. // values are omitted from API requests. However, any field with an
  1795. // empty value appearing in NullFields will be sent to the server as
  1796. // null. It is an error if a field in this list has a non-empty value.
  1797. // This may be used to include null fields in Patch requests.
  1798. NullFields []string `json:"-"`
  1799. }
  1800. func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) {
  1801. type NoMethod BatchUpdateValuesRequest
  1802. raw := NoMethod(*s)
  1803. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1804. }
  1805. // BatchUpdateValuesResponse: The response when updating a range of
  1806. // values in a spreadsheet.
  1807. type BatchUpdateValuesResponse struct {
  1808. // Responses: One UpdateValuesResponse per requested range, in the same
  1809. // order as
  1810. // the requests appeared.
  1811. Responses []*UpdateValuesResponse `json:"responses,omitempty"`
  1812. // SpreadsheetId: The spreadsheet the updates were applied to.
  1813. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1814. // TotalUpdatedCells: The total number of cells updated.
  1815. TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"`
  1816. // TotalUpdatedColumns: The total number of columns where at least one
  1817. // cell in the column was
  1818. // updated.
  1819. TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"`
  1820. // TotalUpdatedRows: The total number of rows where at least one cell in
  1821. // the row was updated.
  1822. TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"`
  1823. // TotalUpdatedSheets: The total number of sheets where at least one
  1824. // cell in the sheet was
  1825. // updated.
  1826. TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"`
  1827. // ServerResponse contains the HTTP response code and headers from the
  1828. // server.
  1829. googleapi.ServerResponse `json:"-"`
  1830. // ForceSendFields is a list of field names (e.g. "Responses") to
  1831. // unconditionally include in API requests. By default, fields with
  1832. // empty values are omitted from API requests. However, any non-pointer,
  1833. // non-interface field appearing in ForceSendFields will be sent to the
  1834. // server regardless of whether the field is empty or not. This may be
  1835. // used to include empty fields in Patch requests.
  1836. ForceSendFields []string `json:"-"`
  1837. // NullFields is a list of field names (e.g. "Responses") to include in
  1838. // API requests with the JSON null value. By default, fields with empty
  1839. // values are omitted from API requests. However, any field with an
  1840. // empty value appearing in NullFields will be sent to the server as
  1841. // null. It is an error if a field in this list has a non-empty value.
  1842. // This may be used to include null fields in Patch requests.
  1843. NullFields []string `json:"-"`
  1844. }
  1845. func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) {
  1846. type NoMethod BatchUpdateValuesResponse
  1847. raw := NoMethod(*s)
  1848. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1849. }
  1850. // BooleanCondition: A condition that can evaluate to true or
  1851. // false.
  1852. // BooleanConditions are used by conditional formatting,
  1853. // data validation, and the criteria in filters.
  1854. type BooleanCondition struct {
  1855. // Type: The type of condition.
  1856. //
  1857. // Possible values:
  1858. // "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use.
  1859. // "NUMBER_GREATER" - The cell's value must be greater than the
  1860. // condition's value.
  1861. // Supported by data validation, conditional formatting and
  1862. // filters.
  1863. // Requires a single ConditionValue.
  1864. // "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or
  1865. // equal to the condition's value.
  1866. // Supported by data validation, conditional formatting and
  1867. // filters.
  1868. // Requires a single ConditionValue.
  1869. // "NUMBER_LESS" - The cell's value must be less than the condition's
  1870. // value.
  1871. // Supported by data validation, conditional formatting and
  1872. // filters.
  1873. // Requires a single ConditionValue.
  1874. // "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal
  1875. // to the condition's value.
  1876. // Supported by data validation, conditional formatting and
  1877. // filters.
  1878. // Requires a single ConditionValue.
  1879. // "NUMBER_EQ" - The cell's value must be equal to the condition's
  1880. // value.
  1881. // Supported by data validation, conditional formatting and
  1882. // filters.
  1883. // Requires a single ConditionValue.
  1884. // "NUMBER_NOT_EQ" - The cell's value must be not equal to the
  1885. // condition's value.
  1886. // Supported by data validation, conditional formatting and
  1887. // filters.
  1888. // Requires a single ConditionValue.
  1889. // "NUMBER_BETWEEN" - The cell's value must be between the two
  1890. // condition values.
  1891. // Supported by data validation, conditional formatting and
  1892. // filters.
  1893. // Requires exactly two ConditionValues.
  1894. // "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two
  1895. // condition values.
  1896. // Supported by data validation, conditional formatting and
  1897. // filters.
  1898. // Requires exactly two ConditionValues.
  1899. // "TEXT_CONTAINS" - The cell's value must contain the condition's
  1900. // value.
  1901. // Supported by data validation, conditional formatting and
  1902. // filters.
  1903. // Requires a single ConditionValue.
  1904. // "TEXT_NOT_CONTAINS" - The cell's value must not contain the
  1905. // condition's value.
  1906. // Supported by data validation, conditional formatting and
  1907. // filters.
  1908. // Requires a single ConditionValue.
  1909. // "TEXT_STARTS_WITH" - The cell's value must start with the
  1910. // condition's value.
  1911. // Supported by conditional formatting and filters.
  1912. // Requires a single ConditionValue.
  1913. // "TEXT_ENDS_WITH" - The cell's value must end with the condition's
  1914. // value.
  1915. // Supported by conditional formatting and filters.
  1916. // Requires a single ConditionValue.
  1917. // "TEXT_EQ" - The cell's value must be exactly the condition's
  1918. // value.
  1919. // Supported by data validation, conditional formatting and
  1920. // filters.
  1921. // Requires a single ConditionValue.
  1922. // "TEXT_IS_EMAIL" - The cell's value must be a valid email
  1923. // address.
  1924. // Supported by data validation.
  1925. // Requires no ConditionValues.
  1926. // "TEXT_IS_URL" - The cell's value must be a valid URL.
  1927. // Supported by data validation.
  1928. // Requires no ConditionValues.
  1929. // "DATE_EQ" - The cell's value must be the same date as the
  1930. // condition's value.
  1931. // Supported by data validation, conditional formatting and
  1932. // filters.
  1933. // Requires a single ConditionValue.
  1934. // "DATE_BEFORE" - The cell's value must be before the date of the
  1935. // condition's value.
  1936. // Supported by data validation, conditional formatting and
  1937. // filters.
  1938. // Requires a single ConditionValue
  1939. // that may be a relative date.
  1940. // "DATE_AFTER" - The cell's value must be after the date of the
  1941. // condition's value.
  1942. // Supported by data validation, conditional formatting and
  1943. // filters.
  1944. // Requires a single ConditionValue
  1945. // that may be a relative date.
  1946. // "DATE_ON_OR_BEFORE" - The cell's value must be on or before the
  1947. // date of the condition's value.
  1948. // Supported by data validation.
  1949. // Requires a single ConditionValue
  1950. // that may be a relative date.
  1951. // "DATE_ON_OR_AFTER" - The cell's value must be on or after the date
  1952. // of the condition's value.
  1953. // Supported by data validation.
  1954. // Requires a single ConditionValue
  1955. // that may be a relative date.
  1956. // "DATE_BETWEEN" - The cell's value must be between the dates of the
  1957. // two condition values.
  1958. // Supported by data validation.
  1959. // Requires exactly two ConditionValues.
  1960. // "DATE_NOT_BETWEEN" - The cell's value must be outside the dates of
  1961. // the two condition values.
  1962. // Supported by data validation.
  1963. // Requires exactly two ConditionValues.
  1964. // "DATE_IS_VALID" - The cell's value must be a date.
  1965. // Supported by data validation.
  1966. // Requires no ConditionValues.
  1967. // "ONE_OF_RANGE" - The cell's value must be listed in the grid in
  1968. // condition value's range.
  1969. // Supported by data validation.
  1970. // Requires a single ConditionValue,
  1971. // and the value must be a valid range in A1 notation.
  1972. // "ONE_OF_LIST" - The cell's value must be in the list of condition
  1973. // values.
  1974. // Supported by data validation.
  1975. // Supports any number of condition values,
  1976. // one per item in the list.
  1977. // Formulas are not supported in the values.
  1978. // "BLANK" - The cell's value must be empty.
  1979. // Supported by conditional formatting and filters.
  1980. // Requires no ConditionValues.
  1981. // "NOT_BLANK" - The cell's value must not be empty.
  1982. // Supported by conditional formatting and filters.
  1983. // Requires no ConditionValues.
  1984. // "CUSTOM_FORMULA" - The condition's formula must evaluate to
  1985. // true.
  1986. // Supported by data validation, conditional formatting and
  1987. // filters.
  1988. // Requires a single ConditionValue.
  1989. // "BOOLEAN" - The cell's value must be TRUE/FALSE or in the list of
  1990. // condition values.
  1991. // Supported by data validation.
  1992. // Renders as a cell checkbox.
  1993. // Supports zero, one or two ConditionValues. No
  1994. // values indicates the cell must be TRUE or FALSE, where TRUE renders
  1995. // as
  1996. // checked and FALSE renders as unchecked. One value indicates the
  1997. // cell
  1998. // will render as checked when it contains that value and unchecked when
  1999. // it
  2000. // is blank. Two values indicate that the cell will render as checked
  2001. // when
  2002. // it contains the first value and unchecked when it contains the
  2003. // second
  2004. // value. For example, ["Yes","No"] indicates that the cell will render
  2005. // a
  2006. // checked box when it has the value "Yes" and an unchecked box when it
  2007. // has
  2008. // the value "No".
  2009. Type string `json:"type,omitempty"`
  2010. // Values: The values of the condition. The number of supported values
  2011. // depends
  2012. // on the condition type. Some support zero values,
  2013. // others one or two values,
  2014. // and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
  2015. Values []*ConditionValue `json:"values,omitempty"`
  2016. // ForceSendFields is a list of field names (e.g. "Type") to
  2017. // unconditionally include in API requests. By default, fields with
  2018. // empty values are omitted from API requests. However, any non-pointer,
  2019. // non-interface field appearing in ForceSendFields will be sent to the
  2020. // server regardless of whether the field is empty or not. This may be
  2021. // used to include empty fields in Patch requests.
  2022. ForceSendFields []string `json:"-"`
  2023. // NullFields is a list of field names (e.g. "Type") to include in API
  2024. // requests with the JSON null value. By default, fields with empty
  2025. // values are omitted from API requests. However, any field with an
  2026. // empty value appearing in NullFields will be sent to the server as
  2027. // null. It is an error if a field in this list has a non-empty value.
  2028. // This may be used to include null fields in Patch requests.
  2029. NullFields []string `json:"-"`
  2030. }
  2031. func (s *BooleanCondition) MarshalJSON() ([]byte, error) {
  2032. type NoMethod BooleanCondition
  2033. raw := NoMethod(*s)
  2034. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2035. }
  2036. // BooleanRule: A rule that may or may not match, depending on the
  2037. // condition.
  2038. type BooleanRule struct {
  2039. // Condition: The condition of the rule. If the condition evaluates to
  2040. // true,
  2041. // the format is applied.
  2042. Condition *BooleanCondition `json:"condition,omitempty"`
  2043. // Format: The format to apply.
  2044. // Conditional formatting can only apply a subset of formatting:
  2045. // bold, italic,
  2046. // strikethrough,
  2047. // foreground color &
  2048. // background color.
  2049. Format *CellFormat `json:"format,omitempty"`
  2050. // ForceSendFields is a list of field names (e.g. "Condition") to
  2051. // unconditionally include in API requests. By default, fields with
  2052. // empty values are omitted from API requests. However, any non-pointer,
  2053. // non-interface field appearing in ForceSendFields will be sent to the
  2054. // server regardless of whether the field is empty or not. This may be
  2055. // used to include empty fields in Patch requests.
  2056. ForceSendFields []string `json:"-"`
  2057. // NullFields is a list of field names (e.g. "Condition") to include in
  2058. // API requests with the JSON null value. By default, fields with empty
  2059. // values are omitted from API requests. However, any field with an
  2060. // empty value appearing in NullFields will be sent to the server as
  2061. // null. It is an error if a field in this list has a non-empty value.
  2062. // This may be used to include null fields in Patch requests.
  2063. NullFields []string `json:"-"`
  2064. }
  2065. func (s *BooleanRule) MarshalJSON() ([]byte, error) {
  2066. type NoMethod BooleanRule
  2067. raw := NoMethod(*s)
  2068. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2069. }
  2070. // Border: A border along a cell.
  2071. type Border struct {
  2072. // Color: The color of the border.
  2073. Color *Color `json:"color,omitempty"`
  2074. // Style: The style of the border.
  2075. //
  2076. // Possible values:
  2077. // "STYLE_UNSPECIFIED" - The style is not specified. Do not use this.
  2078. // "DOTTED" - The border is dotted.
  2079. // "DASHED" - The border is dashed.
  2080. // "SOLID" - The border is a thin solid line.
  2081. // "SOLID_MEDIUM" - The border is a medium solid line.
  2082. // "SOLID_THICK" - The border is a thick solid line.
  2083. // "NONE" - No border.
  2084. // Used only when updating a border in order to erase it.
  2085. // "DOUBLE" - The border is two solid lines.
  2086. Style string `json:"style,omitempty"`
  2087. // Width: The width of the border, in pixels.
  2088. // Deprecated; the width is determined by the "style" field.
  2089. Width int64 `json:"width,omitempty"`
  2090. // ForceSendFields is a list of field names (e.g. "Color") to
  2091. // unconditionally include in API requests. By default, fields with
  2092. // empty values are omitted from API requests. However, any non-pointer,
  2093. // non-interface field appearing in ForceSendFields will be sent to the
  2094. // server regardless of whether the field is empty or not. This may be
  2095. // used to include empty fields in Patch requests.
  2096. ForceSendFields []string `json:"-"`
  2097. // NullFields is a list of field names (e.g. "Color") to include in API
  2098. // requests with the JSON null value. By default, fields with empty
  2099. // values are omitted from API requests. However, any field with an
  2100. // empty value appearing in NullFields will be sent to the server as
  2101. // null. It is an error if a field in this list has a non-empty value.
  2102. // This may be used to include null fields in Patch requests.
  2103. NullFields []string `json:"-"`
  2104. }
  2105. func (s *Border) MarshalJSON() ([]byte, error) {
  2106. type NoMethod Border
  2107. raw := NoMethod(*s)
  2108. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2109. }
  2110. // Borders: The borders of the cell.
  2111. type Borders struct {
  2112. // Bottom: The bottom border of the cell.
  2113. Bottom *Border `json:"bottom,omitempty"`
  2114. // Left: The left border of the cell.
  2115. Left *Border `json:"left,omitempty"`
  2116. // Right: The right border of the cell.
  2117. Right *Border `json:"right,omitempty"`
  2118. // Top: The top border of the cell.
  2119. Top *Border `json:"top,omitempty"`
  2120. // ForceSendFields is a list of field names (e.g. "Bottom") to
  2121. // unconditionally include in API requests. By default, fields with
  2122. // empty values are omitted from API requests. However, any non-pointer,
  2123. // non-interface field appearing in ForceSendFields will be sent to the
  2124. // server regardless of whether the field is empty or not. This may be
  2125. // used to include empty fields in Patch requests.
  2126. ForceSendFields []string `json:"-"`
  2127. // NullFields is a list of field names (e.g. "Bottom") to include in API
  2128. // requests with the JSON null value. By default, fields with empty
  2129. // values are omitted from API requests. However, any field with an
  2130. // empty value appearing in NullFields will be sent to the server as
  2131. // null. It is an error if a field in this list has a non-empty value.
  2132. // This may be used to include null fields in Patch requests.
  2133. NullFields []string `json:"-"`
  2134. }
  2135. func (s *Borders) MarshalJSON() ([]byte, error) {
  2136. type NoMethod Borders
  2137. raw := NoMethod(*s)
  2138. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2139. }
  2140. // BubbleChartSpec: A <a
  2141. // href="/chart/interactive/docs/gallery/bubblechart">bubble chart</a>.
  2142. type BubbleChartSpec struct {
  2143. // BubbleBorderColor: The bubble border color.
  2144. BubbleBorderColor *Color `json:"bubbleBorderColor,omitempty"`
  2145. // BubbleLabels: The data containing the bubble labels. These do not
  2146. // need to be unique.
  2147. BubbleLabels *ChartData `json:"bubbleLabels,omitempty"`
  2148. // BubbleMaxRadiusSize: The max radius size of the bubbles, in
  2149. // pixels.
  2150. // If specified, the field must be a positive value.
  2151. BubbleMaxRadiusSize int64 `json:"bubbleMaxRadiusSize,omitempty"`
  2152. // BubbleMinRadiusSize: The minimum radius size of the bubbles, in
  2153. // pixels.
  2154. // If specific, the field must be a positive value.
  2155. BubbleMinRadiusSize int64 `json:"bubbleMinRadiusSize,omitempty"`
  2156. // BubbleOpacity: The opacity of the bubbles between 0 and 1.0.
  2157. // 0 is fully transparent and 1 is fully opaque.
  2158. BubbleOpacity float64 `json:"bubbleOpacity,omitempty"`
  2159. // BubbleSizes: The data contianing the bubble sizes. Bubble sizes are
  2160. // used to draw
  2161. // the bubbles at different sizes relative to each other.
  2162. // If specified, group_ids must also be specified. This field
  2163. // is
  2164. // optional.
  2165. BubbleSizes *ChartData `json:"bubbleSizes,omitempty"`
  2166. // BubbleTextStyle: The format of the text inside the bubbles.
  2167. // Underline and Strikethrough are not supported.
  2168. BubbleTextStyle *TextFormat `json:"bubbleTextStyle,omitempty"`
  2169. // Domain: The data containing the bubble x-values. These values locate
  2170. // the bubbles
  2171. // in the chart horizontally.
  2172. Domain *ChartData `json:"domain,omitempty"`
  2173. // GroupIds: The data containing the bubble group IDs. All bubbles with
  2174. // the same group
  2175. // ID are drawn in the same color. If bubble_sizes is specified
  2176. // then
  2177. // this field must also be specified but may contain blank values.
  2178. // This field is optional.
  2179. GroupIds *ChartData `json:"groupIds,omitempty"`
  2180. // LegendPosition: Where the legend of the chart should be drawn.
  2181. //
  2182. // Possible values:
  2183. // "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
  2184. // use.
  2185. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  2186. // chart.
  2187. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  2188. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  2189. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  2190. // "NO_LEGEND" - No legend is rendered.
  2191. // "INSIDE_LEGEND" - The legend is rendered inside the chart area.
  2192. LegendPosition string `json:"legendPosition,omitempty"`
  2193. // Series: The data contianing the bubble y-values. These values locate
  2194. // the bubbles
  2195. // in the chart vertically.
  2196. Series *ChartData `json:"series,omitempty"`
  2197. // ForceSendFields is a list of field names (e.g. "BubbleBorderColor")
  2198. // to unconditionally include in API requests. By default, fields with
  2199. // empty values are omitted from API requests. However, any non-pointer,
  2200. // non-interface field appearing in ForceSendFields will be sent to the
  2201. // server regardless of whether the field is empty or not. This may be
  2202. // used to include empty fields in Patch requests.
  2203. ForceSendFields []string `json:"-"`
  2204. // NullFields is a list of field names (e.g. "BubbleBorderColor") to
  2205. // include in API requests with the JSON null value. By default, fields
  2206. // with empty values are omitted from API requests. However, any field
  2207. // with an empty value appearing in NullFields will be sent to the
  2208. // server as null. It is an error if a field in this list has a
  2209. // non-empty value. This may be used to include null fields in Patch
  2210. // requests.
  2211. NullFields []string `json:"-"`
  2212. }
  2213. func (s *BubbleChartSpec) MarshalJSON() ([]byte, error) {
  2214. type NoMethod BubbleChartSpec
  2215. raw := NoMethod(*s)
  2216. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2217. }
  2218. func (s *BubbleChartSpec) UnmarshalJSON(data []byte) error {
  2219. type NoMethod BubbleChartSpec
  2220. var s1 struct {
  2221. BubbleOpacity gensupport.JSONFloat64 `json:"bubbleOpacity"`
  2222. *NoMethod
  2223. }
  2224. s1.NoMethod = (*NoMethod)(s)
  2225. if err := json.Unmarshal(data, &s1); err != nil {
  2226. return err
  2227. }
  2228. s.BubbleOpacity = float64(s1.BubbleOpacity)
  2229. return nil
  2230. }
  2231. // CandlestickChartSpec: A <a
  2232. // href="/chart/interactive/docs/gallery/candlestickchart">candlestick
  2233. // ch
  2234. // art</a>.
  2235. type CandlestickChartSpec struct {
  2236. // Data: The Candlestick chart data.
  2237. // Only one CandlestickData is supported.
  2238. Data []*CandlestickData `json:"data,omitempty"`
  2239. // Domain: The domain data (horizontal axis) for the candlestick chart.
  2240. // String data
  2241. // will be treated as discrete labels, other data will be treated
  2242. // as
  2243. // continuous values.
  2244. Domain *CandlestickDomain `json:"domain,omitempty"`
  2245. // ForceSendFields is a list of field names (e.g. "Data") to
  2246. // unconditionally include in API requests. By default, fields with
  2247. // empty values are omitted from API requests. However, any non-pointer,
  2248. // non-interface field appearing in ForceSendFields will be sent to the
  2249. // server regardless of whether the field is empty or not. This may be
  2250. // used to include empty fields in Patch requests.
  2251. ForceSendFields []string `json:"-"`
  2252. // NullFields is a list of field names (e.g. "Data") to include in API
  2253. // requests with the JSON null value. By default, fields with empty
  2254. // values are omitted from API requests. However, any field with an
  2255. // empty value appearing in NullFields will be sent to the server as
  2256. // null. It is an error if a field in this list has a non-empty value.
  2257. // This may be used to include null fields in Patch requests.
  2258. NullFields []string `json:"-"`
  2259. }
  2260. func (s *CandlestickChartSpec) MarshalJSON() ([]byte, error) {
  2261. type NoMethod CandlestickChartSpec
  2262. raw := NoMethod(*s)
  2263. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2264. }
  2265. // CandlestickData: The Candlestick chart data, each containing the low,
  2266. // open, close, and high
  2267. // values for a series.
  2268. type CandlestickData struct {
  2269. // CloseSeries: The range data (vertical axis) for the close/final value
  2270. // for each candle.
  2271. // This is the top of the candle body. If greater than the open value
  2272. // the
  2273. // candle will be filled. Otherwise the candle will be hollow.
  2274. CloseSeries *CandlestickSeries `json:"closeSeries,omitempty"`
  2275. // HighSeries: The range data (vertical axis) for the high/maximum value
  2276. // for each
  2277. // candle. This is the top of the candle's center line.
  2278. HighSeries *CandlestickSeries `json:"highSeries,omitempty"`
  2279. // LowSeries: The range data (vertical axis) for the low/minimum value
  2280. // for each candle.
  2281. // This is the bottom of the candle's center line.
  2282. LowSeries *CandlestickSeries `json:"lowSeries,omitempty"`
  2283. // OpenSeries: The range data (vertical axis) for the open/initial value
  2284. // for each
  2285. // candle. This is the bottom of the candle body. If less than the
  2286. // close
  2287. // value the candle will be filled. Otherwise the candle will be
  2288. // hollow.
  2289. OpenSeries *CandlestickSeries `json:"openSeries,omitempty"`
  2290. // ForceSendFields is a list of field names (e.g. "CloseSeries") to
  2291. // unconditionally include in API requests. By default, fields with
  2292. // empty values are omitted from API requests. However, any non-pointer,
  2293. // non-interface field appearing in ForceSendFields will be sent to the
  2294. // server regardless of whether the field is empty or not. This may be
  2295. // used to include empty fields in Patch requests.
  2296. ForceSendFields []string `json:"-"`
  2297. // NullFields is a list of field names (e.g. "CloseSeries") to include
  2298. // in API requests with the JSON null value. By default, fields with
  2299. // empty values are omitted from API requests. However, any field with
  2300. // an empty value appearing in NullFields will be sent to the server as
  2301. // null. It is an error if a field in this list has a non-empty value.
  2302. // This may be used to include null fields in Patch requests.
  2303. NullFields []string `json:"-"`
  2304. }
  2305. func (s *CandlestickData) MarshalJSON() ([]byte, error) {
  2306. type NoMethod CandlestickData
  2307. raw := NoMethod(*s)
  2308. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2309. }
  2310. // CandlestickDomain: The domain of a CandlestickChart.
  2311. type CandlestickDomain struct {
  2312. // Data: The data of the CandlestickDomain.
  2313. Data *ChartData `json:"data,omitempty"`
  2314. // Reversed: True to reverse the order of the domain values (horizontal
  2315. // axis).
  2316. Reversed bool `json:"reversed,omitempty"`
  2317. // ForceSendFields is a list of field names (e.g. "Data") to
  2318. // unconditionally include in API requests. By default, fields with
  2319. // empty values are omitted from API requests. However, any non-pointer,
  2320. // non-interface field appearing in ForceSendFields will be sent to the
  2321. // server regardless of whether the field is empty or not. This may be
  2322. // used to include empty fields in Patch requests.
  2323. ForceSendFields []string `json:"-"`
  2324. // NullFields is a list of field names (e.g. "Data") to include in API
  2325. // requests with the JSON null value. By default, fields with empty
  2326. // values are omitted from API requests. However, any field with an
  2327. // empty value appearing in NullFields will be sent to the server as
  2328. // null. It is an error if a field in this list has a non-empty value.
  2329. // This may be used to include null fields in Patch requests.
  2330. NullFields []string `json:"-"`
  2331. }
  2332. func (s *CandlestickDomain) MarshalJSON() ([]byte, error) {
  2333. type NoMethod CandlestickDomain
  2334. raw := NoMethod(*s)
  2335. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2336. }
  2337. // CandlestickSeries: The series of a CandlestickData.
  2338. type CandlestickSeries struct {
  2339. // Data: The data of the CandlestickSeries.
  2340. Data *ChartData `json:"data,omitempty"`
  2341. // ForceSendFields is a list of field names (e.g. "Data") to
  2342. // unconditionally include in API requests. By default, fields with
  2343. // empty values are omitted from API requests. However, any non-pointer,
  2344. // non-interface field appearing in ForceSendFields will be sent to the
  2345. // server regardless of whether the field is empty or not. This may be
  2346. // used to include empty fields in Patch requests.
  2347. ForceSendFields []string `json:"-"`
  2348. // NullFields is a list of field names (e.g. "Data") to include in API
  2349. // requests with the JSON null value. By default, fields with empty
  2350. // values are omitted from API requests. However, any field with an
  2351. // empty value appearing in NullFields will be sent to the server as
  2352. // null. It is an error if a field in this list has a non-empty value.
  2353. // This may be used to include null fields in Patch requests.
  2354. NullFields []string `json:"-"`
  2355. }
  2356. func (s *CandlestickSeries) MarshalJSON() ([]byte, error) {
  2357. type NoMethod CandlestickSeries
  2358. raw := NoMethod(*s)
  2359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2360. }
  2361. // CellData: Data about a specific cell.
  2362. type CellData struct {
  2363. // DataValidation: A data validation rule on the cell, if any.
  2364. //
  2365. // When writing, the new data validation rule will overwrite any prior
  2366. // rule.
  2367. DataValidation *DataValidationRule `json:"dataValidation,omitempty"`
  2368. // EffectiveFormat: The effective format being used by the cell.
  2369. // This includes the results of applying any conditional formatting
  2370. // and,
  2371. // if the cell contains a formula, the computed number format.
  2372. // If the effective format is the default format, effective format
  2373. // will
  2374. // not be written.
  2375. // This field is read-only.
  2376. EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"`
  2377. // EffectiveValue: The effective value of the cell. For cells with
  2378. // formulas, this is
  2379. // the calculated value. For cells with literals, this is
  2380. // the same as the user_entered_value.
  2381. // This field is read-only.
  2382. EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"`
  2383. // FormattedValue: The formatted value of the cell.
  2384. // This is the value as it's shown to the user.
  2385. // This field is read-only.
  2386. FormattedValue string `json:"formattedValue,omitempty"`
  2387. // Hyperlink: A hyperlink this cell points to, if any.
  2388. // This field is read-only. (To set it, use a `=HYPERLINK` formula
  2389. // in the userEnteredValue.formulaValue
  2390. // field.)
  2391. Hyperlink string `json:"hyperlink,omitempty"`
  2392. // Note: Any note on the cell.
  2393. Note string `json:"note,omitempty"`
  2394. // PivotTable: A pivot table anchored at this cell. The size of pivot
  2395. // table itself
  2396. // is computed dynamically based on its data, grouping, filters,
  2397. // values,
  2398. // etc. Only the top-left cell of the pivot table contains the pivot
  2399. // table
  2400. // definition. The other cells will contain the calculated values of
  2401. // the
  2402. // results of the pivot in their effective_value fields.
  2403. PivotTable *PivotTable `json:"pivotTable,omitempty"`
  2404. // TextFormatRuns: Runs of rich text applied to subsections of the cell.
  2405. // Runs are only valid
  2406. // on user entered strings, not formulas, bools, or numbers.
  2407. // Runs start at specific indexes in the text and continue until the
  2408. // next
  2409. // run. Properties of a run will continue unless explicitly changed
  2410. // in a subsequent run (and properties of the first run will
  2411. // continue
  2412. // the properties of the cell unless explicitly changed).
  2413. //
  2414. // When writing, the new runs will overwrite any prior runs. When
  2415. // writing a
  2416. // new user_entered_value, previous runs are erased.
  2417. TextFormatRuns []*TextFormatRun `json:"textFormatRuns,omitempty"`
  2418. // UserEnteredFormat: The format the user entered for the cell.
  2419. //
  2420. // When writing, the new format will be merged with the existing format.
  2421. UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"`
  2422. // UserEnteredValue: The value the user entered in the cell. e.g,
  2423. // `1234`, `'Hello'`, or `=NOW()`
  2424. // Note: Dates, Times and DateTimes are represented as doubles in
  2425. // serial number format.
  2426. UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"`
  2427. // ForceSendFields is a list of field names (e.g. "DataValidation") to
  2428. // unconditionally include in API requests. By default, fields with
  2429. // empty values are omitted from API requests. However, any non-pointer,
  2430. // non-interface field appearing in ForceSendFields will be sent to the
  2431. // server regardless of whether the field is empty or not. This may be
  2432. // used to include empty fields in Patch requests.
  2433. ForceSendFields []string `json:"-"`
  2434. // NullFields is a list of field names (e.g. "DataValidation") to
  2435. // include in API requests with the JSON null value. By default, fields
  2436. // with empty values are omitted from API requests. However, any field
  2437. // with an empty value appearing in NullFields will be sent to the
  2438. // server as null. It is an error if a field in this list has a
  2439. // non-empty value. This may be used to include null fields in Patch
  2440. // requests.
  2441. NullFields []string `json:"-"`
  2442. }
  2443. func (s *CellData) MarshalJSON() ([]byte, error) {
  2444. type NoMethod CellData
  2445. raw := NoMethod(*s)
  2446. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2447. }
  2448. // CellFormat: The format of a cell.
  2449. type CellFormat struct {
  2450. // BackgroundColor: The background color of the cell.
  2451. BackgroundColor *Color `json:"backgroundColor,omitempty"`
  2452. // Borders: The borders of the cell.
  2453. Borders *Borders `json:"borders,omitempty"`
  2454. // HorizontalAlignment: The horizontal alignment of the value in the
  2455. // cell.
  2456. //
  2457. // Possible values:
  2458. // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not
  2459. // specified. Do not use this.
  2460. // "LEFT" - The text is explicitly aligned to the left of the cell.
  2461. // "CENTER" - The text is explicitly aligned to the center of the
  2462. // cell.
  2463. // "RIGHT" - The text is explicitly aligned to the right of the cell.
  2464. HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
  2465. // HyperlinkDisplayType: How a hyperlink, if it exists, should be
  2466. // displayed in the cell.
  2467. //
  2468. // Possible values:
  2469. // "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" - The default value: the
  2470. // hyperlink is rendered. Do not use this.
  2471. // "LINKED" - A hyperlink should be explicitly rendered.
  2472. // "PLAIN_TEXT" - A hyperlink should not be rendered.
  2473. HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"`
  2474. // NumberFormat: A format describing how number values should be
  2475. // represented to the user.
  2476. NumberFormat *NumberFormat `json:"numberFormat,omitempty"`
  2477. // Padding: The padding of the cell.
  2478. Padding *Padding `json:"padding,omitempty"`
  2479. // TextDirection: The direction of the text in the cell.
  2480. //
  2481. // Possible values:
  2482. // "TEXT_DIRECTION_UNSPECIFIED" - The text direction is not specified.
  2483. // Do not use this.
  2484. // "LEFT_TO_RIGHT" - The text direction of left-to-right was set by
  2485. // the user.
  2486. // "RIGHT_TO_LEFT" - The text direction of right-to-left was set by
  2487. // the user.
  2488. TextDirection string `json:"textDirection,omitempty"`
  2489. // TextFormat: The format of the text in the cell (unless overridden by
  2490. // a format run).
  2491. TextFormat *TextFormat `json:"textFormat,omitempty"`
  2492. // TextRotation: The rotation applied to text in a cell
  2493. TextRotation *TextRotation `json:"textRotation,omitempty"`
  2494. // VerticalAlignment: The vertical alignment of the value in the cell.
  2495. //
  2496. // Possible values:
  2497. // "VERTICAL_ALIGN_UNSPECIFIED" - The vertical alignment is not
  2498. // specified. Do not use this.
  2499. // "TOP" - The text is explicitly aligned to the top of the cell.
  2500. // "MIDDLE" - The text is explicitly aligned to the middle of the
  2501. // cell.
  2502. // "BOTTOM" - The text is explicitly aligned to the bottom of the
  2503. // cell.
  2504. VerticalAlignment string `json:"verticalAlignment,omitempty"`
  2505. // WrapStrategy: The wrap strategy for the value in the cell.
  2506. //
  2507. // Possible values:
  2508. // "WRAP_STRATEGY_UNSPECIFIED" - The default value, do not use.
  2509. // "OVERFLOW_CELL" - Lines that are longer than the cell width will be
  2510. // written in the next
  2511. // cell over, so long as that cell is empty. If the next cell over
  2512. // is
  2513. // non-empty, this behaves the same as CLIP. The text will never wrap
  2514. // to the next line unless the user manually inserts a new
  2515. // line.
  2516. // Example:
  2517. //
  2518. // | First sentence. |
  2519. // | Manual newline that is very long. <- Text continues into next
  2520. // cell
  2521. // | Next newline. |
  2522. // "LEGACY_WRAP" - This wrap strategy represents the old Google Sheets
  2523. // wrap strategy where
  2524. // words that are longer than a line are clipped rather than broken.
  2525. // This
  2526. // strategy is not supported on all platforms and is being phased
  2527. // out.
  2528. // Example:
  2529. //
  2530. // | Cell has a |
  2531. // | loooooooooo| <- Word is clipped.
  2532. // | word. |
  2533. // "CLIP" - Lines that are longer than the cell width will be
  2534. // clipped.
  2535. // The text will never wrap to the next line unless the user
  2536. // manually
  2537. // inserts a new line.
  2538. // Example:
  2539. //
  2540. // | First sentence. |
  2541. // | Manual newline t| <- Text is clipped
  2542. // | Next newline. |
  2543. // "WRAP" - Words that are longer than a line are wrapped at the
  2544. // character level
  2545. // rather than clipped.
  2546. // Example:
  2547. //
  2548. // | Cell has a |
  2549. // | loooooooooo| <- Word is broken.
  2550. // | ong word. |
  2551. WrapStrategy string `json:"wrapStrategy,omitempty"`
  2552. // ForceSendFields is a list of field names (e.g. "BackgroundColor") to
  2553. // unconditionally include in API requests. By default, fields with
  2554. // empty values are omitted from API requests. However, any non-pointer,
  2555. // non-interface field appearing in ForceSendFields will be sent to the
  2556. // server regardless of whether the field is empty or not. This may be
  2557. // used to include empty fields in Patch requests.
  2558. ForceSendFields []string `json:"-"`
  2559. // NullFields is a list of field names (e.g. "BackgroundColor") to
  2560. // include in API requests with the JSON null value. By default, fields
  2561. // with empty values are omitted from API requests. However, any field
  2562. // with an empty value appearing in NullFields will be sent to the
  2563. // server as null. It is an error if a field in this list has a
  2564. // non-empty value. This may be used to include null fields in Patch
  2565. // requests.
  2566. NullFields []string `json:"-"`
  2567. }
  2568. func (s *CellFormat) MarshalJSON() ([]byte, error) {
  2569. type NoMethod CellFormat
  2570. raw := NoMethod(*s)
  2571. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2572. }
  2573. // ChartData: The data included in a domain or series.
  2574. type ChartData struct {
  2575. // SourceRange: The source ranges of the data.
  2576. SourceRange *ChartSourceRange `json:"sourceRange,omitempty"`
  2577. // ForceSendFields is a list of field names (e.g. "SourceRange") to
  2578. // unconditionally include in API requests. By default, fields with
  2579. // empty values are omitted from API requests. However, any non-pointer,
  2580. // non-interface field appearing in ForceSendFields will be sent to the
  2581. // server regardless of whether the field is empty or not. This may be
  2582. // used to include empty fields in Patch requests.
  2583. ForceSendFields []string `json:"-"`
  2584. // NullFields is a list of field names (e.g. "SourceRange") to include
  2585. // in API requests with the JSON null value. By default, fields with
  2586. // empty values are omitted from API requests. However, any field with
  2587. // an empty value appearing in NullFields will be sent to the server as
  2588. // null. It is an error if a field in this list has a non-empty value.
  2589. // This may be used to include null fields in Patch requests.
  2590. NullFields []string `json:"-"`
  2591. }
  2592. func (s *ChartData) MarshalJSON() ([]byte, error) {
  2593. type NoMethod ChartData
  2594. raw := NoMethod(*s)
  2595. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2596. }
  2597. // ChartSourceRange: Source ranges for a chart.
  2598. type ChartSourceRange struct {
  2599. // Sources: The ranges of data for a series or domain.
  2600. // Exactly one dimension must have a length of 1,
  2601. // and all sources in the list must have the same dimension
  2602. // with length 1.
  2603. // The domain (if it exists) & all series must have the same number
  2604. // of source ranges. If using more than one source range, then the
  2605. // source
  2606. // range at a given offset must be in order and contiguous across the
  2607. // domain
  2608. // and series.
  2609. //
  2610. // For example, these are valid configurations:
  2611. //
  2612. // domain sources: A1:A5
  2613. // series1 sources: B1:B5
  2614. // series2 sources: D6:D10
  2615. //
  2616. // domain sources: A1:A5, C10:C12
  2617. // series1 sources: B1:B5, D10:D12
  2618. // series2 sources: C1:C5, E10:E12
  2619. Sources []*GridRange `json:"sources,omitempty"`
  2620. // ForceSendFields is a list of field names (e.g. "Sources") to
  2621. // unconditionally include in API requests. By default, fields with
  2622. // empty values are omitted from API requests. However, any non-pointer,
  2623. // non-interface field appearing in ForceSendFields will be sent to the
  2624. // server regardless of whether the field is empty or not. This may be
  2625. // used to include empty fields in Patch requests.
  2626. ForceSendFields []string `json:"-"`
  2627. // NullFields is a list of field names (e.g. "Sources") to include in
  2628. // API requests with the JSON null value. By default, fields with empty
  2629. // values are omitted from API requests. However, any field with an
  2630. // empty value appearing in NullFields will be sent to the server as
  2631. // null. It is an error if a field in this list has a non-empty value.
  2632. // This may be used to include null fields in Patch requests.
  2633. NullFields []string `json:"-"`
  2634. }
  2635. func (s *ChartSourceRange) MarshalJSON() ([]byte, error) {
  2636. type NoMethod ChartSourceRange
  2637. raw := NoMethod(*s)
  2638. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2639. }
  2640. // ChartSpec: The specifications of a chart.
  2641. type ChartSpec struct {
  2642. // AltText: The alternative text that describes the chart. This is
  2643. // often used
  2644. // for accessibility.
  2645. AltText string `json:"altText,omitempty"`
  2646. // BackgroundColor: The background color of the entire chart.
  2647. // Not applicable to Org charts.
  2648. BackgroundColor *Color `json:"backgroundColor,omitempty"`
  2649. // BasicChart: A basic chart specification, can be one of many kinds of
  2650. // charts.
  2651. // See BasicChartType for the list of all
  2652. // charts this supports.
  2653. BasicChart *BasicChartSpec `json:"basicChart,omitempty"`
  2654. // BubbleChart: A bubble chart specification.
  2655. BubbleChart *BubbleChartSpec `json:"bubbleChart,omitempty"`
  2656. // CandlestickChart: A candlestick chart specification.
  2657. CandlestickChart *CandlestickChartSpec `json:"candlestickChart,omitempty"`
  2658. // FontName: The name of the font to use by default for all chart text
  2659. // (e.g. title,
  2660. // axis labels, legend). If a font is specified for a specific part of
  2661. // the
  2662. // chart it will override this font name.
  2663. FontName string `json:"fontName,omitempty"`
  2664. // HiddenDimensionStrategy: Determines how the charts will use hidden
  2665. // rows or columns.
  2666. //
  2667. // Possible values:
  2668. // "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" - Default value, do
  2669. // not use.
  2670. // "SKIP_HIDDEN_ROWS_AND_COLUMNS" - Charts will skip hidden rows and
  2671. // columns.
  2672. // "SKIP_HIDDEN_ROWS" - Charts will skip hidden rows only.
  2673. // "SKIP_HIDDEN_COLUMNS" - Charts will skip hidden columns only.
  2674. // "SHOW_ALL" - Charts will not skip any hidden rows or columns.
  2675. HiddenDimensionStrategy string `json:"hiddenDimensionStrategy,omitempty"`
  2676. // HistogramChart: A histogram chart specification.
  2677. HistogramChart *HistogramChartSpec `json:"histogramChart,omitempty"`
  2678. // Maximized: True to make a chart fill the entire space in which it's
  2679. // rendered with
  2680. // minimum padding. False to use the default padding.
  2681. // (Not applicable to Geo and Org charts.)
  2682. Maximized bool `json:"maximized,omitempty"`
  2683. // OrgChart: An org chart specification.
  2684. OrgChart *OrgChartSpec `json:"orgChart,omitempty"`
  2685. // PieChart: A pie chart specification.
  2686. PieChart *PieChartSpec `json:"pieChart,omitempty"`
  2687. // Subtitle: The subtitle of the chart.
  2688. Subtitle string `json:"subtitle,omitempty"`
  2689. // SubtitleTextFormat: The subtitle text format.
  2690. // Strikethrough and underline are not supported.
  2691. SubtitleTextFormat *TextFormat `json:"subtitleTextFormat,omitempty"`
  2692. // SubtitleTextPosition: The subtitle text position.
  2693. // This field is optional.
  2694. SubtitleTextPosition *TextPosition `json:"subtitleTextPosition,omitempty"`
  2695. // Title: The title of the chart.
  2696. Title string `json:"title,omitempty"`
  2697. // TitleTextFormat: The title text format.
  2698. // Strikethrough and underline are not supported.
  2699. TitleTextFormat *TextFormat `json:"titleTextFormat,omitempty"`
  2700. // TitleTextPosition: The title text position.
  2701. // This field is optional.
  2702. TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"`
  2703. // TreemapChart: A treemap chart specification.
  2704. TreemapChart *TreemapChartSpec `json:"treemapChart,omitempty"`
  2705. // WaterfallChart: A waterfall chart specification.
  2706. WaterfallChart *WaterfallChartSpec `json:"waterfallChart,omitempty"`
  2707. // ForceSendFields is a list of field names (e.g. "AltText") to
  2708. // unconditionally include in API requests. By default, fields with
  2709. // empty values are omitted from API requests. However, any non-pointer,
  2710. // non-interface field appearing in ForceSendFields will be sent to the
  2711. // server regardless of whether the field is empty or not. This may be
  2712. // used to include empty fields in Patch requests.
  2713. ForceSendFields []string `json:"-"`
  2714. // NullFields is a list of field names (e.g. "AltText") to include in
  2715. // API requests with the JSON null value. By default, fields with empty
  2716. // values are omitted from API requests. However, any field with an
  2717. // empty value appearing in NullFields will be sent to the server as
  2718. // null. It is an error if a field in this list has a non-empty value.
  2719. // This may be used to include null fields in Patch requests.
  2720. NullFields []string `json:"-"`
  2721. }
  2722. func (s *ChartSpec) MarshalJSON() ([]byte, error) {
  2723. type NoMethod ChartSpec
  2724. raw := NoMethod(*s)
  2725. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2726. }
  2727. // ClearBasicFilterRequest: Clears the basic filter, if any exists on
  2728. // the sheet.
  2729. type ClearBasicFilterRequest struct {
  2730. // SheetId: The sheet ID on which the basic filter should be cleared.
  2731. SheetId int64 `json:"sheetId,omitempty"`
  2732. // ForceSendFields is a list of field names (e.g. "SheetId") to
  2733. // unconditionally include in API requests. By default, fields with
  2734. // empty values are omitted from API requests. However, any non-pointer,
  2735. // non-interface field appearing in ForceSendFields will be sent to the
  2736. // server regardless of whether the field is empty or not. This may be
  2737. // used to include empty fields in Patch requests.
  2738. ForceSendFields []string `json:"-"`
  2739. // NullFields is a list of field names (e.g. "SheetId") to include in
  2740. // API requests with the JSON null value. By default, fields with empty
  2741. // values are omitted from API requests. However, any field with an
  2742. // empty value appearing in NullFields will be sent to the server as
  2743. // null. It is an error if a field in this list has a non-empty value.
  2744. // This may be used to include null fields in Patch requests.
  2745. NullFields []string `json:"-"`
  2746. }
  2747. func (s *ClearBasicFilterRequest) MarshalJSON() ([]byte, error) {
  2748. type NoMethod ClearBasicFilterRequest
  2749. raw := NoMethod(*s)
  2750. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2751. }
  2752. // ClearValuesRequest: The request for clearing a range of values in a
  2753. // spreadsheet.
  2754. type ClearValuesRequest struct {
  2755. }
  2756. // ClearValuesResponse: The response when clearing a range of values in
  2757. // a spreadsheet.
  2758. type ClearValuesResponse struct {
  2759. // ClearedRange: The range (in A1 notation) that was cleared.
  2760. // (If the request was for an unbounded range or a ranger larger
  2761. // than the bounds of the sheet, this will be the actual range
  2762. // that was cleared, bounded to the sheet's limits.)
  2763. ClearedRange string `json:"clearedRange,omitempty"`
  2764. // SpreadsheetId: The spreadsheet the updates were applied to.
  2765. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  2766. // ServerResponse contains the HTTP response code and headers from the
  2767. // server.
  2768. googleapi.ServerResponse `json:"-"`
  2769. // ForceSendFields is a list of field names (e.g. "ClearedRange") to
  2770. // unconditionally include in API requests. By default, fields with
  2771. // empty values are omitted from API requests. However, any non-pointer,
  2772. // non-interface field appearing in ForceSendFields will be sent to the
  2773. // server regardless of whether the field is empty or not. This may be
  2774. // used to include empty fields in Patch requests.
  2775. ForceSendFields []string `json:"-"`
  2776. // NullFields is a list of field names (e.g. "ClearedRange") to include
  2777. // in API requests with the JSON null value. By default, fields with
  2778. // empty values are omitted from API requests. However, any field with
  2779. // an empty value appearing in NullFields will be sent to the server as
  2780. // null. It is an error if a field in this list has a non-empty value.
  2781. // This may be used to include null fields in Patch requests.
  2782. NullFields []string `json:"-"`
  2783. }
  2784. func (s *ClearValuesResponse) MarshalJSON() ([]byte, error) {
  2785. type NoMethod ClearValuesResponse
  2786. raw := NoMethod(*s)
  2787. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2788. }
  2789. // Color: Represents a color in the RGBA color space. This
  2790. // representation is designed
  2791. // for simplicity of conversion to/from color representations in
  2792. // various
  2793. // languages over compactness; for example, the fields of this
  2794. // representation
  2795. // can be trivially provided to the constructor of "java.awt.Color" in
  2796. // Java; it
  2797. // can also be trivially provided to UIColor's
  2798. // "+colorWithRed:green:blue:alpha"
  2799. // method in iOS; and, with just a little work, it can be easily
  2800. // formatted into
  2801. // a CSS "rgba()" string in JavaScript, as well.
  2802. //
  2803. // Note: this proto does not carry information about the absolute color
  2804. // space
  2805. // that should be used to interpret the RGB value (e.g. sRGB, Adobe
  2806. // RGB,
  2807. // DCI-P3, BT.2020, etc.). By default, applications SHOULD assume the
  2808. // sRGB color
  2809. // space.
  2810. //
  2811. // Example (Java):
  2812. //
  2813. // import com.google.type.Color;
  2814. //
  2815. // // ...
  2816. // public static java.awt.Color fromProto(Color protocolor) {
  2817. // float alpha = protocolor.hasAlpha()
  2818. // ? protocolor.getAlpha().getValue()
  2819. // : 1.0;
  2820. //
  2821. // return new java.awt.Color(
  2822. // protocolor.getRed(),
  2823. // protocolor.getGreen(),
  2824. // protocolor.getBlue(),
  2825. // alpha);
  2826. // }
  2827. //
  2828. // public static Color toProto(java.awt.Color color) {
  2829. // float red = (float) color.getRed();
  2830. // float green = (float) color.getGreen();
  2831. // float blue = (float) color.getBlue();
  2832. // float denominator = 255.0;
  2833. // Color.Builder resultBuilder =
  2834. // Color
  2835. // .newBuilder()
  2836. // .setRed(red / denominator)
  2837. // .setGreen(green / denominator)
  2838. // .setBlue(blue / denominator);
  2839. // int alpha = color.getAlpha();
  2840. // if (alpha != 255) {
  2841. // result.setAlpha(
  2842. // FloatValue
  2843. // .newBuilder()
  2844. // .setValue(((float) alpha) / denominator)
  2845. // .build());
  2846. // }
  2847. // return resultBuilder.build();
  2848. // }
  2849. // // ...
  2850. //
  2851. // Example (iOS / Obj-C):
  2852. //
  2853. // // ...
  2854. // static UIColor* fromProto(Color* protocolor) {
  2855. // float red = [protocolor red];
  2856. // float green = [protocolor green];
  2857. // float blue = [protocolor blue];
  2858. // FloatValue* alpha_wrapper = [protocolor alpha];
  2859. // float alpha = 1.0;
  2860. // if (alpha_wrapper != nil) {
  2861. // alpha = [alpha_wrapper value];
  2862. // }
  2863. // return [UIColor colorWithRed:red green:green blue:blue
  2864. // alpha:alpha];
  2865. // }
  2866. //
  2867. // static Color* toProto(UIColor* color) {
  2868. // CGFloat red, green, blue, alpha;
  2869. // if (![color getRed:&red green:&green blue:&blue
  2870. // alpha:&alpha]) {
  2871. // return nil;
  2872. // }
  2873. // Color* result = [[Color alloc] init];
  2874. // [result setRed:red];
  2875. // [result setGreen:green];
  2876. // [result setBlue:blue];
  2877. // if (alpha <= 0.9999) {
  2878. // [result setAlpha:floatWrapperWithValue(alpha)];
  2879. // }
  2880. // [result autorelease];
  2881. // return result;
  2882. // }
  2883. // // ...
  2884. //
  2885. // Example (JavaScript):
  2886. //
  2887. // // ...
  2888. //
  2889. // var protoToCssColor = function(rgb_color) {
  2890. // var redFrac = rgb_color.red || 0.0;
  2891. // var greenFrac = rgb_color.green || 0.0;
  2892. // var blueFrac = rgb_color.blue || 0.0;
  2893. // var red = Math.floor(redFrac * 255);
  2894. // var green = Math.floor(greenFrac * 255);
  2895. // var blue = Math.floor(blueFrac * 255);
  2896. //
  2897. // if (!('alpha' in rgb_color)) {
  2898. // return rgbToCssColor_(red, green, blue);
  2899. // }
  2900. //
  2901. // var alphaFrac = rgb_color.alpha.value || 0.0;
  2902. // var rgbParams = [red, green, blue].join(',');
  2903. // return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
  2904. // };
  2905. //
  2906. // var rgbToCssColor_ = function(red, green, blue) {
  2907. // var rgbNumber = new Number((red << 16) | (green << 8) | blue);
  2908. // var hexString = rgbNumber.toString(16);
  2909. // var missingZeros = 6 - hexString.length;
  2910. // var resultBuilder = ['#'];
  2911. // for (var i = 0; i < missingZeros; i++) {
  2912. // resultBuilder.push('0');
  2913. // }
  2914. // resultBuilder.push(hexString);
  2915. // return resultBuilder.join('');
  2916. // };
  2917. //
  2918. // // ...
  2919. type Color struct {
  2920. // Alpha: The fraction of this color that should be applied to the
  2921. // pixel. That is,
  2922. // the final pixel color is defined by the equation:
  2923. //
  2924. // pixel color = alpha * (this color) + (1.0 - alpha) * (background
  2925. // color)
  2926. //
  2927. // This means that a value of 1.0 corresponds to a solid color,
  2928. // whereas
  2929. // a value of 0.0 corresponds to a completely transparent color.
  2930. // This
  2931. // uses a wrapper message rather than a simple float scalar so that it
  2932. // is
  2933. // possible to distinguish between a default value and the value being
  2934. // unset.
  2935. // If omitted, this color object is to be rendered as a solid color
  2936. // (as if the alpha value had been explicitly given with a value of
  2937. // 1.0).
  2938. Alpha float64 `json:"alpha,omitempty"`
  2939. // Blue: The amount of blue in the color as a value in the interval [0,
  2940. // 1].
  2941. Blue float64 `json:"blue,omitempty"`
  2942. // Green: The amount of green in the color as a value in the interval
  2943. // [0, 1].
  2944. Green float64 `json:"green,omitempty"`
  2945. // Red: The amount of red in the color as a value in the interval [0,
  2946. // 1].
  2947. Red float64 `json:"red,omitempty"`
  2948. // ForceSendFields is a list of field names (e.g. "Alpha") to
  2949. // unconditionally include in API requests. By default, fields with
  2950. // empty values are omitted from API requests. However, any non-pointer,
  2951. // non-interface field appearing in ForceSendFields will be sent to the
  2952. // server regardless of whether the field is empty or not. This may be
  2953. // used to include empty fields in Patch requests.
  2954. ForceSendFields []string `json:"-"`
  2955. // NullFields is a list of field names (e.g. "Alpha") to include in API
  2956. // requests with the JSON null value. By default, fields with empty
  2957. // values are omitted from API requests. However, any field with an
  2958. // empty value appearing in NullFields will be sent to the server as
  2959. // null. It is an error if a field in this list has a non-empty value.
  2960. // This may be used to include null fields in Patch requests.
  2961. NullFields []string `json:"-"`
  2962. }
  2963. func (s *Color) MarshalJSON() ([]byte, error) {
  2964. type NoMethod Color
  2965. raw := NoMethod(*s)
  2966. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2967. }
  2968. func (s *Color) UnmarshalJSON(data []byte) error {
  2969. type NoMethod Color
  2970. var s1 struct {
  2971. Alpha gensupport.JSONFloat64 `json:"alpha"`
  2972. Blue gensupport.JSONFloat64 `json:"blue"`
  2973. Green gensupport.JSONFloat64 `json:"green"`
  2974. Red gensupport.JSONFloat64 `json:"red"`
  2975. *NoMethod
  2976. }
  2977. s1.NoMethod = (*NoMethod)(s)
  2978. if err := json.Unmarshal(data, &s1); err != nil {
  2979. return err
  2980. }
  2981. s.Alpha = float64(s1.Alpha)
  2982. s.Blue = float64(s1.Blue)
  2983. s.Green = float64(s1.Green)
  2984. s.Red = float64(s1.Red)
  2985. return nil
  2986. }
  2987. // ConditionValue: The value of the condition.
  2988. type ConditionValue struct {
  2989. // RelativeDate: A relative date (based on the current date).
  2990. // Valid only if the type is
  2991. // DATE_BEFORE,
  2992. // DATE_AFTER,
  2993. // DATE_ON_OR_BEFORE or
  2994. // DATE_ON_OR_AFTER.
  2995. //
  2996. // Relative dates are not supported in data validation.
  2997. // They are supported only in conditional formatting and
  2998. // conditional filters.
  2999. //
  3000. // Possible values:
  3001. // "RELATIVE_DATE_UNSPECIFIED" - Default value, do not use.
  3002. // "PAST_YEAR" - The value is one year before today.
  3003. // "PAST_MONTH" - The value is one month before today.
  3004. // "PAST_WEEK" - The value is one week before today.
  3005. // "YESTERDAY" - The value is yesterday.
  3006. // "TODAY" - The value is today.
  3007. // "TOMORROW" - The value is tomorrow.
  3008. RelativeDate string `json:"relativeDate,omitempty"`
  3009. // UserEnteredValue: A value the condition is based on.
  3010. // The value is parsed as if the user typed into a cell.
  3011. // Formulas are supported (and must begin with an `=` or a '+').
  3012. UserEnteredValue string `json:"userEnteredValue,omitempty"`
  3013. // ForceSendFields is a list of field names (e.g. "RelativeDate") to
  3014. // unconditionally include in API requests. By default, fields with
  3015. // empty values are omitted from API requests. However, any non-pointer,
  3016. // non-interface field appearing in ForceSendFields will be sent to the
  3017. // server regardless of whether the field is empty or not. This may be
  3018. // used to include empty fields in Patch requests.
  3019. ForceSendFields []string `json:"-"`
  3020. // NullFields is a list of field names (e.g. "RelativeDate") to include
  3021. // in API requests with the JSON null value. By default, fields with
  3022. // empty values are omitted from API requests. However, any field with
  3023. // an empty value appearing in NullFields will be sent to the server as
  3024. // null. It is an error if a field in this list has a non-empty value.
  3025. // This may be used to include null fields in Patch requests.
  3026. NullFields []string `json:"-"`
  3027. }
  3028. func (s *ConditionValue) MarshalJSON() ([]byte, error) {
  3029. type NoMethod ConditionValue
  3030. raw := NoMethod(*s)
  3031. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3032. }
  3033. // ConditionalFormatRule: A rule describing a conditional format.
  3034. type ConditionalFormatRule struct {
  3035. // BooleanRule: The formatting is either "on" or "off" according to the
  3036. // rule.
  3037. BooleanRule *BooleanRule `json:"booleanRule,omitempty"`
  3038. // GradientRule: The formatting will vary based on the gradients in the
  3039. // rule.
  3040. GradientRule *GradientRule `json:"gradientRule,omitempty"`
  3041. // Ranges: The ranges that are formatted if the condition is true.
  3042. // All the ranges must be on the same grid.
  3043. Ranges []*GridRange `json:"ranges,omitempty"`
  3044. // ForceSendFields is a list of field names (e.g. "BooleanRule") to
  3045. // unconditionally include in API requests. By default, fields with
  3046. // empty values are omitted from API requests. However, any non-pointer,
  3047. // non-interface field appearing in ForceSendFields will be sent to the
  3048. // server regardless of whether the field is empty or not. This may be
  3049. // used to include empty fields in Patch requests.
  3050. ForceSendFields []string `json:"-"`
  3051. // NullFields is a list of field names (e.g. "BooleanRule") to include
  3052. // in API requests with the JSON null value. By default, fields with
  3053. // empty values are omitted from API requests. However, any field with
  3054. // an empty value appearing in NullFields will be sent to the server as
  3055. // null. It is an error if a field in this list has a non-empty value.
  3056. // This may be used to include null fields in Patch requests.
  3057. NullFields []string `json:"-"`
  3058. }
  3059. func (s *ConditionalFormatRule) MarshalJSON() ([]byte, error) {
  3060. type NoMethod ConditionalFormatRule
  3061. raw := NoMethod(*s)
  3062. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3063. }
  3064. // CopyPasteRequest: Copies data from the source to the destination.
  3065. type CopyPasteRequest struct {
  3066. // Destination: The location to paste to. If the range covers a span
  3067. // that's
  3068. // a multiple of the source's height or width, then the
  3069. // data will be repeated to fill in the destination range.
  3070. // If the range is smaller than the source range, the entire
  3071. // source data will still be copied (beyond the end of the destination
  3072. // range).
  3073. Destination *GridRange `json:"destination,omitempty"`
  3074. // PasteOrientation: How that data should be oriented when pasting.
  3075. //
  3076. // Possible values:
  3077. // "NORMAL" - Paste normally.
  3078. // "TRANSPOSE" - Paste transposed, where all rows become columns and
  3079. // vice versa.
  3080. PasteOrientation string `json:"pasteOrientation,omitempty"`
  3081. // PasteType: What kind of data to paste.
  3082. //
  3083. // Possible values:
  3084. // "PASTE_NORMAL" - Paste values, formulas, formats, and merges.
  3085. // "PASTE_VALUES" - Paste the values ONLY without formats, formulas,
  3086. // or merges.
  3087. // "PASTE_FORMAT" - Paste the format and data validation only.
  3088. // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders.
  3089. // "PASTE_FORMULA" - Paste the formulas only.
  3090. // "PASTE_DATA_VALIDATION" - Paste the data validation only.
  3091. // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting
  3092. // rules only.
  3093. PasteType string `json:"pasteType,omitempty"`
  3094. // Source: The source range to copy.
  3095. Source *GridRange `json:"source,omitempty"`
  3096. // ForceSendFields is a list of field names (e.g. "Destination") to
  3097. // unconditionally include in API requests. By default, fields with
  3098. // empty values are omitted from API requests. However, any non-pointer,
  3099. // non-interface field appearing in ForceSendFields will be sent to the
  3100. // server regardless of whether the field is empty or not. This may be
  3101. // used to include empty fields in Patch requests.
  3102. ForceSendFields []string `json:"-"`
  3103. // NullFields is a list of field names (e.g. "Destination") to include
  3104. // in API requests with the JSON null value. By default, fields with
  3105. // empty values are omitted from API requests. However, any field with
  3106. // an empty value appearing in NullFields will be sent to the server as
  3107. // null. It is an error if a field in this list has a non-empty value.
  3108. // This may be used to include null fields in Patch requests.
  3109. NullFields []string `json:"-"`
  3110. }
  3111. func (s *CopyPasteRequest) MarshalJSON() ([]byte, error) {
  3112. type NoMethod CopyPasteRequest
  3113. raw := NoMethod(*s)
  3114. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3115. }
  3116. // CopySheetToAnotherSpreadsheetRequest: The request to copy a sheet
  3117. // across spreadsheets.
  3118. type CopySheetToAnotherSpreadsheetRequest struct {
  3119. // DestinationSpreadsheetId: The ID of the spreadsheet to copy the sheet
  3120. // to.
  3121. DestinationSpreadsheetId string `json:"destinationSpreadsheetId,omitempty"`
  3122. // ForceSendFields is a list of field names (e.g.
  3123. // "DestinationSpreadsheetId") to unconditionally include in API
  3124. // requests. By default, fields with empty values are omitted from API
  3125. // requests. However, any non-pointer, non-interface field appearing in
  3126. // ForceSendFields will be sent to the server regardless of whether the
  3127. // field is empty or not. This may be used to include empty fields in
  3128. // Patch requests.
  3129. ForceSendFields []string `json:"-"`
  3130. // NullFields is a list of field names (e.g. "DestinationSpreadsheetId")
  3131. // to include in API requests with the JSON null value. By default,
  3132. // fields with empty values are omitted from API requests. However, any
  3133. // field with an empty value appearing in NullFields will be sent to the
  3134. // server as null. It is an error if a field in this list has a
  3135. // non-empty value. This may be used to include null fields in Patch
  3136. // requests.
  3137. NullFields []string `json:"-"`
  3138. }
  3139. func (s *CopySheetToAnotherSpreadsheetRequest) MarshalJSON() ([]byte, error) {
  3140. type NoMethod CopySheetToAnotherSpreadsheetRequest
  3141. raw := NoMethod(*s)
  3142. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3143. }
  3144. // CreateDeveloperMetadataRequest: A request to create developer
  3145. // metadata.
  3146. type CreateDeveloperMetadataRequest struct {
  3147. // DeveloperMetadata: The developer metadata to create.
  3148. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  3149. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  3150. // to unconditionally include in API requests. By default, fields with
  3151. // empty values are omitted from API requests. However, any non-pointer,
  3152. // non-interface field appearing in ForceSendFields will be sent to the
  3153. // server regardless of whether the field is empty or not. This may be
  3154. // used to include empty fields in Patch requests.
  3155. ForceSendFields []string `json:"-"`
  3156. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  3157. // include in API requests with the JSON null value. By default, fields
  3158. // with empty values are omitted from API requests. However, any field
  3159. // with an empty value appearing in NullFields will be sent to the
  3160. // server as null. It is an error if a field in this list has a
  3161. // non-empty value. This may be used to include null fields in Patch
  3162. // requests.
  3163. NullFields []string `json:"-"`
  3164. }
  3165. func (s *CreateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  3166. type NoMethod CreateDeveloperMetadataRequest
  3167. raw := NoMethod(*s)
  3168. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3169. }
  3170. // CreateDeveloperMetadataResponse: The response from creating developer
  3171. // metadata.
  3172. type CreateDeveloperMetadataResponse struct {
  3173. // DeveloperMetadata: The developer metadata that was created.
  3174. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  3175. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  3176. // to unconditionally include in API requests. By default, fields with
  3177. // empty values are omitted from API requests. However, any non-pointer,
  3178. // non-interface field appearing in ForceSendFields will be sent to the
  3179. // server regardless of whether the field is empty or not. This may be
  3180. // used to include empty fields in Patch requests.
  3181. ForceSendFields []string `json:"-"`
  3182. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  3183. // include in API requests with the JSON null value. By default, fields
  3184. // with empty values are omitted from API requests. However, any field
  3185. // with an empty value appearing in NullFields will be sent to the
  3186. // server as null. It is an error if a field in this list has a
  3187. // non-empty value. This may be used to include null fields in Patch
  3188. // requests.
  3189. NullFields []string `json:"-"`
  3190. }
  3191. func (s *CreateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  3192. type NoMethod CreateDeveloperMetadataResponse
  3193. raw := NoMethod(*s)
  3194. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3195. }
  3196. // CutPasteRequest: Moves data from the source to the destination.
  3197. type CutPasteRequest struct {
  3198. // Destination: The top-left coordinate where the data should be pasted.
  3199. Destination *GridCoordinate `json:"destination,omitempty"`
  3200. // PasteType: What kind of data to paste. All the source data will be
  3201. // cut, regardless
  3202. // of what is pasted.
  3203. //
  3204. // Possible values:
  3205. // "PASTE_NORMAL" - Paste values, formulas, formats, and merges.
  3206. // "PASTE_VALUES" - Paste the values ONLY without formats, formulas,
  3207. // or merges.
  3208. // "PASTE_FORMAT" - Paste the format and data validation only.
  3209. // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders.
  3210. // "PASTE_FORMULA" - Paste the formulas only.
  3211. // "PASTE_DATA_VALIDATION" - Paste the data validation only.
  3212. // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting
  3213. // rules only.
  3214. PasteType string `json:"pasteType,omitempty"`
  3215. // Source: The source data to cut.
  3216. Source *GridRange `json:"source,omitempty"`
  3217. // ForceSendFields is a list of field names (e.g. "Destination") to
  3218. // unconditionally include in API requests. By default, fields with
  3219. // empty values are omitted from API requests. However, any non-pointer,
  3220. // non-interface field appearing in ForceSendFields will be sent to the
  3221. // server regardless of whether the field is empty or not. This may be
  3222. // used to include empty fields in Patch requests.
  3223. ForceSendFields []string `json:"-"`
  3224. // NullFields is a list of field names (e.g. "Destination") to include
  3225. // in API requests with the JSON null value. By default, fields with
  3226. // empty values are omitted from API requests. However, any field with
  3227. // an empty value appearing in NullFields will be sent to the server as
  3228. // null. It is an error if a field in this list has a non-empty value.
  3229. // This may be used to include null fields in Patch requests.
  3230. NullFields []string `json:"-"`
  3231. }
  3232. func (s *CutPasteRequest) MarshalJSON() ([]byte, error) {
  3233. type NoMethod CutPasteRequest
  3234. raw := NoMethod(*s)
  3235. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3236. }
  3237. // DataFilter: Filter that describes what data should be selected or
  3238. // returned from a
  3239. // request.
  3240. type DataFilter struct {
  3241. // A1Range: Selects data that matches the specified A1 range.
  3242. A1Range string `json:"a1Range,omitempty"`
  3243. // DeveloperMetadataLookup: Selects data associated with the developer
  3244. // metadata matching the criteria
  3245. // described by this DeveloperMetadataLookup.
  3246. DeveloperMetadataLookup *DeveloperMetadataLookup `json:"developerMetadataLookup,omitempty"`
  3247. // GridRange: Selects data that matches the range described by the
  3248. // GridRange.
  3249. GridRange *GridRange `json:"gridRange,omitempty"`
  3250. // ForceSendFields is a list of field names (e.g. "A1Range") to
  3251. // unconditionally include in API requests. By default, fields with
  3252. // empty values are omitted from API requests. However, any non-pointer,
  3253. // non-interface field appearing in ForceSendFields will be sent to the
  3254. // server regardless of whether the field is empty or not. This may be
  3255. // used to include empty fields in Patch requests.
  3256. ForceSendFields []string `json:"-"`
  3257. // NullFields is a list of field names (e.g. "A1Range") to include in
  3258. // API requests with the JSON null value. By default, fields with empty
  3259. // values are omitted from API requests. However, any field with an
  3260. // empty value appearing in NullFields will be sent to the server as
  3261. // null. It is an error if a field in this list has a non-empty value.
  3262. // This may be used to include null fields in Patch requests.
  3263. NullFields []string `json:"-"`
  3264. }
  3265. func (s *DataFilter) MarshalJSON() ([]byte, error) {
  3266. type NoMethod DataFilter
  3267. raw := NoMethod(*s)
  3268. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3269. }
  3270. // DataFilterValueRange: A range of values whose location is specified
  3271. // by a DataFilter.
  3272. type DataFilterValueRange struct {
  3273. // DataFilter: The data filter describing the location of the values in
  3274. // the spreadsheet.
  3275. DataFilter *DataFilter `json:"dataFilter,omitempty"`
  3276. // MajorDimension: The major dimension of the values.
  3277. //
  3278. // Possible values:
  3279. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  3280. // "ROWS" - Operates on the rows of a sheet.
  3281. // "COLUMNS" - Operates on the columns of a sheet.
  3282. MajorDimension string `json:"majorDimension,omitempty"`
  3283. // Values: The data to be written. If the provided values exceed any of
  3284. // the ranges
  3285. // matched by the data filter then the request will fail. If the
  3286. // provided
  3287. // values are less than the matched ranges only the specified values
  3288. // will be
  3289. // written, existing values in the matched ranges will remain
  3290. // unaffected.
  3291. Values [][]interface{} `json:"values,omitempty"`
  3292. // ForceSendFields is a list of field names (e.g. "DataFilter") to
  3293. // unconditionally include in API requests. By default, fields with
  3294. // empty values are omitted from API requests. However, any non-pointer,
  3295. // non-interface field appearing in ForceSendFields will be sent to the
  3296. // server regardless of whether the field is empty or not. This may be
  3297. // used to include empty fields in Patch requests.
  3298. ForceSendFields []string `json:"-"`
  3299. // NullFields is a list of field names (e.g. "DataFilter") to include in
  3300. // API requests with the JSON null value. By default, fields with empty
  3301. // values are omitted from API requests. However, any field with an
  3302. // empty value appearing in NullFields will be sent to the server as
  3303. // null. It is an error if a field in this list has a non-empty value.
  3304. // This may be used to include null fields in Patch requests.
  3305. NullFields []string `json:"-"`
  3306. }
  3307. func (s *DataFilterValueRange) MarshalJSON() ([]byte, error) {
  3308. type NoMethod DataFilterValueRange
  3309. raw := NoMethod(*s)
  3310. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3311. }
  3312. // DataValidationRule: A data validation rule.
  3313. type DataValidationRule struct {
  3314. // Condition: The condition that data in the cell must match.
  3315. Condition *BooleanCondition `json:"condition,omitempty"`
  3316. // InputMessage: A message to show the user when adding data to the
  3317. // cell.
  3318. InputMessage string `json:"inputMessage,omitempty"`
  3319. // ShowCustomUi: True if the UI should be customized based on the kind
  3320. // of condition.
  3321. // If true, "List" conditions will show a dropdown.
  3322. ShowCustomUi bool `json:"showCustomUi,omitempty"`
  3323. // Strict: True if invalid data should be rejected.
  3324. Strict bool `json:"strict,omitempty"`
  3325. // ForceSendFields is a list of field names (e.g. "Condition") to
  3326. // unconditionally include in API requests. By default, fields with
  3327. // empty values are omitted from API requests. However, any non-pointer,
  3328. // non-interface field appearing in ForceSendFields will be sent to the
  3329. // server regardless of whether the field is empty or not. This may be
  3330. // used to include empty fields in Patch requests.
  3331. ForceSendFields []string `json:"-"`
  3332. // NullFields is a list of field names (e.g. "Condition") to include in
  3333. // API requests with the JSON null value. By default, fields with empty
  3334. // values are omitted from API requests. However, any field with an
  3335. // empty value appearing in NullFields will be sent to the server as
  3336. // null. It is an error if a field in this list has a non-empty value.
  3337. // This may be used to include null fields in Patch requests.
  3338. NullFields []string `json:"-"`
  3339. }
  3340. func (s *DataValidationRule) MarshalJSON() ([]byte, error) {
  3341. type NoMethod DataValidationRule
  3342. raw := NoMethod(*s)
  3343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3344. }
  3345. // DateTimeRule: Allows you to organize the date-time values in a source
  3346. // data column into
  3347. // buckets based on selected parts of their date or time values. For
  3348. // example,
  3349. // consider a pivot table showing sales transactions by date:
  3350. //
  3351. // +----------+--------------+
  3352. // | Date | SUM of Sales |
  3353. // +----------+--------------+
  3354. // | 1/1/2017 | $621.14 |
  3355. // | 2/3/2017 | $708.84 |
  3356. // | 5/8/2017 | $326.84 |
  3357. // ...
  3358. // +----------+--------------+
  3359. // Applying a date-time group rule with a DateTimeRuleType of
  3360. // YEAR_MONTH
  3361. // results in the following pivot table.
  3362. //
  3363. // +--------------+--------------+
  3364. // | Grouped Date | SUM of Sales |
  3365. // +--------------+--------------+
  3366. // | 2017-Jan | $53,731.78 |
  3367. // | 2017-Feb | $83,475.32 |
  3368. // | 2017-Mar | $94,385.05 |
  3369. // ...
  3370. // +--------------+--------------+
  3371. type DateTimeRule struct {
  3372. // Type: The type of date-time grouping to apply.
  3373. //
  3374. // Possible values:
  3375. // "DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not use.
  3376. // "SECOND" - Group dates by second, from 0 to 59.
  3377. // "MINUTE" - Group dates by minute, from 0 to 59.
  3378. // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23.
  3379. // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour
  3380. // system, for example 19:45.
  3381. // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour
  3382. // system, for example 7:45
  3383. // PM. The AM/PM designation is translated based on the
  3384. // spreadsheet
  3385. // locale.
  3386. // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The
  3387. // days of the week will
  3388. // be translated based on the spreadsheet locale.
  3389. // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note
  3390. // that dates after Feb. 29
  3391. // fall in different buckets in leap years than in non-leap years.
  3392. // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31.
  3393. // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The
  3394. // month is
  3395. // translated based on the spreadsheet locale.
  3396. // "MONTH" - Group dates by month, for example Nov. The month is
  3397. // translated based
  3398. // on the spreadsheet locale.
  3399. // "QUARTER" - Group dates by quarter, for example Q1 (which
  3400. // represents Jan-Mar).
  3401. // "YEAR" - Group dates by year, for example 2008.
  3402. // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov.
  3403. // The month is
  3404. // translated based on the spreadsheet locale.
  3405. // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008
  3406. // Q4.
  3407. // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example
  3408. // 2008-11-22.
  3409. Type string `json:"type,omitempty"`
  3410. // ForceSendFields is a list of field names (e.g. "Type") to
  3411. // unconditionally include in API requests. By default, fields with
  3412. // empty values are omitted from API requests. However, any non-pointer,
  3413. // non-interface field appearing in ForceSendFields will be sent to the
  3414. // server regardless of whether the field is empty or not. This may be
  3415. // used to include empty fields in Patch requests.
  3416. ForceSendFields []string `json:"-"`
  3417. // NullFields is a list of field names (e.g. "Type") to include in API
  3418. // requests with the JSON null value. By default, fields with empty
  3419. // values are omitted from API requests. However, any field with an
  3420. // empty value appearing in NullFields will be sent to the server as
  3421. // null. It is an error if a field in this list has a non-empty value.
  3422. // This may be used to include null fields in Patch requests.
  3423. NullFields []string `json:"-"`
  3424. }
  3425. func (s *DateTimeRule) MarshalJSON() ([]byte, error) {
  3426. type NoMethod DateTimeRule
  3427. raw := NoMethod(*s)
  3428. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3429. }
  3430. // DeleteBandingRequest: Removes the banded range with the given ID from
  3431. // the spreadsheet.
  3432. type DeleteBandingRequest struct {
  3433. // BandedRangeId: The ID of the banded range to delete.
  3434. BandedRangeId int64 `json:"bandedRangeId,omitempty"`
  3435. // ForceSendFields is a list of field names (e.g. "BandedRangeId") to
  3436. // unconditionally include in API requests. By default, fields with
  3437. // empty values are omitted from API requests. However, any non-pointer,
  3438. // non-interface field appearing in ForceSendFields will be sent to the
  3439. // server regardless of whether the field is empty or not. This may be
  3440. // used to include empty fields in Patch requests.
  3441. ForceSendFields []string `json:"-"`
  3442. // NullFields is a list of field names (e.g. "BandedRangeId") to include
  3443. // in API requests with the JSON null value. By default, fields with
  3444. // empty values are omitted from API requests. However, any field with
  3445. // an empty value appearing in NullFields will be sent to the server as
  3446. // null. It is an error if a field in this list has a non-empty value.
  3447. // This may be used to include null fields in Patch requests.
  3448. NullFields []string `json:"-"`
  3449. }
  3450. func (s *DeleteBandingRequest) MarshalJSON() ([]byte, error) {
  3451. type NoMethod DeleteBandingRequest
  3452. raw := NoMethod(*s)
  3453. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3454. }
  3455. // DeleteConditionalFormatRuleRequest: Deletes a conditional format rule
  3456. // at the given index.
  3457. // All subsequent rules' indexes are decremented.
  3458. type DeleteConditionalFormatRuleRequest struct {
  3459. // Index: The zero-based index of the rule to be deleted.
  3460. Index int64 `json:"index,omitempty"`
  3461. // SheetId: The sheet the rule is being deleted from.
  3462. SheetId int64 `json:"sheetId,omitempty"`
  3463. // ForceSendFields is a list of field names (e.g. "Index") to
  3464. // unconditionally include in API requests. By default, fields with
  3465. // empty values are omitted from API requests. However, any non-pointer,
  3466. // non-interface field appearing in ForceSendFields will be sent to the
  3467. // server regardless of whether the field is empty or not. This may be
  3468. // used to include empty fields in Patch requests.
  3469. ForceSendFields []string `json:"-"`
  3470. // NullFields is a list of field names (e.g. "Index") to include in API
  3471. // requests with the JSON null value. By default, fields with empty
  3472. // values are omitted from API requests. However, any field with an
  3473. // empty value appearing in NullFields will be sent to the server as
  3474. // null. It is an error if a field in this list has a non-empty value.
  3475. // This may be used to include null fields in Patch requests.
  3476. NullFields []string `json:"-"`
  3477. }
  3478. func (s *DeleteConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
  3479. type NoMethod DeleteConditionalFormatRuleRequest
  3480. raw := NoMethod(*s)
  3481. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3482. }
  3483. // DeleteConditionalFormatRuleResponse: The result of deleting a
  3484. // conditional format rule.
  3485. type DeleteConditionalFormatRuleResponse struct {
  3486. // Rule: The rule that was deleted.
  3487. Rule *ConditionalFormatRule `json:"rule,omitempty"`
  3488. // ForceSendFields is a list of field names (e.g. "Rule") to
  3489. // unconditionally include in API requests. By default, fields with
  3490. // empty values are omitted from API requests. However, any non-pointer,
  3491. // non-interface field appearing in ForceSendFields will be sent to the
  3492. // server regardless of whether the field is empty or not. This may be
  3493. // used to include empty fields in Patch requests.
  3494. ForceSendFields []string `json:"-"`
  3495. // NullFields is a list of field names (e.g. "Rule") to include in API
  3496. // requests with the JSON null value. By default, fields with empty
  3497. // values are omitted from API requests. However, any field with an
  3498. // empty value appearing in NullFields will be sent to the server as
  3499. // null. It is an error if a field in this list has a non-empty value.
  3500. // This may be used to include null fields in Patch requests.
  3501. NullFields []string `json:"-"`
  3502. }
  3503. func (s *DeleteConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) {
  3504. type NoMethod DeleteConditionalFormatRuleResponse
  3505. raw := NoMethod(*s)
  3506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3507. }
  3508. // DeleteDeveloperMetadataRequest: A request to delete developer
  3509. // metadata.
  3510. type DeleteDeveloperMetadataRequest struct {
  3511. // DataFilter: The data filter describing the criteria used to select
  3512. // which developer
  3513. // metadata entry to delete.
  3514. DataFilter *DataFilter `json:"dataFilter,omitempty"`
  3515. // ForceSendFields is a list of field names (e.g. "DataFilter") to
  3516. // unconditionally include in API requests. By default, fields with
  3517. // empty values are omitted from API requests. However, any non-pointer,
  3518. // non-interface field appearing in ForceSendFields will be sent to the
  3519. // server regardless of whether the field is empty or not. This may be
  3520. // used to include empty fields in Patch requests.
  3521. ForceSendFields []string `json:"-"`
  3522. // NullFields is a list of field names (e.g. "DataFilter") to include in
  3523. // API requests with the JSON null value. By default, fields with empty
  3524. // values are omitted from API requests. However, any field with an
  3525. // empty value appearing in NullFields will be sent to the server as
  3526. // null. It is an error if a field in this list has a non-empty value.
  3527. // This may be used to include null fields in Patch requests.
  3528. NullFields []string `json:"-"`
  3529. }
  3530. func (s *DeleteDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  3531. type NoMethod DeleteDeveloperMetadataRequest
  3532. raw := NoMethod(*s)
  3533. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3534. }
  3535. // DeleteDeveloperMetadataResponse: The response from deleting developer
  3536. // metadata.
  3537. type DeleteDeveloperMetadataResponse struct {
  3538. // DeletedDeveloperMetadata: The metadata that was deleted.
  3539. DeletedDeveloperMetadata []*DeveloperMetadata `json:"deletedDeveloperMetadata,omitempty"`
  3540. // ForceSendFields is a list of field names (e.g.
  3541. // "DeletedDeveloperMetadata") to unconditionally include in API
  3542. // requests. By default, fields with empty values are omitted from API
  3543. // requests. However, any non-pointer, non-interface field appearing in
  3544. // ForceSendFields will be sent to the server regardless of whether the
  3545. // field is empty or not. This may be used to include empty fields in
  3546. // Patch requests.
  3547. ForceSendFields []string `json:"-"`
  3548. // NullFields is a list of field names (e.g. "DeletedDeveloperMetadata")
  3549. // to include in API requests with the JSON null value. By default,
  3550. // fields with empty values are omitted from API requests. However, any
  3551. // field with an empty value appearing in NullFields will be sent to the
  3552. // server as null. It is an error if a field in this list has a
  3553. // non-empty value. This may be used to include null fields in Patch
  3554. // requests.
  3555. NullFields []string `json:"-"`
  3556. }
  3557. func (s *DeleteDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  3558. type NoMethod DeleteDeveloperMetadataResponse
  3559. raw := NoMethod(*s)
  3560. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3561. }
  3562. // DeleteDimensionGroupRequest: Deletes a group over the specified range
  3563. // by decrementing the depth of the
  3564. // dimensions in the range.
  3565. //
  3566. // For example, assume the sheet has a depth-1 group over B:E and a
  3567. // depth-2
  3568. // group over C:D. Deleting a group over D:E leaves the sheet with
  3569. // a
  3570. // depth-1 group over B:D and a depth-2 group over C:C.
  3571. type DeleteDimensionGroupRequest struct {
  3572. // Range: The range of the group to be deleted.
  3573. Range *DimensionRange `json:"range,omitempty"`
  3574. // ForceSendFields is a list of field names (e.g. "Range") to
  3575. // unconditionally include in API requests. By default, fields with
  3576. // empty values are omitted from API requests. However, any non-pointer,
  3577. // non-interface field appearing in ForceSendFields will be sent to the
  3578. // server regardless of whether the field is empty or not. This may be
  3579. // used to include empty fields in Patch requests.
  3580. ForceSendFields []string `json:"-"`
  3581. // NullFields is a list of field names (e.g. "Range") to include in API
  3582. // requests with the JSON null value. By default, fields with empty
  3583. // values are omitted from API requests. However, any field with an
  3584. // empty value appearing in NullFields will be sent to the server as
  3585. // null. It is an error if a field in this list has a non-empty value.
  3586. // This may be used to include null fields in Patch requests.
  3587. NullFields []string `json:"-"`
  3588. }
  3589. func (s *DeleteDimensionGroupRequest) MarshalJSON() ([]byte, error) {
  3590. type NoMethod DeleteDimensionGroupRequest
  3591. raw := NoMethod(*s)
  3592. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3593. }
  3594. // DeleteDimensionGroupResponse: The result of deleting a group.
  3595. type DeleteDimensionGroupResponse struct {
  3596. // DimensionGroups: All groups of a dimension after deleting a group
  3597. // from that dimension.
  3598. DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"`
  3599. // ForceSendFields is a list of field names (e.g. "DimensionGroups") to
  3600. // unconditionally include in API requests. By default, fields with
  3601. // empty values are omitted from API requests. However, any non-pointer,
  3602. // non-interface field appearing in ForceSendFields will be sent to the
  3603. // server regardless of whether the field is empty or not. This may be
  3604. // used to include empty fields in Patch requests.
  3605. ForceSendFields []string `json:"-"`
  3606. // NullFields is a list of field names (e.g. "DimensionGroups") to
  3607. // include in API requests with the JSON null value. By default, fields
  3608. // with empty values are omitted from API requests. However, any field
  3609. // with an empty value appearing in NullFields will be sent to the
  3610. // server as null. It is an error if a field in this list has a
  3611. // non-empty value. This may be used to include null fields in Patch
  3612. // requests.
  3613. NullFields []string `json:"-"`
  3614. }
  3615. func (s *DeleteDimensionGroupResponse) MarshalJSON() ([]byte, error) {
  3616. type NoMethod DeleteDimensionGroupResponse
  3617. raw := NoMethod(*s)
  3618. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3619. }
  3620. // DeleteDimensionRequest: Deletes the dimensions from the sheet.
  3621. type DeleteDimensionRequest struct {
  3622. // Range: The dimensions to delete from the sheet.
  3623. Range *DimensionRange `json:"range,omitempty"`
  3624. // ForceSendFields is a list of field names (e.g. "Range") to
  3625. // unconditionally include in API requests. By default, fields with
  3626. // empty values are omitted from API requests. However, any non-pointer,
  3627. // non-interface field appearing in ForceSendFields will be sent to the
  3628. // server regardless of whether the field is empty or not. This may be
  3629. // used to include empty fields in Patch requests.
  3630. ForceSendFields []string `json:"-"`
  3631. // NullFields is a list of field names (e.g. "Range") to include in API
  3632. // requests with the JSON null value. By default, fields with empty
  3633. // values are omitted from API requests. However, any field with an
  3634. // empty value appearing in NullFields will be sent to the server as
  3635. // null. It is an error if a field in this list has a non-empty value.
  3636. // This may be used to include null fields in Patch requests.
  3637. NullFields []string `json:"-"`
  3638. }
  3639. func (s *DeleteDimensionRequest) MarshalJSON() ([]byte, error) {
  3640. type NoMethod DeleteDimensionRequest
  3641. raw := NoMethod(*s)
  3642. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3643. }
  3644. // DeleteEmbeddedObjectRequest: Deletes the embedded object with the
  3645. // given ID.
  3646. type DeleteEmbeddedObjectRequest struct {
  3647. // ObjectId: The ID of the embedded object to delete.
  3648. ObjectId int64 `json:"objectId,omitempty"`
  3649. // ForceSendFields is a list of field names (e.g. "ObjectId") to
  3650. // unconditionally include in API requests. By default, fields with
  3651. // empty values are omitted from API requests. However, any non-pointer,
  3652. // non-interface field appearing in ForceSendFields will be sent to the
  3653. // server regardless of whether the field is empty or not. This may be
  3654. // used to include empty fields in Patch requests.
  3655. ForceSendFields []string `json:"-"`
  3656. // NullFields is a list of field names (e.g. "ObjectId") to include in
  3657. // API requests with the JSON null value. By default, fields with empty
  3658. // values are omitted from API requests. However, any field with an
  3659. // empty value appearing in NullFields will be sent to the server as
  3660. // null. It is an error if a field in this list has a non-empty value.
  3661. // This may be used to include null fields in Patch requests.
  3662. NullFields []string `json:"-"`
  3663. }
  3664. func (s *DeleteEmbeddedObjectRequest) MarshalJSON() ([]byte, error) {
  3665. type NoMethod DeleteEmbeddedObjectRequest
  3666. raw := NoMethod(*s)
  3667. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3668. }
  3669. // DeleteFilterViewRequest: Deletes a particular filter view.
  3670. type DeleteFilterViewRequest struct {
  3671. // FilterId: The ID of the filter to delete.
  3672. FilterId int64 `json:"filterId,omitempty"`
  3673. // ForceSendFields is a list of field names (e.g. "FilterId") to
  3674. // unconditionally include in API requests. By default, fields with
  3675. // empty values are omitted from API requests. However, any non-pointer,
  3676. // non-interface field appearing in ForceSendFields will be sent to the
  3677. // server regardless of whether the field is empty or not. This may be
  3678. // used to include empty fields in Patch requests.
  3679. ForceSendFields []string `json:"-"`
  3680. // NullFields is a list of field names (e.g. "FilterId") to include in
  3681. // API requests with the JSON null value. By default, fields with empty
  3682. // values are omitted from API requests. However, any field with an
  3683. // empty value appearing in NullFields will be sent to the server as
  3684. // null. It is an error if a field in this list has a non-empty value.
  3685. // This may be used to include null fields in Patch requests.
  3686. NullFields []string `json:"-"`
  3687. }
  3688. func (s *DeleteFilterViewRequest) MarshalJSON() ([]byte, error) {
  3689. type NoMethod DeleteFilterViewRequest
  3690. raw := NoMethod(*s)
  3691. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3692. }
  3693. // DeleteNamedRangeRequest: Removes the named range with the given ID
  3694. // from the spreadsheet.
  3695. type DeleteNamedRangeRequest struct {
  3696. // NamedRangeId: The ID of the named range to delete.
  3697. NamedRangeId string `json:"namedRangeId,omitempty"`
  3698. // ForceSendFields is a list of field names (e.g. "NamedRangeId") to
  3699. // unconditionally include in API requests. By default, fields with
  3700. // empty values are omitted from API requests. However, any non-pointer,
  3701. // non-interface field appearing in ForceSendFields will be sent to the
  3702. // server regardless of whether the field is empty or not. This may be
  3703. // used to include empty fields in Patch requests.
  3704. ForceSendFields []string `json:"-"`
  3705. // NullFields is a list of field names (e.g. "NamedRangeId") to include
  3706. // in API requests with the JSON null value. By default, fields with
  3707. // empty values are omitted from API requests. However, any field with
  3708. // an empty value appearing in NullFields will be sent to the server as
  3709. // null. It is an error if a field in this list has a non-empty value.
  3710. // This may be used to include null fields in Patch requests.
  3711. NullFields []string `json:"-"`
  3712. }
  3713. func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) {
  3714. type NoMethod DeleteNamedRangeRequest
  3715. raw := NoMethod(*s)
  3716. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3717. }
  3718. // DeleteProtectedRangeRequest: Deletes the protected range with the
  3719. // given ID.
  3720. type DeleteProtectedRangeRequest struct {
  3721. // ProtectedRangeId: The ID of the protected range to delete.
  3722. ProtectedRangeId int64 `json:"protectedRangeId,omitempty"`
  3723. // ForceSendFields is a list of field names (e.g. "ProtectedRangeId") to
  3724. // unconditionally include in API requests. By default, fields with
  3725. // empty values are omitted from API requests. However, any non-pointer,
  3726. // non-interface field appearing in ForceSendFields will be sent to the
  3727. // server regardless of whether the field is empty or not. This may be
  3728. // used to include empty fields in Patch requests.
  3729. ForceSendFields []string `json:"-"`
  3730. // NullFields is a list of field names (e.g. "ProtectedRangeId") to
  3731. // include in API requests with the JSON null value. By default, fields
  3732. // with empty values are omitted from API requests. However, any field
  3733. // with an empty value appearing in NullFields will be sent to the
  3734. // server as null. It is an error if a field in this list has a
  3735. // non-empty value. This may be used to include null fields in Patch
  3736. // requests.
  3737. NullFields []string `json:"-"`
  3738. }
  3739. func (s *DeleteProtectedRangeRequest) MarshalJSON() ([]byte, error) {
  3740. type NoMethod DeleteProtectedRangeRequest
  3741. raw := NoMethod(*s)
  3742. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3743. }
  3744. // DeleteRangeRequest: Deletes a range of cells, shifting other cells
  3745. // into the deleted area.
  3746. type DeleteRangeRequest struct {
  3747. // Range: The range of cells to delete.
  3748. Range *GridRange `json:"range,omitempty"`
  3749. // ShiftDimension: The dimension from which deleted cells will be
  3750. // replaced with.
  3751. // If ROWS, existing cells will be shifted upward to
  3752. // replace the deleted cells. If COLUMNS, existing cells
  3753. // will be shifted left to replace the deleted cells.
  3754. //
  3755. // Possible values:
  3756. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  3757. // "ROWS" - Operates on the rows of a sheet.
  3758. // "COLUMNS" - Operates on the columns of a sheet.
  3759. ShiftDimension string `json:"shiftDimension,omitempty"`
  3760. // ForceSendFields is a list of field names (e.g. "Range") to
  3761. // unconditionally include in API requests. By default, fields with
  3762. // empty values are omitted from API requests. However, any non-pointer,
  3763. // non-interface field appearing in ForceSendFields will be sent to the
  3764. // server regardless of whether the field is empty or not. This may be
  3765. // used to include empty fields in Patch requests.
  3766. ForceSendFields []string `json:"-"`
  3767. // NullFields is a list of field names (e.g. "Range") to include in API
  3768. // requests with the JSON null value. By default, fields with empty
  3769. // values are omitted from API requests. However, any field with an
  3770. // empty value appearing in NullFields will be sent to the server as
  3771. // null. It is an error if a field in this list has a non-empty value.
  3772. // This may be used to include null fields in Patch requests.
  3773. NullFields []string `json:"-"`
  3774. }
  3775. func (s *DeleteRangeRequest) MarshalJSON() ([]byte, error) {
  3776. type NoMethod DeleteRangeRequest
  3777. raw := NoMethod(*s)
  3778. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3779. }
  3780. // DeleteSheetRequest: Deletes the requested sheet.
  3781. type DeleteSheetRequest struct {
  3782. // SheetId: The ID of the sheet to delete.
  3783. SheetId int64 `json:"sheetId,omitempty"`
  3784. // ForceSendFields is a list of field names (e.g. "SheetId") to
  3785. // unconditionally include in API requests. By default, fields with
  3786. // empty values are omitted from API requests. However, any non-pointer,
  3787. // non-interface field appearing in ForceSendFields will be sent to the
  3788. // server regardless of whether the field is empty or not. This may be
  3789. // used to include empty fields in Patch requests.
  3790. ForceSendFields []string `json:"-"`
  3791. // NullFields is a list of field names (e.g. "SheetId") to include in
  3792. // API requests with the JSON null value. By default, fields with empty
  3793. // values are omitted from API requests. However, any field with an
  3794. // empty value appearing in NullFields will be sent to the server as
  3795. // null. It is an error if a field in this list has a non-empty value.
  3796. // This may be used to include null fields in Patch requests.
  3797. NullFields []string `json:"-"`
  3798. }
  3799. func (s *DeleteSheetRequest) MarshalJSON() ([]byte, error) {
  3800. type NoMethod DeleteSheetRequest
  3801. raw := NoMethod(*s)
  3802. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3803. }
  3804. // DeveloperMetadata: Developer metadata associated with a location or
  3805. // object in a spreadsheet.
  3806. // Developer metadata may be used to associate arbitrary data with
  3807. // various
  3808. // parts of a spreadsheet and will remain associated at those locations
  3809. // as they
  3810. // move around and the spreadsheet is edited. For example, if
  3811. // developer
  3812. // metadata is associated with row 5 and another row is then
  3813. // subsequently
  3814. // inserted above row 5, that original metadata will still be associated
  3815. // with
  3816. // the row it was first associated with (what is now row 6). If the
  3817. // associated
  3818. // object is deleted its metadata is deleted too.
  3819. type DeveloperMetadata struct {
  3820. // Location: The location where the metadata is associated.
  3821. Location *DeveloperMetadataLocation `json:"location,omitempty"`
  3822. // MetadataId: The spreadsheet-scoped unique ID that identifies the
  3823. // metadata. IDs may be
  3824. // specified when metadata is created, otherwise one will be
  3825. // randomly
  3826. // generated and assigned. Must be positive.
  3827. MetadataId int64 `json:"metadataId,omitempty"`
  3828. // MetadataKey: The metadata key. There may be multiple metadata in a
  3829. // spreadsheet with the
  3830. // same key. Developer metadata must always have a key specified.
  3831. MetadataKey string `json:"metadataKey,omitempty"`
  3832. // MetadataValue: Data associated with the metadata's key.
  3833. MetadataValue string `json:"metadataValue,omitempty"`
  3834. // Visibility: The metadata visibility. Developer metadata must always
  3835. // have a visibility
  3836. // specified.
  3837. //
  3838. // Possible values:
  3839. // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value.
  3840. // "DOCUMENT" - Document-visible metadata is accessible from any
  3841. // developer project with
  3842. // access to the document.
  3843. // "PROJECT" - Project-visible metadata is only visible to and
  3844. // accessible by the developer
  3845. // project that created the metadata.
  3846. Visibility string `json:"visibility,omitempty"`
  3847. // ServerResponse contains the HTTP response code and headers from the
  3848. // server.
  3849. googleapi.ServerResponse `json:"-"`
  3850. // ForceSendFields is a list of field names (e.g. "Location") to
  3851. // unconditionally include in API requests. By default, fields with
  3852. // empty values are omitted from API requests. However, any non-pointer,
  3853. // non-interface field appearing in ForceSendFields will be sent to the
  3854. // server regardless of whether the field is empty or not. This may be
  3855. // used to include empty fields in Patch requests.
  3856. ForceSendFields []string `json:"-"`
  3857. // NullFields is a list of field names (e.g. "Location") to include in
  3858. // API requests with the JSON null value. By default, fields with empty
  3859. // values are omitted from API requests. However, any field with an
  3860. // empty value appearing in NullFields will be sent to the server as
  3861. // null. It is an error if a field in this list has a non-empty value.
  3862. // This may be used to include null fields in Patch requests.
  3863. NullFields []string `json:"-"`
  3864. }
  3865. func (s *DeveloperMetadata) MarshalJSON() ([]byte, error) {
  3866. type NoMethod DeveloperMetadata
  3867. raw := NoMethod(*s)
  3868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3869. }
  3870. // DeveloperMetadataLocation: A location where metadata may be
  3871. // associated in a spreadsheet.
  3872. type DeveloperMetadataLocation struct {
  3873. // DimensionRange: Represents the row or column when metadata is
  3874. // associated with
  3875. // a dimension. The specified DimensionRange must represent a single
  3876. // row
  3877. // or column; it cannot be unbounded or span multiple rows or columns.
  3878. DimensionRange *DimensionRange `json:"dimensionRange,omitempty"`
  3879. // LocationType: The type of location this object represents. This
  3880. // field is read-only.
  3881. //
  3882. // Possible values:
  3883. // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value.
  3884. // "ROW" - Developer metadata associated on an entire row dimension.
  3885. // "COLUMN" - Developer metadata associated on an entire column
  3886. // dimension.
  3887. // "SHEET" - Developer metadata associated on an entire sheet.
  3888. // "SPREADSHEET" - Developer metadata associated on the entire
  3889. // spreadsheet.
  3890. LocationType string `json:"locationType,omitempty"`
  3891. // SheetId: The ID of the sheet when metadata is associated with an
  3892. // entire sheet.
  3893. SheetId int64 `json:"sheetId,omitempty"`
  3894. // Spreadsheet: True when metadata is associated with an entire
  3895. // spreadsheet.
  3896. Spreadsheet bool `json:"spreadsheet,omitempty"`
  3897. // ForceSendFields is a list of field names (e.g. "DimensionRange") to
  3898. // unconditionally include in API requests. By default, fields with
  3899. // empty values are omitted from API requests. However, any non-pointer,
  3900. // non-interface field appearing in ForceSendFields will be sent to the
  3901. // server regardless of whether the field is empty or not. This may be
  3902. // used to include empty fields in Patch requests.
  3903. ForceSendFields []string `json:"-"`
  3904. // NullFields is a list of field names (e.g. "DimensionRange") to
  3905. // include in API requests with the JSON null value. By default, fields
  3906. // with empty values are omitted from API requests. However, any field
  3907. // with an empty value appearing in NullFields will be sent to the
  3908. // server as null. It is an error if a field in this list has a
  3909. // non-empty value. This may be used to include null fields in Patch
  3910. // requests.
  3911. NullFields []string `json:"-"`
  3912. }
  3913. func (s *DeveloperMetadataLocation) MarshalJSON() ([]byte, error) {
  3914. type NoMethod DeveloperMetadataLocation
  3915. raw := NoMethod(*s)
  3916. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3917. }
  3918. // DeveloperMetadataLookup: Selects DeveloperMetadata that matches all
  3919. // of the specified fields. For
  3920. // example, if only a metadata ID is specified this considers
  3921. // the
  3922. // DeveloperMetadata with that particular unique ID. If a metadata key
  3923. // is
  3924. // specified, this considers all developer metadata with that key. If
  3925. // a
  3926. // key, visibility, and location type are all specified, this considers
  3927. // all
  3928. // developer metadata with that key and visibility that are associated
  3929. // with a
  3930. // location of that type. In general, this
  3931. // selects all DeveloperMetadata that matches the intersection of all
  3932. // the
  3933. // specified fields; any field or combination of fields may be
  3934. // specified.
  3935. type DeveloperMetadataLookup struct {
  3936. // LocationMatchingStrategy: Determines how this lookup matches the
  3937. // location. If this field is
  3938. // specified as EXACT, only developer metadata associated on the
  3939. // exact
  3940. // location specified is matched. If this field is specified to
  3941. // INTERSECTING,
  3942. // developer metadata associated on intersecting locations is
  3943. // also
  3944. // matched. If left unspecified, this field assumes a default value
  3945. // of
  3946. // INTERSECTING.
  3947. // If this field is specified, a metadataLocation
  3948. // must also be specified.
  3949. //
  3950. // Possible values:
  3951. // "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" -
  3952. // Default value. This value must not be used.
  3953. // "EXACT_LOCATION" - Indicates that a specified location should be
  3954. // matched exactly. For
  3955. // example, if row three were specified as a location this matching
  3956. // strategy
  3957. // would only match developer metadata also associated on row three.
  3958. // Metadata
  3959. // associated on other locations would not be considered.
  3960. // "INTERSECTING_LOCATION" - Indicates that a specified location
  3961. // should match that exact location as
  3962. // well as any intersecting locations. For example, if row three
  3963. // were
  3964. // specified as a location this matching strategy would match
  3965. // developer
  3966. // metadata associated on row three as well as metadata associated
  3967. // on
  3968. // locations that intersect row three. If, for instance, there was
  3969. // developer
  3970. // metadata associated on column B, this matching strategy would also
  3971. // match
  3972. // that location because column B intersects row three.
  3973. LocationMatchingStrategy string `json:"locationMatchingStrategy,omitempty"`
  3974. // LocationType: Limits the selected developer metadata to those entries
  3975. // which are
  3976. // associated with locations of the specified type. For example, when
  3977. // this
  3978. // field is specified as ROW this lookup
  3979. // only considers developer metadata associated on rows. If the field
  3980. // is left
  3981. // unspecified, all location types are considered. This field cannot
  3982. // be
  3983. // specified as SPREADSHEET when
  3984. // the locationMatchingStrategy
  3985. // is specified as INTERSECTING or when the
  3986. // metadataLocation is specified as a
  3987. // non-spreadsheet location: spreadsheet metadata cannot intersect any
  3988. // other
  3989. // developer metadata location. This field also must be left
  3990. // unspecified when
  3991. // the locationMatchingStrategy
  3992. // is specified as EXACT.
  3993. //
  3994. // Possible values:
  3995. // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value.
  3996. // "ROW" - Developer metadata associated on an entire row dimension.
  3997. // "COLUMN" - Developer metadata associated on an entire column
  3998. // dimension.
  3999. // "SHEET" - Developer metadata associated on an entire sheet.
  4000. // "SPREADSHEET" - Developer metadata associated on the entire
  4001. // spreadsheet.
  4002. LocationType string `json:"locationType,omitempty"`
  4003. // MetadataId: Limits the selected developer metadata to that which has
  4004. // a matching
  4005. // DeveloperMetadata.metadata_id.
  4006. MetadataId int64 `json:"metadataId,omitempty"`
  4007. // MetadataKey: Limits the selected developer metadata to that which has
  4008. // a matching
  4009. // DeveloperMetadata.metadata_key.
  4010. MetadataKey string `json:"metadataKey,omitempty"`
  4011. // MetadataLocation: Limits the selected developer metadata to those
  4012. // entries associated with
  4013. // the specified location. This field either matches exact locations or
  4014. // all
  4015. // intersecting locations according the
  4016. // specified
  4017. // locationMatchingStrategy.
  4018. MetadataLocation *DeveloperMetadataLocation `json:"metadataLocation,omitempty"`
  4019. // MetadataValue: Limits the selected developer metadata to that which
  4020. // has a matching
  4021. // DeveloperMetadata.metadata_value.
  4022. MetadataValue string `json:"metadataValue,omitempty"`
  4023. // Visibility: Limits the selected developer metadata to that which has
  4024. // a matching
  4025. // DeveloperMetadata.visibility. If left unspecified, all
  4026. // developer
  4027. // metadata visibile to the requesting project is considered.
  4028. //
  4029. // Possible values:
  4030. // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value.
  4031. // "DOCUMENT" - Document-visible metadata is accessible from any
  4032. // developer project with
  4033. // access to the document.
  4034. // "PROJECT" - Project-visible metadata is only visible to and
  4035. // accessible by the developer
  4036. // project that created the metadata.
  4037. Visibility string `json:"visibility,omitempty"`
  4038. // ForceSendFields is a list of field names (e.g.
  4039. // "LocationMatchingStrategy") to unconditionally include in API
  4040. // requests. By default, fields with empty values are omitted from API
  4041. // requests. However, any non-pointer, non-interface field appearing in
  4042. // ForceSendFields will be sent to the server regardless of whether the
  4043. // field is empty or not. This may be used to include empty fields in
  4044. // Patch requests.
  4045. ForceSendFields []string `json:"-"`
  4046. // NullFields is a list of field names (e.g. "LocationMatchingStrategy")
  4047. // to include in API requests with the JSON null value. By default,
  4048. // fields with empty values are omitted from API requests. However, any
  4049. // field with an empty value appearing in NullFields will be sent to the
  4050. // server as null. It is an error if a field in this list has a
  4051. // non-empty value. This may be used to include null fields in Patch
  4052. // requests.
  4053. NullFields []string `json:"-"`
  4054. }
  4055. func (s *DeveloperMetadataLookup) MarshalJSON() ([]byte, error) {
  4056. type NoMethod DeveloperMetadataLookup
  4057. raw := NoMethod(*s)
  4058. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4059. }
  4060. // DimensionGroup: A group over an interval of rows or columns on a
  4061. // sheet, which can contain or
  4062. // be contained within other groups. A group can be collapsed or
  4063. // expanded as a
  4064. // unit on the sheet.
  4065. type DimensionGroup struct {
  4066. // Collapsed: This field is true if this group is collapsed. A collapsed
  4067. // group remains
  4068. // collapsed if an overlapping group at a shallower depth is
  4069. // expanded.
  4070. //
  4071. // A true value does not imply that all dimensions within the group
  4072. // are
  4073. // hidden, since a dimension's visibility can change independently from
  4074. // this
  4075. // group property. However, when this property is updated, all
  4076. // dimensions
  4077. // within it are set to hidden if this field is true, or set to visible
  4078. // if
  4079. // this field is false.
  4080. Collapsed bool `json:"collapsed,omitempty"`
  4081. // Depth: The depth of the group, representing how many groups have a
  4082. // range that
  4083. // wholly contains the range of this group.
  4084. Depth int64 `json:"depth,omitempty"`
  4085. // Range: The range over which this group exists.
  4086. Range *DimensionRange `json:"range,omitempty"`
  4087. // ForceSendFields is a list of field names (e.g. "Collapsed") to
  4088. // unconditionally include in API requests. By default, fields with
  4089. // empty values are omitted from API requests. However, any non-pointer,
  4090. // non-interface field appearing in ForceSendFields will be sent to the
  4091. // server regardless of whether the field is empty or not. This may be
  4092. // used to include empty fields in Patch requests.
  4093. ForceSendFields []string `json:"-"`
  4094. // NullFields is a list of field names (e.g. "Collapsed") to include in
  4095. // API requests with the JSON null value. By default, fields with empty
  4096. // values are omitted from API requests. However, any field with an
  4097. // empty value appearing in NullFields will be sent to the server as
  4098. // null. It is an error if a field in this list has a non-empty value.
  4099. // This may be used to include null fields in Patch requests.
  4100. NullFields []string `json:"-"`
  4101. }
  4102. func (s *DimensionGroup) MarshalJSON() ([]byte, error) {
  4103. type NoMethod DimensionGroup
  4104. raw := NoMethod(*s)
  4105. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4106. }
  4107. // DimensionProperties: Properties about a dimension.
  4108. type DimensionProperties struct {
  4109. // DeveloperMetadata: The developer metadata associated with a single
  4110. // row or column.
  4111. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  4112. // HiddenByFilter: True if this dimension is being filtered.
  4113. // This field is read-only.
  4114. HiddenByFilter bool `json:"hiddenByFilter,omitempty"`
  4115. // HiddenByUser: True if this dimension is explicitly hidden.
  4116. HiddenByUser bool `json:"hiddenByUser,omitempty"`
  4117. // PixelSize: The height (if a row) or width (if a column) of the
  4118. // dimension in pixels.
  4119. PixelSize int64 `json:"pixelSize,omitempty"`
  4120. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  4121. // to unconditionally include in API requests. By default, fields with
  4122. // empty values are omitted from API requests. However, any non-pointer,
  4123. // non-interface field appearing in ForceSendFields will be sent to the
  4124. // server regardless of whether the field is empty or not. This may be
  4125. // used to include empty fields in Patch requests.
  4126. ForceSendFields []string `json:"-"`
  4127. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  4128. // include in API requests with the JSON null value. By default, fields
  4129. // with empty values are omitted from API requests. However, any field
  4130. // with an empty value appearing in NullFields will be sent to the
  4131. // server as null. It is an error if a field in this list has a
  4132. // non-empty value. This may be used to include null fields in Patch
  4133. // requests.
  4134. NullFields []string `json:"-"`
  4135. }
  4136. func (s *DimensionProperties) MarshalJSON() ([]byte, error) {
  4137. type NoMethod DimensionProperties
  4138. raw := NoMethod(*s)
  4139. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4140. }
  4141. // DimensionRange: A range along a single dimension on a sheet.
  4142. // All indexes are zero-based.
  4143. // Indexes are half open: the start index is inclusive
  4144. // and the end index is exclusive.
  4145. // Missing indexes indicate the range is unbounded on that side.
  4146. type DimensionRange struct {
  4147. // Dimension: The dimension of the span.
  4148. //
  4149. // Possible values:
  4150. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  4151. // "ROWS" - Operates on the rows of a sheet.
  4152. // "COLUMNS" - Operates on the columns of a sheet.
  4153. Dimension string `json:"dimension,omitempty"`
  4154. // EndIndex: The end (exclusive) of the span, or not set if unbounded.
  4155. EndIndex int64 `json:"endIndex,omitempty"`
  4156. // SheetId: The sheet this span is on.
  4157. SheetId int64 `json:"sheetId,omitempty"`
  4158. // StartIndex: The start (inclusive) of the span, or not set if
  4159. // unbounded.
  4160. StartIndex int64 `json:"startIndex,omitempty"`
  4161. // ForceSendFields is a list of field names (e.g. "Dimension") to
  4162. // unconditionally include in API requests. By default, fields with
  4163. // empty values are omitted from API requests. However, any non-pointer,
  4164. // non-interface field appearing in ForceSendFields will be sent to the
  4165. // server regardless of whether the field is empty or not. This may be
  4166. // used to include empty fields in Patch requests.
  4167. ForceSendFields []string `json:"-"`
  4168. // NullFields is a list of field names (e.g. "Dimension") to include in
  4169. // API requests with the JSON null value. By default, fields with empty
  4170. // values are omitted from API requests. However, any field with an
  4171. // empty value appearing in NullFields will be sent to the server as
  4172. // null. It is an error if a field in this list has a non-empty value.
  4173. // This may be used to include null fields in Patch requests.
  4174. NullFields []string `json:"-"`
  4175. }
  4176. func (s *DimensionRange) MarshalJSON() ([]byte, error) {
  4177. type NoMethod DimensionRange
  4178. raw := NoMethod(*s)
  4179. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4180. }
  4181. // DuplicateFilterViewRequest: Duplicates a particular filter view.
  4182. type DuplicateFilterViewRequest struct {
  4183. // FilterId: The ID of the filter being duplicated.
  4184. FilterId int64 `json:"filterId,omitempty"`
  4185. // ForceSendFields is a list of field names (e.g. "FilterId") to
  4186. // unconditionally include in API requests. By default, fields with
  4187. // empty values are omitted from API requests. However, any non-pointer,
  4188. // non-interface field appearing in ForceSendFields will be sent to the
  4189. // server regardless of whether the field is empty or not. This may be
  4190. // used to include empty fields in Patch requests.
  4191. ForceSendFields []string `json:"-"`
  4192. // NullFields is a list of field names (e.g. "FilterId") to include in
  4193. // API requests with the JSON null value. By default, fields with empty
  4194. // values are omitted from API requests. However, any field with an
  4195. // empty value appearing in NullFields will be sent to the server as
  4196. // null. It is an error if a field in this list has a non-empty value.
  4197. // This may be used to include null fields in Patch requests.
  4198. NullFields []string `json:"-"`
  4199. }
  4200. func (s *DuplicateFilterViewRequest) MarshalJSON() ([]byte, error) {
  4201. type NoMethod DuplicateFilterViewRequest
  4202. raw := NoMethod(*s)
  4203. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4204. }
  4205. // DuplicateFilterViewResponse: The result of a filter view being
  4206. // duplicated.
  4207. type DuplicateFilterViewResponse struct {
  4208. // Filter: The newly created filter.
  4209. Filter *FilterView `json:"filter,omitempty"`
  4210. // ForceSendFields is a list of field names (e.g. "Filter") to
  4211. // unconditionally include in API requests. By default, fields with
  4212. // empty values are omitted from API requests. However, any non-pointer,
  4213. // non-interface field appearing in ForceSendFields will be sent to the
  4214. // server regardless of whether the field is empty or not. This may be
  4215. // used to include empty fields in Patch requests.
  4216. ForceSendFields []string `json:"-"`
  4217. // NullFields is a list of field names (e.g. "Filter") to include in API
  4218. // requests with the JSON null value. By default, fields with empty
  4219. // values are omitted from API requests. However, any field with an
  4220. // empty value appearing in NullFields will be sent to the server as
  4221. // null. It is an error if a field in this list has a non-empty value.
  4222. // This may be used to include null fields in Patch requests.
  4223. NullFields []string `json:"-"`
  4224. }
  4225. func (s *DuplicateFilterViewResponse) MarshalJSON() ([]byte, error) {
  4226. type NoMethod DuplicateFilterViewResponse
  4227. raw := NoMethod(*s)
  4228. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4229. }
  4230. // DuplicateSheetRequest: Duplicates the contents of a sheet.
  4231. type DuplicateSheetRequest struct {
  4232. // InsertSheetIndex: The zero-based index where the new sheet should be
  4233. // inserted.
  4234. // The index of all sheets after this are incremented.
  4235. InsertSheetIndex int64 `json:"insertSheetIndex,omitempty"`
  4236. // NewSheetId: If set, the ID of the new sheet. If not set, an ID is
  4237. // chosen.
  4238. // If set, the ID must not conflict with any existing sheet ID.
  4239. // If set, it must be non-negative.
  4240. NewSheetId int64 `json:"newSheetId,omitempty"`
  4241. // NewSheetName: The name of the new sheet. If empty, a new name is
  4242. // chosen for you.
  4243. NewSheetName string `json:"newSheetName,omitempty"`
  4244. // SourceSheetId: The sheet to duplicate.
  4245. SourceSheetId int64 `json:"sourceSheetId,omitempty"`
  4246. // ForceSendFields is a list of field names (e.g. "InsertSheetIndex") to
  4247. // unconditionally include in API requests. By default, fields with
  4248. // empty values are omitted from API requests. However, any non-pointer,
  4249. // non-interface field appearing in ForceSendFields will be sent to the
  4250. // server regardless of whether the field is empty or not. This may be
  4251. // used to include empty fields in Patch requests.
  4252. ForceSendFields []string `json:"-"`
  4253. // NullFields is a list of field names (e.g. "InsertSheetIndex") to
  4254. // include in API requests with the JSON null value. By default, fields
  4255. // with empty values are omitted from API requests. However, any field
  4256. // with an empty value appearing in NullFields will be sent to the
  4257. // server as null. It is an error if a field in this list has a
  4258. // non-empty value. This may be used to include null fields in Patch
  4259. // requests.
  4260. NullFields []string `json:"-"`
  4261. }
  4262. func (s *DuplicateSheetRequest) MarshalJSON() ([]byte, error) {
  4263. type NoMethod DuplicateSheetRequest
  4264. raw := NoMethod(*s)
  4265. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4266. }
  4267. // DuplicateSheetResponse: The result of duplicating a sheet.
  4268. type DuplicateSheetResponse struct {
  4269. // Properties: The properties of the duplicate sheet.
  4270. Properties *SheetProperties `json:"properties,omitempty"`
  4271. // ForceSendFields is a list of field names (e.g. "Properties") to
  4272. // unconditionally include in API requests. By default, fields with
  4273. // empty values are omitted from API requests. However, any non-pointer,
  4274. // non-interface field appearing in ForceSendFields will be sent to the
  4275. // server regardless of whether the field is empty or not. This may be
  4276. // used to include empty fields in Patch requests.
  4277. ForceSendFields []string `json:"-"`
  4278. // NullFields is a list of field names (e.g. "Properties") to include in
  4279. // API requests with the JSON null value. By default, fields with empty
  4280. // values are omitted from API requests. However, any field with an
  4281. // empty value appearing in NullFields will be sent to the server as
  4282. // null. It is an error if a field in this list has a non-empty value.
  4283. // This may be used to include null fields in Patch requests.
  4284. NullFields []string `json:"-"`
  4285. }
  4286. func (s *DuplicateSheetResponse) MarshalJSON() ([]byte, error) {
  4287. type NoMethod DuplicateSheetResponse
  4288. raw := NoMethod(*s)
  4289. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4290. }
  4291. // Editors: The editors of a protected range.
  4292. type Editors struct {
  4293. // DomainUsersCanEdit: True if anyone in the document's domain has edit
  4294. // access to the protected
  4295. // range. Domain protection is only supported on documents within a
  4296. // domain.
  4297. DomainUsersCanEdit bool `json:"domainUsersCanEdit,omitempty"`
  4298. // Groups: The email addresses of groups with edit access to the
  4299. // protected range.
  4300. Groups []string `json:"groups,omitempty"`
  4301. // Users: The email addresses of users with edit access to the protected
  4302. // range.
  4303. Users []string `json:"users,omitempty"`
  4304. // ForceSendFields is a list of field names (e.g. "DomainUsersCanEdit")
  4305. // to unconditionally include in API requests. By default, fields with
  4306. // empty values are omitted from API requests. However, any non-pointer,
  4307. // non-interface field appearing in ForceSendFields will be sent to the
  4308. // server regardless of whether the field is empty or not. This may be
  4309. // used to include empty fields in Patch requests.
  4310. ForceSendFields []string `json:"-"`
  4311. // NullFields is a list of field names (e.g. "DomainUsersCanEdit") to
  4312. // include in API requests with the JSON null value. By default, fields
  4313. // with empty values are omitted from API requests. However, any field
  4314. // with an empty value appearing in NullFields will be sent to the
  4315. // server as null. It is an error if a field in this list has a
  4316. // non-empty value. This may be used to include null fields in Patch
  4317. // requests.
  4318. NullFields []string `json:"-"`
  4319. }
  4320. func (s *Editors) MarshalJSON() ([]byte, error) {
  4321. type NoMethod Editors
  4322. raw := NoMethod(*s)
  4323. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4324. }
  4325. // EmbeddedChart: A chart embedded in a sheet.
  4326. type EmbeddedChart struct {
  4327. // ChartId: The ID of the chart.
  4328. ChartId int64 `json:"chartId,omitempty"`
  4329. // Position: The position of the chart.
  4330. Position *EmbeddedObjectPosition `json:"position,omitempty"`
  4331. // Spec: The specification of the chart.
  4332. Spec *ChartSpec `json:"spec,omitempty"`
  4333. // ForceSendFields is a list of field names (e.g. "ChartId") to
  4334. // unconditionally include in API requests. By default, fields with
  4335. // empty values are omitted from API requests. However, any non-pointer,
  4336. // non-interface field appearing in ForceSendFields will be sent to the
  4337. // server regardless of whether the field is empty or not. This may be
  4338. // used to include empty fields in Patch requests.
  4339. ForceSendFields []string `json:"-"`
  4340. // NullFields is a list of field names (e.g. "ChartId") to include in
  4341. // API requests with the JSON null value. By default, fields with empty
  4342. // values are omitted from API requests. However, any field with an
  4343. // empty value appearing in NullFields will be sent to the server as
  4344. // null. It is an error if a field in this list has a non-empty value.
  4345. // This may be used to include null fields in Patch requests.
  4346. NullFields []string `json:"-"`
  4347. }
  4348. func (s *EmbeddedChart) MarshalJSON() ([]byte, error) {
  4349. type NoMethod EmbeddedChart
  4350. raw := NoMethod(*s)
  4351. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4352. }
  4353. // EmbeddedObjectPosition: The position of an embedded object such as a
  4354. // chart.
  4355. type EmbeddedObjectPosition struct {
  4356. // NewSheet: If true, the embedded object is put on a new sheet whose
  4357. // ID
  4358. // is chosen for you. Used only when writing.
  4359. NewSheet bool `json:"newSheet,omitempty"`
  4360. // OverlayPosition: The position at which the object is overlaid on top
  4361. // of a grid.
  4362. OverlayPosition *OverlayPosition `json:"overlayPosition,omitempty"`
  4363. // SheetId: The sheet this is on. Set only if the embedded object
  4364. // is on its own sheet. Must be non-negative.
  4365. SheetId int64 `json:"sheetId,omitempty"`
  4366. // ForceSendFields is a list of field names (e.g. "NewSheet") to
  4367. // unconditionally include in API requests. By default, fields with
  4368. // empty values are omitted from API requests. However, any non-pointer,
  4369. // non-interface field appearing in ForceSendFields will be sent to the
  4370. // server regardless of whether the field is empty or not. This may be
  4371. // used to include empty fields in Patch requests.
  4372. ForceSendFields []string `json:"-"`
  4373. // NullFields is a list of field names (e.g. "NewSheet") to include in
  4374. // API requests with the JSON null value. By default, fields with empty
  4375. // values are omitted from API requests. However, any field with an
  4376. // empty value appearing in NullFields will be sent to the server as
  4377. // null. It is an error if a field in this list has a non-empty value.
  4378. // This may be used to include null fields in Patch requests.
  4379. NullFields []string `json:"-"`
  4380. }
  4381. func (s *EmbeddedObjectPosition) MarshalJSON() ([]byte, error) {
  4382. type NoMethod EmbeddedObjectPosition
  4383. raw := NoMethod(*s)
  4384. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4385. }
  4386. // ErrorValue: An error in a cell.
  4387. type ErrorValue struct {
  4388. // Message: A message with more information about the error
  4389. // (in the spreadsheet's locale).
  4390. Message string `json:"message,omitempty"`
  4391. // Type: The type of error.
  4392. //
  4393. // Possible values:
  4394. // "ERROR_TYPE_UNSPECIFIED" - The default error type, do not use this.
  4395. // "ERROR" - Corresponds to the `#ERROR!` error.
  4396. // "NULL_VALUE" - Corresponds to the `#NULL!` error.
  4397. // "DIVIDE_BY_ZERO" - Corresponds to the `#DIV/0` error.
  4398. // "VALUE" - Corresponds to the `#VALUE!` error.
  4399. // "REF" - Corresponds to the `#REF!` error.
  4400. // "NAME" - Corresponds to the `#NAME?` error.
  4401. // "NUM" - Corresponds to the `#NUM`! error.
  4402. // "N_A" - Corresponds to the `#N/A` error.
  4403. // "LOADING" - Corresponds to the `Loading...` state.
  4404. Type string `json:"type,omitempty"`
  4405. // ForceSendFields is a list of field names (e.g. "Message") to
  4406. // unconditionally include in API requests. By default, fields with
  4407. // empty values are omitted from API requests. However, any non-pointer,
  4408. // non-interface field appearing in ForceSendFields will be sent to the
  4409. // server regardless of whether the field is empty or not. This may be
  4410. // used to include empty fields in Patch requests.
  4411. ForceSendFields []string `json:"-"`
  4412. // NullFields is a list of field names (e.g. "Message") to include in
  4413. // API requests with the JSON null value. By default, fields with empty
  4414. // values are omitted from API requests. However, any field with an
  4415. // empty value appearing in NullFields will be sent to the server as
  4416. // null. It is an error if a field in this list has a non-empty value.
  4417. // This may be used to include null fields in Patch requests.
  4418. NullFields []string `json:"-"`
  4419. }
  4420. func (s *ErrorValue) MarshalJSON() ([]byte, error) {
  4421. type NoMethod ErrorValue
  4422. raw := NoMethod(*s)
  4423. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4424. }
  4425. // ExtendedValue: The kinds of value that a cell in a spreadsheet can
  4426. // have.
  4427. type ExtendedValue struct {
  4428. // BoolValue: Represents a boolean value.
  4429. BoolValue bool `json:"boolValue,omitempty"`
  4430. // ErrorValue: Represents an error.
  4431. // This field is read-only.
  4432. ErrorValue *ErrorValue `json:"errorValue,omitempty"`
  4433. // FormulaValue: Represents a formula.
  4434. FormulaValue string `json:"formulaValue,omitempty"`
  4435. // NumberValue: Represents a double value.
  4436. // Note: Dates, Times and DateTimes are represented as doubles
  4437. // in
  4438. // "serial number" format.
  4439. NumberValue float64 `json:"numberValue,omitempty"`
  4440. // StringValue: Represents a string value.
  4441. // Leading single quotes are not included. For example, if the user
  4442. // typed
  4443. // `'123` into the UI, this would be represented as a `stringValue`
  4444. // of
  4445. // "123".
  4446. StringValue string `json:"stringValue,omitempty"`
  4447. // ForceSendFields is a list of field names (e.g. "BoolValue") to
  4448. // unconditionally include in API requests. By default, fields with
  4449. // empty values are omitted from API requests. However, any non-pointer,
  4450. // non-interface field appearing in ForceSendFields will be sent to the
  4451. // server regardless of whether the field is empty or not. This may be
  4452. // used to include empty fields in Patch requests.
  4453. ForceSendFields []string `json:"-"`
  4454. // NullFields is a list of field names (e.g. "BoolValue") to include in
  4455. // API requests with the JSON null value. By default, fields with empty
  4456. // values are omitted from API requests. However, any field with an
  4457. // empty value appearing in NullFields will be sent to the server as
  4458. // null. It is an error if a field in this list has a non-empty value.
  4459. // This may be used to include null fields in Patch requests.
  4460. NullFields []string `json:"-"`
  4461. }
  4462. func (s *ExtendedValue) MarshalJSON() ([]byte, error) {
  4463. type NoMethod ExtendedValue
  4464. raw := NoMethod(*s)
  4465. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4466. }
  4467. func (s *ExtendedValue) UnmarshalJSON(data []byte) error {
  4468. type NoMethod ExtendedValue
  4469. var s1 struct {
  4470. NumberValue gensupport.JSONFloat64 `json:"numberValue"`
  4471. *NoMethod
  4472. }
  4473. s1.NoMethod = (*NoMethod)(s)
  4474. if err := json.Unmarshal(data, &s1); err != nil {
  4475. return err
  4476. }
  4477. s.NumberValue = float64(s1.NumberValue)
  4478. return nil
  4479. }
  4480. // FilterCriteria: Criteria for showing/hiding rows in a filter or
  4481. // filter view.
  4482. type FilterCriteria struct {
  4483. // Condition: A condition that must be true for values to be
  4484. // shown.
  4485. // (This does not override hiddenValues -- if a value is listed there,
  4486. // it will still be hidden.)
  4487. Condition *BooleanCondition `json:"condition,omitempty"`
  4488. // HiddenValues: Values that should be hidden.
  4489. HiddenValues []string `json:"hiddenValues,omitempty"`
  4490. // ForceSendFields is a list of field names (e.g. "Condition") to
  4491. // unconditionally include in API requests. By default, fields with
  4492. // empty values are omitted from API requests. However, any non-pointer,
  4493. // non-interface field appearing in ForceSendFields will be sent to the
  4494. // server regardless of whether the field is empty or not. This may be
  4495. // used to include empty fields in Patch requests.
  4496. ForceSendFields []string `json:"-"`
  4497. // NullFields is a list of field names (e.g. "Condition") to include in
  4498. // API requests with the JSON null value. By default, fields with empty
  4499. // values are omitted from API requests. However, any field with an
  4500. // empty value appearing in NullFields will be sent to the server as
  4501. // null. It is an error if a field in this list has a non-empty value.
  4502. // This may be used to include null fields in Patch requests.
  4503. NullFields []string `json:"-"`
  4504. }
  4505. func (s *FilterCriteria) MarshalJSON() ([]byte, error) {
  4506. type NoMethod FilterCriteria
  4507. raw := NoMethod(*s)
  4508. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4509. }
  4510. // FilterView: A filter view.
  4511. type FilterView struct {
  4512. // Criteria: The criteria for showing/hiding values per column.
  4513. // The map's key is the column index, and the value is the criteria
  4514. // for
  4515. // that column.
  4516. Criteria map[string]FilterCriteria `json:"criteria,omitempty"`
  4517. // FilterViewId: The ID of the filter view.
  4518. FilterViewId int64 `json:"filterViewId,omitempty"`
  4519. // NamedRangeId: The named range this filter view is backed by, if
  4520. // any.
  4521. //
  4522. // When writing, only one of range or named_range_id
  4523. // may be set.
  4524. NamedRangeId string `json:"namedRangeId,omitempty"`
  4525. // Range: The range this filter view covers.
  4526. //
  4527. // When writing, only one of range or named_range_id
  4528. // may be set.
  4529. Range *GridRange `json:"range,omitempty"`
  4530. // SortSpecs: The sort order per column. Later specifications are used
  4531. // when values
  4532. // are equal in the earlier specifications.
  4533. SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
  4534. // Title: The name of the filter view.
  4535. Title string `json:"title,omitempty"`
  4536. // ForceSendFields is a list of field names (e.g. "Criteria") to
  4537. // unconditionally include in API requests. By default, fields with
  4538. // empty values are omitted from API requests. However, any non-pointer,
  4539. // non-interface field appearing in ForceSendFields will be sent to the
  4540. // server regardless of whether the field is empty or not. This may be
  4541. // used to include empty fields in Patch requests.
  4542. ForceSendFields []string `json:"-"`
  4543. // NullFields is a list of field names (e.g. "Criteria") to include in
  4544. // API requests with the JSON null value. By default, fields with empty
  4545. // values are omitted from API requests. However, any field with an
  4546. // empty value appearing in NullFields will be sent to the server as
  4547. // null. It is an error if a field in this list has a non-empty value.
  4548. // This may be used to include null fields in Patch requests.
  4549. NullFields []string `json:"-"`
  4550. }
  4551. func (s *FilterView) MarshalJSON() ([]byte, error) {
  4552. type NoMethod FilterView
  4553. raw := NoMethod(*s)
  4554. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4555. }
  4556. // FindReplaceRequest: Finds and replaces data in cells over a range,
  4557. // sheet, or all sheets.
  4558. type FindReplaceRequest struct {
  4559. // AllSheets: True to find/replace over all sheets.
  4560. AllSheets bool `json:"allSheets,omitempty"`
  4561. // Find: The value to search.
  4562. Find string `json:"find,omitempty"`
  4563. // IncludeFormulas: True if the search should include cells with
  4564. // formulas.
  4565. // False to skip cells with formulas.
  4566. IncludeFormulas bool `json:"includeFormulas,omitempty"`
  4567. // MatchCase: True if the search is case sensitive.
  4568. MatchCase bool `json:"matchCase,omitempty"`
  4569. // MatchEntireCell: True if the find value should match the entire cell.
  4570. MatchEntireCell bool `json:"matchEntireCell,omitempty"`
  4571. // Range: The range to find/replace over.
  4572. Range *GridRange `json:"range,omitempty"`
  4573. // Replacement: The value to use as the replacement.
  4574. Replacement string `json:"replacement,omitempty"`
  4575. // SearchByRegex: True if the find value is a regex.
  4576. // The regular expression and replacement should follow Java regex
  4577. // rules
  4578. // at
  4579. // https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
  4580. // The replacement string is allowed to refer to capturing groups.
  4581. // For example, if one cell has the contents "Google Sheets" and
  4582. // another
  4583. // has "Google Docs", then searching for "o.* (.*)" with a
  4584. // replacement of
  4585. // "$1 Rocks" would change the contents of the cells to
  4586. // "GSheets Rocks" and "GDocs Rocks" respectively.
  4587. SearchByRegex bool `json:"searchByRegex,omitempty"`
  4588. // SheetId: The sheet to find/replace over.
  4589. SheetId int64 `json:"sheetId,omitempty"`
  4590. // ForceSendFields is a list of field names (e.g. "AllSheets") to
  4591. // unconditionally include in API requests. By default, fields with
  4592. // empty values are omitted from API requests. However, any non-pointer,
  4593. // non-interface field appearing in ForceSendFields will be sent to the
  4594. // server regardless of whether the field is empty or not. This may be
  4595. // used to include empty fields in Patch requests.
  4596. ForceSendFields []string `json:"-"`
  4597. // NullFields is a list of field names (e.g. "AllSheets") to include in
  4598. // API requests with the JSON null value. By default, fields with empty
  4599. // values are omitted from API requests. However, any field with an
  4600. // empty value appearing in NullFields will be sent to the server as
  4601. // null. It is an error if a field in this list has a non-empty value.
  4602. // This may be used to include null fields in Patch requests.
  4603. NullFields []string `json:"-"`
  4604. }
  4605. func (s *FindReplaceRequest) MarshalJSON() ([]byte, error) {
  4606. type NoMethod FindReplaceRequest
  4607. raw := NoMethod(*s)
  4608. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4609. }
  4610. // FindReplaceResponse: The result of the find/replace.
  4611. type FindReplaceResponse struct {
  4612. // FormulasChanged: The number of formula cells changed.
  4613. FormulasChanged int64 `json:"formulasChanged,omitempty"`
  4614. // OccurrencesChanged: The number of occurrences (possibly multiple
  4615. // within a cell) changed.
  4616. // For example, if replacing "e" with "o" in "Google Sheets", this
  4617. // would
  4618. // be "3" because "Google Sheets" -> "Googlo Shoots".
  4619. OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"`
  4620. // RowsChanged: The number of rows changed.
  4621. RowsChanged int64 `json:"rowsChanged,omitempty"`
  4622. // SheetsChanged: The number of sheets changed.
  4623. SheetsChanged int64 `json:"sheetsChanged,omitempty"`
  4624. // ValuesChanged: The number of non-formula cells changed.
  4625. ValuesChanged int64 `json:"valuesChanged,omitempty"`
  4626. // ForceSendFields is a list of field names (e.g. "FormulasChanged") to
  4627. // unconditionally include in API requests. By default, fields with
  4628. // empty values are omitted from API requests. However, any non-pointer,
  4629. // non-interface field appearing in ForceSendFields will be sent to the
  4630. // server regardless of whether the field is empty or not. This may be
  4631. // used to include empty fields in Patch requests.
  4632. ForceSendFields []string `json:"-"`
  4633. // NullFields is a list of field names (e.g. "FormulasChanged") to
  4634. // include in API requests with the JSON null value. By default, fields
  4635. // with empty values are omitted from API requests. However, any field
  4636. // with an empty value appearing in NullFields will be sent to the
  4637. // server as null. It is an error if a field in this list has a
  4638. // non-empty value. This may be used to include null fields in Patch
  4639. // requests.
  4640. NullFields []string `json:"-"`
  4641. }
  4642. func (s *FindReplaceResponse) MarshalJSON() ([]byte, error) {
  4643. type NoMethod FindReplaceResponse
  4644. raw := NoMethod(*s)
  4645. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4646. }
  4647. // GetSpreadsheetByDataFilterRequest: The request for retrieving a
  4648. // Spreadsheet.
  4649. type GetSpreadsheetByDataFilterRequest struct {
  4650. // DataFilters: The DataFilters used to select which ranges to retrieve
  4651. // from
  4652. // the spreadsheet.
  4653. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  4654. // IncludeGridData: True if grid data should be returned.
  4655. // This parameter is ignored if a field mask was set in the request.
  4656. IncludeGridData bool `json:"includeGridData,omitempty"`
  4657. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  4658. // unconditionally include in API requests. By default, fields with
  4659. // empty values are omitted from API requests. However, any non-pointer,
  4660. // non-interface field appearing in ForceSendFields will be sent to the
  4661. // server regardless of whether the field is empty or not. This may be
  4662. // used to include empty fields in Patch requests.
  4663. ForceSendFields []string `json:"-"`
  4664. // NullFields is a list of field names (e.g. "DataFilters") to include
  4665. // in API requests with the JSON null value. By default, fields with
  4666. // empty values are omitted from API requests. However, any field with
  4667. // an empty value appearing in NullFields will be sent to the server as
  4668. // null. It is an error if a field in this list has a non-empty value.
  4669. // This may be used to include null fields in Patch requests.
  4670. NullFields []string `json:"-"`
  4671. }
  4672. func (s *GetSpreadsheetByDataFilterRequest) MarshalJSON() ([]byte, error) {
  4673. type NoMethod GetSpreadsheetByDataFilterRequest
  4674. raw := NoMethod(*s)
  4675. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4676. }
  4677. // GradientRule: A rule that applies a gradient color scale format,
  4678. // based on
  4679. // the interpolation points listed. The format of a cell will vary
  4680. // based on its contents as compared to the values of the
  4681. // interpolation
  4682. // points.
  4683. type GradientRule struct {
  4684. // Maxpoint: The final interpolation point.
  4685. Maxpoint *InterpolationPoint `json:"maxpoint,omitempty"`
  4686. // Midpoint: An optional midway interpolation point.
  4687. Midpoint *InterpolationPoint `json:"midpoint,omitempty"`
  4688. // Minpoint: The starting interpolation point.
  4689. Minpoint *InterpolationPoint `json:"minpoint,omitempty"`
  4690. // ForceSendFields is a list of field names (e.g. "Maxpoint") to
  4691. // unconditionally include in API requests. By default, fields with
  4692. // empty values are omitted from API requests. However, any non-pointer,
  4693. // non-interface field appearing in ForceSendFields will be sent to the
  4694. // server regardless of whether the field is empty or not. This may be
  4695. // used to include empty fields in Patch requests.
  4696. ForceSendFields []string `json:"-"`
  4697. // NullFields is a list of field names (e.g. "Maxpoint") to include in
  4698. // API requests with the JSON null value. By default, fields with empty
  4699. // values are omitted from API requests. However, any field with an
  4700. // empty value appearing in NullFields will be sent to the server as
  4701. // null. It is an error if a field in this list has a non-empty value.
  4702. // This may be used to include null fields in Patch requests.
  4703. NullFields []string `json:"-"`
  4704. }
  4705. func (s *GradientRule) MarshalJSON() ([]byte, error) {
  4706. type NoMethod GradientRule
  4707. raw := NoMethod(*s)
  4708. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4709. }
  4710. // GridCoordinate: A coordinate in a sheet.
  4711. // All indexes are zero-based.
  4712. type GridCoordinate struct {
  4713. // ColumnIndex: The column index of the coordinate.
  4714. ColumnIndex int64 `json:"columnIndex,omitempty"`
  4715. // RowIndex: The row index of the coordinate.
  4716. RowIndex int64 `json:"rowIndex,omitempty"`
  4717. // SheetId: The sheet this coordinate is on.
  4718. SheetId int64 `json:"sheetId,omitempty"`
  4719. // ForceSendFields is a list of field names (e.g. "ColumnIndex") to
  4720. // unconditionally include in API requests. By default, fields with
  4721. // empty values are omitted from API requests. However, any non-pointer,
  4722. // non-interface field appearing in ForceSendFields will be sent to the
  4723. // server regardless of whether the field is empty or not. This may be
  4724. // used to include empty fields in Patch requests.
  4725. ForceSendFields []string `json:"-"`
  4726. // NullFields is a list of field names (e.g. "ColumnIndex") to include
  4727. // in API requests with the JSON null value. By default, fields with
  4728. // empty values are omitted from API requests. However, any field with
  4729. // an empty value appearing in NullFields will be sent to the server as
  4730. // null. It is an error if a field in this list has a non-empty value.
  4731. // This may be used to include null fields in Patch requests.
  4732. NullFields []string `json:"-"`
  4733. }
  4734. func (s *GridCoordinate) MarshalJSON() ([]byte, error) {
  4735. type NoMethod GridCoordinate
  4736. raw := NoMethod(*s)
  4737. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4738. }
  4739. // GridData: Data in the grid, as well as metadata about the dimensions.
  4740. type GridData struct {
  4741. // ColumnMetadata: Metadata about the requested columns in the grid,
  4742. // starting with the column
  4743. // in start_column.
  4744. ColumnMetadata []*DimensionProperties `json:"columnMetadata,omitempty"`
  4745. // RowData: The data in the grid, one entry per row,
  4746. // starting with the row in startRow.
  4747. // The values in RowData will correspond to columns starting
  4748. // at start_column.
  4749. RowData []*RowData `json:"rowData,omitempty"`
  4750. // RowMetadata: Metadata about the requested rows in the grid, starting
  4751. // with the row
  4752. // in start_row.
  4753. RowMetadata []*DimensionProperties `json:"rowMetadata,omitempty"`
  4754. // StartColumn: The first column this GridData refers to, zero-based.
  4755. StartColumn int64 `json:"startColumn,omitempty"`
  4756. // StartRow: The first row this GridData refers to, zero-based.
  4757. StartRow int64 `json:"startRow,omitempty"`
  4758. // ForceSendFields is a list of field names (e.g. "ColumnMetadata") to
  4759. // unconditionally include in API requests. By default, fields with
  4760. // empty values are omitted from API requests. However, any non-pointer,
  4761. // non-interface field appearing in ForceSendFields will be sent to the
  4762. // server regardless of whether the field is empty or not. This may be
  4763. // used to include empty fields in Patch requests.
  4764. ForceSendFields []string `json:"-"`
  4765. // NullFields is a list of field names (e.g. "ColumnMetadata") to
  4766. // include in API requests with the JSON null value. By default, fields
  4767. // with empty values are omitted from API requests. However, any field
  4768. // with an empty value appearing in NullFields will be sent to the
  4769. // server as null. It is an error if a field in this list has a
  4770. // non-empty value. This may be used to include null fields in Patch
  4771. // requests.
  4772. NullFields []string `json:"-"`
  4773. }
  4774. func (s *GridData) MarshalJSON() ([]byte, error) {
  4775. type NoMethod GridData
  4776. raw := NoMethod(*s)
  4777. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4778. }
  4779. // GridProperties: Properties of a grid.
  4780. type GridProperties struct {
  4781. // ColumnCount: The number of columns in the grid.
  4782. ColumnCount int64 `json:"columnCount,omitempty"`
  4783. // ColumnGroupControlAfter: True if the column grouping control toggle
  4784. // is shown after the group.
  4785. ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"`
  4786. // FrozenColumnCount: The number of columns that are frozen in the grid.
  4787. FrozenColumnCount int64 `json:"frozenColumnCount,omitempty"`
  4788. // FrozenRowCount: The number of rows that are frozen in the grid.
  4789. FrozenRowCount int64 `json:"frozenRowCount,omitempty"`
  4790. // HideGridlines: True if the grid isn't showing gridlines in the UI.
  4791. HideGridlines bool `json:"hideGridlines,omitempty"`
  4792. // RowCount: The number of rows in the grid.
  4793. RowCount int64 `json:"rowCount,omitempty"`
  4794. // RowGroupControlAfter: True if the row grouping control toggle is
  4795. // shown after the group.
  4796. RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"`
  4797. // ForceSendFields is a list of field names (e.g. "ColumnCount") to
  4798. // unconditionally include in API requests. By default, fields with
  4799. // empty values are omitted from API requests. However, any non-pointer,
  4800. // non-interface field appearing in ForceSendFields will be sent to the
  4801. // server regardless of whether the field is empty or not. This may be
  4802. // used to include empty fields in Patch requests.
  4803. ForceSendFields []string `json:"-"`
  4804. // NullFields is a list of field names (e.g. "ColumnCount") to include
  4805. // in API requests with the JSON null value. By default, fields with
  4806. // empty values are omitted from API requests. However, any field with
  4807. // an empty value appearing in NullFields will be sent to the server as
  4808. // null. It is an error if a field in this list has a non-empty value.
  4809. // This may be used to include null fields in Patch requests.
  4810. NullFields []string `json:"-"`
  4811. }
  4812. func (s *GridProperties) MarshalJSON() ([]byte, error) {
  4813. type NoMethod GridProperties
  4814. raw := NoMethod(*s)
  4815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4816. }
  4817. // GridRange: A range on a sheet.
  4818. // All indexes are zero-based.
  4819. // Indexes are half open, e.g the start index is inclusive
  4820. // and the end index is exclusive -- [start_index, end_index).
  4821. // Missing indexes indicate the range is unbounded on that side.
  4822. //
  4823. // For example, if "Sheet1" is sheet ID 0, then:
  4824. //
  4825. // `Sheet1!A1:A1 == sheet_id: 0,
  4826. // start_row_index: 0, end_row_index: 1,
  4827. // start_column_index: 0, end_column_index: 1`
  4828. //
  4829. // `Sheet1!A3:B4 == sheet_id: 0,
  4830. // start_row_index: 2, end_row_index: 4,
  4831. // start_column_index: 0, end_column_index: 2`
  4832. //
  4833. // `Sheet1!A:B == sheet_id: 0,
  4834. // start_column_index: 0, end_column_index: 2`
  4835. //
  4836. // `Sheet1!A5:B == sheet_id: 0,
  4837. // start_row_index: 4,
  4838. // start_column_index: 0, end_column_index: 2`
  4839. //
  4840. // `Sheet1 == sheet_id:0`
  4841. //
  4842. // The start index must always be less than or equal to the end
  4843. // index.
  4844. // If the start index equals the end index, then the range is
  4845. // empty.
  4846. // Empty ranges are typically not meaningful and are usually rendered in
  4847. // the
  4848. // UI as `#REF!`.
  4849. type GridRange struct {
  4850. // EndColumnIndex: The end column (exclusive) of the range, or not set
  4851. // if unbounded.
  4852. EndColumnIndex int64 `json:"endColumnIndex,omitempty"`
  4853. // EndRowIndex: The end row (exclusive) of the range, or not set if
  4854. // unbounded.
  4855. EndRowIndex int64 `json:"endRowIndex,omitempty"`
  4856. // SheetId: The sheet this range is on.
  4857. SheetId int64 `json:"sheetId,omitempty"`
  4858. // StartColumnIndex: The start column (inclusive) of the range, or not
  4859. // set if unbounded.
  4860. StartColumnIndex int64 `json:"startColumnIndex,omitempty"`
  4861. // StartRowIndex: The start row (inclusive) of the range, or not set if
  4862. // unbounded.
  4863. StartRowIndex int64 `json:"startRowIndex,omitempty"`
  4864. // ForceSendFields is a list of field names (e.g. "EndColumnIndex") to
  4865. // unconditionally include in API requests. By default, fields with
  4866. // empty values are omitted from API requests. However, any non-pointer,
  4867. // non-interface field appearing in ForceSendFields will be sent to the
  4868. // server regardless of whether the field is empty or not. This may be
  4869. // used to include empty fields in Patch requests.
  4870. ForceSendFields []string `json:"-"`
  4871. // NullFields is a list of field names (e.g. "EndColumnIndex") to
  4872. // include in API requests with the JSON null value. By default, fields
  4873. // with empty values are omitted from API requests. However, any field
  4874. // with an empty value appearing in NullFields will be sent to the
  4875. // server as null. It is an error if a field in this list has a
  4876. // non-empty value. This may be used to include null fields in Patch
  4877. // requests.
  4878. NullFields []string `json:"-"`
  4879. }
  4880. func (s *GridRange) MarshalJSON() ([]byte, error) {
  4881. type NoMethod GridRange
  4882. raw := NoMethod(*s)
  4883. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4884. }
  4885. // HistogramChartSpec: A <a
  4886. // href="/chart/interactive/docs/gallery/histogram">histogram
  4887. // chart</a>.
  4888. // A histogram chart groups data items into bins, displaying each bin as
  4889. // a
  4890. // column of stacked items. Histograms are used to display the
  4891. // distribution
  4892. // of a dataset. Each column of items represents a range into which
  4893. // those
  4894. // items fall. The number of bins can be chosen automatically or
  4895. // specified
  4896. // explicitly.
  4897. type HistogramChartSpec struct {
  4898. // BucketSize: By default the bucket size (the range of values stacked
  4899. // in a single
  4900. // column) is chosen automatically, but it may be overridden here.
  4901. // E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 -
  4902. // 3.0, etc.
  4903. // Cannot be negative.
  4904. // This field is optional.
  4905. BucketSize float64 `json:"bucketSize,omitempty"`
  4906. // LegendPosition: The position of the chart legend.
  4907. //
  4908. // Possible values:
  4909. // "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do
  4910. // not use.
  4911. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  4912. // chart.
  4913. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  4914. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  4915. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  4916. // "NO_LEGEND" - No legend is rendered.
  4917. // "INSIDE_LEGEND" - The legend is rendered inside the chart area.
  4918. LegendPosition string `json:"legendPosition,omitempty"`
  4919. // OutlierPercentile: The outlier percentile is used to ensure that
  4920. // outliers do not adversely
  4921. // affect the calculation of bucket sizes. For example, setting an
  4922. // outlier
  4923. // percentile of 0.05 indicates that the top and bottom 5% of values
  4924. // when
  4925. // calculating buckets. The values are still included in the chart,
  4926. // they will
  4927. // be added to the first or last buckets instead of their own
  4928. // buckets.
  4929. // Must be between 0.0 and 0.5.
  4930. OutlierPercentile float64 `json:"outlierPercentile,omitempty"`
  4931. // Series: The series for a histogram may be either a single series of
  4932. // values to be
  4933. // bucketed or multiple series, each of the same length, containing the
  4934. // name
  4935. // of the series followed by the values to be bucketed for that series.
  4936. Series []*HistogramSeries `json:"series,omitempty"`
  4937. // ShowItemDividers: Whether horizontal divider lines should be
  4938. // displayed between items in each
  4939. // column.
  4940. ShowItemDividers bool `json:"showItemDividers,omitempty"`
  4941. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  4942. // unconditionally include in API requests. By default, fields with
  4943. // empty values are omitted from API requests. However, any non-pointer,
  4944. // non-interface field appearing in ForceSendFields will be sent to the
  4945. // server regardless of whether the field is empty or not. This may be
  4946. // used to include empty fields in Patch requests.
  4947. ForceSendFields []string `json:"-"`
  4948. // NullFields is a list of field names (e.g. "BucketSize") to include in
  4949. // API requests with the JSON null value. By default, fields with empty
  4950. // values are omitted from API requests. However, any field with an
  4951. // empty value appearing in NullFields will be sent to the server as
  4952. // null. It is an error if a field in this list has a non-empty value.
  4953. // This may be used to include null fields in Patch requests.
  4954. NullFields []string `json:"-"`
  4955. }
  4956. func (s *HistogramChartSpec) MarshalJSON() ([]byte, error) {
  4957. type NoMethod HistogramChartSpec
  4958. raw := NoMethod(*s)
  4959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4960. }
  4961. func (s *HistogramChartSpec) UnmarshalJSON(data []byte) error {
  4962. type NoMethod HistogramChartSpec
  4963. var s1 struct {
  4964. BucketSize gensupport.JSONFloat64 `json:"bucketSize"`
  4965. OutlierPercentile gensupport.JSONFloat64 `json:"outlierPercentile"`
  4966. *NoMethod
  4967. }
  4968. s1.NoMethod = (*NoMethod)(s)
  4969. if err := json.Unmarshal(data, &s1); err != nil {
  4970. return err
  4971. }
  4972. s.BucketSize = float64(s1.BucketSize)
  4973. s.OutlierPercentile = float64(s1.OutlierPercentile)
  4974. return nil
  4975. }
  4976. // HistogramRule: Allows you to organize the numeric values in a source
  4977. // data column into
  4978. // buckets of a constant size. All values from HistogramRule.start
  4979. // to
  4980. // HistogramRule.end are placed into groups of
  4981. // size
  4982. // HistogramRule.interval. In addition, all values
  4983. // below
  4984. // HistogramRule.start are placed in one group, and all values
  4985. // above
  4986. // HistogramRule.end are placed in another. Only
  4987. // HistogramRule.interval is required, though if HistogramRule.start
  4988. // and HistogramRule.end are both provided, HistogramRule.start must
  4989. // be less than HistogramRule.end. For example, a pivot table
  4990. // showing
  4991. // average purchase amount by age that has 50+ rows:
  4992. //
  4993. // +-----+-------------------+
  4994. // | Age | AVERAGE of Amount |
  4995. // +-----+-------------------+
  4996. // | 16 | $27.13 |
  4997. // | 17 | $5.24 |
  4998. // | 18 | $20.15 |
  4999. // ...
  5000. // +-----+-------------------+
  5001. // could be turned into a pivot table that looks like the one below
  5002. // by
  5003. // applying a histogram group rule with a HistogramRule.start of 25,
  5004. // an HistogramRule.interval of 20, and an HistogramRule.end
  5005. // of 65.
  5006. //
  5007. // +-------------+-------------------+
  5008. // | Grouped Age | AVERAGE of Amount |
  5009. // +-------------+-------------------+
  5010. // | < 25 | $19.34 |
  5011. // | 25-45 | $31.43 |
  5012. // | 45-65 | $35.87 |
  5013. // | > 65 | $27.55 |
  5014. // +-------------+-------------------+
  5015. // | Grand Total | $29.12 |
  5016. // +-------------+-------------------+
  5017. type HistogramRule struct {
  5018. // End: The maximum value at which items are placed into buckets
  5019. // of constant size. Values above end are lumped into a single
  5020. // bucket.
  5021. // This field is optional.
  5022. End float64 `json:"end,omitempty"`
  5023. // Interval: The size of the buckets that are created. Must be positive.
  5024. Interval float64 `json:"interval,omitempty"`
  5025. // Start: The minimum value at which items are placed into buckets
  5026. // of constant size. Values below start are lumped into a single
  5027. // bucket.
  5028. // This field is optional.
  5029. Start float64 `json:"start,omitempty"`
  5030. // ForceSendFields is a list of field names (e.g. "End") to
  5031. // unconditionally include in API requests. By default, fields with
  5032. // empty values are omitted from API requests. However, any non-pointer,
  5033. // non-interface field appearing in ForceSendFields will be sent to the
  5034. // server regardless of whether the field is empty or not. This may be
  5035. // used to include empty fields in Patch requests.
  5036. ForceSendFields []string `json:"-"`
  5037. // NullFields is a list of field names (e.g. "End") to include in API
  5038. // requests with the JSON null value. By default, fields with empty
  5039. // values are omitted from API requests. However, any field with an
  5040. // empty value appearing in NullFields will be sent to the server as
  5041. // null. It is an error if a field in this list has a non-empty value.
  5042. // This may be used to include null fields in Patch requests.
  5043. NullFields []string `json:"-"`
  5044. }
  5045. func (s *HistogramRule) MarshalJSON() ([]byte, error) {
  5046. type NoMethod HistogramRule
  5047. raw := NoMethod(*s)
  5048. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5049. }
  5050. func (s *HistogramRule) UnmarshalJSON(data []byte) error {
  5051. type NoMethod HistogramRule
  5052. var s1 struct {
  5053. End gensupport.JSONFloat64 `json:"end"`
  5054. Interval gensupport.JSONFloat64 `json:"interval"`
  5055. Start gensupport.JSONFloat64 `json:"start"`
  5056. *NoMethod
  5057. }
  5058. s1.NoMethod = (*NoMethod)(s)
  5059. if err := json.Unmarshal(data, &s1); err != nil {
  5060. return err
  5061. }
  5062. s.End = float64(s1.End)
  5063. s.Interval = float64(s1.Interval)
  5064. s.Start = float64(s1.Start)
  5065. return nil
  5066. }
  5067. // HistogramSeries: A histogram series containing the series color and
  5068. // data.
  5069. type HistogramSeries struct {
  5070. // BarColor: The color of the column representing this series in each
  5071. // bucket.
  5072. // This field is optional.
  5073. BarColor *Color `json:"barColor,omitempty"`
  5074. // Data: The data for this histogram series.
  5075. Data *ChartData `json:"data,omitempty"`
  5076. // ForceSendFields is a list of field names (e.g. "BarColor") to
  5077. // unconditionally include in API requests. By default, fields with
  5078. // empty values are omitted from API requests. However, any non-pointer,
  5079. // non-interface field appearing in ForceSendFields will be sent to the
  5080. // server regardless of whether the field is empty or not. This may be
  5081. // used to include empty fields in Patch requests.
  5082. ForceSendFields []string `json:"-"`
  5083. // NullFields is a list of field names (e.g. "BarColor") to include in
  5084. // API requests with the JSON null value. By default, fields with empty
  5085. // values are omitted from API requests. However, any field with an
  5086. // empty value appearing in NullFields will be sent to the server as
  5087. // null. It is an error if a field in this list has a non-empty value.
  5088. // This may be used to include null fields in Patch requests.
  5089. NullFields []string `json:"-"`
  5090. }
  5091. func (s *HistogramSeries) MarshalJSON() ([]byte, error) {
  5092. type NoMethod HistogramSeries
  5093. raw := NoMethod(*s)
  5094. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5095. }
  5096. // InsertDimensionRequest: Inserts rows or columns in a sheet at a
  5097. // particular index.
  5098. type InsertDimensionRequest struct {
  5099. // InheritFromBefore: Whether dimension properties should be extended
  5100. // from the dimensions
  5101. // before or after the newly inserted dimensions.
  5102. // True to inherit from the dimensions before (in which case the
  5103. // start
  5104. // index must be greater than 0), and false to inherit from the
  5105. // dimensions
  5106. // after.
  5107. //
  5108. // For example, if row index 0 has red background and row index 1
  5109. // has a green background, then inserting 2 rows at index 1 can
  5110. // inherit
  5111. // either the green or red background. If `inheritFromBefore` is
  5112. // true,
  5113. // the two new rows will be red (because the row before the insertion
  5114. // point
  5115. // was red), whereas if `inheritFromBefore` is false, the two new rows
  5116. // will
  5117. // be green (because the row after the insertion point was green).
  5118. InheritFromBefore bool `json:"inheritFromBefore,omitempty"`
  5119. // Range: The dimensions to insert. Both the start and end indexes must
  5120. // be bounded.
  5121. Range *DimensionRange `json:"range,omitempty"`
  5122. // ForceSendFields is a list of field names (e.g. "InheritFromBefore")
  5123. // to unconditionally include in API requests. By default, fields with
  5124. // empty values are omitted from API requests. However, any non-pointer,
  5125. // non-interface field appearing in ForceSendFields will be sent to the
  5126. // server regardless of whether the field is empty or not. This may be
  5127. // used to include empty fields in Patch requests.
  5128. ForceSendFields []string `json:"-"`
  5129. // NullFields is a list of field names (e.g. "InheritFromBefore") to
  5130. // include in API requests with the JSON null value. By default, fields
  5131. // with empty values are omitted from API requests. However, any field
  5132. // with an empty value appearing in NullFields will be sent to the
  5133. // server as null. It is an error if a field in this list has a
  5134. // non-empty value. This may be used to include null fields in Patch
  5135. // requests.
  5136. NullFields []string `json:"-"`
  5137. }
  5138. func (s *InsertDimensionRequest) MarshalJSON() ([]byte, error) {
  5139. type NoMethod InsertDimensionRequest
  5140. raw := NoMethod(*s)
  5141. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5142. }
  5143. // InsertRangeRequest: Inserts cells into a range, shifting the existing
  5144. // cells over or down.
  5145. type InsertRangeRequest struct {
  5146. // Range: The range to insert new cells into.
  5147. Range *GridRange `json:"range,omitempty"`
  5148. // ShiftDimension: The dimension which will be shifted when inserting
  5149. // cells.
  5150. // If ROWS, existing cells will be shifted down.
  5151. // If COLUMNS, existing cells will be shifted right.
  5152. //
  5153. // Possible values:
  5154. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  5155. // "ROWS" - Operates on the rows of a sheet.
  5156. // "COLUMNS" - Operates on the columns of a sheet.
  5157. ShiftDimension string `json:"shiftDimension,omitempty"`
  5158. // ForceSendFields is a list of field names (e.g. "Range") to
  5159. // unconditionally include in API requests. By default, fields with
  5160. // empty values are omitted from API requests. However, any non-pointer,
  5161. // non-interface field appearing in ForceSendFields will be sent to the
  5162. // server regardless of whether the field is empty or not. This may be
  5163. // used to include empty fields in Patch requests.
  5164. ForceSendFields []string `json:"-"`
  5165. // NullFields is a list of field names (e.g. "Range") to include in API
  5166. // requests with the JSON null value. By default, fields with empty
  5167. // values are omitted from API requests. However, any field with an
  5168. // empty value appearing in NullFields will be sent to the server as
  5169. // null. It is an error if a field in this list has a non-empty value.
  5170. // This may be used to include null fields in Patch requests.
  5171. NullFields []string `json:"-"`
  5172. }
  5173. func (s *InsertRangeRequest) MarshalJSON() ([]byte, error) {
  5174. type NoMethod InsertRangeRequest
  5175. raw := NoMethod(*s)
  5176. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5177. }
  5178. // InterpolationPoint: A single interpolation point on a gradient
  5179. // conditional format.
  5180. // These pin the gradient color scale according to the color,
  5181. // type and value chosen.
  5182. type InterpolationPoint struct {
  5183. // Color: The color this interpolation point should use.
  5184. Color *Color `json:"color,omitempty"`
  5185. // Type: How the value should be interpreted.
  5186. //
  5187. // Possible values:
  5188. // "INTERPOLATION_POINT_TYPE_UNSPECIFIED" - The default value, do not
  5189. // use.
  5190. // "MIN" - The interpolation point uses the minimum value in the
  5191. // cells over the range of the conditional format.
  5192. // "MAX" - The interpolation point uses the maximum value in the
  5193. // cells over the range of the conditional format.
  5194. // "NUMBER" - The interpolation point uses exactly the value
  5195. // in
  5196. // InterpolationPoint.value.
  5197. // "PERCENT" - The interpolation point is the given percentage
  5198. // over
  5199. // all the cells in the range of the conditional format.
  5200. // This is equivalent to NUMBER if the value was:
  5201. // `=(MAX(FLATTEN(range)) * (value / 100))
  5202. // + (MIN(FLATTEN(range)) * (1 - (value / 100)))`
  5203. // (where errors in the range are ignored when flattening).
  5204. // "PERCENTILE" - The interpolation point is the given percentile
  5205. // over all the cells in the range of the conditional format.
  5206. // This is equivalent to NUMBER if the value
  5207. // was:
  5208. // `=PERCENTILE(FLATTEN(range), value / 100)`
  5209. // (where errors in the range are ignored when flattening).
  5210. Type string `json:"type,omitempty"`
  5211. // Value: The value this interpolation point uses. May be a
  5212. // formula.
  5213. // Unused if type is MIN or
  5214. // MAX.
  5215. Value string `json:"value,omitempty"`
  5216. // ForceSendFields is a list of field names (e.g. "Color") to
  5217. // unconditionally include in API requests. By default, fields with
  5218. // empty values are omitted from API requests. However, any non-pointer,
  5219. // non-interface field appearing in ForceSendFields will be sent to the
  5220. // server regardless of whether the field is empty or not. This may be
  5221. // used to include empty fields in Patch requests.
  5222. ForceSendFields []string `json:"-"`
  5223. // NullFields is a list of field names (e.g. "Color") to include in API
  5224. // requests with the JSON null value. By default, fields with empty
  5225. // values are omitted from API requests. However, any field with an
  5226. // empty value appearing in NullFields will be sent to the server as
  5227. // null. It is an error if a field in this list has a non-empty value.
  5228. // This may be used to include null fields in Patch requests.
  5229. NullFields []string `json:"-"`
  5230. }
  5231. func (s *InterpolationPoint) MarshalJSON() ([]byte, error) {
  5232. type NoMethod InterpolationPoint
  5233. raw := NoMethod(*s)
  5234. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5235. }
  5236. // IterativeCalculationSettings: Settings to control how circular
  5237. // dependencies are resolved with iterative
  5238. // calculation.
  5239. type IterativeCalculationSettings struct {
  5240. // ConvergenceThreshold: When iterative calculation is enabled and
  5241. // successive results differ by
  5242. // less than this threshold value, the calculation rounds stop.
  5243. ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"`
  5244. // MaxIterations: When iterative calculation is enabled, the maximum
  5245. // number of calculation
  5246. // rounds to perform.
  5247. MaxIterations int64 `json:"maxIterations,omitempty"`
  5248. // ForceSendFields is a list of field names (e.g.
  5249. // "ConvergenceThreshold") to unconditionally include in API requests.
  5250. // By default, fields with empty values are omitted from API requests.
  5251. // However, any non-pointer, non-interface field appearing in
  5252. // ForceSendFields will be sent to the server regardless of whether the
  5253. // field is empty or not. This may be used to include empty fields in
  5254. // Patch requests.
  5255. ForceSendFields []string `json:"-"`
  5256. // NullFields is a list of field names (e.g. "ConvergenceThreshold") to
  5257. // include in API requests with the JSON null value. By default, fields
  5258. // with empty values are omitted from API requests. However, any field
  5259. // with an empty value appearing in NullFields will be sent to the
  5260. // server as null. It is an error if a field in this list has a
  5261. // non-empty value. This may be used to include null fields in Patch
  5262. // requests.
  5263. NullFields []string `json:"-"`
  5264. }
  5265. func (s *IterativeCalculationSettings) MarshalJSON() ([]byte, error) {
  5266. type NoMethod IterativeCalculationSettings
  5267. raw := NoMethod(*s)
  5268. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5269. }
  5270. func (s *IterativeCalculationSettings) UnmarshalJSON(data []byte) error {
  5271. type NoMethod IterativeCalculationSettings
  5272. var s1 struct {
  5273. ConvergenceThreshold gensupport.JSONFloat64 `json:"convergenceThreshold"`
  5274. *NoMethod
  5275. }
  5276. s1.NoMethod = (*NoMethod)(s)
  5277. if err := json.Unmarshal(data, &s1); err != nil {
  5278. return err
  5279. }
  5280. s.ConvergenceThreshold = float64(s1.ConvergenceThreshold)
  5281. return nil
  5282. }
  5283. // LineStyle: Properties that describe the style of a line.
  5284. type LineStyle struct {
  5285. // Type: The dash type of the line.
  5286. //
  5287. // Possible values:
  5288. // "LINE_DASH_TYPE_UNSPECIFIED" - Default value, do not use.
  5289. // "INVISIBLE" - No dash type, which is equivalent to a non-visible
  5290. // line.
  5291. // "CUSTOM" - A custom dash for a line. Modifying the exact custom
  5292. // dash style is
  5293. // currently unsupported.
  5294. // "SOLID" - A solid line.
  5295. // "DOTTED" - A dotted line.
  5296. // "MEDIUM_DASHED" - A dashed line where the dashes have "medium"
  5297. // length.
  5298. // "MEDIUM_DASHED_DOTTED" - A line that alternates between a "medium"
  5299. // dash and a dot.
  5300. // "LONG_DASHED" - A dashed line where the dashes have "long" length.
  5301. // "LONG_DASHED_DOTTED" - A line that alternates between a "long" dash
  5302. // and a dot.
  5303. Type string `json:"type,omitempty"`
  5304. // Width: The thickness of the line, in px.
  5305. Width int64 `json:"width,omitempty"`
  5306. // ForceSendFields is a list of field names (e.g. "Type") to
  5307. // unconditionally include in API requests. By default, fields with
  5308. // empty values are omitted from API requests. However, any non-pointer,
  5309. // non-interface field appearing in ForceSendFields will be sent to the
  5310. // server regardless of whether the field is empty or not. This may be
  5311. // used to include empty fields in Patch requests.
  5312. ForceSendFields []string `json:"-"`
  5313. // NullFields is a list of field names (e.g. "Type") to include in API
  5314. // requests with the JSON null value. By default, fields with empty
  5315. // values are omitted from API requests. However, any field with an
  5316. // empty value appearing in NullFields will be sent to the server as
  5317. // null. It is an error if a field in this list has a non-empty value.
  5318. // This may be used to include null fields in Patch requests.
  5319. NullFields []string `json:"-"`
  5320. }
  5321. func (s *LineStyle) MarshalJSON() ([]byte, error) {
  5322. type NoMethod LineStyle
  5323. raw := NoMethod(*s)
  5324. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5325. }
  5326. // ManualRule: Allows you to manually organize the values in a source
  5327. // data column into
  5328. // buckets with names of your choosing. For example, a pivot table
  5329. // that
  5330. // aggregates population by state:
  5331. //
  5332. // +-------+-------------------+
  5333. // | State | SUM of Population |
  5334. // +-------+-------------------+
  5335. // | AK | 0.7 |
  5336. // | AL | 4.8 |
  5337. // | AR | 2.9 |
  5338. // ...
  5339. // +-------+-------------------+
  5340. // could be turned into a pivot table that aggregates population by time
  5341. // zone
  5342. // by providing a list of groups (for example, groupName =
  5343. // 'Central',
  5344. // items = ['AL', 'AR', 'IA', ...]) to a manual group rule.
  5345. // Note that a similar effect could be achieved by adding a time zone
  5346. // column
  5347. // to the source data and adjusting the pivot table.
  5348. //
  5349. // +-----------+-------------------+
  5350. // | Time Zone | SUM of Population |
  5351. // +-----------+-------------------+
  5352. // | Central | 106.3 |
  5353. // | Eastern | 151.9 |
  5354. // | Mountain | 17.4 |
  5355. // ...
  5356. // +-----------+-------------------+
  5357. type ManualRule struct {
  5358. // Groups: The list of group names and the corresponding items from the
  5359. // source data
  5360. // that map to each group name.
  5361. Groups []*ManualRuleGroup `json:"groups,omitempty"`
  5362. // ForceSendFields is a list of field names (e.g. "Groups") to
  5363. // unconditionally include in API requests. By default, fields with
  5364. // empty values are omitted from API requests. However, any non-pointer,
  5365. // non-interface field appearing in ForceSendFields will be sent to the
  5366. // server regardless of whether the field is empty or not. This may be
  5367. // used to include empty fields in Patch requests.
  5368. ForceSendFields []string `json:"-"`
  5369. // NullFields is a list of field names (e.g. "Groups") to include in API
  5370. // requests with the JSON null value. By default, fields with empty
  5371. // values are omitted from API requests. However, any field with an
  5372. // empty value appearing in NullFields will be sent to the server as
  5373. // null. It is an error if a field in this list has a non-empty value.
  5374. // This may be used to include null fields in Patch requests.
  5375. NullFields []string `json:"-"`
  5376. }
  5377. func (s *ManualRule) MarshalJSON() ([]byte, error) {
  5378. type NoMethod ManualRule
  5379. raw := NoMethod(*s)
  5380. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5381. }
  5382. // ManualRuleGroup: A group name and a list of items from the source
  5383. // data that should be placed
  5384. // in the group with this name.
  5385. type ManualRuleGroup struct {
  5386. // GroupName: The group name, which must be a string. Each group in a
  5387. // given
  5388. // ManualRule must have a unique group name.
  5389. GroupName *ExtendedValue `json:"groupName,omitempty"`
  5390. // Items: The items in the source data that should be placed into this
  5391. // group. Each
  5392. // item may be a string, number, or boolean. Items may appear in at most
  5393. // one
  5394. // group within a given ManualRule. Items that do not appear in
  5395. // any
  5396. // group will appear on their own.
  5397. Items []*ExtendedValue `json:"items,omitempty"`
  5398. // ForceSendFields is a list of field names (e.g. "GroupName") to
  5399. // unconditionally include in API requests. By default, fields with
  5400. // empty values are omitted from API requests. However, any non-pointer,
  5401. // non-interface field appearing in ForceSendFields will be sent to the
  5402. // server regardless of whether the field is empty or not. This may be
  5403. // used to include empty fields in Patch requests.
  5404. ForceSendFields []string `json:"-"`
  5405. // NullFields is a list of field names (e.g. "GroupName") to include in
  5406. // API requests with the JSON null value. By default, fields with empty
  5407. // values are omitted from API requests. However, any field with an
  5408. // empty value appearing in NullFields will be sent to the server as
  5409. // null. It is an error if a field in this list has a non-empty value.
  5410. // This may be used to include null fields in Patch requests.
  5411. NullFields []string `json:"-"`
  5412. }
  5413. func (s *ManualRuleGroup) MarshalJSON() ([]byte, error) {
  5414. type NoMethod ManualRuleGroup
  5415. raw := NoMethod(*s)
  5416. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5417. }
  5418. // MatchedDeveloperMetadata: A developer metadata entry and the data
  5419. // filters specified in the original
  5420. // request that matched it.
  5421. type MatchedDeveloperMetadata struct {
  5422. // DataFilters: All filters matching the returned developer metadata.
  5423. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  5424. // DeveloperMetadata: The developer metadata matching the specified
  5425. // filters.
  5426. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  5427. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  5428. // unconditionally include in API requests. By default, fields with
  5429. // empty values are omitted from API requests. However, any non-pointer,
  5430. // non-interface field appearing in ForceSendFields will be sent to the
  5431. // server regardless of whether the field is empty or not. This may be
  5432. // used to include empty fields in Patch requests.
  5433. ForceSendFields []string `json:"-"`
  5434. // NullFields is a list of field names (e.g. "DataFilters") to include
  5435. // in API requests with the JSON null value. By default, fields with
  5436. // empty values are omitted from API requests. However, any field with
  5437. // an empty value appearing in NullFields will be sent to the server as
  5438. // null. It is an error if a field in this list has a non-empty value.
  5439. // This may be used to include null fields in Patch requests.
  5440. NullFields []string `json:"-"`
  5441. }
  5442. func (s *MatchedDeveloperMetadata) MarshalJSON() ([]byte, error) {
  5443. type NoMethod MatchedDeveloperMetadata
  5444. raw := NoMethod(*s)
  5445. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5446. }
  5447. // MatchedValueRange: A value range that was matched by one or more data
  5448. // filers.
  5449. type MatchedValueRange struct {
  5450. // DataFilters: The DataFilters from the request that matched the range
  5451. // of
  5452. // values.
  5453. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  5454. // ValueRange: The values matched by the DataFilter.
  5455. ValueRange *ValueRange `json:"valueRange,omitempty"`
  5456. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  5457. // unconditionally include in API requests. By default, fields with
  5458. // empty values are omitted from API requests. However, any non-pointer,
  5459. // non-interface field appearing in ForceSendFields will be sent to the
  5460. // server regardless of whether the field is empty or not. This may be
  5461. // used to include empty fields in Patch requests.
  5462. ForceSendFields []string `json:"-"`
  5463. // NullFields is a list of field names (e.g. "DataFilters") to include
  5464. // in API requests with the JSON null value. By default, fields with
  5465. // empty values are omitted from API requests. However, any field with
  5466. // an empty value appearing in NullFields will be sent to the server as
  5467. // null. It is an error if a field in this list has a non-empty value.
  5468. // This may be used to include null fields in Patch requests.
  5469. NullFields []string `json:"-"`
  5470. }
  5471. func (s *MatchedValueRange) MarshalJSON() ([]byte, error) {
  5472. type NoMethod MatchedValueRange
  5473. raw := NoMethod(*s)
  5474. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5475. }
  5476. // MergeCellsRequest: Merges all cells in the range.
  5477. type MergeCellsRequest struct {
  5478. // MergeType: How the cells should be merged.
  5479. //
  5480. // Possible values:
  5481. // "MERGE_ALL" - Create a single merge from the range
  5482. // "MERGE_COLUMNS" - Create a merge for each column in the range
  5483. // "MERGE_ROWS" - Create a merge for each row in the range
  5484. MergeType string `json:"mergeType,omitempty"`
  5485. // Range: The range of cells to merge.
  5486. Range *GridRange `json:"range,omitempty"`
  5487. // ForceSendFields is a list of field names (e.g. "MergeType") to
  5488. // unconditionally include in API requests. By default, fields with
  5489. // empty values are omitted from API requests. However, any non-pointer,
  5490. // non-interface field appearing in ForceSendFields will be sent to the
  5491. // server regardless of whether the field is empty or not. This may be
  5492. // used to include empty fields in Patch requests.
  5493. ForceSendFields []string `json:"-"`
  5494. // NullFields is a list of field names (e.g. "MergeType") to include in
  5495. // API requests with the JSON null value. By default, fields with empty
  5496. // values are omitted from API requests. However, any field with an
  5497. // empty value appearing in NullFields will be sent to the server as
  5498. // null. It is an error if a field in this list has a non-empty value.
  5499. // This may be used to include null fields in Patch requests.
  5500. NullFields []string `json:"-"`
  5501. }
  5502. func (s *MergeCellsRequest) MarshalJSON() ([]byte, error) {
  5503. type NoMethod MergeCellsRequest
  5504. raw := NoMethod(*s)
  5505. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5506. }
  5507. // MoveDimensionRequest: Moves one or more rows or columns.
  5508. type MoveDimensionRequest struct {
  5509. // DestinationIndex: The zero-based start index of where to move the
  5510. // source data to,
  5511. // based on the coordinates *before* the source data is removed
  5512. // from the grid. Existing data will be shifted down or
  5513. // right
  5514. // (depending on the dimension) to make room for the moved
  5515. // dimensions.
  5516. // The source dimensions are removed from the grid, so the
  5517. // the data may end up in a different index than specified.
  5518. //
  5519. // For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to
  5520. // move
  5521. // "1" and "2" to between "3" and "4", the source would be
  5522. // `ROWS [1..3)`,and the destination index would be "4"
  5523. // (the zero-based index of row 5).
  5524. // The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
  5525. DestinationIndex int64 `json:"destinationIndex,omitempty"`
  5526. // Source: The source dimensions to move.
  5527. Source *DimensionRange `json:"source,omitempty"`
  5528. // ForceSendFields is a list of field names (e.g. "DestinationIndex") to
  5529. // unconditionally include in API requests. By default, fields with
  5530. // empty values are omitted from API requests. However, any non-pointer,
  5531. // non-interface field appearing in ForceSendFields will be sent to the
  5532. // server regardless of whether the field is empty or not. This may be
  5533. // used to include empty fields in Patch requests.
  5534. ForceSendFields []string `json:"-"`
  5535. // NullFields is a list of field names (e.g. "DestinationIndex") to
  5536. // include in API requests with the JSON null value. By default, fields
  5537. // with empty values are omitted from API requests. However, any field
  5538. // with an empty value appearing in NullFields will be sent to the
  5539. // server as null. It is an error if a field in this list has a
  5540. // non-empty value. This may be used to include null fields in Patch
  5541. // requests.
  5542. NullFields []string `json:"-"`
  5543. }
  5544. func (s *MoveDimensionRequest) MarshalJSON() ([]byte, error) {
  5545. type NoMethod MoveDimensionRequest
  5546. raw := NoMethod(*s)
  5547. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5548. }
  5549. // NamedRange: A named range.
  5550. type NamedRange struct {
  5551. // Name: The name of the named range.
  5552. Name string `json:"name,omitempty"`
  5553. // NamedRangeId: The ID of the named range.
  5554. NamedRangeId string `json:"namedRangeId,omitempty"`
  5555. // Range: The range this represents.
  5556. Range *GridRange `json:"range,omitempty"`
  5557. // ForceSendFields is a list of field names (e.g. "Name") to
  5558. // unconditionally include in API requests. By default, fields with
  5559. // empty values are omitted from API requests. However, any non-pointer,
  5560. // non-interface field appearing in ForceSendFields will be sent to the
  5561. // server regardless of whether the field is empty or not. This may be
  5562. // used to include empty fields in Patch requests.
  5563. ForceSendFields []string `json:"-"`
  5564. // NullFields is a list of field names (e.g. "Name") to include in API
  5565. // requests with the JSON null value. By default, fields with empty
  5566. // values are omitted from API requests. However, any field with an
  5567. // empty value appearing in NullFields will be sent to the server as
  5568. // null. It is an error if a field in this list has a non-empty value.
  5569. // This may be used to include null fields in Patch requests.
  5570. NullFields []string `json:"-"`
  5571. }
  5572. func (s *NamedRange) MarshalJSON() ([]byte, error) {
  5573. type NoMethod NamedRange
  5574. raw := NoMethod(*s)
  5575. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5576. }
  5577. // NumberFormat: The number format of a cell.
  5578. type NumberFormat struct {
  5579. // Pattern: Pattern string used for formatting. If not set, a default
  5580. // pattern based on
  5581. // the user's locale will be used if necessary for the given type.
  5582. // See the [Date and Number Formats guide](/sheets/api/guides/formats)
  5583. // for
  5584. // more information about the supported patterns.
  5585. Pattern string `json:"pattern,omitempty"`
  5586. // Type: The type of the number format.
  5587. // When writing, this field must be set.
  5588. //
  5589. // Possible values:
  5590. // "NUMBER_FORMAT_TYPE_UNSPECIFIED" - The number format is not
  5591. // specified
  5592. // and is based on the contents of the cell.
  5593. // Do not explicitly use this.
  5594. // "TEXT" - Text formatting, e.g `1000.12`
  5595. // "NUMBER" - Number formatting, e.g, `1,000.12`
  5596. // "PERCENT" - Percent formatting, e.g `10.12%`
  5597. // "CURRENCY" - Currency formatting, e.g `$1,000.12`
  5598. // "DATE" - Date formatting, e.g `9/26/2008`
  5599. // "TIME" - Time formatting, e.g `3:59:00 PM`
  5600. // "DATE_TIME" - Date+Time formatting, e.g `9/26/08 15:59:00`
  5601. // "SCIENTIFIC" - Scientific number formatting, e.g `1.01E+03`
  5602. Type string `json:"type,omitempty"`
  5603. // ForceSendFields is a list of field names (e.g. "Pattern") to
  5604. // unconditionally include in API requests. By default, fields with
  5605. // empty values are omitted from API requests. However, any non-pointer,
  5606. // non-interface field appearing in ForceSendFields will be sent to the
  5607. // server regardless of whether the field is empty or not. This may be
  5608. // used to include empty fields in Patch requests.
  5609. ForceSendFields []string `json:"-"`
  5610. // NullFields is a list of field names (e.g. "Pattern") to include in
  5611. // API requests with the JSON null value. By default, fields with empty
  5612. // values are omitted from API requests. However, any field with an
  5613. // empty value appearing in NullFields will be sent to the server as
  5614. // null. It is an error if a field in this list has a non-empty value.
  5615. // This may be used to include null fields in Patch requests.
  5616. NullFields []string `json:"-"`
  5617. }
  5618. func (s *NumberFormat) MarshalJSON() ([]byte, error) {
  5619. type NoMethod NumberFormat
  5620. raw := NoMethod(*s)
  5621. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5622. }
  5623. // OrgChartSpec: An <a
  5624. // href="/chart/interactive/docs/gallery/orgchart">org chart</a>.
  5625. // Org charts require a unique set of labels in labels and
  5626. // may
  5627. // optionally include parent_labels and tooltips.
  5628. // parent_labels contain, for each node, the label identifying the
  5629. // parent
  5630. // node. tooltips contain, for each node, an optional tooltip.
  5631. //
  5632. // For example, to describe an OrgChart with Alice as the CEO, Bob as
  5633. // the
  5634. // President (reporting to Alice) and Cathy as VP of Sales (also
  5635. // reporting to
  5636. // Alice), have labels contain "Alice", "Bob", "Cathy",
  5637. // parent_labels contain "", "Alice", "Alice" and tooltips
  5638. // contain
  5639. // "CEO", "President", "VP Sales".
  5640. type OrgChartSpec struct {
  5641. // Labels: The data containing the labels for all the nodes in the
  5642. // chart. Labels
  5643. // must be unique.
  5644. Labels *ChartData `json:"labels,omitempty"`
  5645. // NodeColor: The color of the org chart nodes.
  5646. NodeColor *Color `json:"nodeColor,omitempty"`
  5647. // NodeSize: The size of the org chart nodes.
  5648. //
  5649. // Possible values:
  5650. // "ORG_CHART_LABEL_SIZE_UNSPECIFIED" - Default value, do not use.
  5651. // "SMALL" - The small org chart node size.
  5652. // "MEDIUM" - The medium org chart node size.
  5653. // "LARGE" - The large org chart node size.
  5654. NodeSize string `json:"nodeSize,omitempty"`
  5655. // ParentLabels: The data containing the label of the parent for the
  5656. // corresponding node.
  5657. // A blank value indicates that the node has no parent and is a
  5658. // top-level
  5659. // node.
  5660. // This field is optional.
  5661. ParentLabels *ChartData `json:"parentLabels,omitempty"`
  5662. // SelectedNodeColor: The color of the selected org chart nodes.
  5663. SelectedNodeColor *Color `json:"selectedNodeColor,omitempty"`
  5664. // Tooltips: The data containing the tooltip for the corresponding node.
  5665. // A blank value
  5666. // results in no tooltip being displayed for the node.
  5667. // This field is optional.
  5668. Tooltips *ChartData `json:"tooltips,omitempty"`
  5669. // ForceSendFields is a list of field names (e.g. "Labels") to
  5670. // unconditionally include in API requests. By default, fields with
  5671. // empty values are omitted from API requests. However, any non-pointer,
  5672. // non-interface field appearing in ForceSendFields will be sent to the
  5673. // server regardless of whether the field is empty or not. This may be
  5674. // used to include empty fields in Patch requests.
  5675. ForceSendFields []string `json:"-"`
  5676. // NullFields is a list of field names (e.g. "Labels") to include in API
  5677. // requests with the JSON null value. By default, fields with empty
  5678. // values are omitted from API requests. However, any field with an
  5679. // empty value appearing in NullFields will be sent to the server as
  5680. // null. It is an error if a field in this list has a non-empty value.
  5681. // This may be used to include null fields in Patch requests.
  5682. NullFields []string `json:"-"`
  5683. }
  5684. func (s *OrgChartSpec) MarshalJSON() ([]byte, error) {
  5685. type NoMethod OrgChartSpec
  5686. raw := NoMethod(*s)
  5687. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5688. }
  5689. // OverlayPosition: The location an object is overlaid on top of a grid.
  5690. type OverlayPosition struct {
  5691. // AnchorCell: The cell the object is anchored to.
  5692. AnchorCell *GridCoordinate `json:"anchorCell,omitempty"`
  5693. // HeightPixels: The height of the object, in pixels. Defaults to 371.
  5694. HeightPixels int64 `json:"heightPixels,omitempty"`
  5695. // OffsetXPixels: The horizontal offset, in pixels, that the object is
  5696. // offset
  5697. // from the anchor cell.
  5698. OffsetXPixels int64 `json:"offsetXPixels,omitempty"`
  5699. // OffsetYPixels: The vertical offset, in pixels, that the object is
  5700. // offset
  5701. // from the anchor cell.
  5702. OffsetYPixels int64 `json:"offsetYPixels,omitempty"`
  5703. // WidthPixels: The width of the object, in pixels. Defaults to 600.
  5704. WidthPixels int64 `json:"widthPixels,omitempty"`
  5705. // ForceSendFields is a list of field names (e.g. "AnchorCell") to
  5706. // unconditionally include in API requests. By default, fields with
  5707. // empty values are omitted from API requests. However, any non-pointer,
  5708. // non-interface field appearing in ForceSendFields will be sent to the
  5709. // server regardless of whether the field is empty or not. This may be
  5710. // used to include empty fields in Patch requests.
  5711. ForceSendFields []string `json:"-"`
  5712. // NullFields is a list of field names (e.g. "AnchorCell") to include in
  5713. // API requests with the JSON null value. By default, fields with empty
  5714. // values are omitted from API requests. However, any field with an
  5715. // empty value appearing in NullFields will be sent to the server as
  5716. // null. It is an error if a field in this list has a non-empty value.
  5717. // This may be used to include null fields in Patch requests.
  5718. NullFields []string `json:"-"`
  5719. }
  5720. func (s *OverlayPosition) MarshalJSON() ([]byte, error) {
  5721. type NoMethod OverlayPosition
  5722. raw := NoMethod(*s)
  5723. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5724. }
  5725. // Padding: The amount of padding around the cell, in pixels.
  5726. // When updating padding, every field must be specified.
  5727. type Padding struct {
  5728. // Bottom: The bottom padding of the cell.
  5729. Bottom int64 `json:"bottom,omitempty"`
  5730. // Left: The left padding of the cell.
  5731. Left int64 `json:"left,omitempty"`
  5732. // Right: The right padding of the cell.
  5733. Right int64 `json:"right,omitempty"`
  5734. // Top: The top padding of the cell.
  5735. Top int64 `json:"top,omitempty"`
  5736. // ForceSendFields is a list of field names (e.g. "Bottom") to
  5737. // unconditionally include in API requests. By default, fields with
  5738. // empty values are omitted from API requests. However, any non-pointer,
  5739. // non-interface field appearing in ForceSendFields will be sent to the
  5740. // server regardless of whether the field is empty or not. This may be
  5741. // used to include empty fields in Patch requests.
  5742. ForceSendFields []string `json:"-"`
  5743. // NullFields is a list of field names (e.g. "Bottom") to include in API
  5744. // requests with the JSON null value. By default, fields with empty
  5745. // values are omitted from API requests. However, any field with an
  5746. // empty value appearing in NullFields will be sent to the server as
  5747. // null. It is an error if a field in this list has a non-empty value.
  5748. // This may be used to include null fields in Patch requests.
  5749. NullFields []string `json:"-"`
  5750. }
  5751. func (s *Padding) MarshalJSON() ([]byte, error) {
  5752. type NoMethod Padding
  5753. raw := NoMethod(*s)
  5754. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5755. }
  5756. // PasteDataRequest: Inserts data into the spreadsheet starting at the
  5757. // specified coordinate.
  5758. type PasteDataRequest struct {
  5759. // Coordinate: The coordinate at which the data should start being
  5760. // inserted.
  5761. Coordinate *GridCoordinate `json:"coordinate,omitempty"`
  5762. // Data: The data to insert.
  5763. Data string `json:"data,omitempty"`
  5764. // Delimiter: The delimiter in the data.
  5765. Delimiter string `json:"delimiter,omitempty"`
  5766. // Html: True if the data is HTML.
  5767. Html bool `json:"html,omitempty"`
  5768. // Type: How the data should be pasted.
  5769. //
  5770. // Possible values:
  5771. // "PASTE_NORMAL" - Paste values, formulas, formats, and merges.
  5772. // "PASTE_VALUES" - Paste the values ONLY without formats, formulas,
  5773. // or merges.
  5774. // "PASTE_FORMAT" - Paste the format and data validation only.
  5775. // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders.
  5776. // "PASTE_FORMULA" - Paste the formulas only.
  5777. // "PASTE_DATA_VALIDATION" - Paste the data validation only.
  5778. // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting
  5779. // rules only.
  5780. Type string `json:"type,omitempty"`
  5781. // ForceSendFields is a list of field names (e.g. "Coordinate") to
  5782. // unconditionally include in API requests. By default, fields with
  5783. // empty values are omitted from API requests. However, any non-pointer,
  5784. // non-interface field appearing in ForceSendFields will be sent to the
  5785. // server regardless of whether the field is empty or not. This may be
  5786. // used to include empty fields in Patch requests.
  5787. ForceSendFields []string `json:"-"`
  5788. // NullFields is a list of field names (e.g. "Coordinate") 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. func (s *PasteDataRequest) MarshalJSON() ([]byte, error) {
  5797. type NoMethod PasteDataRequest
  5798. raw := NoMethod(*s)
  5799. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5800. }
  5801. // PieChartSpec: A <a
  5802. // href="/chart/interactive/docs/gallery/piechart">pie chart</a>.
  5803. type PieChartSpec struct {
  5804. // Domain: The data that covers the domain of the pie chart.
  5805. Domain *ChartData `json:"domain,omitempty"`
  5806. // LegendPosition: Where the legend of the pie chart should be drawn.
  5807. //
  5808. // Possible values:
  5809. // "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
  5810. // use.
  5811. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  5812. // chart.
  5813. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  5814. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  5815. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  5816. // "NO_LEGEND" - No legend is rendered.
  5817. // "LABELED_LEGEND" - Each pie slice has a label attached to it.
  5818. LegendPosition string `json:"legendPosition,omitempty"`
  5819. // PieHole: The size of the hole in the pie chart.
  5820. PieHole float64 `json:"pieHole,omitempty"`
  5821. // Series: The data that covers the one and only series of the pie
  5822. // chart.
  5823. Series *ChartData `json:"series,omitempty"`
  5824. // ThreeDimensional: True if the pie is three dimensional.
  5825. ThreeDimensional bool `json:"threeDimensional,omitempty"`
  5826. // ForceSendFields is a list of field names (e.g. "Domain") to
  5827. // unconditionally include in API requests. By default, fields with
  5828. // empty values are omitted from API requests. However, any non-pointer,
  5829. // non-interface field appearing in ForceSendFields will be sent to the
  5830. // server regardless of whether the field is empty or not. This may be
  5831. // used to include empty fields in Patch requests.
  5832. ForceSendFields []string `json:"-"`
  5833. // NullFields is a list of field names (e.g. "Domain") to include in API
  5834. // requests with the JSON null value. By default, fields with empty
  5835. // values are omitted from API requests. However, any field with an
  5836. // empty value appearing in NullFields will be sent to the server as
  5837. // null. It is an error if a field in this list has a non-empty value.
  5838. // This may be used to include null fields in Patch requests.
  5839. NullFields []string `json:"-"`
  5840. }
  5841. func (s *PieChartSpec) MarshalJSON() ([]byte, error) {
  5842. type NoMethod PieChartSpec
  5843. raw := NoMethod(*s)
  5844. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5845. }
  5846. func (s *PieChartSpec) UnmarshalJSON(data []byte) error {
  5847. type NoMethod PieChartSpec
  5848. var s1 struct {
  5849. PieHole gensupport.JSONFloat64 `json:"pieHole"`
  5850. *NoMethod
  5851. }
  5852. s1.NoMethod = (*NoMethod)(s)
  5853. if err := json.Unmarshal(data, &s1); err != nil {
  5854. return err
  5855. }
  5856. s.PieHole = float64(s1.PieHole)
  5857. return nil
  5858. }
  5859. // PivotFilterCriteria: Criteria for showing/hiding rows in a pivot
  5860. // table.
  5861. type PivotFilterCriteria struct {
  5862. // VisibleValues: Values that should be included. Values not listed
  5863. // here are excluded.
  5864. VisibleValues []string `json:"visibleValues,omitempty"`
  5865. // ForceSendFields is a list of field names (e.g. "VisibleValues") to
  5866. // unconditionally include in API requests. By default, fields with
  5867. // empty values are omitted from API requests. However, any non-pointer,
  5868. // non-interface field appearing in ForceSendFields will be sent to the
  5869. // server regardless of whether the field is empty or not. This may be
  5870. // used to include empty fields in Patch requests.
  5871. ForceSendFields []string `json:"-"`
  5872. // NullFields is a list of field names (e.g. "VisibleValues") to include
  5873. // in API requests with the JSON null value. By default, fields with
  5874. // empty values are omitted from API requests. However, any field with
  5875. // an empty value appearing in NullFields will be sent to the server as
  5876. // null. It is an error if a field in this list has a non-empty value.
  5877. // This may be used to include null fields in Patch requests.
  5878. NullFields []string `json:"-"`
  5879. }
  5880. func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) {
  5881. type NoMethod PivotFilterCriteria
  5882. raw := NoMethod(*s)
  5883. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5884. }
  5885. // PivotGroup: A single grouping (either row or column) in a pivot
  5886. // table.
  5887. type PivotGroup struct {
  5888. // GroupRule: The group rule to apply to this row/column group.
  5889. GroupRule *PivotGroupRule `json:"groupRule,omitempty"`
  5890. // Label: The labels to use for the row/column groups which can be
  5891. // customized. For
  5892. // example, in the following pivot table, the row label is `Region`
  5893. // (which
  5894. // could be renamed to `State`) and the column label is `Product`
  5895. // (which
  5896. // could be renamed `Item`). Pivot tables created before December 2017
  5897. // do
  5898. // not have header labels. If you'd like to add header labels to an
  5899. // existing
  5900. // pivot table, please delete the existing pivot table and then create a
  5901. // new
  5902. // pivot table with same parameters.
  5903. //
  5904. // +--------------+---------+-------+
  5905. // | SUM of Units | Product | |
  5906. // | Region | Pen | Paper |
  5907. // +--------------+---------+-------+
  5908. // | New York | 345 | 98 |
  5909. // | Oregon | 234 | 123 |
  5910. // | Tennessee | 531 | 415 |
  5911. // +--------------+---------+-------+
  5912. // | Grand Total | 1110 | 636 |
  5913. // +--------------+---------+-------+
  5914. Label string `json:"label,omitempty"`
  5915. // RepeatHeadings: True if the headings in this pivot group should be
  5916. // repeated.
  5917. // This is only valid for row groupings and is ignored by columns.
  5918. //
  5919. // By default, we minimize repitition of headings by not showing
  5920. // higher
  5921. // level headings where they are the same. For example, even though
  5922. // the
  5923. // third row below corresponds to "Q1 Mar", "Q1" is not shown because
  5924. // it is redundant with previous rows. Setting repeat_headings to
  5925. // true
  5926. // would cause "Q1" to be repeated for "Feb" and "Mar".
  5927. //
  5928. // +--------------+
  5929. // | Q1 | Jan |
  5930. // | | Feb |
  5931. // | | Mar |
  5932. // +--------+-----+
  5933. // | Q1 Total |
  5934. // +--------------+
  5935. RepeatHeadings bool `json:"repeatHeadings,omitempty"`
  5936. // ShowTotals: True if the pivot table should include the totals for
  5937. // this grouping.
  5938. ShowTotals bool `json:"showTotals,omitempty"`
  5939. // SortOrder: The order the values in this group should be sorted.
  5940. //
  5941. // Possible values:
  5942. // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this.
  5943. // "ASCENDING" - Sort ascending.
  5944. // "DESCENDING" - Sort descending.
  5945. SortOrder string `json:"sortOrder,omitempty"`
  5946. // SourceColumnOffset: The column offset of the source range that this
  5947. // grouping is based on.
  5948. //
  5949. // For example, if the source was `C10:E15`, a `sourceColumnOffset` of
  5950. // `0`
  5951. // means this group refers to column `C`, whereas the offset `1` would
  5952. // refer
  5953. // to column `D`.
  5954. SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"`
  5955. // ValueBucket: The bucket of the opposite pivot group to sort by.
  5956. // If not specified, sorting is alphabetical by this group's values.
  5957. ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"`
  5958. // ValueMetadata: Metadata about values in the grouping.
  5959. ValueMetadata []*PivotGroupValueMetadata `json:"valueMetadata,omitempty"`
  5960. // ForceSendFields is a list of field names (e.g. "GroupRule") to
  5961. // unconditionally include in API requests. By default, fields with
  5962. // empty values are omitted from API requests. However, any non-pointer,
  5963. // non-interface field appearing in ForceSendFields will be sent to the
  5964. // server regardless of whether the field is empty or not. This may be
  5965. // used to include empty fields in Patch requests.
  5966. ForceSendFields []string `json:"-"`
  5967. // NullFields is a list of field names (e.g. "GroupRule") to include in
  5968. // API requests with the JSON null value. By default, fields with empty
  5969. // values are omitted from API requests. However, any field with an
  5970. // empty value appearing in NullFields will be sent to the server as
  5971. // null. It is an error if a field in this list has a non-empty value.
  5972. // This may be used to include null fields in Patch requests.
  5973. NullFields []string `json:"-"`
  5974. }
  5975. func (s *PivotGroup) MarshalJSON() ([]byte, error) {
  5976. type NoMethod PivotGroup
  5977. raw := NoMethod(*s)
  5978. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5979. }
  5980. // PivotGroupRule: An optional setting on a PivotGroup that defines
  5981. // buckets for the values
  5982. // in the source data column rather than breaking out each individual
  5983. // value.
  5984. // Only one PivotGroup with a group rule may be added for each column
  5985. // in
  5986. // the source data, though on any given column you may add both
  5987. // a
  5988. // PivotGroup that has a rule and a PivotGroup that does not.
  5989. type PivotGroupRule struct {
  5990. // DateTimeRule: A DateTimeRule.
  5991. DateTimeRule *DateTimeRule `json:"dateTimeRule,omitempty"`
  5992. // HistogramRule: A HistogramRule.
  5993. HistogramRule *HistogramRule `json:"histogramRule,omitempty"`
  5994. // ManualRule: A ManualRule.
  5995. ManualRule *ManualRule `json:"manualRule,omitempty"`
  5996. // ForceSendFields is a list of field names (e.g. "DateTimeRule") to
  5997. // unconditionally include in API requests. By default, fields with
  5998. // empty values are omitted from API requests. However, any non-pointer,
  5999. // non-interface field appearing in ForceSendFields will be sent to the
  6000. // server regardless of whether the field is empty or not. This may be
  6001. // used to include empty fields in Patch requests.
  6002. ForceSendFields []string `json:"-"`
  6003. // NullFields is a list of field names (e.g. "DateTimeRule") to include
  6004. // in API requests with the JSON null value. By default, fields with
  6005. // empty values are omitted from API requests. However, any field with
  6006. // an empty value appearing in NullFields will be sent to the server as
  6007. // null. It is an error if a field in this list has a non-empty value.
  6008. // This may be used to include null fields in Patch requests.
  6009. NullFields []string `json:"-"`
  6010. }
  6011. func (s *PivotGroupRule) MarshalJSON() ([]byte, error) {
  6012. type NoMethod PivotGroupRule
  6013. raw := NoMethod(*s)
  6014. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6015. }
  6016. // PivotGroupSortValueBucket: Information about which values in a pivot
  6017. // group should be used for sorting.
  6018. type PivotGroupSortValueBucket struct {
  6019. // Buckets: Determines the bucket from which values are chosen to
  6020. // sort.
  6021. //
  6022. // For example, in a pivot table with one row group & two column
  6023. // groups,
  6024. // the row group can list up to two values. The first value
  6025. // corresponds
  6026. // to a value within the first column group, and the second
  6027. // value
  6028. // corresponds to a value in the second column group. If no values
  6029. // are listed, this would indicate that the row should be sorted
  6030. // according
  6031. // to the "Grand Total" over the column groups. If a single value is
  6032. // listed,
  6033. // this would correspond to using the "Total" of that bucket.
  6034. Buckets []*ExtendedValue `json:"buckets,omitempty"`
  6035. // ValuesIndex: The offset in the PivotTable.values list which the
  6036. // values in this
  6037. // grouping should be sorted by.
  6038. ValuesIndex int64 `json:"valuesIndex,omitempty"`
  6039. // ForceSendFields is a list of field names (e.g. "Buckets") to
  6040. // unconditionally include in API requests. By default, fields with
  6041. // empty values are omitted from API requests. However, any non-pointer,
  6042. // non-interface field appearing in ForceSendFields will be sent to the
  6043. // server regardless of whether the field is empty or not. This may be
  6044. // used to include empty fields in Patch requests.
  6045. ForceSendFields []string `json:"-"`
  6046. // NullFields is a list of field names (e.g. "Buckets") to include in
  6047. // API requests with the JSON null value. By default, fields with empty
  6048. // values are omitted from API requests. However, any field with an
  6049. // empty value appearing in NullFields will be sent to the server as
  6050. // null. It is an error if a field in this list has a non-empty value.
  6051. // This may be used to include null fields in Patch requests.
  6052. NullFields []string `json:"-"`
  6053. }
  6054. func (s *PivotGroupSortValueBucket) MarshalJSON() ([]byte, error) {
  6055. type NoMethod PivotGroupSortValueBucket
  6056. raw := NoMethod(*s)
  6057. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6058. }
  6059. // PivotGroupValueMetadata: Metadata about a value in a pivot grouping.
  6060. type PivotGroupValueMetadata struct {
  6061. // Collapsed: True if the data corresponding to the value is collapsed.
  6062. Collapsed bool `json:"collapsed,omitempty"`
  6063. // Value: The calculated value the metadata corresponds to.
  6064. // (Note that formulaValue is not valid,
  6065. // because the values will be calculated.)
  6066. Value *ExtendedValue `json:"value,omitempty"`
  6067. // ForceSendFields is a list of field names (e.g. "Collapsed") to
  6068. // unconditionally include in API requests. By default, fields with
  6069. // empty values are omitted from API requests. However, any non-pointer,
  6070. // non-interface field appearing in ForceSendFields will be sent to the
  6071. // server regardless of whether the field is empty or not. This may be
  6072. // used to include empty fields in Patch requests.
  6073. ForceSendFields []string `json:"-"`
  6074. // NullFields is a list of field names (e.g. "Collapsed") to include in
  6075. // API requests with the JSON null value. By default, fields with empty
  6076. // values are omitted from API requests. However, any field with an
  6077. // empty value appearing in NullFields will be sent to the server as
  6078. // null. It is an error if a field in this list has a non-empty value.
  6079. // This may be used to include null fields in Patch requests.
  6080. NullFields []string `json:"-"`
  6081. }
  6082. func (s *PivotGroupValueMetadata) MarshalJSON() ([]byte, error) {
  6083. type NoMethod PivotGroupValueMetadata
  6084. raw := NoMethod(*s)
  6085. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6086. }
  6087. // PivotTable: A pivot table.
  6088. type PivotTable struct {
  6089. // Columns: Each column grouping in the pivot table.
  6090. Columns []*PivotGroup `json:"columns,omitempty"`
  6091. // Criteria: An optional mapping of filters per source column
  6092. // offset.
  6093. //
  6094. // The filters are applied before aggregating data into the pivot
  6095. // table.
  6096. // The map's key is the column offset of the source range that you want
  6097. // to
  6098. // filter, and the value is the criteria for that column.
  6099. //
  6100. // For example, if the source was `C10:E15`, a key of `0` will have the
  6101. // filter
  6102. // for column `C`, whereas the key `1` is for column `D`.
  6103. Criteria map[string]PivotFilterCriteria `json:"criteria,omitempty"`
  6104. // Rows: Each row grouping in the pivot table.
  6105. Rows []*PivotGroup `json:"rows,omitempty"`
  6106. // Source: The range the pivot table is reading data from.
  6107. Source *GridRange `json:"source,omitempty"`
  6108. // ValueLayout: Whether values should be listed horizontally (as
  6109. // columns)
  6110. // or vertically (as rows).
  6111. //
  6112. // Possible values:
  6113. // "HORIZONTAL" - Values are laid out horizontally (as columns).
  6114. // "VERTICAL" - Values are laid out vertically (as rows).
  6115. ValueLayout string `json:"valueLayout,omitempty"`
  6116. // Values: A list of values to include in the pivot table.
  6117. Values []*PivotValue `json:"values,omitempty"`
  6118. // ForceSendFields is a list of field names (e.g. "Columns") to
  6119. // unconditionally include in API requests. By default, fields with
  6120. // empty values are omitted from API requests. However, any non-pointer,
  6121. // non-interface field appearing in ForceSendFields will be sent to the
  6122. // server regardless of whether the field is empty or not. This may be
  6123. // used to include empty fields in Patch requests.
  6124. ForceSendFields []string `json:"-"`
  6125. // NullFields is a list of field names (e.g. "Columns") to include in
  6126. // API requests with the JSON null value. By default, fields with empty
  6127. // values are omitted from API requests. However, any field with an
  6128. // empty value appearing in NullFields will be sent to the server as
  6129. // null. It is an error if a field in this list has a non-empty value.
  6130. // This may be used to include null fields in Patch requests.
  6131. NullFields []string `json:"-"`
  6132. }
  6133. func (s *PivotTable) MarshalJSON() ([]byte, error) {
  6134. type NoMethod PivotTable
  6135. raw := NoMethod(*s)
  6136. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6137. }
  6138. // PivotValue: The definition of how a value in a pivot table should be
  6139. // calculated.
  6140. type PivotValue struct {
  6141. // CalculatedDisplayType: If specified, indicates that pivot values
  6142. // should be displayed as
  6143. // the result of a calculation with another pivot value. For example,
  6144. // if
  6145. // calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all
  6146. // the
  6147. // pivot values are displayed as the percentage of the grand total.
  6148. // In
  6149. // the Sheets UI, this is referred to as "Show As" in the value section
  6150. // of a
  6151. // pivot table.
  6152. //
  6153. // Possible values:
  6154. // "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" - Default value,
  6155. // do not use.
  6156. // "PERCENT_OF_ROW_TOTAL" - Shows the pivot values as percentage of
  6157. // the row total values.
  6158. // "PERCENT_OF_COLUMN_TOTAL" - Shows the pivot values as percentage of
  6159. // the column total values.
  6160. // "PERCENT_OF_GRAND_TOTAL" - Shows the pivot values as percentage of
  6161. // the grand total values.
  6162. CalculatedDisplayType string `json:"calculatedDisplayType,omitempty"`
  6163. // Formula: A custom formula to calculate the value. The formula must
  6164. // start
  6165. // with an `=` character.
  6166. Formula string `json:"formula,omitempty"`
  6167. // Name: A name to use for the value.
  6168. Name string `json:"name,omitempty"`
  6169. // SourceColumnOffset: The column offset of the source range that this
  6170. // value reads from.
  6171. //
  6172. // For example, if the source was `C10:E15`, a `sourceColumnOffset` of
  6173. // `0`
  6174. // means this value refers to column `C`, whereas the offset `1`
  6175. // would
  6176. // refer to column `D`.
  6177. SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"`
  6178. // SummarizeFunction: A function to summarize the value.
  6179. // If formula is set, the only supported values are
  6180. // SUM and
  6181. // CUSTOM.
  6182. // If sourceColumnOffset is set, then `CUSTOM`
  6183. // is not supported.
  6184. //
  6185. // Possible values:
  6186. // "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" - The default, do not
  6187. // use.
  6188. // "SUM" - Corresponds to the `SUM` function.
  6189. // "COUNTA" - Corresponds to the `COUNTA` function.
  6190. // "COUNT" - Corresponds to the `COUNT` function.
  6191. // "COUNTUNIQUE" - Corresponds to the `COUNTUNIQUE` function.
  6192. // "AVERAGE" - Corresponds to the `AVERAGE` function.
  6193. // "MAX" - Corresponds to the `MAX` function.
  6194. // "MIN" - Corresponds to the `MIN` function.
  6195. // "MEDIAN" - Corresponds to the `MEDIAN` function.
  6196. // "PRODUCT" - Corresponds to the `PRODUCT` function.
  6197. // "STDEV" - Corresponds to the `STDEV` function.
  6198. // "STDEVP" - Corresponds to the `STDEVP` function.
  6199. // "VAR" - Corresponds to the `VAR` function.
  6200. // "VARP" - Corresponds to the `VARP` function.
  6201. // "CUSTOM" - Indicates the formula should be used as-is.
  6202. // Only valid if PivotValue.formula was set.
  6203. SummarizeFunction string `json:"summarizeFunction,omitempty"`
  6204. // ForceSendFields is a list of field names (e.g.
  6205. // "CalculatedDisplayType") to unconditionally include in API requests.
  6206. // By default, fields with empty values are omitted from API requests.
  6207. // However, any non-pointer, non-interface field appearing in
  6208. // ForceSendFields will be sent to the server regardless of whether the
  6209. // field is empty or not. This may be used to include empty fields in
  6210. // Patch requests.
  6211. ForceSendFields []string `json:"-"`
  6212. // NullFields is a list of field names (e.g. "CalculatedDisplayType") to
  6213. // include in API requests with the JSON null value. By default, fields
  6214. // with empty values are omitted from API requests. However, any field
  6215. // with an empty value appearing in NullFields will be sent to the
  6216. // server as null. It is an error if a field in this list has a
  6217. // non-empty value. This may be used to include null fields in Patch
  6218. // requests.
  6219. NullFields []string `json:"-"`
  6220. }
  6221. func (s *PivotValue) MarshalJSON() ([]byte, error) {
  6222. type NoMethod PivotValue
  6223. raw := NoMethod(*s)
  6224. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6225. }
  6226. // ProtectedRange: A protected range.
  6227. type ProtectedRange struct {
  6228. // Description: The description of this protected range.
  6229. Description string `json:"description,omitempty"`
  6230. // Editors: The users and groups with edit access to the protected
  6231. // range.
  6232. // This field is only visible to users with edit access to the
  6233. // protected
  6234. // range and the document.
  6235. // Editors are not supported with warning_only protection.
  6236. Editors *Editors `json:"editors,omitempty"`
  6237. // NamedRangeId: The named range this protected range is backed by, if
  6238. // any.
  6239. //
  6240. // When writing, only one of range or named_range_id
  6241. // may be set.
  6242. NamedRangeId string `json:"namedRangeId,omitempty"`
  6243. // ProtectedRangeId: The ID of the protected range.
  6244. // This field is read-only.
  6245. ProtectedRangeId int64 `json:"protectedRangeId,omitempty"`
  6246. // Range: The range that is being protected.
  6247. // The range may be fully unbounded, in which case this is considered
  6248. // a protected sheet.
  6249. //
  6250. // When writing, only one of range or named_range_id
  6251. // may be set.
  6252. Range *GridRange `json:"range,omitempty"`
  6253. // RequestingUserCanEdit: True if the user who requested this protected
  6254. // range can edit the
  6255. // protected area.
  6256. // This field is read-only.
  6257. RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"`
  6258. // UnprotectedRanges: The list of unprotected ranges within a protected
  6259. // sheet.
  6260. // Unprotected ranges are only supported on protected sheets.
  6261. UnprotectedRanges []*GridRange `json:"unprotectedRanges,omitempty"`
  6262. // WarningOnly: True if this protected range will show a warning when
  6263. // editing.
  6264. // Warning-based protection means that every user can edit data in
  6265. // the
  6266. // protected range, except editing will prompt a warning asking the
  6267. // user
  6268. // to confirm the edit.
  6269. //
  6270. // When writing: if this field is true, then editors is
  6271. // ignored.
  6272. // Additionally, if this field is changed from true to false and
  6273. // the
  6274. // `editors` field is not set (nor included in the field mask), then
  6275. // the editors will be set to all the editors in the document.
  6276. WarningOnly bool `json:"warningOnly,omitempty"`
  6277. // ForceSendFields is a list of field names (e.g. "Description") to
  6278. // unconditionally include in API requests. By default, fields with
  6279. // empty values are omitted from API requests. However, any non-pointer,
  6280. // non-interface field appearing in ForceSendFields will be sent to the
  6281. // server regardless of whether the field is empty or not. This may be
  6282. // used to include empty fields in Patch requests.
  6283. ForceSendFields []string `json:"-"`
  6284. // NullFields is a list of field names (e.g. "Description") to include
  6285. // in API requests with the JSON null value. By default, fields with
  6286. // empty values are omitted from API requests. However, any field with
  6287. // an empty value appearing in NullFields will be sent to the server as
  6288. // null. It is an error if a field in this list has a non-empty value.
  6289. // This may be used to include null fields in Patch requests.
  6290. NullFields []string `json:"-"`
  6291. }
  6292. func (s *ProtectedRange) MarshalJSON() ([]byte, error) {
  6293. type NoMethod ProtectedRange
  6294. raw := NoMethod(*s)
  6295. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6296. }
  6297. // RandomizeRangeRequest: Randomizes the order of the rows in a range.
  6298. type RandomizeRangeRequest struct {
  6299. // Range: The range to randomize.
  6300. Range *GridRange `json:"range,omitempty"`
  6301. // ForceSendFields is a list of field names (e.g. "Range") to
  6302. // unconditionally include in API requests. By default, fields with
  6303. // empty values are omitted from API requests. However, any non-pointer,
  6304. // non-interface field appearing in ForceSendFields will be sent to the
  6305. // server regardless of whether the field is empty or not. This may be
  6306. // used to include empty fields in Patch requests.
  6307. ForceSendFields []string `json:"-"`
  6308. // NullFields is a list of field names (e.g. "Range") to include in API
  6309. // requests with the JSON null value. By default, fields with empty
  6310. // values are omitted from API requests. However, any field with an
  6311. // empty value appearing in NullFields will be sent to the server as
  6312. // null. It is an error if a field in this list has a non-empty value.
  6313. // This may be used to include null fields in Patch requests.
  6314. NullFields []string `json:"-"`
  6315. }
  6316. func (s *RandomizeRangeRequest) MarshalJSON() ([]byte, error) {
  6317. type NoMethod RandomizeRangeRequest
  6318. raw := NoMethod(*s)
  6319. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6320. }
  6321. // RepeatCellRequest: Updates all cells in the range to the values in
  6322. // the given Cell object.
  6323. // Only the fields listed in the fields field are updated; others
  6324. // are
  6325. // unchanged.
  6326. //
  6327. // If writing a cell with a formula, the formula's ranges will
  6328. // automatically
  6329. // increment for each field in the range.
  6330. // For example, if writing a cell with formula `=A1` into range
  6331. // B2:C4,
  6332. // B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
  6333. // C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
  6334. //
  6335. // To keep the formula's ranges static, use the `$` indicator.
  6336. // For example, use the formula `=$A$1` to prevent both the row and
  6337. // the
  6338. // column from incrementing.
  6339. type RepeatCellRequest struct {
  6340. // Cell: The data to write.
  6341. Cell *CellData `json:"cell,omitempty"`
  6342. // Fields: The fields that should be updated. At least one field must
  6343. // be specified.
  6344. // The root `cell` is implied and should not be specified.
  6345. // A single "*" can be used as short-hand for listing every field.
  6346. Fields string `json:"fields,omitempty"`
  6347. // Range: The range to repeat the cell in.
  6348. Range *GridRange `json:"range,omitempty"`
  6349. // ForceSendFields is a list of field names (e.g. "Cell") to
  6350. // unconditionally include in API requests. By default, fields with
  6351. // empty values are omitted from API requests. However, any non-pointer,
  6352. // non-interface field appearing in ForceSendFields will be sent to the
  6353. // server regardless of whether the field is empty or not. This may be
  6354. // used to include empty fields in Patch requests.
  6355. ForceSendFields []string `json:"-"`
  6356. // NullFields is a list of field names (e.g. "Cell") to include in API
  6357. // requests with the JSON null value. By default, fields with empty
  6358. // values are omitted from API requests. However, any field with an
  6359. // empty value appearing in NullFields will be sent to the server as
  6360. // null. It is an error if a field in this list has a non-empty value.
  6361. // This may be used to include null fields in Patch requests.
  6362. NullFields []string `json:"-"`
  6363. }
  6364. func (s *RepeatCellRequest) MarshalJSON() ([]byte, error) {
  6365. type NoMethod RepeatCellRequest
  6366. raw := NoMethod(*s)
  6367. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6368. }
  6369. // Request: A single kind of update to apply to a spreadsheet.
  6370. type Request struct {
  6371. // AddBanding: Adds a new banded range
  6372. AddBanding *AddBandingRequest `json:"addBanding,omitempty"`
  6373. // AddChart: Adds a chart.
  6374. AddChart *AddChartRequest `json:"addChart,omitempty"`
  6375. // AddConditionalFormatRule: Adds a new conditional format rule.
  6376. AddConditionalFormatRule *AddConditionalFormatRuleRequest `json:"addConditionalFormatRule,omitempty"`
  6377. // AddDimensionGroup: Creates a group over the specified range.
  6378. AddDimensionGroup *AddDimensionGroupRequest `json:"addDimensionGroup,omitempty"`
  6379. // AddFilterView: Adds a filter view.
  6380. AddFilterView *AddFilterViewRequest `json:"addFilterView,omitempty"`
  6381. // AddNamedRange: Adds a named range.
  6382. AddNamedRange *AddNamedRangeRequest `json:"addNamedRange,omitempty"`
  6383. // AddProtectedRange: Adds a protected range.
  6384. AddProtectedRange *AddProtectedRangeRequest `json:"addProtectedRange,omitempty"`
  6385. // AddSheet: Adds a sheet.
  6386. AddSheet *AddSheetRequest `json:"addSheet,omitempty"`
  6387. // AppendCells: Appends cells after the last row with data in a sheet.
  6388. AppendCells *AppendCellsRequest `json:"appendCells,omitempty"`
  6389. // AppendDimension: Appends dimensions to the end of a sheet.
  6390. AppendDimension *AppendDimensionRequest `json:"appendDimension,omitempty"`
  6391. // AutoFill: Automatically fills in more data based on existing data.
  6392. AutoFill *AutoFillRequest `json:"autoFill,omitempty"`
  6393. // AutoResizeDimensions: Automatically resizes one or more dimensions
  6394. // based on the contents
  6395. // of the cells in that dimension.
  6396. AutoResizeDimensions *AutoResizeDimensionsRequest `json:"autoResizeDimensions,omitempty"`
  6397. // ClearBasicFilter: Clears the basic filter on a sheet.
  6398. ClearBasicFilter *ClearBasicFilterRequest `json:"clearBasicFilter,omitempty"`
  6399. // CopyPaste: Copies data from one area and pastes it to another.
  6400. CopyPaste *CopyPasteRequest `json:"copyPaste,omitempty"`
  6401. // CreateDeveloperMetadata: Creates new developer metadata
  6402. CreateDeveloperMetadata *CreateDeveloperMetadataRequest `json:"createDeveloperMetadata,omitempty"`
  6403. // CutPaste: Cuts data from one area and pastes it to another.
  6404. CutPaste *CutPasteRequest `json:"cutPaste,omitempty"`
  6405. // DeleteBanding: Removes a banded range
  6406. DeleteBanding *DeleteBandingRequest `json:"deleteBanding,omitempty"`
  6407. // DeleteConditionalFormatRule: Deletes an existing conditional format
  6408. // rule.
  6409. DeleteConditionalFormatRule *DeleteConditionalFormatRuleRequest `json:"deleteConditionalFormatRule,omitempty"`
  6410. // DeleteDeveloperMetadata: Deletes developer metadata
  6411. DeleteDeveloperMetadata *DeleteDeveloperMetadataRequest `json:"deleteDeveloperMetadata,omitempty"`
  6412. // DeleteDimension: Deletes rows or columns in a sheet.
  6413. DeleteDimension *DeleteDimensionRequest `json:"deleteDimension,omitempty"`
  6414. // DeleteDimensionGroup: Deletes a group over the specified range.
  6415. DeleteDimensionGroup *DeleteDimensionGroupRequest `json:"deleteDimensionGroup,omitempty"`
  6416. // DeleteEmbeddedObject: Deletes an embedded object (e.g, chart, image)
  6417. // in a sheet.
  6418. DeleteEmbeddedObject *DeleteEmbeddedObjectRequest `json:"deleteEmbeddedObject,omitempty"`
  6419. // DeleteFilterView: Deletes a filter view from a sheet.
  6420. DeleteFilterView *DeleteFilterViewRequest `json:"deleteFilterView,omitempty"`
  6421. // DeleteNamedRange: Deletes a named range.
  6422. DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"`
  6423. // DeleteProtectedRange: Deletes a protected range.
  6424. DeleteProtectedRange *DeleteProtectedRangeRequest `json:"deleteProtectedRange,omitempty"`
  6425. // DeleteRange: Deletes a range of cells from a sheet, shifting the
  6426. // remaining cells.
  6427. DeleteRange *DeleteRangeRequest `json:"deleteRange,omitempty"`
  6428. // DeleteSheet: Deletes a sheet.
  6429. DeleteSheet *DeleteSheetRequest `json:"deleteSheet,omitempty"`
  6430. // DuplicateFilterView: Duplicates a filter view.
  6431. DuplicateFilterView *DuplicateFilterViewRequest `json:"duplicateFilterView,omitempty"`
  6432. // DuplicateSheet: Duplicates a sheet.
  6433. DuplicateSheet *DuplicateSheetRequest `json:"duplicateSheet,omitempty"`
  6434. // FindReplace: Finds and replaces occurrences of some text with other
  6435. // text.
  6436. FindReplace *FindReplaceRequest `json:"findReplace,omitempty"`
  6437. // InsertDimension: Inserts new rows or columns in a sheet.
  6438. InsertDimension *InsertDimensionRequest `json:"insertDimension,omitempty"`
  6439. // InsertRange: Inserts new cells in a sheet, shifting the existing
  6440. // cells.
  6441. InsertRange *InsertRangeRequest `json:"insertRange,omitempty"`
  6442. // MergeCells: Merges cells together.
  6443. MergeCells *MergeCellsRequest `json:"mergeCells,omitempty"`
  6444. // MoveDimension: Moves rows or columns to another location in a sheet.
  6445. MoveDimension *MoveDimensionRequest `json:"moveDimension,omitempty"`
  6446. // PasteData: Pastes data (HTML or delimited) into a sheet.
  6447. PasteData *PasteDataRequest `json:"pasteData,omitempty"`
  6448. // RandomizeRange: Randomizes the order of the rows in a range.
  6449. RandomizeRange *RandomizeRangeRequest `json:"randomizeRange,omitempty"`
  6450. // RepeatCell: Repeats a single cell across a range.
  6451. RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"`
  6452. // SetBasicFilter: Sets the basic filter on a sheet.
  6453. SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"`
  6454. // SetDataValidation: Sets data validation for one or more cells.
  6455. SetDataValidation *SetDataValidationRequest `json:"setDataValidation,omitempty"`
  6456. // SortRange: Sorts data in a range.
  6457. SortRange *SortRangeRequest `json:"sortRange,omitempty"`
  6458. // TextToColumns: Converts a column of text into many columns of text.
  6459. TextToColumns *TextToColumnsRequest `json:"textToColumns,omitempty"`
  6460. // UnmergeCells: Unmerges merged cells.
  6461. UnmergeCells *UnmergeCellsRequest `json:"unmergeCells,omitempty"`
  6462. // UpdateBanding: Updates a banded range
  6463. UpdateBanding *UpdateBandingRequest `json:"updateBanding,omitempty"`
  6464. // UpdateBorders: Updates the borders in a range of cells.
  6465. UpdateBorders *UpdateBordersRequest `json:"updateBorders,omitempty"`
  6466. // UpdateCells: Updates many cells at once.
  6467. UpdateCells *UpdateCellsRequest `json:"updateCells,omitempty"`
  6468. // UpdateChartSpec: Updates a chart's specifications.
  6469. UpdateChartSpec *UpdateChartSpecRequest `json:"updateChartSpec,omitempty"`
  6470. // UpdateConditionalFormatRule: Updates an existing conditional format
  6471. // rule.
  6472. UpdateConditionalFormatRule *UpdateConditionalFormatRuleRequest `json:"updateConditionalFormatRule,omitempty"`
  6473. // UpdateDeveloperMetadata: Updates an existing developer metadata entry
  6474. UpdateDeveloperMetadata *UpdateDeveloperMetadataRequest `json:"updateDeveloperMetadata,omitempty"`
  6475. // UpdateDimensionGroup: Updates the state of the specified group.
  6476. UpdateDimensionGroup *UpdateDimensionGroupRequest `json:"updateDimensionGroup,omitempty"`
  6477. // UpdateDimensionProperties: Updates dimensions' properties.
  6478. UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"`
  6479. // UpdateEmbeddedObjectPosition: Updates an embedded object's (e.g.
  6480. // chart, image) position.
  6481. UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionRequest `json:"updateEmbeddedObjectPosition,omitempty"`
  6482. // UpdateFilterView: Updates the properties of a filter view.
  6483. UpdateFilterView *UpdateFilterViewRequest `json:"updateFilterView,omitempty"`
  6484. // UpdateNamedRange: Updates a named range.
  6485. UpdateNamedRange *UpdateNamedRangeRequest `json:"updateNamedRange,omitempty"`
  6486. // UpdateProtectedRange: Updates a protected range.
  6487. UpdateProtectedRange *UpdateProtectedRangeRequest `json:"updateProtectedRange,omitempty"`
  6488. // UpdateSheetProperties: Updates a sheet's properties.
  6489. UpdateSheetProperties *UpdateSheetPropertiesRequest `json:"updateSheetProperties,omitempty"`
  6490. // UpdateSpreadsheetProperties: Updates the spreadsheet's properties.
  6491. UpdateSpreadsheetProperties *UpdateSpreadsheetPropertiesRequest `json:"updateSpreadsheetProperties,omitempty"`
  6492. // ForceSendFields is a list of field names (e.g. "AddBanding") to
  6493. // unconditionally include in API requests. By default, fields with
  6494. // empty values are omitted from API requests. However, any non-pointer,
  6495. // non-interface field appearing in ForceSendFields will be sent to the
  6496. // server regardless of whether the field is empty or not. This may be
  6497. // used to include empty fields in Patch requests.
  6498. ForceSendFields []string `json:"-"`
  6499. // NullFields is a list of field names (e.g. "AddBanding") to include in
  6500. // API requests with the JSON null value. By default, fields with empty
  6501. // values are omitted from API requests. However, any field with an
  6502. // empty value appearing in NullFields will be sent to the server as
  6503. // null. It is an error if a field in this list has a non-empty value.
  6504. // This may be used to include null fields in Patch requests.
  6505. NullFields []string `json:"-"`
  6506. }
  6507. func (s *Request) MarshalJSON() ([]byte, error) {
  6508. type NoMethod Request
  6509. raw := NoMethod(*s)
  6510. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6511. }
  6512. // Response: A single response from an update.
  6513. type Response struct {
  6514. // AddBanding: A reply from adding a banded range.
  6515. AddBanding *AddBandingResponse `json:"addBanding,omitempty"`
  6516. // AddChart: A reply from adding a chart.
  6517. AddChart *AddChartResponse `json:"addChart,omitempty"`
  6518. // AddDimensionGroup: A reply from adding a dimension group.
  6519. AddDimensionGroup *AddDimensionGroupResponse `json:"addDimensionGroup,omitempty"`
  6520. // AddFilterView: A reply from adding a filter view.
  6521. AddFilterView *AddFilterViewResponse `json:"addFilterView,omitempty"`
  6522. // AddNamedRange: A reply from adding a named range.
  6523. AddNamedRange *AddNamedRangeResponse `json:"addNamedRange,omitempty"`
  6524. // AddProtectedRange: A reply from adding a protected range.
  6525. AddProtectedRange *AddProtectedRangeResponse `json:"addProtectedRange,omitempty"`
  6526. // AddSheet: A reply from adding a sheet.
  6527. AddSheet *AddSheetResponse `json:"addSheet,omitempty"`
  6528. // CreateDeveloperMetadata: A reply from creating a developer metadata
  6529. // entry.
  6530. CreateDeveloperMetadata *CreateDeveloperMetadataResponse `json:"createDeveloperMetadata,omitempty"`
  6531. // DeleteConditionalFormatRule: A reply from deleting a conditional
  6532. // format rule.
  6533. DeleteConditionalFormatRule *DeleteConditionalFormatRuleResponse `json:"deleteConditionalFormatRule,omitempty"`
  6534. // DeleteDeveloperMetadata: A reply from deleting a developer metadata
  6535. // entry.
  6536. DeleteDeveloperMetadata *DeleteDeveloperMetadataResponse `json:"deleteDeveloperMetadata,omitempty"`
  6537. // DeleteDimensionGroup: A reply from deleting a dimension group.
  6538. DeleteDimensionGroup *DeleteDimensionGroupResponse `json:"deleteDimensionGroup,omitempty"`
  6539. // DuplicateFilterView: A reply from duplicating a filter view.
  6540. DuplicateFilterView *DuplicateFilterViewResponse `json:"duplicateFilterView,omitempty"`
  6541. // DuplicateSheet: A reply from duplicating a sheet.
  6542. DuplicateSheet *DuplicateSheetResponse `json:"duplicateSheet,omitempty"`
  6543. // FindReplace: A reply from doing a find/replace.
  6544. FindReplace *FindReplaceResponse `json:"findReplace,omitempty"`
  6545. // UpdateConditionalFormatRule: A reply from updating a conditional
  6546. // format rule.
  6547. UpdateConditionalFormatRule *UpdateConditionalFormatRuleResponse `json:"updateConditionalFormatRule,omitempty"`
  6548. // UpdateDeveloperMetadata: A reply from updating a developer metadata
  6549. // entry.
  6550. UpdateDeveloperMetadata *UpdateDeveloperMetadataResponse `json:"updateDeveloperMetadata,omitempty"`
  6551. // UpdateEmbeddedObjectPosition: A reply from updating an embedded
  6552. // object's position.
  6553. UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionResponse `json:"updateEmbeddedObjectPosition,omitempty"`
  6554. // ForceSendFields is a list of field names (e.g. "AddBanding") to
  6555. // unconditionally include in API requests. By default, fields with
  6556. // empty values are omitted from API requests. However, any non-pointer,
  6557. // non-interface field appearing in ForceSendFields will be sent to the
  6558. // server regardless of whether the field is empty or not. This may be
  6559. // used to include empty fields in Patch requests.
  6560. ForceSendFields []string `json:"-"`
  6561. // NullFields is a list of field names (e.g. "AddBanding") to include in
  6562. // API requests with the JSON null value. By default, fields with empty
  6563. // values are omitted from API requests. However, any field with an
  6564. // empty value appearing in NullFields will be sent to the server as
  6565. // null. It is an error if a field in this list has a non-empty value.
  6566. // This may be used to include null fields in Patch requests.
  6567. NullFields []string `json:"-"`
  6568. }
  6569. func (s *Response) MarshalJSON() ([]byte, error) {
  6570. type NoMethod Response
  6571. raw := NoMethod(*s)
  6572. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6573. }
  6574. // RowData: Data about each cell in a row.
  6575. type RowData struct {
  6576. // Values: The values in the row, one per column.
  6577. Values []*CellData `json:"values,omitempty"`
  6578. // ForceSendFields is a list of field names (e.g. "Values") to
  6579. // unconditionally include in API requests. By default, fields with
  6580. // empty values are omitted from API requests. However, any non-pointer,
  6581. // non-interface field appearing in ForceSendFields will be sent to the
  6582. // server regardless of whether the field is empty or not. This may be
  6583. // used to include empty fields in Patch requests.
  6584. ForceSendFields []string `json:"-"`
  6585. // NullFields is a list of field names (e.g. "Values") to include in API
  6586. // requests with the JSON null value. By default, fields with empty
  6587. // values are omitted from API requests. However, any field with an
  6588. // empty value appearing in NullFields will be sent to the server as
  6589. // null. It is an error if a field in this list has a non-empty value.
  6590. // This may be used to include null fields in Patch requests.
  6591. NullFields []string `json:"-"`
  6592. }
  6593. func (s *RowData) MarshalJSON() ([]byte, error) {
  6594. type NoMethod RowData
  6595. raw := NoMethod(*s)
  6596. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6597. }
  6598. // SearchDeveloperMetadataRequest: A request to retrieve all developer
  6599. // metadata matching the set of specified
  6600. // criteria.
  6601. type SearchDeveloperMetadataRequest struct {
  6602. // DataFilters: The data filters describing the criteria used to
  6603. // determine which
  6604. // DeveloperMetadata entries to return. DeveloperMetadata matching any
  6605. // of the
  6606. // specified filters will be included in the response.
  6607. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  6608. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  6609. // unconditionally include in API requests. By default, fields with
  6610. // empty values are omitted from API requests. However, any non-pointer,
  6611. // non-interface field appearing in ForceSendFields will be sent to the
  6612. // server regardless of whether the field is empty or not. This may be
  6613. // used to include empty fields in Patch requests.
  6614. ForceSendFields []string `json:"-"`
  6615. // NullFields is a list of field names (e.g. "DataFilters") to include
  6616. // in API requests with the JSON null value. By default, fields with
  6617. // empty values are omitted from API requests. However, any field with
  6618. // an empty value appearing in NullFields will be sent to the server as
  6619. // null. It is an error if a field in this list has a non-empty value.
  6620. // This may be used to include null fields in Patch requests.
  6621. NullFields []string `json:"-"`
  6622. }
  6623. func (s *SearchDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  6624. type NoMethod SearchDeveloperMetadataRequest
  6625. raw := NoMethod(*s)
  6626. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6627. }
  6628. // SearchDeveloperMetadataResponse: A reply to a developer metadata
  6629. // search request.
  6630. type SearchDeveloperMetadataResponse struct {
  6631. // MatchedDeveloperMetadata: The metadata matching the criteria of the
  6632. // search request.
  6633. MatchedDeveloperMetadata []*MatchedDeveloperMetadata `json:"matchedDeveloperMetadata,omitempty"`
  6634. // ServerResponse contains the HTTP response code and headers from the
  6635. // server.
  6636. googleapi.ServerResponse `json:"-"`
  6637. // ForceSendFields is a list of field names (e.g.
  6638. // "MatchedDeveloperMetadata") to unconditionally include in API
  6639. // requests. By default, fields with empty values are omitted from API
  6640. // requests. However, any non-pointer, non-interface field appearing in
  6641. // ForceSendFields will be sent to the server regardless of whether the
  6642. // field is empty or not. This may be used to include empty fields in
  6643. // Patch requests.
  6644. ForceSendFields []string `json:"-"`
  6645. // NullFields is a list of field names (e.g. "MatchedDeveloperMetadata")
  6646. // to include in API requests with the JSON null value. By default,
  6647. // fields with empty values are omitted from API requests. However, any
  6648. // field with an empty value appearing in NullFields will be sent to the
  6649. // server as null. It is an error if a field in this list has a
  6650. // non-empty value. This may be used to include null fields in Patch
  6651. // requests.
  6652. NullFields []string `json:"-"`
  6653. }
  6654. func (s *SearchDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  6655. type NoMethod SearchDeveloperMetadataResponse
  6656. raw := NoMethod(*s)
  6657. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6658. }
  6659. // SetBasicFilterRequest: Sets the basic filter associated with a sheet.
  6660. type SetBasicFilterRequest struct {
  6661. // Filter: The filter to set.
  6662. Filter *BasicFilter `json:"filter,omitempty"`
  6663. // ForceSendFields is a list of field names (e.g. "Filter") to
  6664. // unconditionally include in API requests. By default, fields with
  6665. // empty values are omitted from API requests. However, any non-pointer,
  6666. // non-interface field appearing in ForceSendFields will be sent to the
  6667. // server regardless of whether the field is empty or not. This may be
  6668. // used to include empty fields in Patch requests.
  6669. ForceSendFields []string `json:"-"`
  6670. // NullFields is a list of field names (e.g. "Filter") to include in API
  6671. // requests with the JSON null value. By default, fields with empty
  6672. // values are omitted from API requests. However, any field with an
  6673. // empty value appearing in NullFields will be sent to the server as
  6674. // null. It is an error if a field in this list has a non-empty value.
  6675. // This may be used to include null fields in Patch requests.
  6676. NullFields []string `json:"-"`
  6677. }
  6678. func (s *SetBasicFilterRequest) MarshalJSON() ([]byte, error) {
  6679. type NoMethod SetBasicFilterRequest
  6680. raw := NoMethod(*s)
  6681. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6682. }
  6683. // SetDataValidationRequest: Sets a data validation rule to every cell
  6684. // in the range.
  6685. // To clear validation in a range, call this with no rule specified.
  6686. type SetDataValidationRequest struct {
  6687. // Range: The range the data validation rule should apply to.
  6688. Range *GridRange `json:"range,omitempty"`
  6689. // Rule: The data validation rule to set on each cell in the range,
  6690. // or empty to clear the data validation in the range.
  6691. Rule *DataValidationRule `json:"rule,omitempty"`
  6692. // ForceSendFields is a list of field names (e.g. "Range") to
  6693. // unconditionally include in API requests. By default, fields with
  6694. // empty values are omitted from API requests. However, any non-pointer,
  6695. // non-interface field appearing in ForceSendFields will be sent to the
  6696. // server regardless of whether the field is empty or not. This may be
  6697. // used to include empty fields in Patch requests.
  6698. ForceSendFields []string `json:"-"`
  6699. // NullFields is a list of field names (e.g. "Range") to include in API
  6700. // requests with the JSON null value. By default, fields with empty
  6701. // values are omitted from API requests. However, any field with an
  6702. // empty value appearing in NullFields will be sent to the server as
  6703. // null. It is an error if a field in this list has a non-empty value.
  6704. // This may be used to include null fields in Patch requests.
  6705. NullFields []string `json:"-"`
  6706. }
  6707. func (s *SetDataValidationRequest) MarshalJSON() ([]byte, error) {
  6708. type NoMethod SetDataValidationRequest
  6709. raw := NoMethod(*s)
  6710. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6711. }
  6712. // Sheet: A sheet in a spreadsheet.
  6713. type Sheet struct {
  6714. // BandedRanges: The banded (alternating colors) ranges on this sheet.
  6715. BandedRanges []*BandedRange `json:"bandedRanges,omitempty"`
  6716. // BasicFilter: The filter on this sheet, if any.
  6717. BasicFilter *BasicFilter `json:"basicFilter,omitempty"`
  6718. // Charts: The specifications of every chart on this sheet.
  6719. Charts []*EmbeddedChart `json:"charts,omitempty"`
  6720. // ColumnGroups: All column groups on this sheet, ordered by increasing
  6721. // range start index,
  6722. // then by group depth.
  6723. ColumnGroups []*DimensionGroup `json:"columnGroups,omitempty"`
  6724. // ConditionalFormats: The conditional format rules in this sheet.
  6725. ConditionalFormats []*ConditionalFormatRule `json:"conditionalFormats,omitempty"`
  6726. // Data: Data in the grid, if this is a grid sheet.
  6727. // The number of GridData objects returned is dependent on the number
  6728. // of
  6729. // ranges requested on this sheet. For example, if this is
  6730. // representing
  6731. // `Sheet1`, and the spreadsheet was requested with
  6732. // ranges
  6733. // `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will
  6734. // have a
  6735. // startRow/startColumn of `0`,
  6736. // while the second one will have `startRow 14` (zero-based row 15),
  6737. // and `startColumn 3` (zero-based column D).
  6738. Data []*GridData `json:"data,omitempty"`
  6739. // DeveloperMetadata: The developer metadata associated with a sheet.
  6740. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  6741. // FilterViews: The filter views in this sheet.
  6742. FilterViews []*FilterView `json:"filterViews,omitempty"`
  6743. // Merges: The ranges that are merged together.
  6744. Merges []*GridRange `json:"merges,omitempty"`
  6745. // Properties: The properties of the sheet.
  6746. Properties *SheetProperties `json:"properties,omitempty"`
  6747. // ProtectedRanges: The protected ranges in this sheet.
  6748. ProtectedRanges []*ProtectedRange `json:"protectedRanges,omitempty"`
  6749. // RowGroups: All row groups on this sheet, ordered by increasing range
  6750. // start index, then
  6751. // by group depth.
  6752. RowGroups []*DimensionGroup `json:"rowGroups,omitempty"`
  6753. // ForceSendFields is a list of field names (e.g. "BandedRanges") to
  6754. // unconditionally include in API requests. By default, fields with
  6755. // empty values are omitted from API requests. However, any non-pointer,
  6756. // non-interface field appearing in ForceSendFields will be sent to the
  6757. // server regardless of whether the field is empty or not. This may be
  6758. // used to include empty fields in Patch requests.
  6759. ForceSendFields []string `json:"-"`
  6760. // NullFields is a list of field names (e.g. "BandedRanges") to include
  6761. // in API requests with the JSON null value. By default, fields with
  6762. // empty values are omitted from API requests. However, any field with
  6763. // an empty value appearing in NullFields will be sent to the server as
  6764. // null. It is an error if a field in this list has a non-empty value.
  6765. // This may be used to include null fields in Patch requests.
  6766. NullFields []string `json:"-"`
  6767. }
  6768. func (s *Sheet) MarshalJSON() ([]byte, error) {
  6769. type NoMethod Sheet
  6770. raw := NoMethod(*s)
  6771. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6772. }
  6773. // SheetProperties: Properties of a sheet.
  6774. type SheetProperties struct {
  6775. // GridProperties: Additional properties of the sheet if this sheet is a
  6776. // grid.
  6777. // (If the sheet is an object sheet, containing a chart or image,
  6778. // then
  6779. // this field will be absent.)
  6780. // When writing it is an error to set any grid properties on non-grid
  6781. // sheets.
  6782. GridProperties *GridProperties `json:"gridProperties,omitempty"`
  6783. // Hidden: True if the sheet is hidden in the UI, false if it's visible.
  6784. Hidden bool `json:"hidden,omitempty"`
  6785. // Index: The index of the sheet within the spreadsheet.
  6786. // When adding or updating sheet properties, if this field
  6787. // is excluded then the sheet is added or moved to the end
  6788. // of the sheet list. When updating sheet indices or inserting
  6789. // sheets, movement is considered in "before the move" indexes.
  6790. // For example, if there were 3 sheets (S1, S2, S3) in order to
  6791. // move S1 ahead of S2 the index would have to be set to 2. A
  6792. // sheet
  6793. // index update request is ignored if the requested index is
  6794. // identical to the sheets current index or if the requested new
  6795. // index is equal to the current sheet index + 1.
  6796. Index int64 `json:"index,omitempty"`
  6797. // RightToLeft: True if the sheet is an RTL sheet instead of an LTR
  6798. // sheet.
  6799. RightToLeft bool `json:"rightToLeft,omitempty"`
  6800. // SheetId: The ID of the sheet. Must be non-negative.
  6801. // This field cannot be changed once set.
  6802. SheetId int64 `json:"sheetId,omitempty"`
  6803. // SheetType: The type of sheet. Defaults to GRID.
  6804. // This field cannot be changed once set.
  6805. //
  6806. // Possible values:
  6807. // "SHEET_TYPE_UNSPECIFIED" - Default value, do not use.
  6808. // "GRID" - The sheet is a grid.
  6809. // "OBJECT" - The sheet has no grid and instead has an object like a
  6810. // chart or image.
  6811. SheetType string `json:"sheetType,omitempty"`
  6812. // TabColor: The color of the tab in the UI.
  6813. TabColor *Color `json:"tabColor,omitempty"`
  6814. // Title: The name of the sheet.
  6815. Title string `json:"title,omitempty"`
  6816. // ServerResponse contains the HTTP response code and headers from the
  6817. // server.
  6818. googleapi.ServerResponse `json:"-"`
  6819. // ForceSendFields is a list of field names (e.g. "GridProperties") to
  6820. // unconditionally include in API requests. By default, fields with
  6821. // empty values are omitted from API requests. However, any non-pointer,
  6822. // non-interface field appearing in ForceSendFields will be sent to the
  6823. // server regardless of whether the field is empty or not. This may be
  6824. // used to include empty fields in Patch requests.
  6825. ForceSendFields []string `json:"-"`
  6826. // NullFields is a list of field names (e.g. "GridProperties") to
  6827. // include in API requests with the JSON null value. By default, fields
  6828. // with empty values are omitted from API requests. However, any field
  6829. // with an empty value appearing in NullFields will be sent to the
  6830. // server as null. It is an error if a field in this list has a
  6831. // non-empty value. This may be used to include null fields in Patch
  6832. // requests.
  6833. NullFields []string `json:"-"`
  6834. }
  6835. func (s *SheetProperties) MarshalJSON() ([]byte, error) {
  6836. type NoMethod SheetProperties
  6837. raw := NoMethod(*s)
  6838. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6839. }
  6840. // SortRangeRequest: Sorts data in rows based on a sort order per
  6841. // column.
  6842. type SortRangeRequest struct {
  6843. // Range: The range to sort.
  6844. Range *GridRange `json:"range,omitempty"`
  6845. // SortSpecs: The sort order per column. Later specifications are used
  6846. // when values
  6847. // are equal in the earlier specifications.
  6848. SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
  6849. // ForceSendFields is a list of field names (e.g. "Range") to
  6850. // unconditionally include in API requests. By default, fields with
  6851. // empty values are omitted from API requests. However, any non-pointer,
  6852. // non-interface field appearing in ForceSendFields will be sent to the
  6853. // server regardless of whether the field is empty or not. This may be
  6854. // used to include empty fields in Patch requests.
  6855. ForceSendFields []string `json:"-"`
  6856. // NullFields is a list of field names (e.g. "Range") to include in API
  6857. // requests with the JSON null value. By default, fields with empty
  6858. // values are omitted from API requests. However, any field with an
  6859. // empty value appearing in NullFields will be sent to the server as
  6860. // null. It is an error if a field in this list has a non-empty value.
  6861. // This may be used to include null fields in Patch requests.
  6862. NullFields []string `json:"-"`
  6863. }
  6864. func (s *SortRangeRequest) MarshalJSON() ([]byte, error) {
  6865. type NoMethod SortRangeRequest
  6866. raw := NoMethod(*s)
  6867. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6868. }
  6869. // SortSpec: A sort order associated with a specific column or row.
  6870. type SortSpec struct {
  6871. // DimensionIndex: The dimension the sort should be applied to.
  6872. DimensionIndex int64 `json:"dimensionIndex,omitempty"`
  6873. // SortOrder: The order data should be sorted.
  6874. //
  6875. // Possible values:
  6876. // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this.
  6877. // "ASCENDING" - Sort ascending.
  6878. // "DESCENDING" - Sort descending.
  6879. SortOrder string `json:"sortOrder,omitempty"`
  6880. // ForceSendFields is a list of field names (e.g. "DimensionIndex") to
  6881. // unconditionally include in API requests. By default, fields with
  6882. // empty values are omitted from API requests. However, any non-pointer,
  6883. // non-interface field appearing in ForceSendFields will be sent to the
  6884. // server regardless of whether the field is empty or not. This may be
  6885. // used to include empty fields in Patch requests.
  6886. ForceSendFields []string `json:"-"`
  6887. // NullFields is a list of field names (e.g. "DimensionIndex") to
  6888. // include in API requests with the JSON null value. By default, fields
  6889. // with empty values are omitted from API requests. However, any field
  6890. // with an empty value appearing in NullFields will be sent to the
  6891. // server as null. It is an error if a field in this list has a
  6892. // non-empty value. This may be used to include null fields in Patch
  6893. // requests.
  6894. NullFields []string `json:"-"`
  6895. }
  6896. func (s *SortSpec) MarshalJSON() ([]byte, error) {
  6897. type NoMethod SortSpec
  6898. raw := NoMethod(*s)
  6899. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6900. }
  6901. // SourceAndDestination: A combination of a source range and how to
  6902. // extend that source.
  6903. type SourceAndDestination struct {
  6904. // Dimension: The dimension that data should be filled into.
  6905. //
  6906. // Possible values:
  6907. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  6908. // "ROWS" - Operates on the rows of a sheet.
  6909. // "COLUMNS" - Operates on the columns of a sheet.
  6910. Dimension string `json:"dimension,omitempty"`
  6911. // FillLength: The number of rows or columns that data should be filled
  6912. // into.
  6913. // Positive numbers expand beyond the last row or last column
  6914. // of the source. Negative numbers expand before the first row
  6915. // or first column of the source.
  6916. FillLength int64 `json:"fillLength,omitempty"`
  6917. // Source: The location of the data to use as the source of the
  6918. // autofill.
  6919. Source *GridRange `json:"source,omitempty"`
  6920. // ForceSendFields is a list of field names (e.g. "Dimension") to
  6921. // unconditionally include in API requests. By default, fields with
  6922. // empty values are omitted from API requests. However, any non-pointer,
  6923. // non-interface field appearing in ForceSendFields will be sent to the
  6924. // server regardless of whether the field is empty or not. This may be
  6925. // used to include empty fields in Patch requests.
  6926. ForceSendFields []string `json:"-"`
  6927. // NullFields is a list of field names (e.g. "Dimension") to include in
  6928. // API requests with the JSON null value. By default, fields with empty
  6929. // values are omitted from API requests. However, any field with an
  6930. // empty value appearing in NullFields will be sent to the server as
  6931. // null. It is an error if a field in this list has a non-empty value.
  6932. // This may be used to include null fields in Patch requests.
  6933. NullFields []string `json:"-"`
  6934. }
  6935. func (s *SourceAndDestination) MarshalJSON() ([]byte, error) {
  6936. type NoMethod SourceAndDestination
  6937. raw := NoMethod(*s)
  6938. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6939. }
  6940. // Spreadsheet: Resource that represents a spreadsheet.
  6941. type Spreadsheet struct {
  6942. // DeveloperMetadata: The developer metadata associated with a
  6943. // spreadsheet.
  6944. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  6945. // NamedRanges: The named ranges defined in a spreadsheet.
  6946. NamedRanges []*NamedRange `json:"namedRanges,omitempty"`
  6947. // Properties: Overall properties of a spreadsheet.
  6948. Properties *SpreadsheetProperties `json:"properties,omitempty"`
  6949. // Sheets: The sheets that are part of a spreadsheet.
  6950. Sheets []*Sheet `json:"sheets,omitempty"`
  6951. // SpreadsheetId: The ID of the spreadsheet.
  6952. // This field is read-only.
  6953. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  6954. // SpreadsheetUrl: The url of the spreadsheet.
  6955. // This field is read-only.
  6956. SpreadsheetUrl string `json:"spreadsheetUrl,omitempty"`
  6957. // ServerResponse contains the HTTP response code and headers from the
  6958. // server.
  6959. googleapi.ServerResponse `json:"-"`
  6960. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  6961. // to unconditionally include in API requests. By default, fields with
  6962. // empty values are omitted from API requests. However, any non-pointer,
  6963. // non-interface field appearing in ForceSendFields will be sent to the
  6964. // server regardless of whether the field is empty or not. This may be
  6965. // used to include empty fields in Patch requests.
  6966. ForceSendFields []string `json:"-"`
  6967. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  6968. // include in API requests with the JSON null value. By default, fields
  6969. // with empty values are omitted from API requests. However, any field
  6970. // with an empty value appearing in NullFields will be sent to the
  6971. // server as null. It is an error if a field in this list has a
  6972. // non-empty value. This may be used to include null fields in Patch
  6973. // requests.
  6974. NullFields []string `json:"-"`
  6975. }
  6976. func (s *Spreadsheet) MarshalJSON() ([]byte, error) {
  6977. type NoMethod Spreadsheet
  6978. raw := NoMethod(*s)
  6979. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6980. }
  6981. // SpreadsheetProperties: Properties of a spreadsheet.
  6982. type SpreadsheetProperties struct {
  6983. // AutoRecalc: The amount of time to wait before volatile functions are
  6984. // recalculated.
  6985. //
  6986. // Possible values:
  6987. // "RECALCULATION_INTERVAL_UNSPECIFIED" - Default value. This value
  6988. // must not be used.
  6989. // "ON_CHANGE" - Volatile functions are updated on every change.
  6990. // "MINUTE" - Volatile functions are updated on every change and every
  6991. // minute.
  6992. // "HOUR" - Volatile functions are updated on every change and hourly.
  6993. AutoRecalc string `json:"autoRecalc,omitempty"`
  6994. // DefaultFormat: The default format of all cells in the
  6995. // spreadsheet.
  6996. // CellData.effectiveFormat will not be set if
  6997. // the cell's format is equal to this default format. This field is
  6998. // read-only.
  6999. DefaultFormat *CellFormat `json:"defaultFormat,omitempty"`
  7000. // IterativeCalculationSettings: Determines whether and how circular
  7001. // references are resolved with iterative
  7002. // calculation. Absence of this field means that circular references
  7003. // will
  7004. // result in calculation errors.
  7005. IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"`
  7006. // Locale: The locale of the spreadsheet in one of the following
  7007. // formats:
  7008. //
  7009. // * an ISO 639-1 language code such as `en`
  7010. //
  7011. // * an ISO 639-2 language code such as `fil`, if no 639-1 code
  7012. // exists
  7013. //
  7014. // * a combination of the ISO language code and country code, such as
  7015. // `en_US`
  7016. //
  7017. // Note: when updating this field, not all locales/languages are
  7018. // supported.
  7019. Locale string `json:"locale,omitempty"`
  7020. // TimeZone: The time zone of the spreadsheet, in CLDR format such
  7021. // as
  7022. // `America/New_York`. If the time zone isn't recognized, this may
  7023. // be a custom time zone such as `GMT-07:00`.
  7024. TimeZone string `json:"timeZone,omitempty"`
  7025. // Title: The title of the spreadsheet.
  7026. Title string `json:"title,omitempty"`
  7027. // ForceSendFields is a list of field names (e.g. "AutoRecalc") to
  7028. // unconditionally include in API requests. By default, fields with
  7029. // empty values are omitted from API requests. However, any non-pointer,
  7030. // non-interface field appearing in ForceSendFields will be sent to the
  7031. // server regardless of whether the field is empty or not. This may be
  7032. // used to include empty fields in Patch requests.
  7033. ForceSendFields []string `json:"-"`
  7034. // NullFields is a list of field names (e.g. "AutoRecalc") to include in
  7035. // API requests with the JSON null value. By default, fields with empty
  7036. // values are omitted from API requests. However, any field with an
  7037. // empty value appearing in NullFields will be sent to the server as
  7038. // null. It is an error if a field in this list has a non-empty value.
  7039. // This may be used to include null fields in Patch requests.
  7040. NullFields []string `json:"-"`
  7041. }
  7042. func (s *SpreadsheetProperties) MarshalJSON() ([]byte, error) {
  7043. type NoMethod SpreadsheetProperties
  7044. raw := NoMethod(*s)
  7045. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7046. }
  7047. // TextFormat: The format of a run of text in a cell.
  7048. // Absent values indicate that the field isn't specified.
  7049. type TextFormat struct {
  7050. // Bold: True if the text is bold.
  7051. Bold bool `json:"bold,omitempty"`
  7052. // FontFamily: The font family.
  7053. FontFamily string `json:"fontFamily,omitempty"`
  7054. // FontSize: The size of the font.
  7055. FontSize int64 `json:"fontSize,omitempty"`
  7056. // ForegroundColor: The foreground color of the text.
  7057. ForegroundColor *Color `json:"foregroundColor,omitempty"`
  7058. // Italic: True if the text is italicized.
  7059. Italic bool `json:"italic,omitempty"`
  7060. // Strikethrough: True if the text has a strikethrough.
  7061. Strikethrough bool `json:"strikethrough,omitempty"`
  7062. // Underline: True if the text is underlined.
  7063. Underline bool `json:"underline,omitempty"`
  7064. // ForceSendFields is a list of field names (e.g. "Bold") to
  7065. // unconditionally include in API requests. By default, fields with
  7066. // empty values are omitted from API requests. However, any non-pointer,
  7067. // non-interface field appearing in ForceSendFields will be sent to the
  7068. // server regardless of whether the field is empty or not. This may be
  7069. // used to include empty fields in Patch requests.
  7070. ForceSendFields []string `json:"-"`
  7071. // NullFields is a list of field names (e.g. "Bold") to include in API
  7072. // requests with the JSON null value. By default, fields with empty
  7073. // values are omitted from API requests. However, any field with an
  7074. // empty value appearing in NullFields will be sent to the server as
  7075. // null. It is an error if a field in this list has a non-empty value.
  7076. // This may be used to include null fields in Patch requests.
  7077. NullFields []string `json:"-"`
  7078. }
  7079. func (s *TextFormat) MarshalJSON() ([]byte, error) {
  7080. type NoMethod TextFormat
  7081. raw := NoMethod(*s)
  7082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7083. }
  7084. // TextFormatRun: A run of a text format. The format of this run
  7085. // continues until the start
  7086. // index of the next run.
  7087. // When updating, all fields must be set.
  7088. type TextFormatRun struct {
  7089. // Format: The format of this run. Absent values inherit the cell's
  7090. // format.
  7091. Format *TextFormat `json:"format,omitempty"`
  7092. // StartIndex: The character index where this run starts.
  7093. StartIndex int64 `json:"startIndex,omitempty"`
  7094. // ForceSendFields is a list of field names (e.g. "Format") to
  7095. // unconditionally include in API requests. By default, fields with
  7096. // empty values are omitted from API requests. However, any non-pointer,
  7097. // non-interface field appearing in ForceSendFields will be sent to the
  7098. // server regardless of whether the field is empty or not. This may be
  7099. // used to include empty fields in Patch requests.
  7100. ForceSendFields []string `json:"-"`
  7101. // NullFields is a list of field names (e.g. "Format") to include in API
  7102. // requests with the JSON null value. By default, fields with empty
  7103. // values are omitted from API requests. However, any field with an
  7104. // empty value appearing in NullFields will be sent to the server as
  7105. // null. It is an error if a field in this list has a non-empty value.
  7106. // This may be used to include null fields in Patch requests.
  7107. NullFields []string `json:"-"`
  7108. }
  7109. func (s *TextFormatRun) MarshalJSON() ([]byte, error) {
  7110. type NoMethod TextFormatRun
  7111. raw := NoMethod(*s)
  7112. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7113. }
  7114. // TextPosition: Position settings for text.
  7115. type TextPosition struct {
  7116. // HorizontalAlignment: Horizontal alignment setting for the piece of
  7117. // text.
  7118. //
  7119. // Possible values:
  7120. // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not
  7121. // specified. Do not use this.
  7122. // "LEFT" - The text is explicitly aligned to the left of the cell.
  7123. // "CENTER" - The text is explicitly aligned to the center of the
  7124. // cell.
  7125. // "RIGHT" - The text is explicitly aligned to the right of the cell.
  7126. HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
  7127. // ForceSendFields is a list of field names (e.g. "HorizontalAlignment")
  7128. // to unconditionally include in API requests. By default, fields with
  7129. // empty values are omitted from API requests. However, any non-pointer,
  7130. // non-interface field appearing in ForceSendFields will be sent to the
  7131. // server regardless of whether the field is empty or not. This may be
  7132. // used to include empty fields in Patch requests.
  7133. ForceSendFields []string `json:"-"`
  7134. // NullFields is a list of field names (e.g. "HorizontalAlignment") to
  7135. // include in API requests with the JSON null value. By default, fields
  7136. // with empty values are omitted from API requests. However, any field
  7137. // with an empty value appearing in NullFields will be sent to the
  7138. // server as null. It is an error if a field in this list has a
  7139. // non-empty value. This may be used to include null fields in Patch
  7140. // requests.
  7141. NullFields []string `json:"-"`
  7142. }
  7143. func (s *TextPosition) MarshalJSON() ([]byte, error) {
  7144. type NoMethod TextPosition
  7145. raw := NoMethod(*s)
  7146. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7147. }
  7148. // TextRotation: The rotation applied to text in a cell.
  7149. type TextRotation struct {
  7150. // Angle: The angle between the standard orientation and the desired
  7151. // orientation.
  7152. // Measured in degrees. Valid values are between -90 and 90.
  7153. // Positive
  7154. // angles are angled upwards, negative are angled downwards.
  7155. //
  7156. // Note: For LTR text direction positive angles are in
  7157. // the
  7158. // counterclockwise direction, whereas for RTL they are in the
  7159. // clockwise
  7160. // direction
  7161. Angle int64 `json:"angle,omitempty"`
  7162. // Vertical: If true, text reads top to bottom, but the orientation of
  7163. // individual
  7164. // characters is unchanged.
  7165. // For example:
  7166. //
  7167. // | V |
  7168. // | e |
  7169. // | r |
  7170. // | t |
  7171. // | i |
  7172. // | c |
  7173. // | a |
  7174. // | l |
  7175. Vertical bool `json:"vertical,omitempty"`
  7176. // ForceSendFields is a list of field names (e.g. "Angle") to
  7177. // unconditionally include in API requests. By default, fields with
  7178. // empty values are omitted from API requests. However, any non-pointer,
  7179. // non-interface field appearing in ForceSendFields will be sent to the
  7180. // server regardless of whether the field is empty or not. This may be
  7181. // used to include empty fields in Patch requests.
  7182. ForceSendFields []string `json:"-"`
  7183. // NullFields is a list of field names (e.g. "Angle") to include in API
  7184. // requests with the JSON null value. By default, fields with empty
  7185. // values are omitted from API requests. However, any field with an
  7186. // empty value appearing in NullFields will be sent to the server as
  7187. // null. It is an error if a field in this list has a non-empty value.
  7188. // This may be used to include null fields in Patch requests.
  7189. NullFields []string `json:"-"`
  7190. }
  7191. func (s *TextRotation) MarshalJSON() ([]byte, error) {
  7192. type NoMethod TextRotation
  7193. raw := NoMethod(*s)
  7194. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7195. }
  7196. // TextToColumnsRequest: Splits a column of text into multiple
  7197. // columns,
  7198. // based on a delimiter in each cell.
  7199. type TextToColumnsRequest struct {
  7200. // Delimiter: The delimiter to use. Used only if delimiterType
  7201. // is
  7202. // CUSTOM.
  7203. Delimiter string `json:"delimiter,omitempty"`
  7204. // DelimiterType: The delimiter type to use.
  7205. //
  7206. // Possible values:
  7207. // "DELIMITER_TYPE_UNSPECIFIED" - Default value. This value must not
  7208. // be used.
  7209. // "COMMA" - ","
  7210. // "SEMICOLON" - ";"
  7211. // "PERIOD" - "."
  7212. // "SPACE" - " "
  7213. // "CUSTOM" - A custom value as defined in delimiter.
  7214. // "AUTODETECT" - Automatically detect columns.
  7215. DelimiterType string `json:"delimiterType,omitempty"`
  7216. // Source: The source data range. This must span exactly one column.
  7217. Source *GridRange `json:"source,omitempty"`
  7218. // ForceSendFields is a list of field names (e.g. "Delimiter") to
  7219. // unconditionally include in API requests. By default, fields with
  7220. // empty values are omitted from API requests. However, any non-pointer,
  7221. // non-interface field appearing in ForceSendFields will be sent to the
  7222. // server regardless of whether the field is empty or not. This may be
  7223. // used to include empty fields in Patch requests.
  7224. ForceSendFields []string `json:"-"`
  7225. // NullFields is a list of field names (e.g. "Delimiter") to include in
  7226. // API requests with the JSON null value. By default, fields with empty
  7227. // values are omitted from API requests. However, any field with an
  7228. // empty value appearing in NullFields will be sent to the server as
  7229. // null. It is an error if a field in this list has a non-empty value.
  7230. // This may be used to include null fields in Patch requests.
  7231. NullFields []string `json:"-"`
  7232. }
  7233. func (s *TextToColumnsRequest) MarshalJSON() ([]byte, error) {
  7234. type NoMethod TextToColumnsRequest
  7235. raw := NoMethod(*s)
  7236. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7237. }
  7238. // TreemapChartColorScale: A color scale for a treemap chart.
  7239. type TreemapChartColorScale struct {
  7240. // MaxValueColor: The background color for cells with a color value
  7241. // greater than or equal
  7242. // to maxValue. Defaults to #109618 if not
  7243. // specified.
  7244. MaxValueColor *Color `json:"maxValueColor,omitempty"`
  7245. // MidValueColor: The background color for cells with a color value at
  7246. // the midpoint between
  7247. // minValue and
  7248. // maxValue. Defaults to #efe6dc if not
  7249. // specified.
  7250. MidValueColor *Color `json:"midValueColor,omitempty"`
  7251. // MinValueColor: The background color for cells with a color value less
  7252. // than or equal to
  7253. // minValue. Defaults to #dc3912 if not
  7254. // specified.
  7255. MinValueColor *Color `json:"minValueColor,omitempty"`
  7256. // NoDataColor: The background color for cells that have no color data
  7257. // associated with
  7258. // them. Defaults to #000000 if not specified.
  7259. NoDataColor *Color `json:"noDataColor,omitempty"`
  7260. // ForceSendFields is a list of field names (e.g. "MaxValueColor") to
  7261. // unconditionally include in API requests. By default, fields with
  7262. // empty values are omitted from API requests. However, any non-pointer,
  7263. // non-interface field appearing in ForceSendFields will be sent to the
  7264. // server regardless of whether the field is empty or not. This may be
  7265. // used to include empty fields in Patch requests.
  7266. ForceSendFields []string `json:"-"`
  7267. // NullFields is a list of field names (e.g. "MaxValueColor") to include
  7268. // in API requests with the JSON null value. By default, fields with
  7269. // empty values are omitted from API requests. However, any field with
  7270. // an empty value appearing in NullFields will be sent to the server as
  7271. // null. It is an error if a field in this list has a non-empty value.
  7272. // This may be used to include null fields in Patch requests.
  7273. NullFields []string `json:"-"`
  7274. }
  7275. func (s *TreemapChartColorScale) MarshalJSON() ([]byte, error) {
  7276. type NoMethod TreemapChartColorScale
  7277. raw := NoMethod(*s)
  7278. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7279. }
  7280. // TreemapChartSpec: A <a
  7281. // href="/chart/interactive/docs/gallery/treemap">Treemap chart</a>.
  7282. type TreemapChartSpec struct {
  7283. // ColorData: The data that determines the background color of each
  7284. // treemap data cell.
  7285. // This field is optional. If not specified, size_data is used
  7286. // to
  7287. // determine background colors. If specified, the data is expected to
  7288. // be
  7289. // numeric. color_scale will determine how the values in this data map
  7290. // to
  7291. // data cell background colors.
  7292. ColorData *ChartData `json:"colorData,omitempty"`
  7293. // ColorScale: The color scale for data cells in the treemap chart. Data
  7294. // cells are
  7295. // assigned colors based on their color values. These color values come
  7296. // from
  7297. // color_data, or from size_data if color_data is not specified.
  7298. // Cells with color values less than or equal to min_value will
  7299. // have minValueColor as their
  7300. // background color. Cells with color values greater than or equal
  7301. // to
  7302. // max_value will have
  7303. // maxValueColor as their background
  7304. // color. Cells with color values between min_value and max_value
  7305. // will
  7306. // have background colors on a gradient between
  7307. // minValueColor and
  7308. // maxValueColor, the midpoint of
  7309. // the gradient being midValueColor.
  7310. // Cells with missing or non-numeric color values will have
  7311. // noDataColor as their background
  7312. // color.
  7313. ColorScale *TreemapChartColorScale `json:"colorScale,omitempty"`
  7314. // HeaderColor: The background color for header cells.
  7315. HeaderColor *Color `json:"headerColor,omitempty"`
  7316. // HideTooltips: True to hide tooltips.
  7317. HideTooltips bool `json:"hideTooltips,omitempty"`
  7318. // HintedLevels: The number of additional data levels beyond the labeled
  7319. // levels to be shown
  7320. // on the treemap chart. These levels are not interactive and are
  7321. // shown
  7322. // without their labels. Defaults to 0 if not specified.
  7323. HintedLevels int64 `json:"hintedLevels,omitempty"`
  7324. // Labels: The data that contains the treemap cell labels.
  7325. Labels *ChartData `json:"labels,omitempty"`
  7326. // Levels: The number of data levels to show on the treemap chart. These
  7327. // levels are
  7328. // interactive and are shown with their labels. Defaults to 2 if
  7329. // not
  7330. // specified.
  7331. Levels int64 `json:"levels,omitempty"`
  7332. // MaxValue: The maximum possible data value. Cells with values greater
  7333. // than this will
  7334. // have the same color as cells with this value. If not specified,
  7335. // defaults
  7336. // to the actual maximum value from color_data, or the maximum value
  7337. // from
  7338. // size_data if color_data is not specified.
  7339. MaxValue float64 `json:"maxValue,omitempty"`
  7340. // MinValue: The minimum possible data value. Cells with values less
  7341. // than this will
  7342. // have the same color as cells with this value. If not specified,
  7343. // defaults
  7344. // to the actual minimum value from color_data, or the minimum value
  7345. // from
  7346. // size_data if color_data is not specified.
  7347. MinValue float64 `json:"minValue,omitempty"`
  7348. // ParentLabels: The data the contains the treemap cells' parent labels.
  7349. ParentLabels *ChartData `json:"parentLabels,omitempty"`
  7350. // SizeData: The data that determines the size of each treemap data
  7351. // cell. This data is
  7352. // expected to be numeric. The cells corresponding to non-numeric or
  7353. // missing
  7354. // data will not be rendered. If color_data is not specified, this
  7355. // data
  7356. // is used to determine data cell background colors as well.
  7357. SizeData *ChartData `json:"sizeData,omitempty"`
  7358. // TextFormat: The text format for all labels on the chart.
  7359. TextFormat *TextFormat `json:"textFormat,omitempty"`
  7360. // ForceSendFields is a list of field names (e.g. "ColorData") to
  7361. // unconditionally include in API requests. By default, fields with
  7362. // empty values are omitted from API requests. However, any non-pointer,
  7363. // non-interface field appearing in ForceSendFields will be sent to the
  7364. // server regardless of whether the field is empty or not. This may be
  7365. // used to include empty fields in Patch requests.
  7366. ForceSendFields []string `json:"-"`
  7367. // NullFields is a list of field names (e.g. "ColorData") to include in
  7368. // API requests with the JSON null value. By default, fields with empty
  7369. // values are omitted from API requests. However, any field with an
  7370. // empty value appearing in NullFields will be sent to the server as
  7371. // null. It is an error if a field in this list has a non-empty value.
  7372. // This may be used to include null fields in Patch requests.
  7373. NullFields []string `json:"-"`
  7374. }
  7375. func (s *TreemapChartSpec) MarshalJSON() ([]byte, error) {
  7376. type NoMethod TreemapChartSpec
  7377. raw := NoMethod(*s)
  7378. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7379. }
  7380. func (s *TreemapChartSpec) UnmarshalJSON(data []byte) error {
  7381. type NoMethod TreemapChartSpec
  7382. var s1 struct {
  7383. MaxValue gensupport.JSONFloat64 `json:"maxValue"`
  7384. MinValue gensupport.JSONFloat64 `json:"minValue"`
  7385. *NoMethod
  7386. }
  7387. s1.NoMethod = (*NoMethod)(s)
  7388. if err := json.Unmarshal(data, &s1); err != nil {
  7389. return err
  7390. }
  7391. s.MaxValue = float64(s1.MaxValue)
  7392. s.MinValue = float64(s1.MinValue)
  7393. return nil
  7394. }
  7395. // UnmergeCellsRequest: Unmerges cells in the given range.
  7396. type UnmergeCellsRequest struct {
  7397. // Range: The range within which all cells should be unmerged.
  7398. // If the range spans multiple merges, all will be unmerged.
  7399. // The range must not partially span any merge.
  7400. Range *GridRange `json:"range,omitempty"`
  7401. // ForceSendFields is a list of field names (e.g. "Range") to
  7402. // unconditionally include in API requests. By default, fields with
  7403. // empty values are omitted from API requests. However, any non-pointer,
  7404. // non-interface field appearing in ForceSendFields will be sent to the
  7405. // server regardless of whether the field is empty or not. This may be
  7406. // used to include empty fields in Patch requests.
  7407. ForceSendFields []string `json:"-"`
  7408. // NullFields is a list of field names (e.g. "Range") to include in API
  7409. // requests with the JSON null value. By default, fields with empty
  7410. // values are omitted from API requests. However, any field with an
  7411. // empty value appearing in NullFields will be sent to the server as
  7412. // null. It is an error if a field in this list has a non-empty value.
  7413. // This may be used to include null fields in Patch requests.
  7414. NullFields []string `json:"-"`
  7415. }
  7416. func (s *UnmergeCellsRequest) MarshalJSON() ([]byte, error) {
  7417. type NoMethod UnmergeCellsRequest
  7418. raw := NoMethod(*s)
  7419. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7420. }
  7421. // UpdateBandingRequest: Updates properties of the supplied banded
  7422. // range.
  7423. type UpdateBandingRequest struct {
  7424. // BandedRange: The banded range to update with the new properties.
  7425. BandedRange *BandedRange `json:"bandedRange,omitempty"`
  7426. // Fields: The fields that should be updated. At least one field must
  7427. // be specified.
  7428. // The root `bandedRange` is implied and should not be specified.
  7429. // A single "*" can be used as short-hand for listing every field.
  7430. Fields string `json:"fields,omitempty"`
  7431. // ForceSendFields is a list of field names (e.g. "BandedRange") to
  7432. // unconditionally include in API requests. By default, fields with
  7433. // empty values are omitted from API requests. However, any non-pointer,
  7434. // non-interface field appearing in ForceSendFields will be sent to the
  7435. // server regardless of whether the field is empty or not. This may be
  7436. // used to include empty fields in Patch requests.
  7437. ForceSendFields []string `json:"-"`
  7438. // NullFields is a list of field names (e.g. "BandedRange") to include
  7439. // in API requests with the JSON null value. By default, fields with
  7440. // empty values are omitted from API requests. However, any field with
  7441. // an empty value appearing in NullFields will be sent to the server as
  7442. // null. It is an error if a field in this list has a non-empty value.
  7443. // This may be used to include null fields in Patch requests.
  7444. NullFields []string `json:"-"`
  7445. }
  7446. func (s *UpdateBandingRequest) MarshalJSON() ([]byte, error) {
  7447. type NoMethod UpdateBandingRequest
  7448. raw := NoMethod(*s)
  7449. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7450. }
  7451. // UpdateBordersRequest: Updates the borders of a range.
  7452. // If a field is not set in the request, that means the border remains
  7453. // as-is.
  7454. // For example, with two subsequent UpdateBordersRequest:
  7455. //
  7456. // 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
  7457. // 2. range: A1:A5 `{ left: BLUE }`
  7458. //
  7459. // That would result in A1:A5 having a borders of
  7460. // `{ top: RED, bottom: WHITE, left: BLUE }`.
  7461. // If you want to clear a border, explicitly set the style to
  7462. // NONE.
  7463. type UpdateBordersRequest struct {
  7464. // Bottom: The border to put at the bottom of the range.
  7465. Bottom *Border `json:"bottom,omitempty"`
  7466. // InnerHorizontal: The horizontal border to put within the range.
  7467. InnerHorizontal *Border `json:"innerHorizontal,omitempty"`
  7468. // InnerVertical: The vertical border to put within the range.
  7469. InnerVertical *Border `json:"innerVertical,omitempty"`
  7470. // Left: The border to put at the left of the range.
  7471. Left *Border `json:"left,omitempty"`
  7472. // Range: The range whose borders should be updated.
  7473. Range *GridRange `json:"range,omitempty"`
  7474. // Right: The border to put at the right of the range.
  7475. Right *Border `json:"right,omitempty"`
  7476. // Top: The border to put at the top of the range.
  7477. Top *Border `json:"top,omitempty"`
  7478. // ForceSendFields is a list of field names (e.g. "Bottom") to
  7479. // unconditionally include in API requests. By default, fields with
  7480. // empty values are omitted from API requests. However, any non-pointer,
  7481. // non-interface field appearing in ForceSendFields will be sent to the
  7482. // server regardless of whether the field is empty or not. This may be
  7483. // used to include empty fields in Patch requests.
  7484. ForceSendFields []string `json:"-"`
  7485. // NullFields is a list of field names (e.g. "Bottom") to include in API
  7486. // requests with the JSON null value. By default, fields with empty
  7487. // values are omitted from API requests. However, any field with an
  7488. // empty value appearing in NullFields will be sent to the server as
  7489. // null. It is an error if a field in this list has a non-empty value.
  7490. // This may be used to include null fields in Patch requests.
  7491. NullFields []string `json:"-"`
  7492. }
  7493. func (s *UpdateBordersRequest) MarshalJSON() ([]byte, error) {
  7494. type NoMethod UpdateBordersRequest
  7495. raw := NoMethod(*s)
  7496. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7497. }
  7498. // UpdateCellsRequest: Updates all cells in a range with new data.
  7499. type UpdateCellsRequest struct {
  7500. // Fields: The fields of CellData that should be updated.
  7501. // At least one field must be specified.
  7502. // The root is the CellData; 'row.values.' should not be specified.
  7503. // A single "*" can be used as short-hand for listing every field.
  7504. Fields string `json:"fields,omitempty"`
  7505. // Range: The range to write data to.
  7506. //
  7507. // If the data in rows does not cover the entire requested range,
  7508. // the fields matching those set in fields will be cleared.
  7509. Range *GridRange `json:"range,omitempty"`
  7510. // Rows: The data to write.
  7511. Rows []*RowData `json:"rows,omitempty"`
  7512. // Start: The coordinate to start writing data at.
  7513. // Any number of rows and columns (including a different number
  7514. // of
  7515. // columns per row) may be written.
  7516. Start *GridCoordinate `json:"start,omitempty"`
  7517. // ForceSendFields is a list of field names (e.g. "Fields") to
  7518. // unconditionally include in API requests. By default, fields with
  7519. // empty values are omitted from API requests. However, any non-pointer,
  7520. // non-interface field appearing in ForceSendFields will be sent to the
  7521. // server regardless of whether the field is empty or not. This may be
  7522. // used to include empty fields in Patch requests.
  7523. ForceSendFields []string `json:"-"`
  7524. // NullFields is a list of field names (e.g. "Fields") to include in API
  7525. // requests with the JSON null value. By default, fields with empty
  7526. // values are omitted from API requests. However, any field with an
  7527. // empty value appearing in NullFields will be sent to the server as
  7528. // null. It is an error if a field in this list has a non-empty value.
  7529. // This may be used to include null fields in Patch requests.
  7530. NullFields []string `json:"-"`
  7531. }
  7532. func (s *UpdateCellsRequest) MarshalJSON() ([]byte, error) {
  7533. type NoMethod UpdateCellsRequest
  7534. raw := NoMethod(*s)
  7535. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7536. }
  7537. // UpdateChartSpecRequest: Updates a chart's specifications.
  7538. // (This does not move or resize a chart. To move or resize a chart,
  7539. // use
  7540. // UpdateEmbeddedObjectPositionRequest.)
  7541. type UpdateChartSpecRequest struct {
  7542. // ChartId: The ID of the chart to update.
  7543. ChartId int64 `json:"chartId,omitempty"`
  7544. // Spec: The specification to apply to the chart.
  7545. Spec *ChartSpec `json:"spec,omitempty"`
  7546. // ForceSendFields is a list of field names (e.g. "ChartId") to
  7547. // unconditionally include in API requests. By default, fields with
  7548. // empty values are omitted from API requests. However, any non-pointer,
  7549. // non-interface field appearing in ForceSendFields will be sent to the
  7550. // server regardless of whether the field is empty or not. This may be
  7551. // used to include empty fields in Patch requests.
  7552. ForceSendFields []string `json:"-"`
  7553. // NullFields is a list of field names (e.g. "ChartId") to include in
  7554. // API requests with the JSON null value. By default, fields with empty
  7555. // values are omitted from API requests. However, any field with an
  7556. // empty value appearing in NullFields will be sent to the server as
  7557. // null. It is an error if a field in this list has a non-empty value.
  7558. // This may be used to include null fields in Patch requests.
  7559. NullFields []string `json:"-"`
  7560. }
  7561. func (s *UpdateChartSpecRequest) MarshalJSON() ([]byte, error) {
  7562. type NoMethod UpdateChartSpecRequest
  7563. raw := NoMethod(*s)
  7564. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7565. }
  7566. // UpdateConditionalFormatRuleRequest: Updates a conditional format rule
  7567. // at the given index,
  7568. // or moves a conditional format rule to another index.
  7569. type UpdateConditionalFormatRuleRequest struct {
  7570. // Index: The zero-based index of the rule that should be replaced or
  7571. // moved.
  7572. Index int64 `json:"index,omitempty"`
  7573. // NewIndex: The zero-based new index the rule should end up at.
  7574. NewIndex int64 `json:"newIndex,omitempty"`
  7575. // Rule: The rule that should replace the rule at the given index.
  7576. Rule *ConditionalFormatRule `json:"rule,omitempty"`
  7577. // SheetId: The sheet of the rule to move. Required if new_index is
  7578. // set,
  7579. // unused otherwise.
  7580. SheetId int64 `json:"sheetId,omitempty"`
  7581. // ForceSendFields is a list of field names (e.g. "Index") to
  7582. // unconditionally include in API requests. By default, fields with
  7583. // empty values are omitted from API requests. However, any non-pointer,
  7584. // non-interface field appearing in ForceSendFields will be sent to the
  7585. // server regardless of whether the field is empty or not. This may be
  7586. // used to include empty fields in Patch requests.
  7587. ForceSendFields []string `json:"-"`
  7588. // NullFields is a list of field names (e.g. "Index") to include in API
  7589. // requests with the JSON null value. By default, fields with empty
  7590. // values are omitted from API requests. However, any field with an
  7591. // empty value appearing in NullFields will be sent to the server as
  7592. // null. It is an error if a field in this list has a non-empty value.
  7593. // This may be used to include null fields in Patch requests.
  7594. NullFields []string `json:"-"`
  7595. }
  7596. func (s *UpdateConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
  7597. type NoMethod UpdateConditionalFormatRuleRequest
  7598. raw := NoMethod(*s)
  7599. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7600. }
  7601. // UpdateConditionalFormatRuleResponse: The result of updating a
  7602. // conditional format rule.
  7603. type UpdateConditionalFormatRuleResponse struct {
  7604. // NewIndex: The index of the new rule.
  7605. NewIndex int64 `json:"newIndex,omitempty"`
  7606. // NewRule: The new rule that replaced the old rule (if replacing),
  7607. // or the rule that was moved (if moved)
  7608. NewRule *ConditionalFormatRule `json:"newRule,omitempty"`
  7609. // OldIndex: The old index of the rule. Not set if a rule was
  7610. // replaced
  7611. // (because it is the same as new_index).
  7612. OldIndex int64 `json:"oldIndex,omitempty"`
  7613. // OldRule: The old (deleted) rule. Not set if a rule was moved
  7614. // (because it is the same as new_rule).
  7615. OldRule *ConditionalFormatRule `json:"oldRule,omitempty"`
  7616. // ForceSendFields is a list of field names (e.g. "NewIndex") to
  7617. // unconditionally include in API requests. By default, fields with
  7618. // empty values are omitted from API requests. However, any non-pointer,
  7619. // non-interface field appearing in ForceSendFields will be sent to the
  7620. // server regardless of whether the field is empty or not. This may be
  7621. // used to include empty fields in Patch requests.
  7622. ForceSendFields []string `json:"-"`
  7623. // NullFields is a list of field names (e.g. "NewIndex") to include in
  7624. // API requests with the JSON null value. By default, fields with empty
  7625. // values are omitted from API requests. However, any field with an
  7626. // empty value appearing in NullFields will be sent to the server as
  7627. // null. It is an error if a field in this list has a non-empty value.
  7628. // This may be used to include null fields in Patch requests.
  7629. NullFields []string `json:"-"`
  7630. }
  7631. func (s *UpdateConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) {
  7632. type NoMethod UpdateConditionalFormatRuleResponse
  7633. raw := NoMethod(*s)
  7634. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7635. }
  7636. // UpdateDeveloperMetadataRequest: A request to update properties of
  7637. // developer metadata.
  7638. // Updates the properties of the developer metadata selected by the
  7639. // filters to
  7640. // the values provided in the DeveloperMetadata resource. Callers
  7641. // must
  7642. // specify the properties they wish to update in the fields parameter,
  7643. // as well
  7644. // as specify at least one DataFilter matching the metadata they wish
  7645. // to
  7646. // update.
  7647. type UpdateDeveloperMetadataRequest struct {
  7648. // DataFilters: The filters matching the developer metadata entries to
  7649. // update.
  7650. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  7651. // DeveloperMetadata: The value that all metadata matched by the data
  7652. // filters will be updated to.
  7653. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  7654. // Fields: The fields that should be updated. At least one field must
  7655. // be specified.
  7656. // The root `developerMetadata` is implied and should not be
  7657. // specified.
  7658. // A single "*" can be used as short-hand for listing every field.
  7659. Fields string `json:"fields,omitempty"`
  7660. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  7661. // unconditionally include in API requests. By default, fields with
  7662. // empty values are omitted from API requests. However, any non-pointer,
  7663. // non-interface field appearing in ForceSendFields will be sent to the
  7664. // server regardless of whether the field is empty or not. This may be
  7665. // used to include empty fields in Patch requests.
  7666. ForceSendFields []string `json:"-"`
  7667. // NullFields is a list of field names (e.g. "DataFilters") to include
  7668. // in API requests with the JSON null value. By default, fields with
  7669. // empty values are omitted from API requests. However, any field with
  7670. // an empty value appearing in NullFields will be sent to the server as
  7671. // null. It is an error if a field in this list has a non-empty value.
  7672. // This may be used to include null fields in Patch requests.
  7673. NullFields []string `json:"-"`
  7674. }
  7675. func (s *UpdateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  7676. type NoMethod UpdateDeveloperMetadataRequest
  7677. raw := NoMethod(*s)
  7678. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7679. }
  7680. // UpdateDeveloperMetadataResponse: The response from updating developer
  7681. // metadata.
  7682. type UpdateDeveloperMetadataResponse struct {
  7683. // DeveloperMetadata: The updated developer metadata.
  7684. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  7685. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  7686. // to unconditionally include in API requests. By default, fields with
  7687. // empty values are omitted from API requests. However, any non-pointer,
  7688. // non-interface field appearing in ForceSendFields will be sent to the
  7689. // server regardless of whether the field is empty or not. This may be
  7690. // used to include empty fields in Patch requests.
  7691. ForceSendFields []string `json:"-"`
  7692. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  7693. // include in API requests with the JSON null value. By default, fields
  7694. // with empty values are omitted from API requests. However, any field
  7695. // with an empty value appearing in NullFields will be sent to the
  7696. // server as null. It is an error if a field in this list has a
  7697. // non-empty value. This may be used to include null fields in Patch
  7698. // requests.
  7699. NullFields []string `json:"-"`
  7700. }
  7701. func (s *UpdateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  7702. type NoMethod UpdateDeveloperMetadataResponse
  7703. raw := NoMethod(*s)
  7704. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7705. }
  7706. // UpdateDimensionGroupRequest: Updates the state of the specified
  7707. // group.
  7708. type UpdateDimensionGroupRequest struct {
  7709. // DimensionGroup: The group whose state should be updated. The range
  7710. // and depth of the group
  7711. // should specify a valid group on the sheet, and all other fields
  7712. // updated.
  7713. DimensionGroup *DimensionGroup `json:"dimensionGroup,omitempty"`
  7714. // Fields: The fields that should be updated. At least one field must
  7715. // be specified.
  7716. // The root `dimensionGroup` is implied and should not be specified.
  7717. // A single "*" can be used as short-hand for listing every field.
  7718. Fields string `json:"fields,omitempty"`
  7719. // ForceSendFields is a list of field names (e.g. "DimensionGroup") to
  7720. // unconditionally include in API requests. By default, fields with
  7721. // empty values are omitted from API requests. However, any non-pointer,
  7722. // non-interface field appearing in ForceSendFields will be sent to the
  7723. // server regardless of whether the field is empty or not. This may be
  7724. // used to include empty fields in Patch requests.
  7725. ForceSendFields []string `json:"-"`
  7726. // NullFields is a list of field names (e.g. "DimensionGroup") to
  7727. // include in API requests with the JSON null value. By default, fields
  7728. // with empty values are omitted from API requests. However, any field
  7729. // with an empty value appearing in NullFields will be sent to the
  7730. // server as null. It is an error if a field in this list has a
  7731. // non-empty value. This may be used to include null fields in Patch
  7732. // requests.
  7733. NullFields []string `json:"-"`
  7734. }
  7735. func (s *UpdateDimensionGroupRequest) MarshalJSON() ([]byte, error) {
  7736. type NoMethod UpdateDimensionGroupRequest
  7737. raw := NoMethod(*s)
  7738. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7739. }
  7740. // UpdateDimensionPropertiesRequest: Updates properties of dimensions
  7741. // within the specified range.
  7742. type UpdateDimensionPropertiesRequest struct {
  7743. // Fields: The fields that should be updated. At least one field must
  7744. // be specified.
  7745. // The root `properties` is implied and should not be specified.
  7746. // A single "*" can be used as short-hand for listing every field.
  7747. Fields string `json:"fields,omitempty"`
  7748. // Properties: Properties to update.
  7749. Properties *DimensionProperties `json:"properties,omitempty"`
  7750. // Range: The rows or columns to update.
  7751. Range *DimensionRange `json:"range,omitempty"`
  7752. // ForceSendFields is a list of field names (e.g. "Fields") to
  7753. // unconditionally include in API requests. By default, fields with
  7754. // empty values are omitted from API requests. However, any non-pointer,
  7755. // non-interface field appearing in ForceSendFields will be sent to the
  7756. // server regardless of whether the field is empty or not. This may be
  7757. // used to include empty fields in Patch requests.
  7758. ForceSendFields []string `json:"-"`
  7759. // NullFields is a list of field names (e.g. "Fields") to include in API
  7760. // requests with the JSON null value. By default, fields with empty
  7761. // values are omitted from API requests. However, any field with an
  7762. // empty value appearing in NullFields will be sent to the server as
  7763. // null. It is an error if a field in this list has a non-empty value.
  7764. // This may be used to include null fields in Patch requests.
  7765. NullFields []string `json:"-"`
  7766. }
  7767. func (s *UpdateDimensionPropertiesRequest) MarshalJSON() ([]byte, error) {
  7768. type NoMethod UpdateDimensionPropertiesRequest
  7769. raw := NoMethod(*s)
  7770. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7771. }
  7772. // UpdateEmbeddedObjectPositionRequest: Update an embedded object's
  7773. // position (such as a moving or resizing a
  7774. // chart or image).
  7775. type UpdateEmbeddedObjectPositionRequest struct {
  7776. // Fields: The fields of OverlayPosition
  7777. // that should be updated when setting a new position. Used only
  7778. // if
  7779. // newPosition.overlayPosition
  7780. // is set, in which case at least one field must
  7781. // be specified. The root `newPosition.overlayPosition` is implied
  7782. // and
  7783. // should not be specified.
  7784. // A single "*" can be used as short-hand for listing every field.
  7785. Fields string `json:"fields,omitempty"`
  7786. // NewPosition: An explicit position to move the embedded object to.
  7787. // If newPosition.sheetId is set,
  7788. // a new sheet with that ID will be created.
  7789. // If newPosition.newSheet is set to true,
  7790. // a new sheet will be created with an ID that will be chosen for you.
  7791. NewPosition *EmbeddedObjectPosition `json:"newPosition,omitempty"`
  7792. // ObjectId: The ID of the object to moved.
  7793. ObjectId int64 `json:"objectId,omitempty"`
  7794. // ForceSendFields is a list of field names (e.g. "Fields") to
  7795. // unconditionally include in API requests. By default, fields with
  7796. // empty values are omitted from API requests. However, any non-pointer,
  7797. // non-interface field appearing in ForceSendFields will be sent to the
  7798. // server regardless of whether the field is empty or not. This may be
  7799. // used to include empty fields in Patch requests.
  7800. ForceSendFields []string `json:"-"`
  7801. // NullFields is a list of field names (e.g. "Fields") to include in API
  7802. // requests with the JSON null value. By default, fields with empty
  7803. // values are omitted from API requests. However, any field with an
  7804. // empty value appearing in NullFields will be sent to the server as
  7805. // null. It is an error if a field in this list has a non-empty value.
  7806. // This may be used to include null fields in Patch requests.
  7807. NullFields []string `json:"-"`
  7808. }
  7809. func (s *UpdateEmbeddedObjectPositionRequest) MarshalJSON() ([]byte, error) {
  7810. type NoMethod UpdateEmbeddedObjectPositionRequest
  7811. raw := NoMethod(*s)
  7812. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7813. }
  7814. // UpdateEmbeddedObjectPositionResponse: The result of updating an
  7815. // embedded object's position.
  7816. type UpdateEmbeddedObjectPositionResponse struct {
  7817. // Position: The new position of the embedded object.
  7818. Position *EmbeddedObjectPosition `json:"position,omitempty"`
  7819. // ForceSendFields is a list of field names (e.g. "Position") to
  7820. // unconditionally include in API requests. By default, fields with
  7821. // empty values are omitted from API requests. However, any non-pointer,
  7822. // non-interface field appearing in ForceSendFields will be sent to the
  7823. // server regardless of whether the field is empty or not. This may be
  7824. // used to include empty fields in Patch requests.
  7825. ForceSendFields []string `json:"-"`
  7826. // NullFields is a list of field names (e.g. "Position") to include in
  7827. // API requests with the JSON null value. By default, fields with empty
  7828. // values are omitted from API requests. However, any field with an
  7829. // empty value appearing in NullFields will be sent to the server as
  7830. // null. It is an error if a field in this list has a non-empty value.
  7831. // This may be used to include null fields in Patch requests.
  7832. NullFields []string `json:"-"`
  7833. }
  7834. func (s *UpdateEmbeddedObjectPositionResponse) MarshalJSON() ([]byte, error) {
  7835. type NoMethod UpdateEmbeddedObjectPositionResponse
  7836. raw := NoMethod(*s)
  7837. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7838. }
  7839. // UpdateFilterViewRequest: Updates properties of the filter view.
  7840. type UpdateFilterViewRequest struct {
  7841. // Fields: The fields that should be updated. At least one field must
  7842. // be specified.
  7843. // The root `filter` is implied and should not be specified.
  7844. // A single "*" can be used as short-hand for listing every field.
  7845. Fields string `json:"fields,omitempty"`
  7846. // Filter: The new properties of the filter view.
  7847. Filter *FilterView `json:"filter,omitempty"`
  7848. // ForceSendFields is a list of field names (e.g. "Fields") to
  7849. // unconditionally include in API requests. By default, fields with
  7850. // empty values are omitted from API requests. However, any non-pointer,
  7851. // non-interface field appearing in ForceSendFields will be sent to the
  7852. // server regardless of whether the field is empty or not. This may be
  7853. // used to include empty fields in Patch requests.
  7854. ForceSendFields []string `json:"-"`
  7855. // NullFields is a list of field names (e.g. "Fields") to include in API
  7856. // requests with the JSON null value. By default, fields with empty
  7857. // values are omitted from API requests. However, any field with an
  7858. // empty value appearing in NullFields will be sent to the server as
  7859. // null. It is an error if a field in this list has a non-empty value.
  7860. // This may be used to include null fields in Patch requests.
  7861. NullFields []string `json:"-"`
  7862. }
  7863. func (s *UpdateFilterViewRequest) MarshalJSON() ([]byte, error) {
  7864. type NoMethod UpdateFilterViewRequest
  7865. raw := NoMethod(*s)
  7866. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7867. }
  7868. // UpdateNamedRangeRequest: Updates properties of the named range with
  7869. // the specified
  7870. // namedRangeId.
  7871. type UpdateNamedRangeRequest struct {
  7872. // Fields: The fields that should be updated. At least one field must
  7873. // be specified.
  7874. // The root `namedRange` is implied and should not be specified.
  7875. // A single "*" can be used as short-hand for listing every field.
  7876. Fields string `json:"fields,omitempty"`
  7877. // NamedRange: The named range to update with the new properties.
  7878. NamedRange *NamedRange `json:"namedRange,omitempty"`
  7879. // ForceSendFields is a list of field names (e.g. "Fields") to
  7880. // unconditionally include in API requests. By default, fields with
  7881. // empty values are omitted from API requests. However, any non-pointer,
  7882. // non-interface field appearing in ForceSendFields will be sent to the
  7883. // server regardless of whether the field is empty or not. This may be
  7884. // used to include empty fields in Patch requests.
  7885. ForceSendFields []string `json:"-"`
  7886. // NullFields is a list of field names (e.g. "Fields") to include in API
  7887. // requests with the JSON null value. By default, fields with empty
  7888. // values are omitted from API requests. However, any field with an
  7889. // empty value appearing in NullFields will be sent to the server as
  7890. // null. It is an error if a field in this list has a non-empty value.
  7891. // This may be used to include null fields in Patch requests.
  7892. NullFields []string `json:"-"`
  7893. }
  7894. func (s *UpdateNamedRangeRequest) MarshalJSON() ([]byte, error) {
  7895. type NoMethod UpdateNamedRangeRequest
  7896. raw := NoMethod(*s)
  7897. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7898. }
  7899. // UpdateProtectedRangeRequest: Updates an existing protected range with
  7900. // the specified
  7901. // protectedRangeId.
  7902. type UpdateProtectedRangeRequest struct {
  7903. // Fields: The fields that should be updated. At least one field must
  7904. // be specified.
  7905. // The root `protectedRange` is implied and should not be specified.
  7906. // A single "*" can be used as short-hand for listing every field.
  7907. Fields string `json:"fields,omitempty"`
  7908. // ProtectedRange: The protected range to update with the new
  7909. // properties.
  7910. ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
  7911. // ForceSendFields is a list of field names (e.g. "Fields") to
  7912. // unconditionally include in API requests. By default, fields with
  7913. // empty values are omitted from API requests. However, any non-pointer,
  7914. // non-interface field appearing in ForceSendFields will be sent to the
  7915. // server regardless of whether the field is empty or not. This may be
  7916. // used to include empty fields in Patch requests.
  7917. ForceSendFields []string `json:"-"`
  7918. // NullFields is a list of field names (e.g. "Fields") to include in API
  7919. // requests with the JSON null value. By default, fields with empty
  7920. // values are omitted from API requests. However, any field with an
  7921. // empty value appearing in NullFields will be sent to the server as
  7922. // null. It is an error if a field in this list has a non-empty value.
  7923. // This may be used to include null fields in Patch requests.
  7924. NullFields []string `json:"-"`
  7925. }
  7926. func (s *UpdateProtectedRangeRequest) MarshalJSON() ([]byte, error) {
  7927. type NoMethod UpdateProtectedRangeRequest
  7928. raw := NoMethod(*s)
  7929. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7930. }
  7931. // UpdateSheetPropertiesRequest: Updates properties of the sheet with
  7932. // the specified
  7933. // sheetId.
  7934. type UpdateSheetPropertiesRequest struct {
  7935. // Fields: The fields that should be updated. At least one field must
  7936. // be specified.
  7937. // The root `properties` is implied and should not be specified.
  7938. // A single "*" can be used as short-hand for listing every field.
  7939. Fields string `json:"fields,omitempty"`
  7940. // Properties: The properties to update.
  7941. Properties *SheetProperties `json:"properties,omitempty"`
  7942. // ForceSendFields is a list of field names (e.g. "Fields") to
  7943. // unconditionally include in API requests. By default, fields with
  7944. // empty values are omitted from API requests. However, any non-pointer,
  7945. // non-interface field appearing in ForceSendFields will be sent to the
  7946. // server regardless of whether the field is empty or not. This may be
  7947. // used to include empty fields in Patch requests.
  7948. ForceSendFields []string `json:"-"`
  7949. // NullFields is a list of field names (e.g. "Fields") to include in API
  7950. // requests with the JSON null value. By default, fields with empty
  7951. // values are omitted from API requests. However, any field with an
  7952. // empty value appearing in NullFields will be sent to the server as
  7953. // null. It is an error if a field in this list has a non-empty value.
  7954. // This may be used to include null fields in Patch requests.
  7955. NullFields []string `json:"-"`
  7956. }
  7957. func (s *UpdateSheetPropertiesRequest) MarshalJSON() ([]byte, error) {
  7958. type NoMethod UpdateSheetPropertiesRequest
  7959. raw := NoMethod(*s)
  7960. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7961. }
  7962. // UpdateSpreadsheetPropertiesRequest: Updates properties of a
  7963. // spreadsheet.
  7964. type UpdateSpreadsheetPropertiesRequest struct {
  7965. // Fields: The fields that should be updated. At least one field must
  7966. // be specified.
  7967. // The root 'properties' is implied and should not be specified.
  7968. // A single "*" can be used as short-hand for listing every field.
  7969. Fields string `json:"fields,omitempty"`
  7970. // Properties: The properties to update.
  7971. Properties *SpreadsheetProperties `json:"properties,omitempty"`
  7972. // ForceSendFields is a list of field names (e.g. "Fields") to
  7973. // unconditionally include in API requests. By default, fields with
  7974. // empty values are omitted from API requests. However, any non-pointer,
  7975. // non-interface field appearing in ForceSendFields will be sent to the
  7976. // server regardless of whether the field is empty or not. This may be
  7977. // used to include empty fields in Patch requests.
  7978. ForceSendFields []string `json:"-"`
  7979. // NullFields is a list of field names (e.g. "Fields") to include in API
  7980. // requests with the JSON null value. By default, fields with empty
  7981. // values are omitted from API requests. However, any field with an
  7982. // empty value appearing in NullFields will be sent to the server as
  7983. // null. It is an error if a field in this list has a non-empty value.
  7984. // This may be used to include null fields in Patch requests.
  7985. NullFields []string `json:"-"`
  7986. }
  7987. func (s *UpdateSpreadsheetPropertiesRequest) MarshalJSON() ([]byte, error) {
  7988. type NoMethod UpdateSpreadsheetPropertiesRequest
  7989. raw := NoMethod(*s)
  7990. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7991. }
  7992. // UpdateValuesByDataFilterResponse: The response when updating a range
  7993. // of values by a data filter in a
  7994. // spreadsheet.
  7995. type UpdateValuesByDataFilterResponse struct {
  7996. // DataFilter: The data filter that selected the range that was updated.
  7997. DataFilter *DataFilter `json:"dataFilter,omitempty"`
  7998. // UpdatedCells: The number of cells updated.
  7999. UpdatedCells int64 `json:"updatedCells,omitempty"`
  8000. // UpdatedColumns: The number of columns where at least one cell in the
  8001. // column was updated.
  8002. UpdatedColumns int64 `json:"updatedColumns,omitempty"`
  8003. // UpdatedData: The values of the cells in the range matched by the
  8004. // dataFilter after all
  8005. // updates were applied. This is only included if the
  8006. // request's
  8007. // `includeValuesInResponse` field was `true`.
  8008. UpdatedData *ValueRange `json:"updatedData,omitempty"`
  8009. // UpdatedRange: The range (in A1 notation) that updates were applied
  8010. // to.
  8011. UpdatedRange string `json:"updatedRange,omitempty"`
  8012. // UpdatedRows: The number of rows where at least one cell in the row
  8013. // was updated.
  8014. UpdatedRows int64 `json:"updatedRows,omitempty"`
  8015. // ForceSendFields is a list of field names (e.g. "DataFilter") to
  8016. // unconditionally include in API requests. By default, fields with
  8017. // empty values are omitted from API requests. However, any non-pointer,
  8018. // non-interface field appearing in ForceSendFields will be sent to the
  8019. // server regardless of whether the field is empty or not. This may be
  8020. // used to include empty fields in Patch requests.
  8021. ForceSendFields []string `json:"-"`
  8022. // NullFields is a list of field names (e.g. "DataFilter") to include in
  8023. // API requests with the JSON null value. By default, fields with empty
  8024. // values are omitted from API requests. However, any field with an
  8025. // empty value appearing in NullFields will be sent to the server as
  8026. // null. It is an error if a field in this list has a non-empty value.
  8027. // This may be used to include null fields in Patch requests.
  8028. NullFields []string `json:"-"`
  8029. }
  8030. func (s *UpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  8031. type NoMethod UpdateValuesByDataFilterResponse
  8032. raw := NoMethod(*s)
  8033. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8034. }
  8035. // UpdateValuesResponse: The response when updating a range of values in
  8036. // a spreadsheet.
  8037. type UpdateValuesResponse struct {
  8038. // SpreadsheetId: The spreadsheet the updates were applied to.
  8039. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  8040. // UpdatedCells: The number of cells updated.
  8041. UpdatedCells int64 `json:"updatedCells,omitempty"`
  8042. // UpdatedColumns: The number of columns where at least one cell in the
  8043. // column was updated.
  8044. UpdatedColumns int64 `json:"updatedColumns,omitempty"`
  8045. // UpdatedData: The values of the cells after updates were applied.
  8046. // This is only included if the request's `includeValuesInResponse`
  8047. // field
  8048. // was `true`.
  8049. UpdatedData *ValueRange `json:"updatedData,omitempty"`
  8050. // UpdatedRange: The range (in A1 notation) that updates were applied
  8051. // to.
  8052. UpdatedRange string `json:"updatedRange,omitempty"`
  8053. // UpdatedRows: The number of rows where at least one cell in the row
  8054. // was updated.
  8055. UpdatedRows int64 `json:"updatedRows,omitempty"`
  8056. // ServerResponse contains the HTTP response code and headers from the
  8057. // server.
  8058. googleapi.ServerResponse `json:"-"`
  8059. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  8060. // unconditionally include in API requests. By default, fields with
  8061. // empty values are omitted from API requests. However, any non-pointer,
  8062. // non-interface field appearing in ForceSendFields will be sent to the
  8063. // server regardless of whether the field is empty or not. This may be
  8064. // used to include empty fields in Patch requests.
  8065. ForceSendFields []string `json:"-"`
  8066. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  8067. // in API requests with the JSON null value. By default, fields with
  8068. // empty values are omitted from API requests. However, any field with
  8069. // an empty value appearing in NullFields will be sent to the server as
  8070. // null. It is an error if a field in this list has a non-empty value.
  8071. // This may be used to include null fields in Patch requests.
  8072. NullFields []string `json:"-"`
  8073. }
  8074. func (s *UpdateValuesResponse) MarshalJSON() ([]byte, error) {
  8075. type NoMethod UpdateValuesResponse
  8076. raw := NoMethod(*s)
  8077. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8078. }
  8079. // ValueRange: Data within a range of the spreadsheet.
  8080. type ValueRange struct {
  8081. // MajorDimension: The major dimension of the values.
  8082. //
  8083. // For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  8084. // then requesting `range=A1:B2,majorDimension=ROWS` will
  8085. // return
  8086. // `[[1,2],[3,4]]`,
  8087. // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will
  8088. // return
  8089. // `[[1,3],[2,4]]`.
  8090. //
  8091. // For input, with `range=A1:B2,majorDimension=ROWS` then
  8092. // `[[1,2],[3,4]]`
  8093. // will set `A1=1,B1=2,A2=3,B2=4`. With
  8094. // `range=A1:B2,majorDimension=COLUMNS`
  8095. // then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
  8096. //
  8097. // When writing, if this field is not set, it defaults to ROWS.
  8098. //
  8099. // Possible values:
  8100. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  8101. // "ROWS" - Operates on the rows of a sheet.
  8102. // "COLUMNS" - Operates on the columns of a sheet.
  8103. MajorDimension string `json:"majorDimension,omitempty"`
  8104. // Range: The range the values cover, in A1 notation.
  8105. // For output, this range indicates the entire requested range,
  8106. // even though the values will exclude trailing rows and columns.
  8107. // When appending values, this field represents the range to search for
  8108. // a
  8109. // table, after which values will be appended.
  8110. Range string `json:"range,omitempty"`
  8111. // Values: The data that was read or to be written. This is an array of
  8112. // arrays,
  8113. // the outer array representing all the data and each inner
  8114. // array
  8115. // representing a major dimension. Each item in the inner
  8116. // array
  8117. // corresponds with one cell.
  8118. //
  8119. // For output, empty trailing rows and columns will not be
  8120. // included.
  8121. //
  8122. // For input, supported value types are: bool, string, and double.
  8123. // Null values will be skipped.
  8124. // To set a cell to an empty value, set the string value to an empty
  8125. // string.
  8126. Values [][]interface{} `json:"values,omitempty"`
  8127. // ServerResponse contains the HTTP response code and headers from the
  8128. // server.
  8129. googleapi.ServerResponse `json:"-"`
  8130. // ForceSendFields is a list of field names (e.g. "MajorDimension") to
  8131. // unconditionally include in API requests. By default, fields with
  8132. // empty values are omitted from API requests. However, any non-pointer,
  8133. // non-interface field appearing in ForceSendFields will be sent to the
  8134. // server regardless of whether the field is empty or not. This may be
  8135. // used to include empty fields in Patch requests.
  8136. ForceSendFields []string `json:"-"`
  8137. // NullFields is a list of field names (e.g. "MajorDimension") to
  8138. // include in API requests with the JSON null value. By default, fields
  8139. // with empty values are omitted from API requests. However, any field
  8140. // with an empty value appearing in NullFields will be sent to the
  8141. // server as null. It is an error if a field in this list has a
  8142. // non-empty value. This may be used to include null fields in Patch
  8143. // requests.
  8144. NullFields []string `json:"-"`
  8145. }
  8146. func (s *ValueRange) MarshalJSON() ([]byte, error) {
  8147. type NoMethod ValueRange
  8148. raw := NoMethod(*s)
  8149. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8150. }
  8151. // WaterfallChartColumnStyle: Styles for a waterfall chart column.
  8152. type WaterfallChartColumnStyle struct {
  8153. // Color: The color of the column.
  8154. Color *Color `json:"color,omitempty"`
  8155. // Label: The label of the column's legend.
  8156. Label string `json:"label,omitempty"`
  8157. // ForceSendFields is a list of field names (e.g. "Color") to
  8158. // unconditionally include in API requests. By default, fields with
  8159. // empty values are omitted from API requests. However, any non-pointer,
  8160. // non-interface field appearing in ForceSendFields will be sent to the
  8161. // server regardless of whether the field is empty or not. This may be
  8162. // used to include empty fields in Patch requests.
  8163. ForceSendFields []string `json:"-"`
  8164. // NullFields is a list of field names (e.g. "Color") to include in API
  8165. // requests with the JSON null value. By default, fields with empty
  8166. // values are omitted from API requests. However, any field with an
  8167. // empty value appearing in NullFields will be sent to the server as
  8168. // null. It is an error if a field in this list has a non-empty value.
  8169. // This may be used to include null fields in Patch requests.
  8170. NullFields []string `json:"-"`
  8171. }
  8172. func (s *WaterfallChartColumnStyle) MarshalJSON() ([]byte, error) {
  8173. type NoMethod WaterfallChartColumnStyle
  8174. raw := NoMethod(*s)
  8175. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8176. }
  8177. // WaterfallChartCustomSubtotal: A custom subtotal column for a
  8178. // waterfall chart series.
  8179. type WaterfallChartCustomSubtotal struct {
  8180. // DataIsSubtotal: True if the data point at subtotal_index is the
  8181. // subtotal. If false,
  8182. // the subtotal will be computed and appear after the data point.
  8183. DataIsSubtotal bool `json:"dataIsSubtotal,omitempty"`
  8184. // Label: A label for the subtotal column.
  8185. Label string `json:"label,omitempty"`
  8186. // SubtotalIndex: The 0-based index of a data point within the series.
  8187. // If
  8188. // data_is_subtotal is true, the data point at this index is
  8189. // the
  8190. // subtotal. Otherwise, the subtotal appears after the data point
  8191. // with
  8192. // this index. A series can have multiple subtotals at arbitrary
  8193. // indices,
  8194. // but subtotals do not affect the indices of the data points.
  8195. // For
  8196. // example, if a series has three data points, their indices will
  8197. // always
  8198. // be 0, 1, and 2, regardless of how many subtotals exist on the series
  8199. // or
  8200. // what data points they are associated with.
  8201. SubtotalIndex int64 `json:"subtotalIndex,omitempty"`
  8202. // ForceSendFields is a list of field names (e.g. "DataIsSubtotal") to
  8203. // unconditionally include in API requests. By default, fields with
  8204. // empty values are omitted from API requests. However, any non-pointer,
  8205. // non-interface field appearing in ForceSendFields will be sent to the
  8206. // server regardless of whether the field is empty or not. This may be
  8207. // used to include empty fields in Patch requests.
  8208. ForceSendFields []string `json:"-"`
  8209. // NullFields is a list of field names (e.g. "DataIsSubtotal") to
  8210. // include in API requests with the JSON null value. By default, fields
  8211. // with empty values are omitted from API requests. However, any field
  8212. // with an empty value appearing in NullFields will be sent to the
  8213. // server as null. It is an error if a field in this list has a
  8214. // non-empty value. This may be used to include null fields in Patch
  8215. // requests.
  8216. NullFields []string `json:"-"`
  8217. }
  8218. func (s *WaterfallChartCustomSubtotal) MarshalJSON() ([]byte, error) {
  8219. type NoMethod WaterfallChartCustomSubtotal
  8220. raw := NoMethod(*s)
  8221. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8222. }
  8223. // WaterfallChartDomain: The domain of a waterfall chart.
  8224. type WaterfallChartDomain struct {
  8225. // Data: The data of the WaterfallChartDomain.
  8226. Data *ChartData `json:"data,omitempty"`
  8227. // Reversed: True to reverse the order of the domain values (horizontal
  8228. // axis).
  8229. Reversed bool `json:"reversed,omitempty"`
  8230. // ForceSendFields is a list of field names (e.g. "Data") to
  8231. // unconditionally include in API requests. By default, fields with
  8232. // empty values are omitted from API requests. However, any non-pointer,
  8233. // non-interface field appearing in ForceSendFields will be sent to the
  8234. // server regardless of whether the field is empty or not. This may be
  8235. // used to include empty fields in Patch requests.
  8236. ForceSendFields []string `json:"-"`
  8237. // NullFields is a list of field names (e.g. "Data") to include in API
  8238. // requests with the JSON null value. By default, fields with empty
  8239. // values are omitted from API requests. However, any field with an
  8240. // empty value appearing in NullFields will be sent to the server as
  8241. // null. It is an error if a field in this list has a non-empty value.
  8242. // This may be used to include null fields in Patch requests.
  8243. NullFields []string `json:"-"`
  8244. }
  8245. func (s *WaterfallChartDomain) MarshalJSON() ([]byte, error) {
  8246. type NoMethod WaterfallChartDomain
  8247. raw := NoMethod(*s)
  8248. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8249. }
  8250. // WaterfallChartSeries: A single series of data for a waterfall chart.
  8251. type WaterfallChartSeries struct {
  8252. // CustomSubtotals: Custom subtotal columns appearing in this series.
  8253. // The order in which
  8254. // subtotals are defined is not significant. Only one subtotal may
  8255. // be
  8256. // defined for each data point.
  8257. CustomSubtotals []*WaterfallChartCustomSubtotal `json:"customSubtotals,omitempty"`
  8258. // Data: The data being visualized in this series.
  8259. Data *ChartData `json:"data,omitempty"`
  8260. // HideTrailingSubtotal: True to hide the subtotal column from the end
  8261. // of the series. By default,
  8262. // a subtotal column will appear at the end of each series. Setting
  8263. // this
  8264. // field to true will hide that subtotal column for this series.
  8265. HideTrailingSubtotal bool `json:"hideTrailingSubtotal,omitempty"`
  8266. // NegativeColumnsStyle: Styles for all columns in this series with
  8267. // negative values.
  8268. NegativeColumnsStyle *WaterfallChartColumnStyle `json:"negativeColumnsStyle,omitempty"`
  8269. // PositiveColumnsStyle: Styles for all columns in this series with
  8270. // positive values.
  8271. PositiveColumnsStyle *WaterfallChartColumnStyle `json:"positiveColumnsStyle,omitempty"`
  8272. // SubtotalColumnsStyle: Styles for all subtotal columns in this series.
  8273. SubtotalColumnsStyle *WaterfallChartColumnStyle `json:"subtotalColumnsStyle,omitempty"`
  8274. // ForceSendFields is a list of field names (e.g. "CustomSubtotals") to
  8275. // unconditionally include in API requests. By default, fields with
  8276. // empty values are omitted from API requests. However, any non-pointer,
  8277. // non-interface field appearing in ForceSendFields will be sent to the
  8278. // server regardless of whether the field is empty or not. This may be
  8279. // used to include empty fields in Patch requests.
  8280. ForceSendFields []string `json:"-"`
  8281. // NullFields is a list of field names (e.g. "CustomSubtotals") to
  8282. // include in API requests with the JSON null value. By default, fields
  8283. // with empty values are omitted from API requests. However, any field
  8284. // with an empty value appearing in NullFields will be sent to the
  8285. // server as null. It is an error if a field in this list has a
  8286. // non-empty value. This may be used to include null fields in Patch
  8287. // requests.
  8288. NullFields []string `json:"-"`
  8289. }
  8290. func (s *WaterfallChartSeries) MarshalJSON() ([]byte, error) {
  8291. type NoMethod WaterfallChartSeries
  8292. raw := NoMethod(*s)
  8293. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8294. }
  8295. // WaterfallChartSpec: A waterfall chart.
  8296. type WaterfallChartSpec struct {
  8297. // ConnectorLineStyle: The line style for the connector lines.
  8298. ConnectorLineStyle *LineStyle `json:"connectorLineStyle,omitempty"`
  8299. // Domain: The domain data (horizontal axis) for the waterfall chart.
  8300. Domain *WaterfallChartDomain `json:"domain,omitempty"`
  8301. // FirstValueIsTotal: True to interpret the first value as a total.
  8302. FirstValueIsTotal bool `json:"firstValueIsTotal,omitempty"`
  8303. // HideConnectorLines: True to hide connector lines between columns.
  8304. HideConnectorLines bool `json:"hideConnectorLines,omitempty"`
  8305. // Series: The data this waterfall chart is visualizing.
  8306. Series []*WaterfallChartSeries `json:"series,omitempty"`
  8307. // StackedType: The stacked type.
  8308. //
  8309. // Possible values:
  8310. // "WATERFALL_STACKED_TYPE_UNSPECIFIED" - Default value, do not use.
  8311. // "STACKED" - Values corresponding to the same domain (horizontal
  8312. // axis) value will be
  8313. // stacked vertically.
  8314. // "SEQUENTIAL" - Series will spread out along the horizontal axis.
  8315. StackedType string `json:"stackedType,omitempty"`
  8316. // ForceSendFields is a list of field names (e.g. "ConnectorLineStyle")
  8317. // to unconditionally include in API requests. By default, fields with
  8318. // empty values are omitted from API requests. However, any non-pointer,
  8319. // non-interface field appearing in ForceSendFields will be sent to the
  8320. // server regardless of whether the field is empty or not. This may be
  8321. // used to include empty fields in Patch requests.
  8322. ForceSendFields []string `json:"-"`
  8323. // NullFields is a list of field names (e.g. "ConnectorLineStyle") to
  8324. // include in API requests with the JSON null value. By default, fields
  8325. // with empty values are omitted from API requests. However, any field
  8326. // with an empty value appearing in NullFields will be sent to the
  8327. // server as null. It is an error if a field in this list has a
  8328. // non-empty value. This may be used to include null fields in Patch
  8329. // requests.
  8330. NullFields []string `json:"-"`
  8331. }
  8332. func (s *WaterfallChartSpec) MarshalJSON() ([]byte, error) {
  8333. type NoMethod WaterfallChartSpec
  8334. raw := NoMethod(*s)
  8335. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8336. }
  8337. // method id "sheets.spreadsheets.batchUpdate":
  8338. type SpreadsheetsBatchUpdateCall struct {
  8339. s *Service
  8340. spreadsheetId string
  8341. batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest
  8342. urlParams_ gensupport.URLParams
  8343. ctx_ context.Context
  8344. header_ http.Header
  8345. }
  8346. // BatchUpdate: Applies one or more updates to the spreadsheet.
  8347. //
  8348. // Each request is validated before
  8349. // being applied. If any request is not valid then the entire request
  8350. // will
  8351. // fail and nothing will be applied.
  8352. //
  8353. // Some requests have replies to
  8354. // give you some information about how
  8355. // they are applied. The replies will mirror the requests. For
  8356. // example,
  8357. // if you applied 4 updates and the 3rd one had a reply, then
  8358. // the
  8359. // response will have 2 empty replies, the actual reply, and another
  8360. // empty
  8361. // reply, in that order.
  8362. //
  8363. // Due to the collaborative nature of spreadsheets, it is not guaranteed
  8364. // that
  8365. // the spreadsheet will reflect exactly your changes after this
  8366. // completes,
  8367. // however it is guaranteed that the updates in the request will
  8368. // be
  8369. // applied together atomically. Your changes may be altered with respect
  8370. // to
  8371. // collaborator changes. If there are no collaborators, the
  8372. // spreadsheet
  8373. // should reflect your changes.
  8374. func (r *SpreadsheetsService) BatchUpdate(spreadsheetId string, batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest) *SpreadsheetsBatchUpdateCall {
  8375. c := &SpreadsheetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8376. c.spreadsheetId = spreadsheetId
  8377. c.batchupdatespreadsheetrequest = batchupdatespreadsheetrequest
  8378. return c
  8379. }
  8380. // Fields allows partial responses to be retrieved. See
  8381. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8382. // for more information.
  8383. func (c *SpreadsheetsBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsBatchUpdateCall {
  8384. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8385. return c
  8386. }
  8387. // Context sets the context to be used in this call's Do method. Any
  8388. // pending HTTP request will be aborted if the provided context is
  8389. // canceled.
  8390. func (c *SpreadsheetsBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsBatchUpdateCall {
  8391. c.ctx_ = ctx
  8392. return c
  8393. }
  8394. // Header returns an http.Header that can be modified by the caller to
  8395. // add HTTP headers to the request.
  8396. func (c *SpreadsheetsBatchUpdateCall) Header() http.Header {
  8397. if c.header_ == nil {
  8398. c.header_ = make(http.Header)
  8399. }
  8400. return c.header_
  8401. }
  8402. func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  8403. reqHeaders := make(http.Header)
  8404. for k, v := range c.header_ {
  8405. reqHeaders[k] = v
  8406. }
  8407. reqHeaders.Set("User-Agent", c.s.userAgent())
  8408. var body io.Reader = nil
  8409. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatespreadsheetrequest)
  8410. if err != nil {
  8411. return nil, err
  8412. }
  8413. reqHeaders.Set("Content-Type", "application/json")
  8414. c.urlParams_.Set("alt", alt)
  8415. c.urlParams_.Set("prettyPrint", "false")
  8416. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate")
  8417. urls += "?" + c.urlParams_.Encode()
  8418. req, err := http.NewRequest("POST", urls, body)
  8419. if err != nil {
  8420. return nil, err
  8421. }
  8422. req.Header = reqHeaders
  8423. googleapi.Expand(req.URL, map[string]string{
  8424. "spreadsheetId": c.spreadsheetId,
  8425. })
  8426. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8427. }
  8428. // Do executes the "sheets.spreadsheets.batchUpdate" call.
  8429. // Exactly one of *BatchUpdateSpreadsheetResponse or error will be
  8430. // non-nil. Any non-2xx status code is an error. Response headers are in
  8431. // either *BatchUpdateSpreadsheetResponse.ServerResponse.Header or (if a
  8432. // response was returned at all) in error.(*googleapi.Error).Header. Use
  8433. // googleapi.IsNotModified to check whether the returned error was
  8434. // because http.StatusNotModified was returned.
  8435. func (c *SpreadsheetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateSpreadsheetResponse, error) {
  8436. gensupport.SetOptions(c.urlParams_, opts...)
  8437. res, err := c.doRequest("json")
  8438. if res != nil && res.StatusCode == http.StatusNotModified {
  8439. if res.Body != nil {
  8440. res.Body.Close()
  8441. }
  8442. return nil, &googleapi.Error{
  8443. Code: res.StatusCode,
  8444. Header: res.Header,
  8445. }
  8446. }
  8447. if err != nil {
  8448. return nil, err
  8449. }
  8450. defer googleapi.CloseBody(res)
  8451. if err := googleapi.CheckResponse(res); err != nil {
  8452. return nil, err
  8453. }
  8454. ret := &BatchUpdateSpreadsheetResponse{
  8455. ServerResponse: googleapi.ServerResponse{
  8456. Header: res.Header,
  8457. HTTPStatusCode: res.StatusCode,
  8458. },
  8459. }
  8460. target := &ret
  8461. if err := gensupport.DecodeResponse(target, res); err != nil {
  8462. return nil, err
  8463. }
  8464. return ret, nil
  8465. // {
  8466. // "description": "Applies one or more updates to the spreadsheet.\n\nEach request is validated before\nbeing applied. If any request is not valid then the entire request will\nfail and nothing will be applied.\n\nSome requests have replies to\ngive you some information about how\nthey are applied. The replies will mirror the requests. For example,\nif you applied 4 updates and the 3rd one had a reply, then the\nresponse will have 2 empty replies, the actual reply, and another empty\nreply, in that order.\n\nDue to the collaborative nature of spreadsheets, it is not guaranteed that\nthe spreadsheet will reflect exactly your changes after this completes,\nhowever it is guaranteed that the updates in the request will be\napplied together atomically. Your changes may be altered with respect to\ncollaborator changes. If there are no collaborators, the spreadsheet\nshould reflect your changes.",
  8467. // "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate",
  8468. // "httpMethod": "POST",
  8469. // "id": "sheets.spreadsheets.batchUpdate",
  8470. // "parameterOrder": [
  8471. // "spreadsheetId"
  8472. // ],
  8473. // "parameters": {
  8474. // "spreadsheetId": {
  8475. // "description": "The spreadsheet to apply the updates to.",
  8476. // "location": "path",
  8477. // "required": true,
  8478. // "type": "string"
  8479. // }
  8480. // },
  8481. // "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate",
  8482. // "request": {
  8483. // "$ref": "BatchUpdateSpreadsheetRequest"
  8484. // },
  8485. // "response": {
  8486. // "$ref": "BatchUpdateSpreadsheetResponse"
  8487. // },
  8488. // "scopes": [
  8489. // "https://www.googleapis.com/auth/drive",
  8490. // "https://www.googleapis.com/auth/drive.file",
  8491. // "https://www.googleapis.com/auth/spreadsheets"
  8492. // ]
  8493. // }
  8494. }
  8495. // method id "sheets.spreadsheets.create":
  8496. type SpreadsheetsCreateCall struct {
  8497. s *Service
  8498. spreadsheet *Spreadsheet
  8499. urlParams_ gensupport.URLParams
  8500. ctx_ context.Context
  8501. header_ http.Header
  8502. }
  8503. // Create: Creates a spreadsheet, returning the newly created
  8504. // spreadsheet.
  8505. func (r *SpreadsheetsService) Create(spreadsheet *Spreadsheet) *SpreadsheetsCreateCall {
  8506. c := &SpreadsheetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8507. c.spreadsheet = spreadsheet
  8508. return c
  8509. }
  8510. // Fields allows partial responses to be retrieved. See
  8511. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8512. // for more information.
  8513. func (c *SpreadsheetsCreateCall) Fields(s ...googleapi.Field) *SpreadsheetsCreateCall {
  8514. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8515. return c
  8516. }
  8517. // Context sets the context to be used in this call's Do method. Any
  8518. // pending HTTP request will be aborted if the provided context is
  8519. // canceled.
  8520. func (c *SpreadsheetsCreateCall) Context(ctx context.Context) *SpreadsheetsCreateCall {
  8521. c.ctx_ = ctx
  8522. return c
  8523. }
  8524. // Header returns an http.Header that can be modified by the caller to
  8525. // add HTTP headers to the request.
  8526. func (c *SpreadsheetsCreateCall) Header() http.Header {
  8527. if c.header_ == nil {
  8528. c.header_ = make(http.Header)
  8529. }
  8530. return c.header_
  8531. }
  8532. func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) {
  8533. reqHeaders := make(http.Header)
  8534. for k, v := range c.header_ {
  8535. reqHeaders[k] = v
  8536. }
  8537. reqHeaders.Set("User-Agent", c.s.userAgent())
  8538. var body io.Reader = nil
  8539. body, err := googleapi.WithoutDataWrapper.JSONReader(c.spreadsheet)
  8540. if err != nil {
  8541. return nil, err
  8542. }
  8543. reqHeaders.Set("Content-Type", "application/json")
  8544. c.urlParams_.Set("alt", alt)
  8545. c.urlParams_.Set("prettyPrint", "false")
  8546. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets")
  8547. urls += "?" + c.urlParams_.Encode()
  8548. req, err := http.NewRequest("POST", urls, body)
  8549. if err != nil {
  8550. return nil, err
  8551. }
  8552. req.Header = reqHeaders
  8553. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8554. }
  8555. // Do executes the "sheets.spreadsheets.create" call.
  8556. // Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx
  8557. // status code is an error. Response headers are in either
  8558. // *Spreadsheet.ServerResponse.Header or (if a response was returned at
  8559. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8560. // to check whether the returned error was because
  8561. // http.StatusNotModified was returned.
  8562. func (c *SpreadsheetsCreateCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) {
  8563. gensupport.SetOptions(c.urlParams_, opts...)
  8564. res, err := c.doRequest("json")
  8565. if res != nil && res.StatusCode == http.StatusNotModified {
  8566. if res.Body != nil {
  8567. res.Body.Close()
  8568. }
  8569. return nil, &googleapi.Error{
  8570. Code: res.StatusCode,
  8571. Header: res.Header,
  8572. }
  8573. }
  8574. if err != nil {
  8575. return nil, err
  8576. }
  8577. defer googleapi.CloseBody(res)
  8578. if err := googleapi.CheckResponse(res); err != nil {
  8579. return nil, err
  8580. }
  8581. ret := &Spreadsheet{
  8582. ServerResponse: googleapi.ServerResponse{
  8583. Header: res.Header,
  8584. HTTPStatusCode: res.StatusCode,
  8585. },
  8586. }
  8587. target := &ret
  8588. if err := gensupport.DecodeResponse(target, res); err != nil {
  8589. return nil, err
  8590. }
  8591. return ret, nil
  8592. // {
  8593. // "description": "Creates a spreadsheet, returning the newly created spreadsheet.",
  8594. // "flatPath": "v4/spreadsheets",
  8595. // "httpMethod": "POST",
  8596. // "id": "sheets.spreadsheets.create",
  8597. // "parameterOrder": [],
  8598. // "parameters": {},
  8599. // "path": "v4/spreadsheets",
  8600. // "request": {
  8601. // "$ref": "Spreadsheet"
  8602. // },
  8603. // "response": {
  8604. // "$ref": "Spreadsheet"
  8605. // },
  8606. // "scopes": [
  8607. // "https://www.googleapis.com/auth/drive",
  8608. // "https://www.googleapis.com/auth/drive.file",
  8609. // "https://www.googleapis.com/auth/spreadsheets"
  8610. // ]
  8611. // }
  8612. }
  8613. // method id "sheets.spreadsheets.get":
  8614. type SpreadsheetsGetCall struct {
  8615. s *Service
  8616. spreadsheetId string
  8617. urlParams_ gensupport.URLParams
  8618. ifNoneMatch_ string
  8619. ctx_ context.Context
  8620. header_ http.Header
  8621. }
  8622. // Get: Returns the spreadsheet at the given ID.
  8623. // The caller must specify the spreadsheet ID.
  8624. //
  8625. // By default, data within grids will not be returned.
  8626. // You can include grid data one of two ways:
  8627. //
  8628. // * Specify a field mask listing your desired fields using the `fields`
  8629. // URL
  8630. // parameter in HTTP
  8631. //
  8632. // * Set the includeGridData
  8633. // URL parameter to true. If a field mask is set, the
  8634. // `includeGridData`
  8635. // parameter is ignored
  8636. //
  8637. // For large spreadsheets, it is recommended to retrieve only the
  8638. // specific
  8639. // fields of the spreadsheet that you want.
  8640. //
  8641. // To retrieve only subsets of the spreadsheet, use the
  8642. // ranges URL parameter.
  8643. // Multiple ranges can be specified. Limiting the range will
  8644. // return only the portions of the spreadsheet that intersect the
  8645. // requested
  8646. // ranges. Ranges are specified using A1 notation.
  8647. func (r *SpreadsheetsService) Get(spreadsheetId string) *SpreadsheetsGetCall {
  8648. c := &SpreadsheetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8649. c.spreadsheetId = spreadsheetId
  8650. return c
  8651. }
  8652. // IncludeGridData sets the optional parameter "includeGridData": True
  8653. // if grid data should be returned.
  8654. // This parameter is ignored if a field mask was set in the request.
  8655. func (c *SpreadsheetsGetCall) IncludeGridData(includeGridData bool) *SpreadsheetsGetCall {
  8656. c.urlParams_.Set("includeGridData", fmt.Sprint(includeGridData))
  8657. return c
  8658. }
  8659. // Ranges sets the optional parameter "ranges": The ranges to retrieve
  8660. // from the spreadsheet.
  8661. func (c *SpreadsheetsGetCall) Ranges(ranges ...string) *SpreadsheetsGetCall {
  8662. c.urlParams_.SetMulti("ranges", append([]string{}, ranges...))
  8663. return c
  8664. }
  8665. // Fields allows partial responses to be retrieved. See
  8666. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8667. // for more information.
  8668. func (c *SpreadsheetsGetCall) Fields(s ...googleapi.Field) *SpreadsheetsGetCall {
  8669. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8670. return c
  8671. }
  8672. // IfNoneMatch sets the optional parameter which makes the operation
  8673. // fail if the object's ETag matches the given value. This is useful for
  8674. // getting updates only after the object has changed since the last
  8675. // request. Use googleapi.IsNotModified to check whether the response
  8676. // error from Do is the result of In-None-Match.
  8677. func (c *SpreadsheetsGetCall) IfNoneMatch(entityTag string) *SpreadsheetsGetCall {
  8678. c.ifNoneMatch_ = entityTag
  8679. return c
  8680. }
  8681. // Context sets the context to be used in this call's Do method. Any
  8682. // pending HTTP request will be aborted if the provided context is
  8683. // canceled.
  8684. func (c *SpreadsheetsGetCall) Context(ctx context.Context) *SpreadsheetsGetCall {
  8685. c.ctx_ = ctx
  8686. return c
  8687. }
  8688. // Header returns an http.Header that can be modified by the caller to
  8689. // add HTTP headers to the request.
  8690. func (c *SpreadsheetsGetCall) Header() http.Header {
  8691. if c.header_ == nil {
  8692. c.header_ = make(http.Header)
  8693. }
  8694. return c.header_
  8695. }
  8696. func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) {
  8697. reqHeaders := make(http.Header)
  8698. for k, v := range c.header_ {
  8699. reqHeaders[k] = v
  8700. }
  8701. reqHeaders.Set("User-Agent", c.s.userAgent())
  8702. if c.ifNoneMatch_ != "" {
  8703. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8704. }
  8705. var body io.Reader = nil
  8706. c.urlParams_.Set("alt", alt)
  8707. c.urlParams_.Set("prettyPrint", "false")
  8708. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}")
  8709. urls += "?" + c.urlParams_.Encode()
  8710. req, err := http.NewRequest("GET", urls, body)
  8711. if err != nil {
  8712. return nil, err
  8713. }
  8714. req.Header = reqHeaders
  8715. googleapi.Expand(req.URL, map[string]string{
  8716. "spreadsheetId": c.spreadsheetId,
  8717. })
  8718. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8719. }
  8720. // Do executes the "sheets.spreadsheets.get" call.
  8721. // Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx
  8722. // status code is an error. Response headers are in either
  8723. // *Spreadsheet.ServerResponse.Header or (if a response was returned at
  8724. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8725. // to check whether the returned error was because
  8726. // http.StatusNotModified was returned.
  8727. func (c *SpreadsheetsGetCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) {
  8728. gensupport.SetOptions(c.urlParams_, opts...)
  8729. res, err := c.doRequest("json")
  8730. if res != nil && res.StatusCode == http.StatusNotModified {
  8731. if res.Body != nil {
  8732. res.Body.Close()
  8733. }
  8734. return nil, &googleapi.Error{
  8735. Code: res.StatusCode,
  8736. Header: res.Header,
  8737. }
  8738. }
  8739. if err != nil {
  8740. return nil, err
  8741. }
  8742. defer googleapi.CloseBody(res)
  8743. if err := googleapi.CheckResponse(res); err != nil {
  8744. return nil, err
  8745. }
  8746. ret := &Spreadsheet{
  8747. ServerResponse: googleapi.ServerResponse{
  8748. Header: res.Header,
  8749. HTTPStatusCode: res.StatusCode,
  8750. },
  8751. }
  8752. target := &ret
  8753. if err := gensupport.DecodeResponse(target, res); err != nil {
  8754. return nil, err
  8755. }
  8756. return ret, nil
  8757. // {
  8758. // "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nURL parameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.\n\nTo retrieve only subsets of the spreadsheet, use the\nranges URL parameter.\nMultiple ranges can be specified. Limiting the range will\nreturn only the portions of the spreadsheet that intersect the requested\nranges. Ranges are specified using A1 notation.",
  8759. // "flatPath": "v4/spreadsheets/{spreadsheetId}",
  8760. // "httpMethod": "GET",
  8761. // "id": "sheets.spreadsheets.get",
  8762. // "parameterOrder": [
  8763. // "spreadsheetId"
  8764. // ],
  8765. // "parameters": {
  8766. // "includeGridData": {
  8767. // "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.",
  8768. // "location": "query",
  8769. // "type": "boolean"
  8770. // },
  8771. // "ranges": {
  8772. // "description": "The ranges to retrieve from the spreadsheet.",
  8773. // "location": "query",
  8774. // "repeated": true,
  8775. // "type": "string"
  8776. // },
  8777. // "spreadsheetId": {
  8778. // "description": "The spreadsheet to request.",
  8779. // "location": "path",
  8780. // "required": true,
  8781. // "type": "string"
  8782. // }
  8783. // },
  8784. // "path": "v4/spreadsheets/{spreadsheetId}",
  8785. // "response": {
  8786. // "$ref": "Spreadsheet"
  8787. // },
  8788. // "scopes": [
  8789. // "https://www.googleapis.com/auth/drive",
  8790. // "https://www.googleapis.com/auth/drive.file",
  8791. // "https://www.googleapis.com/auth/drive.readonly",
  8792. // "https://www.googleapis.com/auth/spreadsheets",
  8793. // "https://www.googleapis.com/auth/spreadsheets.readonly"
  8794. // ]
  8795. // }
  8796. }
  8797. // method id "sheets.spreadsheets.getByDataFilter":
  8798. type SpreadsheetsGetByDataFilterCall struct {
  8799. s *Service
  8800. spreadsheetId string
  8801. getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest
  8802. urlParams_ gensupport.URLParams
  8803. ctx_ context.Context
  8804. header_ http.Header
  8805. }
  8806. // GetByDataFilter: Returns the spreadsheet at the given ID.
  8807. // The caller must specify the spreadsheet ID.
  8808. //
  8809. // This method differs from GetSpreadsheet in that it allows
  8810. // selecting
  8811. // which subsets of spreadsheet data to return by specifying
  8812. // a
  8813. // dataFilters parameter.
  8814. // Multiple DataFilters can be specified. Specifying one or
  8815. // more data filters will return the portions of the spreadsheet
  8816. // that
  8817. // intersect ranges matched by any of the filters.
  8818. //
  8819. // By default, data within grids will not be returned.
  8820. // You can include grid data one of two ways:
  8821. //
  8822. // * Specify a field mask listing your desired fields using the `fields`
  8823. // URL
  8824. // parameter in HTTP
  8825. //
  8826. // * Set the includeGridData
  8827. // parameter to true. If a field mask is set, the
  8828. // `includeGridData`
  8829. // parameter is ignored
  8830. //
  8831. // For large spreadsheets, it is recommended to retrieve only the
  8832. // specific
  8833. // fields of the spreadsheet that you want.
  8834. func (r *SpreadsheetsService) GetByDataFilter(spreadsheetId string, getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest) *SpreadsheetsGetByDataFilterCall {
  8835. c := &SpreadsheetsGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8836. c.spreadsheetId = spreadsheetId
  8837. c.getspreadsheetbydatafilterrequest = getspreadsheetbydatafilterrequest
  8838. return c
  8839. }
  8840. // Fields allows partial responses to be retrieved. See
  8841. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8842. // for more information.
  8843. func (c *SpreadsheetsGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsGetByDataFilterCall {
  8844. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8845. return c
  8846. }
  8847. // Context sets the context to be used in this call's Do method. Any
  8848. // pending HTTP request will be aborted if the provided context is
  8849. // canceled.
  8850. func (c *SpreadsheetsGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsGetByDataFilterCall {
  8851. c.ctx_ = ctx
  8852. return c
  8853. }
  8854. // Header returns an http.Header that can be modified by the caller to
  8855. // add HTTP headers to the request.
  8856. func (c *SpreadsheetsGetByDataFilterCall) Header() http.Header {
  8857. if c.header_ == nil {
  8858. c.header_ = make(http.Header)
  8859. }
  8860. return c.header_
  8861. }
  8862. func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  8863. reqHeaders := make(http.Header)
  8864. for k, v := range c.header_ {
  8865. reqHeaders[k] = v
  8866. }
  8867. reqHeaders.Set("User-Agent", c.s.userAgent())
  8868. var body io.Reader = nil
  8869. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getspreadsheetbydatafilterrequest)
  8870. if err != nil {
  8871. return nil, err
  8872. }
  8873. reqHeaders.Set("Content-Type", "application/json")
  8874. c.urlParams_.Set("alt", alt)
  8875. c.urlParams_.Set("prettyPrint", "false")
  8876. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter")
  8877. urls += "?" + c.urlParams_.Encode()
  8878. req, err := http.NewRequest("POST", urls, body)
  8879. if err != nil {
  8880. return nil, err
  8881. }
  8882. req.Header = reqHeaders
  8883. googleapi.Expand(req.URL, map[string]string{
  8884. "spreadsheetId": c.spreadsheetId,
  8885. })
  8886. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8887. }
  8888. // Do executes the "sheets.spreadsheets.getByDataFilter" call.
  8889. // Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx
  8890. // status code is an error. Response headers are in either
  8891. // *Spreadsheet.ServerResponse.Header or (if a response was returned at
  8892. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8893. // to check whether the returned error was because
  8894. // http.StatusNotModified was returned.
  8895. func (c *SpreadsheetsGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) {
  8896. gensupport.SetOptions(c.urlParams_, opts...)
  8897. res, err := c.doRequest("json")
  8898. if res != nil && res.StatusCode == http.StatusNotModified {
  8899. if res.Body != nil {
  8900. res.Body.Close()
  8901. }
  8902. return nil, &googleapi.Error{
  8903. Code: res.StatusCode,
  8904. Header: res.Header,
  8905. }
  8906. }
  8907. if err != nil {
  8908. return nil, err
  8909. }
  8910. defer googleapi.CloseBody(res)
  8911. if err := googleapi.CheckResponse(res); err != nil {
  8912. return nil, err
  8913. }
  8914. ret := &Spreadsheet{
  8915. ServerResponse: googleapi.ServerResponse{
  8916. Header: res.Header,
  8917. HTTPStatusCode: res.StatusCode,
  8918. },
  8919. }
  8920. target := &ret
  8921. if err := gensupport.DecodeResponse(target, res); err != nil {
  8922. return nil, err
  8923. }
  8924. return ret, nil
  8925. // {
  8926. // "description": "Returns the spreadsheet at the given ID.\nThe caller must specify the spreadsheet ID.\n\nThis method differs from GetSpreadsheet in that it allows selecting\nwhich subsets of spreadsheet data to return by specifying a\ndataFilters parameter.\nMultiple DataFilters can be specified. Specifying one or\nmore data filters will return the portions of the spreadsheet that\nintersect ranges matched by any of the filters.\n\nBy default, data within grids will not be returned.\nYou can include grid data one of two ways:\n\n* Specify a field mask listing your desired fields using the `fields` URL\nparameter in HTTP\n\n* Set the includeGridData\nparameter to true. If a field mask is set, the `includeGridData`\nparameter is ignored\n\nFor large spreadsheets, it is recommended to retrieve only the specific\nfields of the spreadsheet that you want.",
  8927. // "flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter",
  8928. // "httpMethod": "POST",
  8929. // "id": "sheets.spreadsheets.getByDataFilter",
  8930. // "parameterOrder": [
  8931. // "spreadsheetId"
  8932. // ],
  8933. // "parameters": {
  8934. // "spreadsheetId": {
  8935. // "description": "The spreadsheet to request.",
  8936. // "location": "path",
  8937. // "required": true,
  8938. // "type": "string"
  8939. // }
  8940. // },
  8941. // "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter",
  8942. // "request": {
  8943. // "$ref": "GetSpreadsheetByDataFilterRequest"
  8944. // },
  8945. // "response": {
  8946. // "$ref": "Spreadsheet"
  8947. // },
  8948. // "scopes": [
  8949. // "https://www.googleapis.com/auth/drive",
  8950. // "https://www.googleapis.com/auth/drive.file",
  8951. // "https://www.googleapis.com/auth/spreadsheets"
  8952. // ]
  8953. // }
  8954. }
  8955. // method id "sheets.spreadsheets.developerMetadata.get":
  8956. type SpreadsheetsDeveloperMetadataGetCall struct {
  8957. s *Service
  8958. spreadsheetId string
  8959. metadataId int64
  8960. urlParams_ gensupport.URLParams
  8961. ifNoneMatch_ string
  8962. ctx_ context.Context
  8963. header_ http.Header
  8964. }
  8965. // Get: Returns the developer metadata with the specified ID.
  8966. // The caller must specify the spreadsheet ID and the developer
  8967. // metadata's
  8968. // unique metadataId.
  8969. func (r *SpreadsheetsDeveloperMetadataService) Get(spreadsheetId string, metadataId int64) *SpreadsheetsDeveloperMetadataGetCall {
  8970. c := &SpreadsheetsDeveloperMetadataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8971. c.spreadsheetId = spreadsheetId
  8972. c.metadataId = metadataId
  8973. return c
  8974. }
  8975. // Fields allows partial responses to be retrieved. See
  8976. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8977. // for more information.
  8978. func (c *SpreadsheetsDeveloperMetadataGetCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataGetCall {
  8979. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8980. return c
  8981. }
  8982. // IfNoneMatch sets the optional parameter which makes the operation
  8983. // fail if the object's ETag matches the given value. This is useful for
  8984. // getting updates only after the object has changed since the last
  8985. // request. Use googleapi.IsNotModified to check whether the response
  8986. // error from Do is the result of In-None-Match.
  8987. func (c *SpreadsheetsDeveloperMetadataGetCall) IfNoneMatch(entityTag string) *SpreadsheetsDeveloperMetadataGetCall {
  8988. c.ifNoneMatch_ = entityTag
  8989. return c
  8990. }
  8991. // Context sets the context to be used in this call's Do method. Any
  8992. // pending HTTP request will be aborted if the provided context is
  8993. // canceled.
  8994. func (c *SpreadsheetsDeveloperMetadataGetCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataGetCall {
  8995. c.ctx_ = ctx
  8996. return c
  8997. }
  8998. // Header returns an http.Header that can be modified by the caller to
  8999. // add HTTP headers to the request.
  9000. func (c *SpreadsheetsDeveloperMetadataGetCall) Header() http.Header {
  9001. if c.header_ == nil {
  9002. c.header_ = make(http.Header)
  9003. }
  9004. return c.header_
  9005. }
  9006. func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Response, error) {
  9007. reqHeaders := make(http.Header)
  9008. for k, v := range c.header_ {
  9009. reqHeaders[k] = v
  9010. }
  9011. reqHeaders.Set("User-Agent", c.s.userAgent())
  9012. if c.ifNoneMatch_ != "" {
  9013. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9014. }
  9015. var body io.Reader = nil
  9016. c.urlParams_.Set("alt", alt)
  9017. c.urlParams_.Set("prettyPrint", "false")
  9018. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}")
  9019. urls += "?" + c.urlParams_.Encode()
  9020. req, err := http.NewRequest("GET", urls, body)
  9021. if err != nil {
  9022. return nil, err
  9023. }
  9024. req.Header = reqHeaders
  9025. googleapi.Expand(req.URL, map[string]string{
  9026. "spreadsheetId": c.spreadsheetId,
  9027. "metadataId": strconv.FormatInt(c.metadataId, 10),
  9028. })
  9029. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9030. }
  9031. // Do executes the "sheets.spreadsheets.developerMetadata.get" call.
  9032. // Exactly one of *DeveloperMetadata or error will be non-nil. Any
  9033. // non-2xx status code is an error. Response headers are in either
  9034. // *DeveloperMetadata.ServerResponse.Header or (if a response was
  9035. // returned at all) in error.(*googleapi.Error).Header. Use
  9036. // googleapi.IsNotModified to check whether the returned error was
  9037. // because http.StatusNotModified was returned.
  9038. func (c *SpreadsheetsDeveloperMetadataGetCall) Do(opts ...googleapi.CallOption) (*DeveloperMetadata, error) {
  9039. gensupport.SetOptions(c.urlParams_, opts...)
  9040. res, err := c.doRequest("json")
  9041. if res != nil && res.StatusCode == http.StatusNotModified {
  9042. if res.Body != nil {
  9043. res.Body.Close()
  9044. }
  9045. return nil, &googleapi.Error{
  9046. Code: res.StatusCode,
  9047. Header: res.Header,
  9048. }
  9049. }
  9050. if err != nil {
  9051. return nil, err
  9052. }
  9053. defer googleapi.CloseBody(res)
  9054. if err := googleapi.CheckResponse(res); err != nil {
  9055. return nil, err
  9056. }
  9057. ret := &DeveloperMetadata{
  9058. ServerResponse: googleapi.ServerResponse{
  9059. Header: res.Header,
  9060. HTTPStatusCode: res.StatusCode,
  9061. },
  9062. }
  9063. target := &ret
  9064. if err := gensupport.DecodeResponse(target, res); err != nil {
  9065. return nil, err
  9066. }
  9067. return ret, nil
  9068. // {
  9069. // "description": "Returns the developer metadata with the specified ID.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId.",
  9070. // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}",
  9071. // "httpMethod": "GET",
  9072. // "id": "sheets.spreadsheets.developerMetadata.get",
  9073. // "parameterOrder": [
  9074. // "spreadsheetId",
  9075. // "metadataId"
  9076. // ],
  9077. // "parameters": {
  9078. // "metadataId": {
  9079. // "description": "The ID of the developer metadata to retrieve.",
  9080. // "format": "int32",
  9081. // "location": "path",
  9082. // "required": true,
  9083. // "type": "integer"
  9084. // },
  9085. // "spreadsheetId": {
  9086. // "description": "The ID of the spreadsheet to retrieve metadata from.",
  9087. // "location": "path",
  9088. // "required": true,
  9089. // "type": "string"
  9090. // }
  9091. // },
  9092. // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}",
  9093. // "response": {
  9094. // "$ref": "DeveloperMetadata"
  9095. // },
  9096. // "scopes": [
  9097. // "https://www.googleapis.com/auth/drive",
  9098. // "https://www.googleapis.com/auth/drive.file",
  9099. // "https://www.googleapis.com/auth/spreadsheets"
  9100. // ]
  9101. // }
  9102. }
  9103. // method id "sheets.spreadsheets.developerMetadata.search":
  9104. type SpreadsheetsDeveloperMetadataSearchCall struct {
  9105. s *Service
  9106. spreadsheetId string
  9107. searchdevelopermetadatarequest *SearchDeveloperMetadataRequest
  9108. urlParams_ gensupport.URLParams
  9109. ctx_ context.Context
  9110. header_ http.Header
  9111. }
  9112. // Search: Returns all developer metadata matching the specified
  9113. // DataFilter.
  9114. // If the provided DataFilter represents a DeveloperMetadataLookup
  9115. // object,
  9116. // this will return all DeveloperMetadata entries selected by it. If
  9117. // the
  9118. // DataFilter represents a location in a spreadsheet, this will return
  9119. // all
  9120. // developer metadata associated with locations intersecting that
  9121. // region.
  9122. func (r *SpreadsheetsDeveloperMetadataService) Search(spreadsheetId string, searchdevelopermetadatarequest *SearchDeveloperMetadataRequest) *SpreadsheetsDeveloperMetadataSearchCall {
  9123. c := &SpreadsheetsDeveloperMetadataSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9124. c.spreadsheetId = spreadsheetId
  9125. c.searchdevelopermetadatarequest = searchdevelopermetadatarequest
  9126. return c
  9127. }
  9128. // Fields allows partial responses to be retrieved. See
  9129. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9130. // for more information.
  9131. func (c *SpreadsheetsDeveloperMetadataSearchCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataSearchCall {
  9132. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9133. return c
  9134. }
  9135. // Context sets the context to be used in this call's Do method. Any
  9136. // pending HTTP request will be aborted if the provided context is
  9137. // canceled.
  9138. func (c *SpreadsheetsDeveloperMetadataSearchCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataSearchCall {
  9139. c.ctx_ = ctx
  9140. return c
  9141. }
  9142. // Header returns an http.Header that can be modified by the caller to
  9143. // add HTTP headers to the request.
  9144. func (c *SpreadsheetsDeveloperMetadataSearchCall) Header() http.Header {
  9145. if c.header_ == nil {
  9146. c.header_ = make(http.Header)
  9147. }
  9148. return c.header_
  9149. }
  9150. func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.Response, error) {
  9151. reqHeaders := make(http.Header)
  9152. for k, v := range c.header_ {
  9153. reqHeaders[k] = v
  9154. }
  9155. reqHeaders.Set("User-Agent", c.s.userAgent())
  9156. var body io.Reader = nil
  9157. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchdevelopermetadatarequest)
  9158. if err != nil {
  9159. return nil, err
  9160. }
  9161. reqHeaders.Set("Content-Type", "application/json")
  9162. c.urlParams_.Set("alt", alt)
  9163. c.urlParams_.Set("prettyPrint", "false")
  9164. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search")
  9165. urls += "?" + c.urlParams_.Encode()
  9166. req, err := http.NewRequest("POST", urls, body)
  9167. if err != nil {
  9168. return nil, err
  9169. }
  9170. req.Header = reqHeaders
  9171. googleapi.Expand(req.URL, map[string]string{
  9172. "spreadsheetId": c.spreadsheetId,
  9173. })
  9174. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9175. }
  9176. // Do executes the "sheets.spreadsheets.developerMetadata.search" call.
  9177. // Exactly one of *SearchDeveloperMetadataResponse or error will be
  9178. // non-nil. Any non-2xx status code is an error. Response headers are in
  9179. // either *SearchDeveloperMetadataResponse.ServerResponse.Header or (if
  9180. // a response was returned at all) in error.(*googleapi.Error).Header.
  9181. // Use googleapi.IsNotModified to check whether the returned error was
  9182. // because http.StatusNotModified was returned.
  9183. func (c *SpreadsheetsDeveloperMetadataSearchCall) Do(opts ...googleapi.CallOption) (*SearchDeveloperMetadataResponse, error) {
  9184. gensupport.SetOptions(c.urlParams_, opts...)
  9185. res, err := c.doRequest("json")
  9186. if res != nil && res.StatusCode == http.StatusNotModified {
  9187. if res.Body != nil {
  9188. res.Body.Close()
  9189. }
  9190. return nil, &googleapi.Error{
  9191. Code: res.StatusCode,
  9192. Header: res.Header,
  9193. }
  9194. }
  9195. if err != nil {
  9196. return nil, err
  9197. }
  9198. defer googleapi.CloseBody(res)
  9199. if err := googleapi.CheckResponse(res); err != nil {
  9200. return nil, err
  9201. }
  9202. ret := &SearchDeveloperMetadataResponse{
  9203. ServerResponse: googleapi.ServerResponse{
  9204. Header: res.Header,
  9205. HTTPStatusCode: res.StatusCode,
  9206. },
  9207. }
  9208. target := &ret
  9209. if err := gensupport.DecodeResponse(target, res); err != nil {
  9210. return nil, err
  9211. }
  9212. return ret, nil
  9213. // {
  9214. // "description": "Returns all developer metadata matching the specified DataFilter.\nIf the provided DataFilter represents a DeveloperMetadataLookup object,\nthis will return all DeveloperMetadata entries selected by it. If the\nDataFilter represents a location in a spreadsheet, this will return all\ndeveloper metadata associated with locations intersecting that region.",
  9215. // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search",
  9216. // "httpMethod": "POST",
  9217. // "id": "sheets.spreadsheets.developerMetadata.search",
  9218. // "parameterOrder": [
  9219. // "spreadsheetId"
  9220. // ],
  9221. // "parameters": {
  9222. // "spreadsheetId": {
  9223. // "description": "The ID of the spreadsheet to retrieve metadata from.",
  9224. // "location": "path",
  9225. // "required": true,
  9226. // "type": "string"
  9227. // }
  9228. // },
  9229. // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search",
  9230. // "request": {
  9231. // "$ref": "SearchDeveloperMetadataRequest"
  9232. // },
  9233. // "response": {
  9234. // "$ref": "SearchDeveloperMetadataResponse"
  9235. // },
  9236. // "scopes": [
  9237. // "https://www.googleapis.com/auth/drive",
  9238. // "https://www.googleapis.com/auth/drive.file",
  9239. // "https://www.googleapis.com/auth/spreadsheets"
  9240. // ]
  9241. // }
  9242. }
  9243. // method id "sheets.spreadsheets.sheets.copyTo":
  9244. type SpreadsheetsSheetsCopyToCall struct {
  9245. s *Service
  9246. spreadsheetId string
  9247. sheetId int64
  9248. copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest
  9249. urlParams_ gensupport.URLParams
  9250. ctx_ context.Context
  9251. header_ http.Header
  9252. }
  9253. // CopyTo: Copies a single sheet from a spreadsheet to another
  9254. // spreadsheet.
  9255. // Returns the properties of the newly created sheet.
  9256. func (r *SpreadsheetsSheetsService) CopyTo(spreadsheetId string, sheetId int64, copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest) *SpreadsheetsSheetsCopyToCall {
  9257. c := &SpreadsheetsSheetsCopyToCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9258. c.spreadsheetId = spreadsheetId
  9259. c.sheetId = sheetId
  9260. c.copysheettoanotherspreadsheetrequest = copysheettoanotherspreadsheetrequest
  9261. return c
  9262. }
  9263. // Fields allows partial responses to be retrieved. See
  9264. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9265. // for more information.
  9266. func (c *SpreadsheetsSheetsCopyToCall) Fields(s ...googleapi.Field) *SpreadsheetsSheetsCopyToCall {
  9267. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9268. return c
  9269. }
  9270. // Context sets the context to be used in this call's Do method. Any
  9271. // pending HTTP request will be aborted if the provided context is
  9272. // canceled.
  9273. func (c *SpreadsheetsSheetsCopyToCall) Context(ctx context.Context) *SpreadsheetsSheetsCopyToCall {
  9274. c.ctx_ = ctx
  9275. return c
  9276. }
  9277. // Header returns an http.Header that can be modified by the caller to
  9278. // add HTTP headers to the request.
  9279. func (c *SpreadsheetsSheetsCopyToCall) Header() http.Header {
  9280. if c.header_ == nil {
  9281. c.header_ = make(http.Header)
  9282. }
  9283. return c.header_
  9284. }
  9285. func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, error) {
  9286. reqHeaders := make(http.Header)
  9287. for k, v := range c.header_ {
  9288. reqHeaders[k] = v
  9289. }
  9290. reqHeaders.Set("User-Agent", c.s.userAgent())
  9291. var body io.Reader = nil
  9292. body, err := googleapi.WithoutDataWrapper.JSONReader(c.copysheettoanotherspreadsheetrequest)
  9293. if err != nil {
  9294. return nil, err
  9295. }
  9296. reqHeaders.Set("Content-Type", "application/json")
  9297. c.urlParams_.Set("alt", alt)
  9298. c.urlParams_.Set("prettyPrint", "false")
  9299. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo")
  9300. urls += "?" + c.urlParams_.Encode()
  9301. req, err := http.NewRequest("POST", urls, body)
  9302. if err != nil {
  9303. return nil, err
  9304. }
  9305. req.Header = reqHeaders
  9306. googleapi.Expand(req.URL, map[string]string{
  9307. "spreadsheetId": c.spreadsheetId,
  9308. "sheetId": strconv.FormatInt(c.sheetId, 10),
  9309. })
  9310. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9311. }
  9312. // Do executes the "sheets.spreadsheets.sheets.copyTo" call.
  9313. // Exactly one of *SheetProperties or error will be non-nil. Any non-2xx
  9314. // status code is an error. Response headers are in either
  9315. // *SheetProperties.ServerResponse.Header or (if a response was returned
  9316. // at all) in error.(*googleapi.Error).Header. Use
  9317. // googleapi.IsNotModified to check whether the returned error was
  9318. // because http.StatusNotModified was returned.
  9319. func (c *SpreadsheetsSheetsCopyToCall) Do(opts ...googleapi.CallOption) (*SheetProperties, error) {
  9320. gensupport.SetOptions(c.urlParams_, opts...)
  9321. res, err := c.doRequest("json")
  9322. if res != nil && res.StatusCode == http.StatusNotModified {
  9323. if res.Body != nil {
  9324. res.Body.Close()
  9325. }
  9326. return nil, &googleapi.Error{
  9327. Code: res.StatusCode,
  9328. Header: res.Header,
  9329. }
  9330. }
  9331. if err != nil {
  9332. return nil, err
  9333. }
  9334. defer googleapi.CloseBody(res)
  9335. if err := googleapi.CheckResponse(res); err != nil {
  9336. return nil, err
  9337. }
  9338. ret := &SheetProperties{
  9339. ServerResponse: googleapi.ServerResponse{
  9340. Header: res.Header,
  9341. HTTPStatusCode: res.StatusCode,
  9342. },
  9343. }
  9344. target := &ret
  9345. if err := gensupport.DecodeResponse(target, res); err != nil {
  9346. return nil, err
  9347. }
  9348. return ret, nil
  9349. // {
  9350. // "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.",
  9351. // "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo",
  9352. // "httpMethod": "POST",
  9353. // "id": "sheets.spreadsheets.sheets.copyTo",
  9354. // "parameterOrder": [
  9355. // "spreadsheetId",
  9356. // "sheetId"
  9357. // ],
  9358. // "parameters": {
  9359. // "sheetId": {
  9360. // "description": "The ID of the sheet to copy.",
  9361. // "format": "int32",
  9362. // "location": "path",
  9363. // "required": true,
  9364. // "type": "integer"
  9365. // },
  9366. // "spreadsheetId": {
  9367. // "description": "The ID of the spreadsheet containing the sheet to copy.",
  9368. // "location": "path",
  9369. // "required": true,
  9370. // "type": "string"
  9371. // }
  9372. // },
  9373. // "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo",
  9374. // "request": {
  9375. // "$ref": "CopySheetToAnotherSpreadsheetRequest"
  9376. // },
  9377. // "response": {
  9378. // "$ref": "SheetProperties"
  9379. // },
  9380. // "scopes": [
  9381. // "https://www.googleapis.com/auth/drive",
  9382. // "https://www.googleapis.com/auth/drive.file",
  9383. // "https://www.googleapis.com/auth/spreadsheets"
  9384. // ]
  9385. // }
  9386. }
  9387. // method id "sheets.spreadsheets.values.append":
  9388. type SpreadsheetsValuesAppendCall struct {
  9389. s *Service
  9390. spreadsheetId string
  9391. range_ string
  9392. valuerange *ValueRange
  9393. urlParams_ gensupport.URLParams
  9394. ctx_ context.Context
  9395. header_ http.Header
  9396. }
  9397. // Append: Appends values to a spreadsheet. The input range is used to
  9398. // search for
  9399. // existing data and find a "table" within that range. Values will
  9400. // be
  9401. // appended to the next row of the table, starting with the first column
  9402. // of
  9403. // the table. See
  9404. // the
  9405. // [guide](/sheets/api/guides/values#appending_values)
  9406. // and
  9407. // [sample code](/sheets/api/samples/writing#append_values)
  9408. // for specific details of how tables are detected and data is
  9409. // appended.
  9410. //
  9411. // The caller must specify the spreadsheet ID, range, and
  9412. // a valueInputOption. The `valueInputOption` only
  9413. // controls how the input data will be added to the sheet (column-wise
  9414. // or
  9415. // row-wise), it does not influence what cell the data starts being
  9416. // written
  9417. // to.
  9418. func (r *SpreadsheetsValuesService) Append(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesAppendCall {
  9419. c := &SpreadsheetsValuesAppendCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9420. c.spreadsheetId = spreadsheetId
  9421. c.range_ = range_
  9422. c.valuerange = valuerange
  9423. return c
  9424. }
  9425. // IncludeValuesInResponse sets the optional parameter
  9426. // "includeValuesInResponse": Determines if the update response should
  9427. // include the values
  9428. // of the cells that were appended. By default, responses
  9429. // do not include the updated values.
  9430. func (c *SpreadsheetsValuesAppendCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesAppendCall {
  9431. c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse))
  9432. return c
  9433. }
  9434. // InsertDataOption sets the optional parameter "insertDataOption": How
  9435. // the input data should be inserted.
  9436. //
  9437. // Possible values:
  9438. // "OVERWRITE"
  9439. // "INSERT_ROWS"
  9440. func (c *SpreadsheetsValuesAppendCall) InsertDataOption(insertDataOption string) *SpreadsheetsValuesAppendCall {
  9441. c.urlParams_.Set("insertDataOption", insertDataOption)
  9442. return c
  9443. }
  9444. // ResponseDateTimeRenderOption sets the optional parameter
  9445. // "responseDateTimeRenderOption": Determines how dates, times, and
  9446. // durations in the response should be
  9447. // rendered. This is ignored if response_value_render_option
  9448. // is
  9449. // FORMATTED_VALUE.
  9450. // The default dateTime render option is
  9451. // [DateTimeRenderOption.SERIAL_NUMBER].
  9452. //
  9453. // Possible values:
  9454. // "SERIAL_NUMBER"
  9455. // "FORMATTED_STRING"
  9456. func (c *SpreadsheetsValuesAppendCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesAppendCall {
  9457. c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption)
  9458. return c
  9459. }
  9460. // ResponseValueRenderOption sets the optional parameter
  9461. // "responseValueRenderOption": Determines how values in the response
  9462. // should be rendered.
  9463. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  9464. //
  9465. // Possible values:
  9466. // "FORMATTED_VALUE"
  9467. // "UNFORMATTED_VALUE"
  9468. // "FORMULA"
  9469. func (c *SpreadsheetsValuesAppendCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesAppendCall {
  9470. c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption)
  9471. return c
  9472. }
  9473. // ValueInputOption sets the optional parameter "valueInputOption": How
  9474. // the input data should be interpreted.
  9475. //
  9476. // Possible values:
  9477. // "INPUT_VALUE_OPTION_UNSPECIFIED"
  9478. // "RAW"
  9479. // "USER_ENTERED"
  9480. func (c *SpreadsheetsValuesAppendCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesAppendCall {
  9481. c.urlParams_.Set("valueInputOption", valueInputOption)
  9482. return c
  9483. }
  9484. // Fields allows partial responses to be retrieved. See
  9485. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9486. // for more information.
  9487. func (c *SpreadsheetsValuesAppendCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesAppendCall {
  9488. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9489. return c
  9490. }
  9491. // Context sets the context to be used in this call's Do method. Any
  9492. // pending HTTP request will be aborted if the provided context is
  9493. // canceled.
  9494. func (c *SpreadsheetsValuesAppendCall) Context(ctx context.Context) *SpreadsheetsValuesAppendCall {
  9495. c.ctx_ = ctx
  9496. return c
  9497. }
  9498. // Header returns an http.Header that can be modified by the caller to
  9499. // add HTTP headers to the request.
  9500. func (c *SpreadsheetsValuesAppendCall) Header() http.Header {
  9501. if c.header_ == nil {
  9502. c.header_ = make(http.Header)
  9503. }
  9504. return c.header_
  9505. }
  9506. func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, error) {
  9507. reqHeaders := make(http.Header)
  9508. for k, v := range c.header_ {
  9509. reqHeaders[k] = v
  9510. }
  9511. reqHeaders.Set("User-Agent", c.s.userAgent())
  9512. var body io.Reader = nil
  9513. body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange)
  9514. if err != nil {
  9515. return nil, err
  9516. }
  9517. reqHeaders.Set("Content-Type", "application/json")
  9518. c.urlParams_.Set("alt", alt)
  9519. c.urlParams_.Set("prettyPrint", "false")
  9520. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append")
  9521. urls += "?" + c.urlParams_.Encode()
  9522. req, err := http.NewRequest("POST", urls, body)
  9523. if err != nil {
  9524. return nil, err
  9525. }
  9526. req.Header = reqHeaders
  9527. googleapi.Expand(req.URL, map[string]string{
  9528. "spreadsheetId": c.spreadsheetId,
  9529. "range": c.range_,
  9530. })
  9531. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9532. }
  9533. // Do executes the "sheets.spreadsheets.values.append" call.
  9534. // Exactly one of *AppendValuesResponse or error will be non-nil. Any
  9535. // non-2xx status code is an error. Response headers are in either
  9536. // *AppendValuesResponse.ServerResponse.Header or (if a response was
  9537. // returned at all) in error.(*googleapi.Error).Header. Use
  9538. // googleapi.IsNotModified to check whether the returned error was
  9539. // because http.StatusNotModified was returned.
  9540. func (c *SpreadsheetsValuesAppendCall) Do(opts ...googleapi.CallOption) (*AppendValuesResponse, error) {
  9541. gensupport.SetOptions(c.urlParams_, opts...)
  9542. res, err := c.doRequest("json")
  9543. if res != nil && res.StatusCode == http.StatusNotModified {
  9544. if res.Body != nil {
  9545. res.Body.Close()
  9546. }
  9547. return nil, &googleapi.Error{
  9548. Code: res.StatusCode,
  9549. Header: res.Header,
  9550. }
  9551. }
  9552. if err != nil {
  9553. return nil, err
  9554. }
  9555. defer googleapi.CloseBody(res)
  9556. if err := googleapi.CheckResponse(res); err != nil {
  9557. return nil, err
  9558. }
  9559. ret := &AppendValuesResponse{
  9560. ServerResponse: googleapi.ServerResponse{
  9561. Header: res.Header,
  9562. HTTPStatusCode: res.StatusCode,
  9563. },
  9564. }
  9565. target := &ret
  9566. if err := gensupport.DecodeResponse(target, res); err != nil {
  9567. return nil, err
  9568. }
  9569. return ret, nil
  9570. // {
  9571. // "description": "Appends values to a spreadsheet. The input range is used to search for\nexisting data and find a \"table\" within that range. Values will be\nappended to the next row of the table, starting with the first column of\nthe table. See the\n[guide](/sheets/api/guides/values#appending_values)\nand\n[sample code](/sheets/api/samples/writing#append_values)\nfor specific details of how tables are detected and data is appended.\n\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption. The `valueInputOption` only\ncontrols how the input data will be added to the sheet (column-wise or\nrow-wise), it does not influence what cell the data starts being written\nto.",
  9572. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
  9573. // "httpMethod": "POST",
  9574. // "id": "sheets.spreadsheets.values.append",
  9575. // "parameterOrder": [
  9576. // "spreadsheetId",
  9577. // "range"
  9578. // ],
  9579. // "parameters": {
  9580. // "includeValuesInResponse": {
  9581. // "description": "Determines if the update response should include the values\nof the cells that were appended. By default, responses\ndo not include the updated values.",
  9582. // "location": "query",
  9583. // "type": "boolean"
  9584. // },
  9585. // "insertDataOption": {
  9586. // "description": "How the input data should be inserted.",
  9587. // "enum": [
  9588. // "OVERWRITE",
  9589. // "INSERT_ROWS"
  9590. // ],
  9591. // "location": "query",
  9592. // "type": "string"
  9593. // },
  9594. // "range": {
  9595. // "description": "The A1 notation of a range to search for a logical table of data.\nValues will be appended after the last row of the table.",
  9596. // "location": "path",
  9597. // "required": true,
  9598. // "type": "string"
  9599. // },
  9600. // "responseDateTimeRenderOption": {
  9601. // "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].",
  9602. // "enum": [
  9603. // "SERIAL_NUMBER",
  9604. // "FORMATTED_STRING"
  9605. // ],
  9606. // "location": "query",
  9607. // "type": "string"
  9608. // },
  9609. // "responseValueRenderOption": {
  9610. // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  9611. // "enum": [
  9612. // "FORMATTED_VALUE",
  9613. // "UNFORMATTED_VALUE",
  9614. // "FORMULA"
  9615. // ],
  9616. // "location": "query",
  9617. // "type": "string"
  9618. // },
  9619. // "spreadsheetId": {
  9620. // "description": "The ID of the spreadsheet to update.",
  9621. // "location": "path",
  9622. // "required": true,
  9623. // "type": "string"
  9624. // },
  9625. // "valueInputOption": {
  9626. // "description": "How the input data should be interpreted.",
  9627. // "enum": [
  9628. // "INPUT_VALUE_OPTION_UNSPECIFIED",
  9629. // "RAW",
  9630. // "USER_ENTERED"
  9631. // ],
  9632. // "location": "query",
  9633. // "type": "string"
  9634. // }
  9635. // },
  9636. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
  9637. // "request": {
  9638. // "$ref": "ValueRange"
  9639. // },
  9640. // "response": {
  9641. // "$ref": "AppendValuesResponse"
  9642. // },
  9643. // "scopes": [
  9644. // "https://www.googleapis.com/auth/drive",
  9645. // "https://www.googleapis.com/auth/drive.file",
  9646. // "https://www.googleapis.com/auth/spreadsheets"
  9647. // ]
  9648. // }
  9649. }
  9650. // method id "sheets.spreadsheets.values.batchClear":
  9651. type SpreadsheetsValuesBatchClearCall struct {
  9652. s *Service
  9653. spreadsheetId string
  9654. batchclearvaluesrequest *BatchClearValuesRequest
  9655. urlParams_ gensupport.URLParams
  9656. ctx_ context.Context
  9657. header_ http.Header
  9658. }
  9659. // BatchClear: Clears one or more ranges of values from a
  9660. // spreadsheet.
  9661. // The caller must specify the spreadsheet ID and one or more
  9662. // ranges.
  9663. // Only values are cleared -- all other properties of the cell (such
  9664. // as
  9665. // formatting, data validation, etc..) are kept.
  9666. func (r *SpreadsheetsValuesService) BatchClear(spreadsheetId string, batchclearvaluesrequest *BatchClearValuesRequest) *SpreadsheetsValuesBatchClearCall {
  9667. c := &SpreadsheetsValuesBatchClearCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9668. c.spreadsheetId = spreadsheetId
  9669. c.batchclearvaluesrequest = batchclearvaluesrequest
  9670. return c
  9671. }
  9672. // Fields allows partial responses to be retrieved. See
  9673. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9674. // for more information.
  9675. func (c *SpreadsheetsValuesBatchClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearCall {
  9676. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9677. return c
  9678. }
  9679. // Context sets the context to be used in this call's Do method. Any
  9680. // pending HTTP request will be aborted if the provided context is
  9681. // canceled.
  9682. func (c *SpreadsheetsValuesBatchClearCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearCall {
  9683. c.ctx_ = ctx
  9684. return c
  9685. }
  9686. // Header returns an http.Header that can be modified by the caller to
  9687. // add HTTP headers to the request.
  9688. func (c *SpreadsheetsValuesBatchClearCall) Header() http.Header {
  9689. if c.header_ == nil {
  9690. c.header_ = make(http.Header)
  9691. }
  9692. return c.header_
  9693. }
  9694. func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response, error) {
  9695. reqHeaders := make(http.Header)
  9696. for k, v := range c.header_ {
  9697. reqHeaders[k] = v
  9698. }
  9699. reqHeaders.Set("User-Agent", c.s.userAgent())
  9700. var body io.Reader = nil
  9701. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesrequest)
  9702. if err != nil {
  9703. return nil, err
  9704. }
  9705. reqHeaders.Set("Content-Type", "application/json")
  9706. c.urlParams_.Set("alt", alt)
  9707. c.urlParams_.Set("prettyPrint", "false")
  9708. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear")
  9709. urls += "?" + c.urlParams_.Encode()
  9710. req, err := http.NewRequest("POST", urls, body)
  9711. if err != nil {
  9712. return nil, err
  9713. }
  9714. req.Header = reqHeaders
  9715. googleapi.Expand(req.URL, map[string]string{
  9716. "spreadsheetId": c.spreadsheetId,
  9717. })
  9718. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9719. }
  9720. // Do executes the "sheets.spreadsheets.values.batchClear" call.
  9721. // Exactly one of *BatchClearValuesResponse or error will be non-nil.
  9722. // Any non-2xx status code is an error. Response headers are in either
  9723. // *BatchClearValuesResponse.ServerResponse.Header or (if a response was
  9724. // returned at all) in error.(*googleapi.Error).Header. Use
  9725. // googleapi.IsNotModified to check whether the returned error was
  9726. // because http.StatusNotModified was returned.
  9727. func (c *SpreadsheetsValuesBatchClearCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesResponse, error) {
  9728. gensupport.SetOptions(c.urlParams_, opts...)
  9729. res, err := c.doRequest("json")
  9730. if res != nil && res.StatusCode == http.StatusNotModified {
  9731. if res.Body != nil {
  9732. res.Body.Close()
  9733. }
  9734. return nil, &googleapi.Error{
  9735. Code: res.StatusCode,
  9736. Header: res.Header,
  9737. }
  9738. }
  9739. if err != nil {
  9740. return nil, err
  9741. }
  9742. defer googleapi.CloseBody(res)
  9743. if err := googleapi.CheckResponse(res); err != nil {
  9744. return nil, err
  9745. }
  9746. ret := &BatchClearValuesResponse{
  9747. ServerResponse: googleapi.ServerResponse{
  9748. Header: res.Header,
  9749. HTTPStatusCode: res.StatusCode,
  9750. },
  9751. }
  9752. target := &ret
  9753. if err := gensupport.DecodeResponse(target, res); err != nil {
  9754. return nil, err
  9755. }
  9756. return ret, nil
  9757. // {
  9758. // "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.",
  9759. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
  9760. // "httpMethod": "POST",
  9761. // "id": "sheets.spreadsheets.values.batchClear",
  9762. // "parameterOrder": [
  9763. // "spreadsheetId"
  9764. // ],
  9765. // "parameters": {
  9766. // "spreadsheetId": {
  9767. // "description": "The ID of the spreadsheet to update.",
  9768. // "location": "path",
  9769. // "required": true,
  9770. // "type": "string"
  9771. // }
  9772. // },
  9773. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
  9774. // "request": {
  9775. // "$ref": "BatchClearValuesRequest"
  9776. // },
  9777. // "response": {
  9778. // "$ref": "BatchClearValuesResponse"
  9779. // },
  9780. // "scopes": [
  9781. // "https://www.googleapis.com/auth/drive",
  9782. // "https://www.googleapis.com/auth/drive.file",
  9783. // "https://www.googleapis.com/auth/spreadsheets"
  9784. // ]
  9785. // }
  9786. }
  9787. // method id "sheets.spreadsheets.values.batchClearByDataFilter":
  9788. type SpreadsheetsValuesBatchClearByDataFilterCall struct {
  9789. s *Service
  9790. spreadsheetId string
  9791. batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest
  9792. urlParams_ gensupport.URLParams
  9793. ctx_ context.Context
  9794. header_ http.Header
  9795. }
  9796. // BatchClearByDataFilter: Clears one or more ranges of values from a
  9797. // spreadsheet.
  9798. // The caller must specify the spreadsheet ID and one or
  9799. // more
  9800. // DataFilters. Ranges matching any of the specified data
  9801. // filters will be cleared. Only values are cleared -- all other
  9802. // properties
  9803. // of the cell (such as formatting, data validation, etc..) are kept.
  9804. func (r *SpreadsheetsValuesService) BatchClearByDataFilter(spreadsheetId string, batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest) *SpreadsheetsValuesBatchClearByDataFilterCall {
  9805. c := &SpreadsheetsValuesBatchClearByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9806. c.spreadsheetId = spreadsheetId
  9807. c.batchclearvaluesbydatafilterrequest = batchclearvaluesbydatafilterrequest
  9808. return c
  9809. }
  9810. // Fields allows partial responses to be retrieved. See
  9811. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9812. // for more information.
  9813. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearByDataFilterCall {
  9814. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9815. return c
  9816. }
  9817. // Context sets the context to be used in this call's Do method. Any
  9818. // pending HTTP request will be aborted if the provided context is
  9819. // canceled.
  9820. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearByDataFilterCall {
  9821. c.ctx_ = ctx
  9822. return c
  9823. }
  9824. // Header returns an http.Header that can be modified by the caller to
  9825. // add HTTP headers to the request.
  9826. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Header() http.Header {
  9827. if c.header_ == nil {
  9828. c.header_ = make(http.Header)
  9829. }
  9830. return c.header_
  9831. }
  9832. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  9833. reqHeaders := make(http.Header)
  9834. for k, v := range c.header_ {
  9835. reqHeaders[k] = v
  9836. }
  9837. reqHeaders.Set("User-Agent", c.s.userAgent())
  9838. var body io.Reader = nil
  9839. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesbydatafilterrequest)
  9840. if err != nil {
  9841. return nil, err
  9842. }
  9843. reqHeaders.Set("Content-Type", "application/json")
  9844. c.urlParams_.Set("alt", alt)
  9845. c.urlParams_.Set("prettyPrint", "false")
  9846. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter")
  9847. urls += "?" + c.urlParams_.Encode()
  9848. req, err := http.NewRequest("POST", urls, body)
  9849. if err != nil {
  9850. return nil, err
  9851. }
  9852. req.Header = reqHeaders
  9853. googleapi.Expand(req.URL, map[string]string{
  9854. "spreadsheetId": c.spreadsheetId,
  9855. })
  9856. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9857. }
  9858. // Do executes the "sheets.spreadsheets.values.batchClearByDataFilter" call.
  9859. // Exactly one of *BatchClearValuesByDataFilterResponse or error will be
  9860. // non-nil. Any non-2xx status code is an error. Response headers are in
  9861. // either *BatchClearValuesByDataFilterResponse.ServerResponse.Header or
  9862. // (if a response was returned at all) in
  9863. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9864. // whether the returned error was because http.StatusNotModified was
  9865. // returned.
  9866. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesByDataFilterResponse, error) {
  9867. gensupport.SetOptions(c.urlParams_, opts...)
  9868. res, err := c.doRequest("json")
  9869. if res != nil && res.StatusCode == http.StatusNotModified {
  9870. if res.Body != nil {
  9871. res.Body.Close()
  9872. }
  9873. return nil, &googleapi.Error{
  9874. Code: res.StatusCode,
  9875. Header: res.Header,
  9876. }
  9877. }
  9878. if err != nil {
  9879. return nil, err
  9880. }
  9881. defer googleapi.CloseBody(res)
  9882. if err := googleapi.CheckResponse(res); err != nil {
  9883. return nil, err
  9884. }
  9885. ret := &BatchClearValuesByDataFilterResponse{
  9886. ServerResponse: googleapi.ServerResponse{
  9887. Header: res.Header,
  9888. HTTPStatusCode: res.StatusCode,
  9889. },
  9890. }
  9891. target := &ret
  9892. if err := gensupport.DecodeResponse(target, res); err != nil {
  9893. return nil, err
  9894. }
  9895. return ret, nil
  9896. // {
  9897. // "description": "Clears one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more\nDataFilters. Ranges matching any of the specified data\nfilters will be cleared. Only values are cleared -- all other properties\nof the cell (such as formatting, data validation, etc..) are kept.",
  9898. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter",
  9899. // "httpMethod": "POST",
  9900. // "id": "sheets.spreadsheets.values.batchClearByDataFilter",
  9901. // "parameterOrder": [
  9902. // "spreadsheetId"
  9903. // ],
  9904. // "parameters": {
  9905. // "spreadsheetId": {
  9906. // "description": "The ID of the spreadsheet to update.",
  9907. // "location": "path",
  9908. // "required": true,
  9909. // "type": "string"
  9910. // }
  9911. // },
  9912. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter",
  9913. // "request": {
  9914. // "$ref": "BatchClearValuesByDataFilterRequest"
  9915. // },
  9916. // "response": {
  9917. // "$ref": "BatchClearValuesByDataFilterResponse"
  9918. // },
  9919. // "scopes": [
  9920. // "https://www.googleapis.com/auth/drive",
  9921. // "https://www.googleapis.com/auth/drive.file",
  9922. // "https://www.googleapis.com/auth/spreadsheets"
  9923. // ]
  9924. // }
  9925. }
  9926. // method id "sheets.spreadsheets.values.batchGet":
  9927. type SpreadsheetsValuesBatchGetCall struct {
  9928. s *Service
  9929. spreadsheetId string
  9930. urlParams_ gensupport.URLParams
  9931. ifNoneMatch_ string
  9932. ctx_ context.Context
  9933. header_ http.Header
  9934. }
  9935. // BatchGet: Returns one or more ranges of values from a
  9936. // spreadsheet.
  9937. // The caller must specify the spreadsheet ID and one or more ranges.
  9938. func (r *SpreadsheetsValuesService) BatchGet(spreadsheetId string) *SpreadsheetsValuesBatchGetCall {
  9939. c := &SpreadsheetsValuesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9940. c.spreadsheetId = spreadsheetId
  9941. return c
  9942. }
  9943. // DateTimeRenderOption sets the optional parameter
  9944. // "dateTimeRenderOption": How dates, times, and durations should be
  9945. // represented in the output.
  9946. // This is ignored if value_render_option is
  9947. // FORMATTED_VALUE.
  9948. // The default dateTime render option is
  9949. // [DateTimeRenderOption.SERIAL_NUMBER].
  9950. //
  9951. // Possible values:
  9952. // "SERIAL_NUMBER"
  9953. // "FORMATTED_STRING"
  9954. func (c *SpreadsheetsValuesBatchGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesBatchGetCall {
  9955. c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption)
  9956. return c
  9957. }
  9958. // MajorDimension sets the optional parameter "majorDimension": The
  9959. // major dimension that results should use.
  9960. //
  9961. // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  9962. // then requesting `range=A1:B2,majorDimension=ROWS` will
  9963. // return
  9964. // `[[1,2],[3,4]]`,
  9965. // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will
  9966. // return
  9967. // `[[1,3],[2,4]]`.
  9968. //
  9969. // Possible values:
  9970. // "DIMENSION_UNSPECIFIED"
  9971. // "ROWS"
  9972. // "COLUMNS"
  9973. func (c *SpreadsheetsValuesBatchGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesBatchGetCall {
  9974. c.urlParams_.Set("majorDimension", majorDimension)
  9975. return c
  9976. }
  9977. // Ranges sets the optional parameter "ranges": The A1 notation of the
  9978. // values to retrieve.
  9979. func (c *SpreadsheetsValuesBatchGetCall) Ranges(ranges ...string) *SpreadsheetsValuesBatchGetCall {
  9980. c.urlParams_.SetMulti("ranges", append([]string{}, ranges...))
  9981. return c
  9982. }
  9983. // ValueRenderOption sets the optional parameter "valueRenderOption":
  9984. // How values should be represented in the output.
  9985. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  9986. //
  9987. // Possible values:
  9988. // "FORMATTED_VALUE"
  9989. // "UNFORMATTED_VALUE"
  9990. // "FORMULA"
  9991. func (c *SpreadsheetsValuesBatchGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesBatchGetCall {
  9992. c.urlParams_.Set("valueRenderOption", valueRenderOption)
  9993. return c
  9994. }
  9995. // Fields allows partial responses to be retrieved. See
  9996. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9997. // for more information.
  9998. func (c *SpreadsheetsValuesBatchGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetCall {
  9999. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10000. return c
  10001. }
  10002. // IfNoneMatch sets the optional parameter which makes the operation
  10003. // fail if the object's ETag matches the given value. This is useful for
  10004. // getting updates only after the object has changed since the last
  10005. // request. Use googleapi.IsNotModified to check whether the response
  10006. // error from Do is the result of In-None-Match.
  10007. func (c *SpreadsheetsValuesBatchGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesBatchGetCall {
  10008. c.ifNoneMatch_ = entityTag
  10009. return c
  10010. }
  10011. // Context sets the context to be used in this call's Do method. Any
  10012. // pending HTTP request will be aborted if the provided context is
  10013. // canceled.
  10014. func (c *SpreadsheetsValuesBatchGetCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetCall {
  10015. c.ctx_ = ctx
  10016. return c
  10017. }
  10018. // Header returns an http.Header that can be modified by the caller to
  10019. // add HTTP headers to the request.
  10020. func (c *SpreadsheetsValuesBatchGetCall) Header() http.Header {
  10021. if c.header_ == nil {
  10022. c.header_ = make(http.Header)
  10023. }
  10024. return c.header_
  10025. }
  10026. func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, error) {
  10027. reqHeaders := make(http.Header)
  10028. for k, v := range c.header_ {
  10029. reqHeaders[k] = v
  10030. }
  10031. reqHeaders.Set("User-Agent", c.s.userAgent())
  10032. if c.ifNoneMatch_ != "" {
  10033. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10034. }
  10035. var body io.Reader = nil
  10036. c.urlParams_.Set("alt", alt)
  10037. c.urlParams_.Set("prettyPrint", "false")
  10038. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet")
  10039. urls += "?" + c.urlParams_.Encode()
  10040. req, err := http.NewRequest("GET", urls, body)
  10041. if err != nil {
  10042. return nil, err
  10043. }
  10044. req.Header = reqHeaders
  10045. googleapi.Expand(req.URL, map[string]string{
  10046. "spreadsheetId": c.spreadsheetId,
  10047. })
  10048. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10049. }
  10050. // Do executes the "sheets.spreadsheets.values.batchGet" call.
  10051. // Exactly one of *BatchGetValuesResponse or error will be non-nil. Any
  10052. // non-2xx status code is an error. Response headers are in either
  10053. // *BatchGetValuesResponse.ServerResponse.Header or (if a response was
  10054. // returned at all) in error.(*googleapi.Error).Header. Use
  10055. // googleapi.IsNotModified to check whether the returned error was
  10056. // because http.StatusNotModified was returned.
  10057. func (c *SpreadsheetsValuesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesResponse, error) {
  10058. gensupport.SetOptions(c.urlParams_, opts...)
  10059. res, err := c.doRequest("json")
  10060. if res != nil && res.StatusCode == http.StatusNotModified {
  10061. if res.Body != nil {
  10062. res.Body.Close()
  10063. }
  10064. return nil, &googleapi.Error{
  10065. Code: res.StatusCode,
  10066. Header: res.Header,
  10067. }
  10068. }
  10069. if err != nil {
  10070. return nil, err
  10071. }
  10072. defer googleapi.CloseBody(res)
  10073. if err := googleapi.CheckResponse(res); err != nil {
  10074. return nil, err
  10075. }
  10076. ret := &BatchGetValuesResponse{
  10077. ServerResponse: googleapi.ServerResponse{
  10078. Header: res.Header,
  10079. HTTPStatusCode: res.StatusCode,
  10080. },
  10081. }
  10082. target := &ret
  10083. if err := gensupport.DecodeResponse(target, res); err != nil {
  10084. return nil, err
  10085. }
  10086. return ret, nil
  10087. // {
  10088. // "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.",
  10089. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
  10090. // "httpMethod": "GET",
  10091. // "id": "sheets.spreadsheets.values.batchGet",
  10092. // "parameterOrder": [
  10093. // "spreadsheetId"
  10094. // ],
  10095. // "parameters": {
  10096. // "dateTimeRenderOption": {
  10097. // "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].",
  10098. // "enum": [
  10099. // "SERIAL_NUMBER",
  10100. // "FORMATTED_STRING"
  10101. // ],
  10102. // "location": "query",
  10103. // "type": "string"
  10104. // },
  10105. // "majorDimension": {
  10106. // "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.",
  10107. // "enum": [
  10108. // "DIMENSION_UNSPECIFIED",
  10109. // "ROWS",
  10110. // "COLUMNS"
  10111. // ],
  10112. // "location": "query",
  10113. // "type": "string"
  10114. // },
  10115. // "ranges": {
  10116. // "description": "The A1 notation of the values to retrieve.",
  10117. // "location": "query",
  10118. // "repeated": true,
  10119. // "type": "string"
  10120. // },
  10121. // "spreadsheetId": {
  10122. // "description": "The ID of the spreadsheet to retrieve data from.",
  10123. // "location": "path",
  10124. // "required": true,
  10125. // "type": "string"
  10126. // },
  10127. // "valueRenderOption": {
  10128. // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  10129. // "enum": [
  10130. // "FORMATTED_VALUE",
  10131. // "UNFORMATTED_VALUE",
  10132. // "FORMULA"
  10133. // ],
  10134. // "location": "query",
  10135. // "type": "string"
  10136. // }
  10137. // },
  10138. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
  10139. // "response": {
  10140. // "$ref": "BatchGetValuesResponse"
  10141. // },
  10142. // "scopes": [
  10143. // "https://www.googleapis.com/auth/drive",
  10144. // "https://www.googleapis.com/auth/drive.file",
  10145. // "https://www.googleapis.com/auth/drive.readonly",
  10146. // "https://www.googleapis.com/auth/spreadsheets",
  10147. // "https://www.googleapis.com/auth/spreadsheets.readonly"
  10148. // ]
  10149. // }
  10150. }
  10151. // method id "sheets.spreadsheets.values.batchGetByDataFilter":
  10152. type SpreadsheetsValuesBatchGetByDataFilterCall struct {
  10153. s *Service
  10154. spreadsheetId string
  10155. batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest
  10156. urlParams_ gensupport.URLParams
  10157. ctx_ context.Context
  10158. header_ http.Header
  10159. }
  10160. // BatchGetByDataFilter: Returns one or more ranges of values that match
  10161. // the specified data filters.
  10162. // The caller must specify the spreadsheet ID and one or
  10163. // more
  10164. // DataFilters. Ranges that match any of the data filters in
  10165. // the request will be returned.
  10166. func (r *SpreadsheetsValuesService) BatchGetByDataFilter(spreadsheetId string, batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest) *SpreadsheetsValuesBatchGetByDataFilterCall {
  10167. c := &SpreadsheetsValuesBatchGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10168. c.spreadsheetId = spreadsheetId
  10169. c.batchgetvaluesbydatafilterrequest = batchgetvaluesbydatafilterrequest
  10170. return c
  10171. }
  10172. // Fields allows partial responses to be retrieved. See
  10173. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10174. // for more information.
  10175. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetByDataFilterCall {
  10176. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10177. return c
  10178. }
  10179. // Context sets the context to be used in this call's Do method. Any
  10180. // pending HTTP request will be aborted if the provided context is
  10181. // canceled.
  10182. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetByDataFilterCall {
  10183. c.ctx_ = ctx
  10184. return c
  10185. }
  10186. // Header returns an http.Header that can be modified by the caller to
  10187. // add HTTP headers to the request.
  10188. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Header() http.Header {
  10189. if c.header_ == nil {
  10190. c.header_ = make(http.Header)
  10191. }
  10192. return c.header_
  10193. }
  10194. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  10195. reqHeaders := make(http.Header)
  10196. for k, v := range c.header_ {
  10197. reqHeaders[k] = v
  10198. }
  10199. reqHeaders.Set("User-Agent", c.s.userAgent())
  10200. var body io.Reader = nil
  10201. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetvaluesbydatafilterrequest)
  10202. if err != nil {
  10203. return nil, err
  10204. }
  10205. reqHeaders.Set("Content-Type", "application/json")
  10206. c.urlParams_.Set("alt", alt)
  10207. c.urlParams_.Set("prettyPrint", "false")
  10208. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter")
  10209. urls += "?" + c.urlParams_.Encode()
  10210. req, err := http.NewRequest("POST", urls, body)
  10211. if err != nil {
  10212. return nil, err
  10213. }
  10214. req.Header = reqHeaders
  10215. googleapi.Expand(req.URL, map[string]string{
  10216. "spreadsheetId": c.spreadsheetId,
  10217. })
  10218. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10219. }
  10220. // Do executes the "sheets.spreadsheets.values.batchGetByDataFilter" call.
  10221. // Exactly one of *BatchGetValuesByDataFilterResponse or error will be
  10222. // non-nil. Any non-2xx status code is an error. Response headers are in
  10223. // either *BatchGetValuesByDataFilterResponse.ServerResponse.Header or
  10224. // (if a response was returned at all) in
  10225. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10226. // whether the returned error was because http.StatusNotModified was
  10227. // returned.
  10228. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesByDataFilterResponse, error) {
  10229. gensupport.SetOptions(c.urlParams_, opts...)
  10230. res, err := c.doRequest("json")
  10231. if res != nil && res.StatusCode == http.StatusNotModified {
  10232. if res.Body != nil {
  10233. res.Body.Close()
  10234. }
  10235. return nil, &googleapi.Error{
  10236. Code: res.StatusCode,
  10237. Header: res.Header,
  10238. }
  10239. }
  10240. if err != nil {
  10241. return nil, err
  10242. }
  10243. defer googleapi.CloseBody(res)
  10244. if err := googleapi.CheckResponse(res); err != nil {
  10245. return nil, err
  10246. }
  10247. ret := &BatchGetValuesByDataFilterResponse{
  10248. ServerResponse: googleapi.ServerResponse{
  10249. Header: res.Header,
  10250. HTTPStatusCode: res.StatusCode,
  10251. },
  10252. }
  10253. target := &ret
  10254. if err := gensupport.DecodeResponse(target, res); err != nil {
  10255. return nil, err
  10256. }
  10257. return ret, nil
  10258. // {
  10259. // "description": "Returns one or more ranges of values that match the specified data filters.\nThe caller must specify the spreadsheet ID and one or more\nDataFilters. Ranges that match any of the data filters in\nthe request will be returned.",
  10260. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter",
  10261. // "httpMethod": "POST",
  10262. // "id": "sheets.spreadsheets.values.batchGetByDataFilter",
  10263. // "parameterOrder": [
  10264. // "spreadsheetId"
  10265. // ],
  10266. // "parameters": {
  10267. // "spreadsheetId": {
  10268. // "description": "The ID of the spreadsheet to retrieve data from.",
  10269. // "location": "path",
  10270. // "required": true,
  10271. // "type": "string"
  10272. // }
  10273. // },
  10274. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter",
  10275. // "request": {
  10276. // "$ref": "BatchGetValuesByDataFilterRequest"
  10277. // },
  10278. // "response": {
  10279. // "$ref": "BatchGetValuesByDataFilterResponse"
  10280. // },
  10281. // "scopes": [
  10282. // "https://www.googleapis.com/auth/drive",
  10283. // "https://www.googleapis.com/auth/drive.file",
  10284. // "https://www.googleapis.com/auth/spreadsheets"
  10285. // ]
  10286. // }
  10287. }
  10288. // method id "sheets.spreadsheets.values.batchUpdate":
  10289. type SpreadsheetsValuesBatchUpdateCall struct {
  10290. s *Service
  10291. spreadsheetId string
  10292. batchupdatevaluesrequest *BatchUpdateValuesRequest
  10293. urlParams_ gensupport.URLParams
  10294. ctx_ context.Context
  10295. header_ http.Header
  10296. }
  10297. // BatchUpdate: Sets values in one or more ranges of a spreadsheet.
  10298. // The caller must specify the spreadsheet ID,
  10299. // a valueInputOption, and one or more
  10300. // ValueRanges.
  10301. func (r *SpreadsheetsValuesService) BatchUpdate(spreadsheetId string, batchupdatevaluesrequest *BatchUpdateValuesRequest) *SpreadsheetsValuesBatchUpdateCall {
  10302. c := &SpreadsheetsValuesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10303. c.spreadsheetId = spreadsheetId
  10304. c.batchupdatevaluesrequest = batchupdatevaluesrequest
  10305. return c
  10306. }
  10307. // Fields allows partial responses to be retrieved. See
  10308. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10309. // for more information.
  10310. func (c *SpreadsheetsValuesBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateCall {
  10311. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10312. return c
  10313. }
  10314. // Context sets the context to be used in this call's Do method. Any
  10315. // pending HTTP request will be aborted if the provided context is
  10316. // canceled.
  10317. func (c *SpreadsheetsValuesBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateCall {
  10318. c.ctx_ = ctx
  10319. return c
  10320. }
  10321. // Header returns an http.Header that can be modified by the caller to
  10322. // add HTTP headers to the request.
  10323. func (c *SpreadsheetsValuesBatchUpdateCall) Header() http.Header {
  10324. if c.header_ == nil {
  10325. c.header_ = make(http.Header)
  10326. }
  10327. return c.header_
  10328. }
  10329. func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  10330. reqHeaders := make(http.Header)
  10331. for k, v := range c.header_ {
  10332. reqHeaders[k] = v
  10333. }
  10334. reqHeaders.Set("User-Agent", c.s.userAgent())
  10335. var body io.Reader = nil
  10336. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesrequest)
  10337. if err != nil {
  10338. return nil, err
  10339. }
  10340. reqHeaders.Set("Content-Type", "application/json")
  10341. c.urlParams_.Set("alt", alt)
  10342. c.urlParams_.Set("prettyPrint", "false")
  10343. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate")
  10344. urls += "?" + c.urlParams_.Encode()
  10345. req, err := http.NewRequest("POST", urls, body)
  10346. if err != nil {
  10347. return nil, err
  10348. }
  10349. req.Header = reqHeaders
  10350. googleapi.Expand(req.URL, map[string]string{
  10351. "spreadsheetId": c.spreadsheetId,
  10352. })
  10353. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10354. }
  10355. // Do executes the "sheets.spreadsheets.values.batchUpdate" call.
  10356. // Exactly one of *BatchUpdateValuesResponse or error will be non-nil.
  10357. // Any non-2xx status code is an error. Response headers are in either
  10358. // *BatchUpdateValuesResponse.ServerResponse.Header or (if a response
  10359. // was returned at all) in error.(*googleapi.Error).Header. Use
  10360. // googleapi.IsNotModified to check whether the returned error was
  10361. // because http.StatusNotModified was returned.
  10362. func (c *SpreadsheetsValuesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesResponse, error) {
  10363. gensupport.SetOptions(c.urlParams_, opts...)
  10364. res, err := c.doRequest("json")
  10365. if res != nil && res.StatusCode == http.StatusNotModified {
  10366. if res.Body != nil {
  10367. res.Body.Close()
  10368. }
  10369. return nil, &googleapi.Error{
  10370. Code: res.StatusCode,
  10371. Header: res.Header,
  10372. }
  10373. }
  10374. if err != nil {
  10375. return nil, err
  10376. }
  10377. defer googleapi.CloseBody(res)
  10378. if err := googleapi.CheckResponse(res); err != nil {
  10379. return nil, err
  10380. }
  10381. ret := &BatchUpdateValuesResponse{
  10382. ServerResponse: googleapi.ServerResponse{
  10383. Header: res.Header,
  10384. HTTPStatusCode: res.StatusCode,
  10385. },
  10386. }
  10387. target := &ret
  10388. if err := gensupport.DecodeResponse(target, res); err != nil {
  10389. return nil, err
  10390. }
  10391. return ret, nil
  10392. // {
  10393. // "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nValueRanges.",
  10394. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
  10395. // "httpMethod": "POST",
  10396. // "id": "sheets.spreadsheets.values.batchUpdate",
  10397. // "parameterOrder": [
  10398. // "spreadsheetId"
  10399. // ],
  10400. // "parameters": {
  10401. // "spreadsheetId": {
  10402. // "description": "The ID of the spreadsheet to update.",
  10403. // "location": "path",
  10404. // "required": true,
  10405. // "type": "string"
  10406. // }
  10407. // },
  10408. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
  10409. // "request": {
  10410. // "$ref": "BatchUpdateValuesRequest"
  10411. // },
  10412. // "response": {
  10413. // "$ref": "BatchUpdateValuesResponse"
  10414. // },
  10415. // "scopes": [
  10416. // "https://www.googleapis.com/auth/drive",
  10417. // "https://www.googleapis.com/auth/drive.file",
  10418. // "https://www.googleapis.com/auth/spreadsheets"
  10419. // ]
  10420. // }
  10421. }
  10422. // method id "sheets.spreadsheets.values.batchUpdateByDataFilter":
  10423. type SpreadsheetsValuesBatchUpdateByDataFilterCall struct {
  10424. s *Service
  10425. spreadsheetId string
  10426. batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest
  10427. urlParams_ gensupport.URLParams
  10428. ctx_ context.Context
  10429. header_ http.Header
  10430. }
  10431. // BatchUpdateByDataFilter: Sets values in one or more ranges of a
  10432. // spreadsheet.
  10433. // The caller must specify the spreadsheet ID,
  10434. // a valueInputOption, and one or more
  10435. // DataFilterValueRanges.
  10436. func (r *SpreadsheetsValuesService) BatchUpdateByDataFilter(spreadsheetId string, batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest) *SpreadsheetsValuesBatchUpdateByDataFilterCall {
  10437. c := &SpreadsheetsValuesBatchUpdateByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10438. c.spreadsheetId = spreadsheetId
  10439. c.batchupdatevaluesbydatafilterrequest = batchupdatevaluesbydatafilterrequest
  10440. return c
  10441. }
  10442. // Fields allows partial responses to be retrieved. See
  10443. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10444. // for more information.
  10445. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateByDataFilterCall {
  10446. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10447. return c
  10448. }
  10449. // Context sets the context to be used in this call's Do method. Any
  10450. // pending HTTP request will be aborted if the provided context is
  10451. // canceled.
  10452. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateByDataFilterCall {
  10453. c.ctx_ = ctx
  10454. return c
  10455. }
  10456. // Header returns an http.Header that can be modified by the caller to
  10457. // add HTTP headers to the request.
  10458. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Header() http.Header {
  10459. if c.header_ == nil {
  10460. c.header_ = make(http.Header)
  10461. }
  10462. return c.header_
  10463. }
  10464. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  10465. reqHeaders := make(http.Header)
  10466. for k, v := range c.header_ {
  10467. reqHeaders[k] = v
  10468. }
  10469. reqHeaders.Set("User-Agent", c.s.userAgent())
  10470. var body io.Reader = nil
  10471. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesbydatafilterrequest)
  10472. if err != nil {
  10473. return nil, err
  10474. }
  10475. reqHeaders.Set("Content-Type", "application/json")
  10476. c.urlParams_.Set("alt", alt)
  10477. c.urlParams_.Set("prettyPrint", "false")
  10478. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter")
  10479. urls += "?" + c.urlParams_.Encode()
  10480. req, err := http.NewRequest("POST", urls, body)
  10481. if err != nil {
  10482. return nil, err
  10483. }
  10484. req.Header = reqHeaders
  10485. googleapi.Expand(req.URL, map[string]string{
  10486. "spreadsheetId": c.spreadsheetId,
  10487. })
  10488. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10489. }
  10490. // Do executes the "sheets.spreadsheets.values.batchUpdateByDataFilter" call.
  10491. // Exactly one of *BatchUpdateValuesByDataFilterResponse or error will
  10492. // be non-nil. Any non-2xx status code is an error. Response headers are
  10493. // in either
  10494. // *BatchUpdateValuesByDataFilterResponse.ServerResponse.Header or (if a
  10495. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10496. // googleapi.IsNotModified to check whether the returned error was
  10497. // because http.StatusNotModified was returned.
  10498. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesByDataFilterResponse, error) {
  10499. gensupport.SetOptions(c.urlParams_, opts...)
  10500. res, err := c.doRequest("json")
  10501. if res != nil && res.StatusCode == http.StatusNotModified {
  10502. if res.Body != nil {
  10503. res.Body.Close()
  10504. }
  10505. return nil, &googleapi.Error{
  10506. Code: res.StatusCode,
  10507. Header: res.Header,
  10508. }
  10509. }
  10510. if err != nil {
  10511. return nil, err
  10512. }
  10513. defer googleapi.CloseBody(res)
  10514. if err := googleapi.CheckResponse(res); err != nil {
  10515. return nil, err
  10516. }
  10517. ret := &BatchUpdateValuesByDataFilterResponse{
  10518. ServerResponse: googleapi.ServerResponse{
  10519. Header: res.Header,
  10520. HTTPStatusCode: res.StatusCode,
  10521. },
  10522. }
  10523. target := &ret
  10524. if err := gensupport.DecodeResponse(target, res); err != nil {
  10525. return nil, err
  10526. }
  10527. return ret, nil
  10528. // {
  10529. // "description": "Sets values in one or more ranges of a spreadsheet.\nThe caller must specify the spreadsheet ID,\na valueInputOption, and one or more\nDataFilterValueRanges.",
  10530. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter",
  10531. // "httpMethod": "POST",
  10532. // "id": "sheets.spreadsheets.values.batchUpdateByDataFilter",
  10533. // "parameterOrder": [
  10534. // "spreadsheetId"
  10535. // ],
  10536. // "parameters": {
  10537. // "spreadsheetId": {
  10538. // "description": "The ID of the spreadsheet to update.",
  10539. // "location": "path",
  10540. // "required": true,
  10541. // "type": "string"
  10542. // }
  10543. // },
  10544. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter",
  10545. // "request": {
  10546. // "$ref": "BatchUpdateValuesByDataFilterRequest"
  10547. // },
  10548. // "response": {
  10549. // "$ref": "BatchUpdateValuesByDataFilterResponse"
  10550. // },
  10551. // "scopes": [
  10552. // "https://www.googleapis.com/auth/drive",
  10553. // "https://www.googleapis.com/auth/drive.file",
  10554. // "https://www.googleapis.com/auth/spreadsheets"
  10555. // ]
  10556. // }
  10557. }
  10558. // method id "sheets.spreadsheets.values.clear":
  10559. type SpreadsheetsValuesClearCall struct {
  10560. s *Service
  10561. spreadsheetId string
  10562. range_ string
  10563. clearvaluesrequest *ClearValuesRequest
  10564. urlParams_ gensupport.URLParams
  10565. ctx_ context.Context
  10566. header_ http.Header
  10567. }
  10568. // Clear: Clears values from a spreadsheet.
  10569. // The caller must specify the spreadsheet ID and range.
  10570. // Only values are cleared -- all other properties of the cell (such
  10571. // as
  10572. // formatting, data validation, etc..) are kept.
  10573. func (r *SpreadsheetsValuesService) Clear(spreadsheetId string, range_ string, clearvaluesrequest *ClearValuesRequest) *SpreadsheetsValuesClearCall {
  10574. c := &SpreadsheetsValuesClearCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10575. c.spreadsheetId = spreadsheetId
  10576. c.range_ = range_
  10577. c.clearvaluesrequest = clearvaluesrequest
  10578. return c
  10579. }
  10580. // Fields allows partial responses to be retrieved. See
  10581. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10582. // for more information.
  10583. func (c *SpreadsheetsValuesClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesClearCall {
  10584. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10585. return c
  10586. }
  10587. // Context sets the context to be used in this call's Do method. Any
  10588. // pending HTTP request will be aborted if the provided context is
  10589. // canceled.
  10590. func (c *SpreadsheetsValuesClearCall) Context(ctx context.Context) *SpreadsheetsValuesClearCall {
  10591. c.ctx_ = ctx
  10592. return c
  10593. }
  10594. // Header returns an http.Header that can be modified by the caller to
  10595. // add HTTP headers to the request.
  10596. func (c *SpreadsheetsValuesClearCall) Header() http.Header {
  10597. if c.header_ == nil {
  10598. c.header_ = make(http.Header)
  10599. }
  10600. return c.header_
  10601. }
  10602. func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, error) {
  10603. reqHeaders := make(http.Header)
  10604. for k, v := range c.header_ {
  10605. reqHeaders[k] = v
  10606. }
  10607. reqHeaders.Set("User-Agent", c.s.userAgent())
  10608. var body io.Reader = nil
  10609. body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearvaluesrequest)
  10610. if err != nil {
  10611. return nil, err
  10612. }
  10613. reqHeaders.Set("Content-Type", "application/json")
  10614. c.urlParams_.Set("alt", alt)
  10615. c.urlParams_.Set("prettyPrint", "false")
  10616. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear")
  10617. urls += "?" + c.urlParams_.Encode()
  10618. req, err := http.NewRequest("POST", urls, body)
  10619. if err != nil {
  10620. return nil, err
  10621. }
  10622. req.Header = reqHeaders
  10623. googleapi.Expand(req.URL, map[string]string{
  10624. "spreadsheetId": c.spreadsheetId,
  10625. "range": c.range_,
  10626. })
  10627. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10628. }
  10629. // Do executes the "sheets.spreadsheets.values.clear" call.
  10630. // Exactly one of *ClearValuesResponse or error will be non-nil. Any
  10631. // non-2xx status code is an error. Response headers are in either
  10632. // *ClearValuesResponse.ServerResponse.Header or (if a response was
  10633. // returned at all) in error.(*googleapi.Error).Header. Use
  10634. // googleapi.IsNotModified to check whether the returned error was
  10635. // because http.StatusNotModified was returned.
  10636. func (c *SpreadsheetsValuesClearCall) Do(opts ...googleapi.CallOption) (*ClearValuesResponse, error) {
  10637. gensupport.SetOptions(c.urlParams_, opts...)
  10638. res, err := c.doRequest("json")
  10639. if res != nil && res.StatusCode == http.StatusNotModified {
  10640. if res.Body != nil {
  10641. res.Body.Close()
  10642. }
  10643. return nil, &googleapi.Error{
  10644. Code: res.StatusCode,
  10645. Header: res.Header,
  10646. }
  10647. }
  10648. if err != nil {
  10649. return nil, err
  10650. }
  10651. defer googleapi.CloseBody(res)
  10652. if err := googleapi.CheckResponse(res); err != nil {
  10653. return nil, err
  10654. }
  10655. ret := &ClearValuesResponse{
  10656. ServerResponse: googleapi.ServerResponse{
  10657. Header: res.Header,
  10658. HTTPStatusCode: res.StatusCode,
  10659. },
  10660. }
  10661. target := &ret
  10662. if err := gensupport.DecodeResponse(target, res); err != nil {
  10663. return nil, err
  10664. }
  10665. return ret, nil
  10666. // {
  10667. // "description": "Clears values from a spreadsheet.\nThe caller must specify the spreadsheet ID and range.\nOnly values are cleared -- all other properties of the cell (such as\nformatting, data validation, etc..) are kept.",
  10668. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
  10669. // "httpMethod": "POST",
  10670. // "id": "sheets.spreadsheets.values.clear",
  10671. // "parameterOrder": [
  10672. // "spreadsheetId",
  10673. // "range"
  10674. // ],
  10675. // "parameters": {
  10676. // "range": {
  10677. // "description": "The A1 notation of the values to clear.",
  10678. // "location": "path",
  10679. // "required": true,
  10680. // "type": "string"
  10681. // },
  10682. // "spreadsheetId": {
  10683. // "description": "The ID of the spreadsheet to update.",
  10684. // "location": "path",
  10685. // "required": true,
  10686. // "type": "string"
  10687. // }
  10688. // },
  10689. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
  10690. // "request": {
  10691. // "$ref": "ClearValuesRequest"
  10692. // },
  10693. // "response": {
  10694. // "$ref": "ClearValuesResponse"
  10695. // },
  10696. // "scopes": [
  10697. // "https://www.googleapis.com/auth/drive",
  10698. // "https://www.googleapis.com/auth/drive.file",
  10699. // "https://www.googleapis.com/auth/spreadsheets"
  10700. // ]
  10701. // }
  10702. }
  10703. // method id "sheets.spreadsheets.values.get":
  10704. type SpreadsheetsValuesGetCall struct {
  10705. s *Service
  10706. spreadsheetId string
  10707. range_ string
  10708. urlParams_ gensupport.URLParams
  10709. ifNoneMatch_ string
  10710. ctx_ context.Context
  10711. header_ http.Header
  10712. }
  10713. // Get: Returns a range of values from a spreadsheet.
  10714. // The caller must specify the spreadsheet ID and a range.
  10715. func (r *SpreadsheetsValuesService) Get(spreadsheetId string, range_ string) *SpreadsheetsValuesGetCall {
  10716. c := &SpreadsheetsValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10717. c.spreadsheetId = spreadsheetId
  10718. c.range_ = range_
  10719. return c
  10720. }
  10721. // DateTimeRenderOption sets the optional parameter
  10722. // "dateTimeRenderOption": How dates, times, and durations should be
  10723. // represented in the output.
  10724. // This is ignored if value_render_option is
  10725. // FORMATTED_VALUE.
  10726. // The default dateTime render option is
  10727. // [DateTimeRenderOption.SERIAL_NUMBER].
  10728. //
  10729. // Possible values:
  10730. // "SERIAL_NUMBER"
  10731. // "FORMATTED_STRING"
  10732. func (c *SpreadsheetsValuesGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesGetCall {
  10733. c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption)
  10734. return c
  10735. }
  10736. // MajorDimension sets the optional parameter "majorDimension": The
  10737. // major dimension that results should use.
  10738. //
  10739. // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  10740. // then requesting `range=A1:B2,majorDimension=ROWS` will
  10741. // return
  10742. // `[[1,2],[3,4]]`,
  10743. // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will
  10744. // return
  10745. // `[[1,3],[2,4]]`.
  10746. //
  10747. // Possible values:
  10748. // "DIMENSION_UNSPECIFIED"
  10749. // "ROWS"
  10750. // "COLUMNS"
  10751. func (c *SpreadsheetsValuesGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesGetCall {
  10752. c.urlParams_.Set("majorDimension", majorDimension)
  10753. return c
  10754. }
  10755. // ValueRenderOption sets the optional parameter "valueRenderOption":
  10756. // How values should be represented in the output.
  10757. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  10758. //
  10759. // Possible values:
  10760. // "FORMATTED_VALUE"
  10761. // "UNFORMATTED_VALUE"
  10762. // "FORMULA"
  10763. func (c *SpreadsheetsValuesGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesGetCall {
  10764. c.urlParams_.Set("valueRenderOption", valueRenderOption)
  10765. return c
  10766. }
  10767. // Fields allows partial responses to be retrieved. See
  10768. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10769. // for more information.
  10770. func (c *SpreadsheetsValuesGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesGetCall {
  10771. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10772. return c
  10773. }
  10774. // IfNoneMatch sets the optional parameter which makes the operation
  10775. // fail if the object's ETag matches the given value. This is useful for
  10776. // getting updates only after the object has changed since the last
  10777. // request. Use googleapi.IsNotModified to check whether the response
  10778. // error from Do is the result of In-None-Match.
  10779. func (c *SpreadsheetsValuesGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesGetCall {
  10780. c.ifNoneMatch_ = entityTag
  10781. return c
  10782. }
  10783. // Context sets the context to be used in this call's Do method. Any
  10784. // pending HTTP request will be aborted if the provided context is
  10785. // canceled.
  10786. func (c *SpreadsheetsValuesGetCall) Context(ctx context.Context) *SpreadsheetsValuesGetCall {
  10787. c.ctx_ = ctx
  10788. return c
  10789. }
  10790. // Header returns an http.Header that can be modified by the caller to
  10791. // add HTTP headers to the request.
  10792. func (c *SpreadsheetsValuesGetCall) Header() http.Header {
  10793. if c.header_ == nil {
  10794. c.header_ = make(http.Header)
  10795. }
  10796. return c.header_
  10797. }
  10798. func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error) {
  10799. reqHeaders := make(http.Header)
  10800. for k, v := range c.header_ {
  10801. reqHeaders[k] = v
  10802. }
  10803. reqHeaders.Set("User-Agent", c.s.userAgent())
  10804. if c.ifNoneMatch_ != "" {
  10805. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10806. }
  10807. var body io.Reader = nil
  10808. c.urlParams_.Set("alt", alt)
  10809. c.urlParams_.Set("prettyPrint", "false")
  10810. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}")
  10811. urls += "?" + c.urlParams_.Encode()
  10812. req, err := http.NewRequest("GET", urls, body)
  10813. if err != nil {
  10814. return nil, err
  10815. }
  10816. req.Header = reqHeaders
  10817. googleapi.Expand(req.URL, map[string]string{
  10818. "spreadsheetId": c.spreadsheetId,
  10819. "range": c.range_,
  10820. })
  10821. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10822. }
  10823. // Do executes the "sheets.spreadsheets.values.get" call.
  10824. // Exactly one of *ValueRange or error will be non-nil. Any non-2xx
  10825. // status code is an error. Response headers are in either
  10826. // *ValueRange.ServerResponse.Header or (if a response was returned at
  10827. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10828. // to check whether the returned error was because
  10829. // http.StatusNotModified was returned.
  10830. func (c *SpreadsheetsValuesGetCall) Do(opts ...googleapi.CallOption) (*ValueRange, error) {
  10831. gensupport.SetOptions(c.urlParams_, opts...)
  10832. res, err := c.doRequest("json")
  10833. if res != nil && res.StatusCode == http.StatusNotModified {
  10834. if res.Body != nil {
  10835. res.Body.Close()
  10836. }
  10837. return nil, &googleapi.Error{
  10838. Code: res.StatusCode,
  10839. Header: res.Header,
  10840. }
  10841. }
  10842. if err != nil {
  10843. return nil, err
  10844. }
  10845. defer googleapi.CloseBody(res)
  10846. if err := googleapi.CheckResponse(res); err != nil {
  10847. return nil, err
  10848. }
  10849. ret := &ValueRange{
  10850. ServerResponse: googleapi.ServerResponse{
  10851. Header: res.Header,
  10852. HTTPStatusCode: res.StatusCode,
  10853. },
  10854. }
  10855. target := &ret
  10856. if err := gensupport.DecodeResponse(target, res); err != nil {
  10857. return nil, err
  10858. }
  10859. return ret, nil
  10860. // {
  10861. // "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.",
  10862. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  10863. // "httpMethod": "GET",
  10864. // "id": "sheets.spreadsheets.values.get",
  10865. // "parameterOrder": [
  10866. // "spreadsheetId",
  10867. // "range"
  10868. // ],
  10869. // "parameters": {
  10870. // "dateTimeRenderOption": {
  10871. // "description": "How dates, times, and durations should be represented in the output.\nThis is ignored if value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is [DateTimeRenderOption.SERIAL_NUMBER].",
  10872. // "enum": [
  10873. // "SERIAL_NUMBER",
  10874. // "FORMATTED_STRING"
  10875. // ],
  10876. // "location": "query",
  10877. // "type": "string"
  10878. // },
  10879. // "majorDimension": {
  10880. // "description": "The major dimension that results should use.\n\nFor example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,\nthen requesting `range=A1:B2,majorDimension=ROWS` will return\n`[[1,2],[3,4]]`,\nwhereas requesting `range=A1:B2,majorDimension=COLUMNS` will return\n`[[1,3],[2,4]]`.",
  10881. // "enum": [
  10882. // "DIMENSION_UNSPECIFIED",
  10883. // "ROWS",
  10884. // "COLUMNS"
  10885. // ],
  10886. // "location": "query",
  10887. // "type": "string"
  10888. // },
  10889. // "range": {
  10890. // "description": "The A1 notation of the values to retrieve.",
  10891. // "location": "path",
  10892. // "required": true,
  10893. // "type": "string"
  10894. // },
  10895. // "spreadsheetId": {
  10896. // "description": "The ID of the spreadsheet to retrieve data from.",
  10897. // "location": "path",
  10898. // "required": true,
  10899. // "type": "string"
  10900. // },
  10901. // "valueRenderOption": {
  10902. // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  10903. // "enum": [
  10904. // "FORMATTED_VALUE",
  10905. // "UNFORMATTED_VALUE",
  10906. // "FORMULA"
  10907. // ],
  10908. // "location": "query",
  10909. // "type": "string"
  10910. // }
  10911. // },
  10912. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  10913. // "response": {
  10914. // "$ref": "ValueRange"
  10915. // },
  10916. // "scopes": [
  10917. // "https://www.googleapis.com/auth/drive",
  10918. // "https://www.googleapis.com/auth/drive.file",
  10919. // "https://www.googleapis.com/auth/drive.readonly",
  10920. // "https://www.googleapis.com/auth/spreadsheets",
  10921. // "https://www.googleapis.com/auth/spreadsheets.readonly"
  10922. // ]
  10923. // }
  10924. }
  10925. // method id "sheets.spreadsheets.values.update":
  10926. type SpreadsheetsValuesUpdateCall struct {
  10927. s *Service
  10928. spreadsheetId string
  10929. range_ string
  10930. valuerange *ValueRange
  10931. urlParams_ gensupport.URLParams
  10932. ctx_ context.Context
  10933. header_ http.Header
  10934. }
  10935. // Update: Sets values in a range of a spreadsheet.
  10936. // The caller must specify the spreadsheet ID, range, and
  10937. // a valueInputOption.
  10938. func (r *SpreadsheetsValuesService) Update(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesUpdateCall {
  10939. c := &SpreadsheetsValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10940. c.spreadsheetId = spreadsheetId
  10941. c.range_ = range_
  10942. c.valuerange = valuerange
  10943. return c
  10944. }
  10945. // IncludeValuesInResponse sets the optional parameter
  10946. // "includeValuesInResponse": Determines if the update response should
  10947. // include the values
  10948. // of the cells that were updated. By default, responses
  10949. // do not include the updated values.
  10950. // If the range to write was larger than than the range actually
  10951. // written,
  10952. // the response will include all values in the requested range
  10953. // (excluding
  10954. // trailing empty rows and columns).
  10955. func (c *SpreadsheetsValuesUpdateCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesUpdateCall {
  10956. c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse))
  10957. return c
  10958. }
  10959. // ResponseDateTimeRenderOption sets the optional parameter
  10960. // "responseDateTimeRenderOption": Determines how dates, times, and
  10961. // durations in the response should be
  10962. // rendered. This is ignored if response_value_render_option
  10963. // is
  10964. // FORMATTED_VALUE.
  10965. // The default dateTime render option
  10966. // is
  10967. // DateTimeRenderOption.SERIAL_NUMBER.
  10968. //
  10969. // Possible values:
  10970. // "SERIAL_NUMBER"
  10971. // "FORMATTED_STRING"
  10972. func (c *SpreadsheetsValuesUpdateCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesUpdateCall {
  10973. c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption)
  10974. return c
  10975. }
  10976. // ResponseValueRenderOption sets the optional parameter
  10977. // "responseValueRenderOption": Determines how values in the response
  10978. // should be rendered.
  10979. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  10980. //
  10981. // Possible values:
  10982. // "FORMATTED_VALUE"
  10983. // "UNFORMATTED_VALUE"
  10984. // "FORMULA"
  10985. func (c *SpreadsheetsValuesUpdateCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesUpdateCall {
  10986. c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption)
  10987. return c
  10988. }
  10989. // ValueInputOption sets the optional parameter "valueInputOption": How
  10990. // the input data should be interpreted.
  10991. //
  10992. // Possible values:
  10993. // "INPUT_VALUE_OPTION_UNSPECIFIED"
  10994. // "RAW"
  10995. // "USER_ENTERED"
  10996. func (c *SpreadsheetsValuesUpdateCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesUpdateCall {
  10997. c.urlParams_.Set("valueInputOption", valueInputOption)
  10998. return c
  10999. }
  11000. // Fields allows partial responses to be retrieved. See
  11001. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11002. // for more information.
  11003. func (c *SpreadsheetsValuesUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesUpdateCall {
  11004. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11005. return c
  11006. }
  11007. // Context sets the context to be used in this call's Do method. Any
  11008. // pending HTTP request will be aborted if the provided context is
  11009. // canceled.
  11010. func (c *SpreadsheetsValuesUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesUpdateCall {
  11011. c.ctx_ = ctx
  11012. return c
  11013. }
  11014. // Header returns an http.Header that can be modified by the caller to
  11015. // add HTTP headers to the request.
  11016. func (c *SpreadsheetsValuesUpdateCall) Header() http.Header {
  11017. if c.header_ == nil {
  11018. c.header_ = make(http.Header)
  11019. }
  11020. return c.header_
  11021. }
  11022. func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
  11023. reqHeaders := make(http.Header)
  11024. for k, v := range c.header_ {
  11025. reqHeaders[k] = v
  11026. }
  11027. reqHeaders.Set("User-Agent", c.s.userAgent())
  11028. var body io.Reader = nil
  11029. body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange)
  11030. if err != nil {
  11031. return nil, err
  11032. }
  11033. reqHeaders.Set("Content-Type", "application/json")
  11034. c.urlParams_.Set("alt", alt)
  11035. c.urlParams_.Set("prettyPrint", "false")
  11036. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}")
  11037. urls += "?" + c.urlParams_.Encode()
  11038. req, err := http.NewRequest("PUT", urls, body)
  11039. if err != nil {
  11040. return nil, err
  11041. }
  11042. req.Header = reqHeaders
  11043. googleapi.Expand(req.URL, map[string]string{
  11044. "spreadsheetId": c.spreadsheetId,
  11045. "range": c.range_,
  11046. })
  11047. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11048. }
  11049. // Do executes the "sheets.spreadsheets.values.update" call.
  11050. // Exactly one of *UpdateValuesResponse or error will be non-nil. Any
  11051. // non-2xx status code is an error. Response headers are in either
  11052. // *UpdateValuesResponse.ServerResponse.Header or (if a response was
  11053. // returned at all) in error.(*googleapi.Error).Header. Use
  11054. // googleapi.IsNotModified to check whether the returned error was
  11055. // because http.StatusNotModified was returned.
  11056. func (c *SpreadsheetsValuesUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateValuesResponse, error) {
  11057. gensupport.SetOptions(c.urlParams_, opts...)
  11058. res, err := c.doRequest("json")
  11059. if res != nil && res.StatusCode == http.StatusNotModified {
  11060. if res.Body != nil {
  11061. res.Body.Close()
  11062. }
  11063. return nil, &googleapi.Error{
  11064. Code: res.StatusCode,
  11065. Header: res.Header,
  11066. }
  11067. }
  11068. if err != nil {
  11069. return nil, err
  11070. }
  11071. defer googleapi.CloseBody(res)
  11072. if err := googleapi.CheckResponse(res); err != nil {
  11073. return nil, err
  11074. }
  11075. ret := &UpdateValuesResponse{
  11076. ServerResponse: googleapi.ServerResponse{
  11077. Header: res.Header,
  11078. HTTPStatusCode: res.StatusCode,
  11079. },
  11080. }
  11081. target := &ret
  11082. if err := gensupport.DecodeResponse(target, res); err != nil {
  11083. return nil, err
  11084. }
  11085. return ret, nil
  11086. // {
  11087. // "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.",
  11088. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  11089. // "httpMethod": "PUT",
  11090. // "id": "sheets.spreadsheets.values.update",
  11091. // "parameterOrder": [
  11092. // "spreadsheetId",
  11093. // "range"
  11094. // ],
  11095. // "parameters": {
  11096. // "includeValuesInResponse": {
  11097. // "description": "Determines if the update response should include the values\nof the cells that were updated. By default, responses\ndo not include the updated values.\nIf the range to write was larger than than the range actually written,\nthe response will include all values in the requested range (excluding\ntrailing empty rows and columns).",
  11098. // "location": "query",
  11099. // "type": "boolean"
  11100. // },
  11101. // "range": {
  11102. // "description": "The A1 notation of the values to update.",
  11103. // "location": "path",
  11104. // "required": true,
  11105. // "type": "string"
  11106. // },
  11107. // "responseDateTimeRenderOption": {
  11108. // "description": "Determines how dates, times, and durations in the response should be\nrendered. This is ignored if response_value_render_option is\nFORMATTED_VALUE.\nThe default dateTime render option is\nDateTimeRenderOption.SERIAL_NUMBER.",
  11109. // "enum": [
  11110. // "SERIAL_NUMBER",
  11111. // "FORMATTED_STRING"
  11112. // ],
  11113. // "location": "query",
  11114. // "type": "string"
  11115. // },
  11116. // "responseValueRenderOption": {
  11117. // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  11118. // "enum": [
  11119. // "FORMATTED_VALUE",
  11120. // "UNFORMATTED_VALUE",
  11121. // "FORMULA"
  11122. // ],
  11123. // "location": "query",
  11124. // "type": "string"
  11125. // },
  11126. // "spreadsheetId": {
  11127. // "description": "The ID of the spreadsheet to update.",
  11128. // "location": "path",
  11129. // "required": true,
  11130. // "type": "string"
  11131. // },
  11132. // "valueInputOption": {
  11133. // "description": "How the input data should be interpreted.",
  11134. // "enum": [
  11135. // "INPUT_VALUE_OPTION_UNSPECIFIED",
  11136. // "RAW",
  11137. // "USER_ENTERED"
  11138. // ],
  11139. // "location": "query",
  11140. // "type": "string"
  11141. // }
  11142. // },
  11143. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  11144. // "request": {
  11145. // "$ref": "ValueRange"
  11146. // },
  11147. // "response": {
  11148. // "$ref": "UpdateValuesResponse"
  11149. // },
  11150. // "scopes": [
  11151. // "https://www.googleapis.com/auth/drive",
  11152. // "https://www.googleapis.com/auth/drive.file",
  11153. // "https://www.googleapis.com/auth/spreadsheets"
  11154. // ]
  11155. // }
  11156. }