You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12450 lines
493 KiB

  1. // Package sheets provides access to the Google Sheets API.
  2. //
  3. // See https://developers.google.com/sheets/
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/sheets/v4"
  8. // ...
  9. // sheetsService, err := sheets.New(oauthHttpClient)
  10. package sheets // import "google.golang.org/api/sheets/v4"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "sheets:v4"
  41. const apiName = "sheets"
  42. const apiVersion = "v4"
  43. const basePath = "https://sheets.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage the files in your Google Drive
  47. DriveScope = "https://www.googleapis.com/auth/drive"
  48. // View and manage Google Drive files and folders that you have opened
  49. // or created with this app
  50. DriveFileScope = "https://www.googleapis.com/auth/drive.file"
  51. // View the files in your Google Drive
  52. DriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"
  53. // View and manage your spreadsheets in Google Drive
  54. SpreadsheetsScope = "https://www.googleapis.com/auth/spreadsheets"
  55. // View your Google Spreadsheets
  56. SpreadsheetsReadonlyScope = "https://www.googleapis.com/auth/spreadsheets.readonly"
  57. )
  58. func New(client *http.Client) (*Service, error) {
  59. if client == nil {
  60. return nil, errors.New("client is nil")
  61. }
  62. s := &Service{client: client, BasePath: basePath}
  63. s.Spreadsheets = NewSpreadsheetsService(s)
  64. return s, nil
  65. }
  66. type Service struct {
  67. client *http.Client
  68. BasePath string // API endpoint base URL
  69. UserAgent string // optional additional User-Agent fragment
  70. Spreadsheets *SpreadsheetsService
  71. }
  72. func (s *Service) userAgent() string {
  73. if s.UserAgent == "" {
  74. return googleapi.UserAgent
  75. }
  76. return googleapi.UserAgent + " " + s.UserAgent
  77. }
  78. func NewSpreadsheetsService(s *Service) *SpreadsheetsService {
  79. rs := &SpreadsheetsService{s: s}
  80. rs.DeveloperMetadata = NewSpreadsheetsDeveloperMetadataService(s)
  81. rs.Sheets = NewSpreadsheetsSheetsService(s)
  82. rs.Values = NewSpreadsheetsValuesService(s)
  83. return rs
  84. }
  85. type SpreadsheetsService struct {
  86. s *Service
  87. DeveloperMetadata *SpreadsheetsDeveloperMetadataService
  88. Sheets *SpreadsheetsSheetsService
  89. Values *SpreadsheetsValuesService
  90. }
  91. func NewSpreadsheetsDeveloperMetadataService(s *Service) *SpreadsheetsDeveloperMetadataService {
  92. rs := &SpreadsheetsDeveloperMetadataService{s: s}
  93. return rs
  94. }
  95. type SpreadsheetsDeveloperMetadataService struct {
  96. s *Service
  97. }
  98. func NewSpreadsheetsSheetsService(s *Service) *SpreadsheetsSheetsService {
  99. rs := &SpreadsheetsSheetsService{s: s}
  100. return rs
  101. }
  102. type SpreadsheetsSheetsService struct {
  103. s *Service
  104. }
  105. func NewSpreadsheetsValuesService(s *Service) *SpreadsheetsValuesService {
  106. rs := &SpreadsheetsValuesService{s: s}
  107. return rs
  108. }
  109. type SpreadsheetsValuesService struct {
  110. s *Service
  111. }
  112. // AddBandingRequest: Adds a new banded range to the spreadsheet.
  113. type AddBandingRequest struct {
  114. // BandedRange: The banded range to add. The bandedRangeId
  115. // field is optional; if one is not set, an id will be randomly
  116. // generated. (It
  117. // is an error to specify the ID of a range that already exists.)
  118. BandedRange *BandedRange `json:"bandedRange,omitempty"`
  119. // ForceSendFields is a list of field names (e.g. "BandedRange") to
  120. // unconditionally include in API requests. By default, fields with
  121. // empty values are omitted from API requests. However, any non-pointer,
  122. // non-interface field appearing in ForceSendFields will be sent to the
  123. // server regardless of whether the field is empty or not. This may be
  124. // used to include empty fields in Patch requests.
  125. ForceSendFields []string `json:"-"`
  126. // NullFields is a list of field names (e.g. "BandedRange") to include
  127. // in API requests with the JSON null value. By default, fields with
  128. // empty values are omitted from API requests. However, any field with
  129. // an empty value appearing in NullFields will be sent to the server as
  130. // null. It is an error if a field in this list has a non-empty value.
  131. // This may be used to include null fields in Patch requests.
  132. NullFields []string `json:"-"`
  133. }
  134. func (s *AddBandingRequest) MarshalJSON() ([]byte, error) {
  135. type NoMethod AddBandingRequest
  136. raw := NoMethod(*s)
  137. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  138. }
  139. // AddBandingResponse: The result of adding a banded range.
  140. type AddBandingResponse struct {
  141. // BandedRange: The banded range that was added.
  142. BandedRange *BandedRange `json:"bandedRange,omitempty"`
  143. // ForceSendFields is a list of field names (e.g. "BandedRange") to
  144. // unconditionally include in API requests. By default, fields with
  145. // empty values are omitted from API requests. However, any non-pointer,
  146. // non-interface field appearing in ForceSendFields will be sent to the
  147. // server regardless of whether the field is empty or not. This may be
  148. // used to include empty fields in Patch requests.
  149. ForceSendFields []string `json:"-"`
  150. // NullFields is a list of field names (e.g. "BandedRange") to include
  151. // in API requests with the JSON null value. By default, fields with
  152. // empty values are omitted from API requests. However, any field with
  153. // an empty value appearing in NullFields will be sent to the server as
  154. // null. It is an error if a field in this list has a non-empty value.
  155. // This may be used to include null fields in Patch requests.
  156. NullFields []string `json:"-"`
  157. }
  158. func (s *AddBandingResponse) MarshalJSON() ([]byte, error) {
  159. type NoMethod AddBandingResponse
  160. raw := NoMethod(*s)
  161. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  162. }
  163. // AddChartRequest: Adds a chart to a sheet in the spreadsheet.
  164. type AddChartRequest struct {
  165. // Chart: The chart that should be added to the spreadsheet, including
  166. // the position
  167. // where it should be placed. The chartId
  168. // field is optional; if one is not set, an id will be randomly
  169. // generated. (It
  170. // is an error to specify the ID of a chart that already exists.)
  171. Chart *EmbeddedChart `json:"chart,omitempty"`
  172. // ForceSendFields is a list of field names (e.g. "Chart") to
  173. // unconditionally include in API requests. By default, fields with
  174. // empty values are omitted from API requests. However, any non-pointer,
  175. // non-interface field appearing in ForceSendFields will be sent to the
  176. // server regardless of whether the field is empty or not. This may be
  177. // used to include empty fields in Patch requests.
  178. ForceSendFields []string `json:"-"`
  179. // NullFields is a list of field names (e.g. "Chart") to include in API
  180. // requests with the JSON null value. By default, fields with empty
  181. // values are omitted from API requests. However, any field with an
  182. // empty value appearing in NullFields will be sent to the server as
  183. // null. It is an error if a field in this list has a non-empty value.
  184. // This may be used to include null fields in Patch requests.
  185. NullFields []string `json:"-"`
  186. }
  187. func (s *AddChartRequest) MarshalJSON() ([]byte, error) {
  188. type NoMethod AddChartRequest
  189. raw := NoMethod(*s)
  190. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  191. }
  192. // AddChartResponse: The result of adding a chart to a spreadsheet.
  193. type AddChartResponse struct {
  194. // Chart: The newly added chart.
  195. Chart *EmbeddedChart `json:"chart,omitempty"`
  196. // ForceSendFields is a list of field names (e.g. "Chart") to
  197. // unconditionally include in API requests. By default, fields with
  198. // empty values are omitted from API requests. However, any non-pointer,
  199. // non-interface field appearing in ForceSendFields will be sent to the
  200. // server regardless of whether the field is empty or not. This may be
  201. // used to include empty fields in Patch requests.
  202. ForceSendFields []string `json:"-"`
  203. // NullFields is a list of field names (e.g. "Chart") to include in API
  204. // requests with the JSON null value. By default, fields with empty
  205. // values are omitted from API requests. However, any field with an
  206. // empty value appearing in NullFields will be sent to the server as
  207. // null. It is an error if a field in this list has a non-empty value.
  208. // This may be used to include null fields in Patch requests.
  209. NullFields []string `json:"-"`
  210. }
  211. func (s *AddChartResponse) MarshalJSON() ([]byte, error) {
  212. type NoMethod AddChartResponse
  213. raw := NoMethod(*s)
  214. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  215. }
  216. // AddConditionalFormatRuleRequest: Adds a new conditional format rule
  217. // at the given index.
  218. // All subsequent rules' indexes are incremented.
  219. type AddConditionalFormatRuleRequest struct {
  220. // Index: The zero-based index where the rule should be inserted.
  221. Index int64 `json:"index,omitempty"`
  222. // Rule: The rule to add.
  223. Rule *ConditionalFormatRule `json:"rule,omitempty"`
  224. // ForceSendFields is a list of field names (e.g. "Index") to
  225. // unconditionally include in API requests. By default, fields with
  226. // empty values are omitted from API requests. However, any non-pointer,
  227. // non-interface field appearing in ForceSendFields will be sent to the
  228. // server regardless of whether the field is empty or not. This may be
  229. // used to include empty fields in Patch requests.
  230. ForceSendFields []string `json:"-"`
  231. // NullFields is a list of field names (e.g. "Index") to include in API
  232. // requests with the JSON null value. By default, fields with empty
  233. // values are omitted from API requests. However, any field with an
  234. // empty value appearing in NullFields will be sent to the server as
  235. // null. It is an error if a field in this list has a non-empty value.
  236. // This may be used to include null fields in Patch requests.
  237. NullFields []string `json:"-"`
  238. }
  239. func (s *AddConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
  240. type NoMethod AddConditionalFormatRuleRequest
  241. raw := NoMethod(*s)
  242. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  243. }
  244. // AddDimensionGroupRequest: Creates a group over the specified
  245. // range.
  246. //
  247. // If the requested range is a superset of the range of an existing
  248. // group G,
  249. // then the depth of G is incremented and this new group G' has
  250. // the
  251. // depth of that group. For example, a group [C:D, depth 1] + [B:E]
  252. // results in
  253. // groups [B:E, depth 1] and [C:D, depth 2].
  254. // If the requested range is a subset of the range of an existing group
  255. // G,
  256. // then the depth of the new group G' becomes one greater than the depth
  257. // of G.
  258. // For example, a group [B:E, depth 1] + [C:D] results in groups [B:E,
  259. // depth 1]
  260. // and [C:D, depth 2].
  261. // If the requested range starts before and ends within, or starts
  262. // within and
  263. // ends after, the range of an existing group G, then the range of the
  264. // existing
  265. // group G becomes the union of the ranges, and the new group G'
  266. // has
  267. // depth one greater than the depth of G and range as the intersection
  268. // of the
  269. // ranges. For example, a group [B:D, depth 1] + [C:E] results in groups
  270. // [B:E,
  271. // depth 1] and [C:D, depth 2].
  272. type AddDimensionGroupRequest struct {
  273. // Range: The range over which to create a group.
  274. Range *DimensionRange `json:"range,omitempty"`
  275. // ForceSendFields is a list of field names (e.g. "Range") to
  276. // unconditionally include in API requests. By default, fields with
  277. // empty values are omitted from API requests. However, any non-pointer,
  278. // non-interface field appearing in ForceSendFields will be sent to the
  279. // server regardless of whether the field is empty or not. This may be
  280. // used to include empty fields in Patch requests.
  281. ForceSendFields []string `json:"-"`
  282. // NullFields is a list of field names (e.g. "Range") to include in API
  283. // requests with the JSON null value. By default, fields with empty
  284. // values are omitted from API requests. However, any field with an
  285. // empty value appearing in NullFields will be sent to the server as
  286. // null. It is an error if a field in this list has a non-empty value.
  287. // This may be used to include null fields in Patch requests.
  288. NullFields []string `json:"-"`
  289. }
  290. func (s *AddDimensionGroupRequest) MarshalJSON() ([]byte, error) {
  291. type NoMethod AddDimensionGroupRequest
  292. raw := NoMethod(*s)
  293. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  294. }
  295. // AddDimensionGroupResponse: The result of adding a group.
  296. type AddDimensionGroupResponse struct {
  297. // DimensionGroups: All groups of a dimension after adding a group to
  298. // that dimension.
  299. DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"`
  300. // ForceSendFields is a list of field names (e.g. "DimensionGroups") to
  301. // unconditionally include in API requests. By default, fields with
  302. // empty values are omitted from API requests. However, any non-pointer,
  303. // non-interface field appearing in ForceSendFields will be sent to the
  304. // server regardless of whether the field is empty or not. This may be
  305. // used to include empty fields in Patch requests.
  306. ForceSendFields []string `json:"-"`
  307. // NullFields is a list of field names (e.g. "DimensionGroups") to
  308. // include in API requests with the JSON null value. By default, fields
  309. // with empty values are omitted from API requests. However, any field
  310. // with an empty value appearing in NullFields will be sent to the
  311. // server as null. It is an error if a field in this list has a
  312. // non-empty value. This may be used to include null fields in Patch
  313. // requests.
  314. NullFields []string `json:"-"`
  315. }
  316. func (s *AddDimensionGroupResponse) MarshalJSON() ([]byte, error) {
  317. type NoMethod AddDimensionGroupResponse
  318. raw := NoMethod(*s)
  319. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  320. }
  321. // AddFilterViewRequest: Adds a filter view.
  322. type AddFilterViewRequest struct {
  323. // Filter: The filter to add. The filterViewId
  324. // field is optional; if one is not set, an id will be randomly
  325. // generated. (It
  326. // is an error to specify the ID of a filter that already exists.)
  327. Filter *FilterView `json:"filter,omitempty"`
  328. // ForceSendFields is a list of field names (e.g. "Filter") to
  329. // unconditionally include in API requests. By default, fields with
  330. // empty values are omitted from API requests. However, any non-pointer,
  331. // non-interface field appearing in ForceSendFields will be sent to the
  332. // server regardless of whether the field is empty or not. This may be
  333. // used to include empty fields in Patch requests.
  334. ForceSendFields []string `json:"-"`
  335. // NullFields is a list of field names (e.g. "Filter") to include in API
  336. // requests with the JSON null value. By default, fields with empty
  337. // values are omitted from API requests. However, any field with an
  338. // empty value appearing in NullFields will be sent to the server as
  339. // null. It is an error if a field in this list has a non-empty value.
  340. // This may be used to include null fields in Patch requests.
  341. NullFields []string `json:"-"`
  342. }
  343. func (s *AddFilterViewRequest) MarshalJSON() ([]byte, error) {
  344. type NoMethod AddFilterViewRequest
  345. raw := NoMethod(*s)
  346. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  347. }
  348. // AddFilterViewResponse: The result of adding a filter view.
  349. type AddFilterViewResponse struct {
  350. // Filter: The newly added filter view.
  351. Filter *FilterView `json:"filter,omitempty"`
  352. // ForceSendFields is a list of field names (e.g. "Filter") to
  353. // unconditionally include in API requests. By default, fields with
  354. // empty values are omitted from API requests. However, any non-pointer,
  355. // non-interface field appearing in ForceSendFields will be sent to the
  356. // server regardless of whether the field is empty or not. This may be
  357. // used to include empty fields in Patch requests.
  358. ForceSendFields []string `json:"-"`
  359. // NullFields is a list of field names (e.g. "Filter") to include in API
  360. // requests with the JSON null value. By default, fields with empty
  361. // values are omitted from API requests. However, any field with an
  362. // empty value appearing in NullFields will be sent to the server as
  363. // null. It is an error if a field in this list has a non-empty value.
  364. // This may be used to include null fields in Patch requests.
  365. NullFields []string `json:"-"`
  366. }
  367. func (s *AddFilterViewResponse) MarshalJSON() ([]byte, error) {
  368. type NoMethod AddFilterViewResponse
  369. raw := NoMethod(*s)
  370. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  371. }
  372. // AddNamedRangeRequest: Adds a named range to the spreadsheet.
  373. type AddNamedRangeRequest struct {
  374. // NamedRange: The named range to add. The namedRangeId
  375. // field is optional; if one is not set, an id will be randomly
  376. // generated. (It
  377. // is an error to specify the ID of a range that already exists.)
  378. NamedRange *NamedRange `json:"namedRange,omitempty"`
  379. // ForceSendFields is a list of field names (e.g. "NamedRange") to
  380. // unconditionally include in API requests. By default, fields with
  381. // empty values are omitted from API requests. However, any non-pointer,
  382. // non-interface field appearing in ForceSendFields will be sent to the
  383. // server regardless of whether the field is empty or not. This may be
  384. // used to include empty fields in Patch requests.
  385. ForceSendFields []string `json:"-"`
  386. // NullFields is a list of field names (e.g. "NamedRange") to include in
  387. // API requests with the JSON null value. By default, fields with empty
  388. // values are omitted from API requests. However, any field with an
  389. // empty value appearing in NullFields will be sent to the server as
  390. // null. It is an error if a field in this list has a non-empty value.
  391. // This may be used to include null fields in Patch requests.
  392. NullFields []string `json:"-"`
  393. }
  394. func (s *AddNamedRangeRequest) MarshalJSON() ([]byte, error) {
  395. type NoMethod AddNamedRangeRequest
  396. raw := NoMethod(*s)
  397. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  398. }
  399. // AddNamedRangeResponse: The result of adding a named range.
  400. type AddNamedRangeResponse struct {
  401. // NamedRange: The named range to add.
  402. NamedRange *NamedRange `json:"namedRange,omitempty"`
  403. // ForceSendFields is a list of field names (e.g. "NamedRange") to
  404. // unconditionally include in API requests. By default, fields with
  405. // empty values are omitted from API requests. However, any non-pointer,
  406. // non-interface field appearing in ForceSendFields will be sent to the
  407. // server regardless of whether the field is empty or not. This may be
  408. // used to include empty fields in Patch requests.
  409. ForceSendFields []string `json:"-"`
  410. // NullFields is a list of field names (e.g. "NamedRange") to include in
  411. // API requests with the JSON null value. By default, fields with empty
  412. // values are omitted from API requests. However, any field with an
  413. // empty value appearing in NullFields will be sent to the server as
  414. // null. It is an error if a field in this list has a non-empty value.
  415. // This may be used to include null fields in Patch requests.
  416. NullFields []string `json:"-"`
  417. }
  418. func (s *AddNamedRangeResponse) MarshalJSON() ([]byte, error) {
  419. type NoMethod AddNamedRangeResponse
  420. raw := NoMethod(*s)
  421. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  422. }
  423. // AddProtectedRangeRequest: Adds a new protected range.
  424. type AddProtectedRangeRequest struct {
  425. // ProtectedRange: The protected range to be added. The
  426. // protectedRangeId field is optional; if
  427. // one is not set, an id will be randomly generated. (It is an error
  428. // to
  429. // specify the ID of a range that already exists.)
  430. ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
  431. // ForceSendFields is a list of field names (e.g. "ProtectedRange") to
  432. // unconditionally include in API requests. By default, fields with
  433. // empty values are omitted from API requests. However, any non-pointer,
  434. // non-interface field appearing in ForceSendFields will be sent to the
  435. // server regardless of whether the field is empty or not. This may be
  436. // used to include empty fields in Patch requests.
  437. ForceSendFields []string `json:"-"`
  438. // NullFields is a list of field names (e.g. "ProtectedRange") to
  439. // include in API requests with the JSON null value. By default, fields
  440. // with empty values are omitted from API requests. However, any field
  441. // with an empty value appearing in NullFields will be sent to the
  442. // server as null. It is an error if a field in this list has a
  443. // non-empty value. This may be used to include null fields in Patch
  444. // requests.
  445. NullFields []string `json:"-"`
  446. }
  447. func (s *AddProtectedRangeRequest) MarshalJSON() ([]byte, error) {
  448. type NoMethod AddProtectedRangeRequest
  449. raw := NoMethod(*s)
  450. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  451. }
  452. // AddProtectedRangeResponse: The result of adding a new protected
  453. // range.
  454. type AddProtectedRangeResponse struct {
  455. // ProtectedRange: The newly added protected range.
  456. ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
  457. // ForceSendFields is a list of field names (e.g. "ProtectedRange") to
  458. // unconditionally include in API requests. By default, fields with
  459. // empty values are omitted from API requests. However, any non-pointer,
  460. // non-interface field appearing in ForceSendFields will be sent to the
  461. // server regardless of whether the field is empty or not. This may be
  462. // used to include empty fields in Patch requests.
  463. ForceSendFields []string `json:"-"`
  464. // NullFields is a list of field names (e.g. "ProtectedRange") to
  465. // include in API requests with the JSON null value. By default, fields
  466. // with empty values are omitted from API requests. However, any field
  467. // with an empty value appearing in NullFields will be sent to the
  468. // server as null. It is an error if a field in this list has a
  469. // non-empty value. This may be used to include null fields in Patch
  470. // requests.
  471. NullFields []string `json:"-"`
  472. }
  473. func (s *AddProtectedRangeResponse) MarshalJSON() ([]byte, error) {
  474. type NoMethod AddProtectedRangeResponse
  475. raw := NoMethod(*s)
  476. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  477. }
  478. // AddSheetRequest: Adds a new sheet.
  479. // When a sheet is added at a given index,
  480. // all subsequent sheets' indexes are incremented.
  481. // To add an object sheet, use AddChartRequest instead and
  482. // specify
  483. // EmbeddedObjectPosition.sheetId or
  484. // EmbeddedObjectPosition.newSheet.
  485. type AddSheetRequest struct {
  486. // Properties: The properties the new sheet should have.
  487. // All properties are optional.
  488. // The sheetId field is optional; if one is not
  489. // set, an id will be randomly generated. (It is an error to specify the
  490. // ID
  491. // of a sheet that already exists.)
  492. Properties *SheetProperties `json:"properties,omitempty"`
  493. // ForceSendFields is a list of field names (e.g. "Properties") to
  494. // unconditionally include in API requests. By default, fields with
  495. // empty values are omitted from API requests. However, any non-pointer,
  496. // non-interface field appearing in ForceSendFields will be sent to the
  497. // server regardless of whether the field is empty or not. This may be
  498. // used to include empty fields in Patch requests.
  499. ForceSendFields []string `json:"-"`
  500. // NullFields is a list of field names (e.g. "Properties") to include in
  501. // API requests with the JSON null value. By default, fields with empty
  502. // values are omitted from API requests. However, any field with an
  503. // empty value appearing in NullFields will be sent to the server as
  504. // null. It is an error if a field in this list has a non-empty value.
  505. // This may be used to include null fields in Patch requests.
  506. NullFields []string `json:"-"`
  507. }
  508. func (s *AddSheetRequest) MarshalJSON() ([]byte, error) {
  509. type NoMethod AddSheetRequest
  510. raw := NoMethod(*s)
  511. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  512. }
  513. // AddSheetResponse: The result of adding a sheet.
  514. type AddSheetResponse struct {
  515. // Properties: The properties of the newly added sheet.
  516. Properties *SheetProperties `json:"properties,omitempty"`
  517. // ForceSendFields is a list of field names (e.g. "Properties") to
  518. // unconditionally include in API requests. By default, fields with
  519. // empty values are omitted from API requests. However, any non-pointer,
  520. // non-interface field appearing in ForceSendFields will be sent to the
  521. // server regardless of whether the field is empty or not. This may be
  522. // used to include empty fields in Patch requests.
  523. ForceSendFields []string `json:"-"`
  524. // NullFields is a list of field names (e.g. "Properties") to include in
  525. // API requests with the JSON null value. By default, fields with empty
  526. // values are omitted from API requests. However, any field with an
  527. // empty value appearing in NullFields will be sent to the server as
  528. // null. It is an error if a field in this list has a non-empty value.
  529. // This may be used to include null fields in Patch requests.
  530. NullFields []string `json:"-"`
  531. }
  532. func (s *AddSheetResponse) MarshalJSON() ([]byte, error) {
  533. type NoMethod AddSheetResponse
  534. raw := NoMethod(*s)
  535. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  536. }
  537. // AppendCellsRequest: Adds new cells after the last row with data in a
  538. // sheet,
  539. // inserting new rows into the sheet if necessary.
  540. type AppendCellsRequest struct {
  541. // Fields: The fields of CellData that should be updated.
  542. // At least one field must be specified.
  543. // The root is the CellData; 'row.values.' should not be specified.
  544. // A single "*" can be used as short-hand for listing every field.
  545. Fields string `json:"fields,omitempty"`
  546. // Rows: The data to append.
  547. Rows []*RowData `json:"rows,omitempty"`
  548. // SheetId: The sheet ID to append the data to.
  549. SheetId int64 `json:"sheetId,omitempty"`
  550. // ForceSendFields is a list of field names (e.g. "Fields") to
  551. // unconditionally include in API requests. By default, fields with
  552. // empty values are omitted from API requests. However, any non-pointer,
  553. // non-interface field appearing in ForceSendFields will be sent to the
  554. // server regardless of whether the field is empty or not. This may be
  555. // used to include empty fields in Patch requests.
  556. ForceSendFields []string `json:"-"`
  557. // NullFields is a list of field names (e.g. "Fields") to include in API
  558. // requests with the JSON null value. By default, fields with empty
  559. // values are omitted from API requests. However, any field with an
  560. // empty value appearing in NullFields will be sent to the server as
  561. // null. It is an error if a field in this list has a non-empty value.
  562. // This may be used to include null fields in Patch requests.
  563. NullFields []string `json:"-"`
  564. }
  565. func (s *AppendCellsRequest) MarshalJSON() ([]byte, error) {
  566. type NoMethod AppendCellsRequest
  567. raw := NoMethod(*s)
  568. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  569. }
  570. // AppendDimensionRequest: Appends rows or columns to the end of a
  571. // sheet.
  572. type AppendDimensionRequest struct {
  573. // Dimension: Whether rows or columns should be appended.
  574. //
  575. // Possible values:
  576. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  577. // "ROWS" - Operates on the rows of a sheet.
  578. // "COLUMNS" - Operates on the columns of a sheet.
  579. Dimension string `json:"dimension,omitempty"`
  580. // Length: The number of rows or columns to append.
  581. Length int64 `json:"length,omitempty"`
  582. // SheetId: The sheet to append rows or columns to.
  583. SheetId int64 `json:"sheetId,omitempty"`
  584. // ForceSendFields is a list of field names (e.g. "Dimension") to
  585. // unconditionally include in API requests. By default, fields with
  586. // empty values are omitted from API requests. However, any non-pointer,
  587. // non-interface field appearing in ForceSendFields will be sent to the
  588. // server regardless of whether the field is empty or not. This may be
  589. // used to include empty fields in Patch requests.
  590. ForceSendFields []string `json:"-"`
  591. // NullFields is a list of field names (e.g. "Dimension") to include in
  592. // API requests with the JSON null value. By default, fields with empty
  593. // values are omitted from API requests. However, any field with an
  594. // empty value appearing in NullFields will be sent to the server as
  595. // null. It is an error if a field in this list has a non-empty value.
  596. // This may be used to include null fields in Patch requests.
  597. NullFields []string `json:"-"`
  598. }
  599. func (s *AppendDimensionRequest) MarshalJSON() ([]byte, error) {
  600. type NoMethod AppendDimensionRequest
  601. raw := NoMethod(*s)
  602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  603. }
  604. // AppendValuesResponse: The response when updating a range of values in
  605. // a spreadsheet.
  606. type AppendValuesResponse struct {
  607. // SpreadsheetId: The spreadsheet the updates were applied to.
  608. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  609. // TableRange: The range (in A1 notation) of the table that values are
  610. // being appended to
  611. // (before the values were appended).
  612. // Empty if no table was found.
  613. TableRange string `json:"tableRange,omitempty"`
  614. // Updates: Information about the updates that were applied.
  615. Updates *UpdateValuesResponse `json:"updates,omitempty"`
  616. // ServerResponse contains the HTTP response code and headers from the
  617. // server.
  618. googleapi.ServerResponse `json:"-"`
  619. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  620. // unconditionally include in API requests. By default, fields with
  621. // empty values are omitted from API requests. However, any non-pointer,
  622. // non-interface field appearing in ForceSendFields will be sent to the
  623. // server regardless of whether the field is empty or not. This may be
  624. // used to include empty fields in Patch requests.
  625. ForceSendFields []string `json:"-"`
  626. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  627. // in API requests with the JSON null value. By default, fields with
  628. // empty values are omitted from API requests. However, any field with
  629. // an empty value appearing in NullFields will be sent to the server as
  630. // null. It is an error if a field in this list has a non-empty value.
  631. // This may be used to include null fields in Patch requests.
  632. NullFields []string `json:"-"`
  633. }
  634. func (s *AppendValuesResponse) MarshalJSON() ([]byte, error) {
  635. type NoMethod AppendValuesResponse
  636. raw := NoMethod(*s)
  637. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  638. }
  639. // AutoFillRequest: Fills in more data based on existing data.
  640. type AutoFillRequest struct {
  641. // Range: The range to autofill. This will examine the range and
  642. // detect
  643. // the location that has data and automatically fill that data
  644. // in to the rest of the range.
  645. Range *GridRange `json:"range,omitempty"`
  646. // SourceAndDestination: The source and destination areas to
  647. // autofill.
  648. // This explicitly lists the source of the autofill and where to
  649. // extend that data.
  650. SourceAndDestination *SourceAndDestination `json:"sourceAndDestination,omitempty"`
  651. // UseAlternateSeries: True if we should generate data with the
  652. // "alternate" series.
  653. // This differs based on the type and amount of source data.
  654. UseAlternateSeries bool `json:"useAlternateSeries,omitempty"`
  655. // ForceSendFields is a list of field names (e.g. "Range") to
  656. // unconditionally include in API requests. By default, fields with
  657. // empty values are omitted from API requests. However, any non-pointer,
  658. // non-interface field appearing in ForceSendFields will be sent to the
  659. // server regardless of whether the field is empty or not. This may be
  660. // used to include empty fields in Patch requests.
  661. ForceSendFields []string `json:"-"`
  662. // NullFields is a list of field names (e.g. "Range") to include in API
  663. // requests with the JSON null value. By default, fields with empty
  664. // values are omitted from API requests. However, any field with an
  665. // empty value appearing in NullFields will be sent to the server as
  666. // null. It is an error if a field in this list has a non-empty value.
  667. // This may be used to include null fields in Patch requests.
  668. NullFields []string `json:"-"`
  669. }
  670. func (s *AutoFillRequest) MarshalJSON() ([]byte, error) {
  671. type NoMethod AutoFillRequest
  672. raw := NoMethod(*s)
  673. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  674. }
  675. // AutoResizeDimensionsRequest: Automatically resizes one or more
  676. // dimensions based on the contents
  677. // of the cells in that dimension.
  678. type AutoResizeDimensionsRequest struct {
  679. // Dimensions: The dimensions to automatically resize.
  680. Dimensions *DimensionRange `json:"dimensions,omitempty"`
  681. // ForceSendFields is a list of field names (e.g. "Dimensions") to
  682. // unconditionally include in API requests. By default, fields with
  683. // empty values are omitted from API requests. However, any non-pointer,
  684. // non-interface field appearing in ForceSendFields will be sent to the
  685. // server regardless of whether the field is empty or not. This may be
  686. // used to include empty fields in Patch requests.
  687. ForceSendFields []string `json:"-"`
  688. // NullFields is a list of field names (e.g. "Dimensions") to include in
  689. // API requests with the JSON null value. By default, fields with empty
  690. // values are omitted from API requests. However, any field with an
  691. // empty value appearing in NullFields will be sent to the server as
  692. // null. It is an error if a field in this list has a non-empty value.
  693. // This may be used to include null fields in Patch requests.
  694. NullFields []string `json:"-"`
  695. }
  696. func (s *AutoResizeDimensionsRequest) MarshalJSON() ([]byte, error) {
  697. type NoMethod AutoResizeDimensionsRequest
  698. raw := NoMethod(*s)
  699. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  700. }
  701. // BandedRange: A banded (alternating colors) range in a sheet.
  702. type BandedRange struct {
  703. // BandedRangeId: The id of the banded range.
  704. BandedRangeId int64 `json:"bandedRangeId,omitempty"`
  705. // ColumnProperties: Properties for column bands. These properties are
  706. // applied on a column-
  707. // by-column basis throughout all the columns in the range. At least one
  708. // of
  709. // row_properties or column_properties must be specified.
  710. ColumnProperties *BandingProperties `json:"columnProperties,omitempty"`
  711. // Range: The range over which these properties are applied.
  712. Range *GridRange `json:"range,omitempty"`
  713. // RowProperties: Properties for row bands. These properties are applied
  714. // on a row-by-row
  715. // basis throughout all the rows in the range. At least one
  716. // of
  717. // row_properties or column_properties must be specified.
  718. RowProperties *BandingProperties `json:"rowProperties,omitempty"`
  719. // ForceSendFields is a list of field names (e.g. "BandedRangeId") to
  720. // unconditionally include in API requests. By default, fields with
  721. // empty values are omitted from API requests. However, any non-pointer,
  722. // non-interface field appearing in ForceSendFields will be sent to the
  723. // server regardless of whether the field is empty or not. This may be
  724. // used to include empty fields in Patch requests.
  725. ForceSendFields []string `json:"-"`
  726. // NullFields is a list of field names (e.g. "BandedRangeId") to include
  727. // in API requests with the JSON null value. By default, fields with
  728. // empty values are omitted from API requests. However, any field with
  729. // an empty value appearing in NullFields will be sent to the server as
  730. // null. It is an error if a field in this list has a non-empty value.
  731. // This may be used to include null fields in Patch requests.
  732. NullFields []string `json:"-"`
  733. }
  734. func (s *BandedRange) MarshalJSON() ([]byte, error) {
  735. type NoMethod BandedRange
  736. raw := NoMethod(*s)
  737. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  738. }
  739. // BandingProperties: Properties referring a single dimension (either
  740. // row or column). If both
  741. // BandedRange.row_properties and BandedRange.column_properties are
  742. // set, the fill colors are applied to cells according to the following
  743. // rules:
  744. //
  745. // * header_color and footer_color take priority over band colors.
  746. // * first_band_color takes priority over second_band_color.
  747. // * row_properties takes priority over column_properties.
  748. //
  749. // For example, the first row color takes priority over the first
  750. // column
  751. // color, but the first column color takes priority over the second row
  752. // color.
  753. // Similarly, the row header takes priority over the column header in
  754. // the
  755. // top left cell, but the column header takes priority over the first
  756. // row
  757. // color if the row header is not set.
  758. type BandingProperties struct {
  759. // FirstBandColor: The first color that is alternating. (Required)
  760. FirstBandColor *Color `json:"firstBandColor,omitempty"`
  761. // FooterColor: The color of the last row or column. If this field is
  762. // not set, the last
  763. // row or column will be filled with either first_band_color
  764. // or
  765. // second_band_color, depending on the color of the previous row
  766. // or
  767. // column.
  768. FooterColor *Color `json:"footerColor,omitempty"`
  769. // HeaderColor: The color of the first row or column. If this field is
  770. // set, the first
  771. // row or column will be filled with this color and the colors
  772. // will
  773. // alternate between first_band_color and second_band_color
  774. // starting
  775. // from the second row or column. Otherwise, the first row or column
  776. // will be
  777. // filled with first_band_color and the colors will proceed to
  778. // alternate
  779. // as they normally would.
  780. HeaderColor *Color `json:"headerColor,omitempty"`
  781. // SecondBandColor: The second color that is alternating. (Required)
  782. SecondBandColor *Color `json:"secondBandColor,omitempty"`
  783. // ForceSendFields is a list of field names (e.g. "FirstBandColor") to
  784. // unconditionally include in API requests. By default, fields with
  785. // empty values are omitted from API requests. However, any non-pointer,
  786. // non-interface field appearing in ForceSendFields will be sent to the
  787. // server regardless of whether the field is empty or not. This may be
  788. // used to include empty fields in Patch requests.
  789. ForceSendFields []string `json:"-"`
  790. // NullFields is a list of field names (e.g. "FirstBandColor") to
  791. // include in API requests with the JSON null value. By default, fields
  792. // with empty values are omitted from API requests. However, any field
  793. // with an empty value appearing in NullFields will be sent to the
  794. // server as null. It is an error if a field in this list has a
  795. // non-empty value. This may be used to include null fields in Patch
  796. // requests.
  797. NullFields []string `json:"-"`
  798. }
  799. func (s *BandingProperties) MarshalJSON() ([]byte, error) {
  800. type NoMethod BandingProperties
  801. raw := NoMethod(*s)
  802. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  803. }
  804. // BasicChartAxis: An axis of the chart.
  805. // A chart may not have more than one axis per
  806. // axis position.
  807. type BasicChartAxis struct {
  808. // Format: The format of the title.
  809. // Only valid if the axis is not associated with the domain.
  810. Format *TextFormat `json:"format,omitempty"`
  811. // Position: The position of this axis.
  812. //
  813. // Possible values:
  814. // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not
  815. // use.
  816. // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart.
  817. // For most charts, this is the standard major axis.
  818. // For bar charts, this is a minor axis.
  819. // "LEFT_AXIS" - The axis rendered at the left of a chart.
  820. // For most charts, this is a minor axis.
  821. // For bar charts, this is the standard major axis.
  822. // "RIGHT_AXIS" - The axis rendered at the right of a chart.
  823. // For most charts, this is a minor axis.
  824. // For bar charts, this is an unusual major axis.
  825. Position string `json:"position,omitempty"`
  826. // Title: The title of this axis. If set, this overrides any title
  827. // inferred
  828. // from headers of the data.
  829. Title string `json:"title,omitempty"`
  830. // TitleTextPosition: The axis title text position.
  831. TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"`
  832. // ForceSendFields is a list of field names (e.g. "Format") to
  833. // unconditionally include in API requests. By default, fields with
  834. // empty values are omitted from API requests. However, any non-pointer,
  835. // non-interface field appearing in ForceSendFields will be sent to the
  836. // server regardless of whether the field is empty or not. This may be
  837. // used to include empty fields in Patch requests.
  838. ForceSendFields []string `json:"-"`
  839. // NullFields is a list of field names (e.g. "Format") to include in API
  840. // requests with the JSON null value. By default, fields with empty
  841. // values are omitted from API requests. However, any field with an
  842. // empty value appearing in NullFields will be sent to the server as
  843. // null. It is an error if a field in this list has a non-empty value.
  844. // This may be used to include null fields in Patch requests.
  845. NullFields []string `json:"-"`
  846. }
  847. func (s *BasicChartAxis) MarshalJSON() ([]byte, error) {
  848. type NoMethod BasicChartAxis
  849. raw := NoMethod(*s)
  850. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  851. }
  852. // BasicChartDomain: The domain of a chart.
  853. // For example, if charting stock prices over time, this would be the
  854. // date.
  855. type BasicChartDomain struct {
  856. // Domain: The data of the domain. For example, if charting stock prices
  857. // over time,
  858. // this is the data representing the dates.
  859. Domain *ChartData `json:"domain,omitempty"`
  860. // Reversed: True to reverse the order of the domain values (horizontal
  861. // axis).
  862. Reversed bool `json:"reversed,omitempty"`
  863. // ForceSendFields is a list of field names (e.g. "Domain") to
  864. // unconditionally include in API requests. By default, fields with
  865. // empty values are omitted from API requests. However, any non-pointer,
  866. // non-interface field appearing in ForceSendFields will be sent to the
  867. // server regardless of whether the field is empty or not. This may be
  868. // used to include empty fields in Patch requests.
  869. ForceSendFields []string `json:"-"`
  870. // NullFields is a list of field names (e.g. "Domain") to include in API
  871. // requests with the JSON null value. By default, fields with empty
  872. // values are omitted from API requests. However, any field with an
  873. // empty value appearing in NullFields will be sent to the server as
  874. // null. It is an error if a field in this list has a non-empty value.
  875. // This may be used to include null fields in Patch requests.
  876. NullFields []string `json:"-"`
  877. }
  878. func (s *BasicChartDomain) MarshalJSON() ([]byte, error) {
  879. type NoMethod BasicChartDomain
  880. raw := NoMethod(*s)
  881. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  882. }
  883. // BasicChartSeries: A single series of data in a chart.
  884. // For example, if charting stock prices over time, multiple series may
  885. // exist,
  886. // one for the "Open Price", "High Price", "Low Price" and "Close
  887. // Price".
  888. type BasicChartSeries struct {
  889. // Color: The color for elements (i.e. bars, lines, points) associated
  890. // with this
  891. // series. If empty, a default color is used.
  892. Color *Color `json:"color,omitempty"`
  893. // LineStyle: The line style of this series. Valid only if the
  894. // chartType is AREA,
  895. // LINE, or SCATTER.
  896. // COMBO charts are also supported if the
  897. // series chart type is
  898. // AREA or LINE.
  899. LineStyle *LineStyle `json:"lineStyle,omitempty"`
  900. // Series: The data being visualized in this chart series.
  901. Series *ChartData `json:"series,omitempty"`
  902. // TargetAxis: The minor axis that will specify the range of values for
  903. // this series.
  904. // For example, if charting stocks over time, the "Volume" series
  905. // may want to be pinned to the right with the prices pinned to the
  906. // left,
  907. // because the scale of trading volume is different than the scale
  908. // of
  909. // prices.
  910. // It is an error to specify an axis that isn't a valid minor axis
  911. // for the chart's type.
  912. //
  913. // Possible values:
  914. // "BASIC_CHART_AXIS_POSITION_UNSPECIFIED" - Default value, do not
  915. // use.
  916. // "BOTTOM_AXIS" - The axis rendered at the bottom of a chart.
  917. // For most charts, this is the standard major axis.
  918. // For bar charts, this is a minor axis.
  919. // "LEFT_AXIS" - The axis rendered at the left of a chart.
  920. // For most charts, this is a minor axis.
  921. // For bar charts, this is the standard major axis.
  922. // "RIGHT_AXIS" - The axis rendered at the right of a chart.
  923. // For most charts, this is a minor axis.
  924. // For bar charts, this is an unusual major axis.
  925. TargetAxis string `json:"targetAxis,omitempty"`
  926. // Type: The type of this series. Valid only if the
  927. // chartType is
  928. // COMBO.
  929. // Different types will change the way the series is visualized.
  930. // Only LINE, AREA,
  931. // and COLUMN are supported.
  932. //
  933. // Possible values:
  934. // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use.
  935. // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar
  936. // chart</a>.
  937. // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line
  938. // chart</a>.
  939. // "AREA" - An <a
  940. // href="/chart/interactive/docs/gallery/areachart">area chart</a>.
  941. // "COLUMN" - A <a
  942. // href="/chart/interactive/docs/gallery/columnchart">column chart</a>.
  943. // "SCATTER" - A <a
  944. // href="/chart/interactive/docs/gallery/scatterchart">scatter
  945. // chart</a>.
  946. // "COMBO" - A <a
  947. // href="/chart/interactive/docs/gallery/combochart">combo chart</a>.
  948. // "STEPPED_AREA" - A <a
  949. // href="/chart/interactive/docs/gallery/steppedareachart">stepped area
  950. // chart</a>.
  951. Type string `json:"type,omitempty"`
  952. // ForceSendFields is a list of field names (e.g. "Color") to
  953. // unconditionally include in API requests. By default, fields with
  954. // empty values are omitted from API requests. However, any non-pointer,
  955. // non-interface field appearing in ForceSendFields will be sent to the
  956. // server regardless of whether the field is empty or not. This may be
  957. // used to include empty fields in Patch requests.
  958. ForceSendFields []string `json:"-"`
  959. // NullFields is a list of field names (e.g. "Color") to include in API
  960. // requests with the JSON null value. By default, fields with empty
  961. // values are omitted from API requests. However, any field with an
  962. // empty value appearing in NullFields will be sent to the server as
  963. // null. It is an error if a field in this list has a non-empty value.
  964. // This may be used to include null fields in Patch requests.
  965. NullFields []string `json:"-"`
  966. }
  967. func (s *BasicChartSeries) MarshalJSON() ([]byte, error) {
  968. type NoMethod BasicChartSeries
  969. raw := NoMethod(*s)
  970. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  971. }
  972. // BasicChartSpec: The specification for a basic chart. See
  973. // BasicChartType for the list
  974. // of charts this supports.
  975. type BasicChartSpec struct {
  976. // Axis: The axis on the chart.
  977. Axis []*BasicChartAxis `json:"axis,omitempty"`
  978. // ChartType: The type of the chart.
  979. //
  980. // Possible values:
  981. // "BASIC_CHART_TYPE_UNSPECIFIED" - Default value, do not use.
  982. // "BAR" - A <a href="/chart/interactive/docs/gallery/barchart">bar
  983. // chart</a>.
  984. // "LINE" - A <a href="/chart/interactive/docs/gallery/linechart">line
  985. // chart</a>.
  986. // "AREA" - An <a
  987. // href="/chart/interactive/docs/gallery/areachart">area chart</a>.
  988. // "COLUMN" - A <a
  989. // href="/chart/interactive/docs/gallery/columnchart">column chart</a>.
  990. // "SCATTER" - A <a
  991. // href="/chart/interactive/docs/gallery/scatterchart">scatter
  992. // chart</a>.
  993. // "COMBO" - A <a
  994. // href="/chart/interactive/docs/gallery/combochart">combo chart</a>.
  995. // "STEPPED_AREA" - A <a
  996. // href="/chart/interactive/docs/gallery/steppedareachart">stepped area
  997. // chart</a>.
  998. ChartType string `json:"chartType,omitempty"`
  999. // CompareMode: The behavior of tooltips and data highlighting when
  1000. // hovering on data and
  1001. // chart area.
  1002. //
  1003. // Possible values:
  1004. // "BASIC_CHART_COMPARE_MODE_UNSPECIFIED" - Default value, do not use.
  1005. // "DATUM" - Only the focused data element is highlighted and shown in
  1006. // the tooltip.
  1007. // "CATEGORY" - All data elements with the same category (e.g., domain
  1008. // value) are
  1009. // highlighted and shown in the tooltip.
  1010. CompareMode string `json:"compareMode,omitempty"`
  1011. // Domains: The domain of data this is charting.
  1012. // Only a single domain is supported.
  1013. Domains []*BasicChartDomain `json:"domains,omitempty"`
  1014. // HeaderCount: The number of rows or columns in the data that are
  1015. // "headers".
  1016. // If not set, Google Sheets will guess how many rows are headers
  1017. // based
  1018. // on the data.
  1019. //
  1020. // (Note that BasicChartAxis.title may override the axis title
  1021. // inferred from the header values.)
  1022. HeaderCount int64 `json:"headerCount,omitempty"`
  1023. // InterpolateNulls: If some values in a series are missing, gaps may
  1024. // appear in the chart (e.g,
  1025. // segments of lines in a line chart will be missing). To eliminate
  1026. // these
  1027. // gaps set this to true.
  1028. // Applies to Line, Area, and Combo charts.
  1029. InterpolateNulls bool `json:"interpolateNulls,omitempty"`
  1030. // LegendPosition: The position of the chart legend.
  1031. //
  1032. // Possible values:
  1033. // "BASIC_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
  1034. // use.
  1035. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  1036. // chart.
  1037. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  1038. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  1039. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  1040. // "NO_LEGEND" - No legend is rendered.
  1041. LegendPosition string `json:"legendPosition,omitempty"`
  1042. // LineSmoothing: Gets whether all lines should be rendered smooth or
  1043. // straight by default.
  1044. // Applies to Line charts.
  1045. LineSmoothing bool `json:"lineSmoothing,omitempty"`
  1046. // Series: The data this chart is visualizing.
  1047. Series []*BasicChartSeries `json:"series,omitempty"`
  1048. // StackedType: The stacked type for charts that support vertical
  1049. // stacking.
  1050. // Applies to Area, Bar, Column, Combo, and Stepped Area charts.
  1051. //
  1052. // Possible values:
  1053. // "BASIC_CHART_STACKED_TYPE_UNSPECIFIED" - Default value, do not use.
  1054. // "NOT_STACKED" - Series are not stacked.
  1055. // "STACKED" - Series values are stacked, each value is rendered
  1056. // vertically beginning
  1057. // from the top of the value below it.
  1058. // "PERCENT_STACKED" - Vertical stacks are stretched to reach the top
  1059. // of the chart, with
  1060. // values laid out as percentages of each other.
  1061. StackedType string `json:"stackedType,omitempty"`
  1062. // ThreeDimensional: True to make the chart 3D.
  1063. // Applies to Bar and Column charts.
  1064. ThreeDimensional bool `json:"threeDimensional,omitempty"`
  1065. // ForceSendFields is a list of field names (e.g. "Axis") to
  1066. // unconditionally include in API requests. By default, fields with
  1067. // empty values are omitted from API requests. However, any non-pointer,
  1068. // non-interface field appearing in ForceSendFields will be sent to the
  1069. // server regardless of whether the field is empty or not. This may be
  1070. // used to include empty fields in Patch requests.
  1071. ForceSendFields []string `json:"-"`
  1072. // NullFields is a list of field names (e.g. "Axis") to include in API
  1073. // requests with the JSON null value. By default, fields with empty
  1074. // values are omitted from API requests. However, any field with an
  1075. // empty value appearing in NullFields will be sent to the server as
  1076. // null. It is an error if a field in this list has a non-empty value.
  1077. // This may be used to include null fields in Patch requests.
  1078. NullFields []string `json:"-"`
  1079. }
  1080. func (s *BasicChartSpec) MarshalJSON() ([]byte, error) {
  1081. type NoMethod BasicChartSpec
  1082. raw := NoMethod(*s)
  1083. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1084. }
  1085. // BasicFilter: The default filter associated with a sheet.
  1086. type BasicFilter struct {
  1087. // Criteria: The criteria for showing/hiding values per column.
  1088. // The map's key is the column index, and the value is the criteria
  1089. // for
  1090. // that column.
  1091. Criteria map[string]FilterCriteria `json:"criteria,omitempty"`
  1092. // Range: The range the filter covers.
  1093. Range *GridRange `json:"range,omitempty"`
  1094. // SortSpecs: The sort order per column. Later specifications are used
  1095. // when values
  1096. // are equal in the earlier specifications.
  1097. SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
  1098. // ForceSendFields is a list of field names (e.g. "Criteria") to
  1099. // unconditionally include in API requests. By default, fields with
  1100. // empty values are omitted from API requests. However, any non-pointer,
  1101. // non-interface field appearing in ForceSendFields will be sent to the
  1102. // server regardless of whether the field is empty or not. This may be
  1103. // used to include empty fields in Patch requests.
  1104. ForceSendFields []string `json:"-"`
  1105. // NullFields is a list of field names (e.g. "Criteria") to include in
  1106. // API requests with the JSON null value. By default, fields with empty
  1107. // values are omitted from API requests. However, any field with an
  1108. // empty value appearing in NullFields will be sent to the server as
  1109. // null. It is an error if a field in this list has a non-empty value.
  1110. // This may be used to include null fields in Patch requests.
  1111. NullFields []string `json:"-"`
  1112. }
  1113. func (s *BasicFilter) MarshalJSON() ([]byte, error) {
  1114. type NoMethod BasicFilter
  1115. raw := NoMethod(*s)
  1116. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1117. }
  1118. // BatchClearValuesByDataFilterRequest: The request for clearing more
  1119. // than one range selected by a
  1120. // DataFilter in a spreadsheet.
  1121. type BatchClearValuesByDataFilterRequest struct {
  1122. // DataFilters: The DataFilters used to determine which ranges to clear.
  1123. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  1124. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  1125. // unconditionally include in API requests. By default, fields with
  1126. // empty values are omitted from API requests. However, any non-pointer,
  1127. // non-interface field appearing in ForceSendFields will be sent to the
  1128. // server regardless of whether the field is empty or not. This may be
  1129. // used to include empty fields in Patch requests.
  1130. ForceSendFields []string `json:"-"`
  1131. // NullFields is a list of field names (e.g. "DataFilters") to include
  1132. // in API requests with the JSON null value. By default, fields with
  1133. // empty values are omitted from API requests. However, any field with
  1134. // an empty value appearing in NullFields will be sent to the server as
  1135. // null. It is an error if a field in this list has a non-empty value.
  1136. // This may be used to include null fields in Patch requests.
  1137. NullFields []string `json:"-"`
  1138. }
  1139. func (s *BatchClearValuesByDataFilterRequest) MarshalJSON() ([]byte, error) {
  1140. type NoMethod BatchClearValuesByDataFilterRequest
  1141. raw := NoMethod(*s)
  1142. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1143. }
  1144. // BatchClearValuesByDataFilterResponse: The response when clearing a
  1145. // range of values selected with
  1146. // DataFilters in a spreadsheet.
  1147. type BatchClearValuesByDataFilterResponse struct {
  1148. // ClearedRanges: The ranges that were cleared, in A1 notation.
  1149. // (If the requests were for an unbounded range or a ranger larger
  1150. // than the bounds of the sheet, this will be the actual ranges
  1151. // that were cleared, bounded to the sheet's limits.)
  1152. ClearedRanges []string `json:"clearedRanges,omitempty"`
  1153. // SpreadsheetId: The spreadsheet the updates were applied to.
  1154. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1155. // ServerResponse contains the HTTP response code and headers from the
  1156. // server.
  1157. googleapi.ServerResponse `json:"-"`
  1158. // ForceSendFields is a list of field names (e.g. "ClearedRanges") to
  1159. // unconditionally include in API requests. By default, fields with
  1160. // empty values are omitted from API requests. However, any non-pointer,
  1161. // non-interface field appearing in ForceSendFields will be sent to the
  1162. // server regardless of whether the field is empty or not. This may be
  1163. // used to include empty fields in Patch requests.
  1164. ForceSendFields []string `json:"-"`
  1165. // NullFields is a list of field names (e.g. "ClearedRanges") to include
  1166. // in API requests with the JSON null value. By default, fields with
  1167. // empty values are omitted from API requests. However, any field with
  1168. // an empty value appearing in NullFields will be sent to the server as
  1169. // null. It is an error if a field in this list has a non-empty value.
  1170. // This may be used to include null fields in Patch requests.
  1171. NullFields []string `json:"-"`
  1172. }
  1173. func (s *BatchClearValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  1174. type NoMethod BatchClearValuesByDataFilterResponse
  1175. raw := NoMethod(*s)
  1176. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1177. }
  1178. // BatchClearValuesRequest: The request for clearing more than one range
  1179. // of values in a spreadsheet.
  1180. type BatchClearValuesRequest struct {
  1181. // Ranges: The ranges to clear, in A1 notation.
  1182. Ranges []string `json:"ranges,omitempty"`
  1183. // ForceSendFields is a list of field names (e.g. "Ranges") to
  1184. // unconditionally include in API requests. By default, fields with
  1185. // empty values are omitted from API requests. However, any non-pointer,
  1186. // non-interface field appearing in ForceSendFields will be sent to the
  1187. // server regardless of whether the field is empty or not. This may be
  1188. // used to include empty fields in Patch requests.
  1189. ForceSendFields []string `json:"-"`
  1190. // NullFields is a list of field names (e.g. "Ranges") to include in API
  1191. // requests with the JSON null value. By default, fields with empty
  1192. // values are omitted from API requests. However, any field with an
  1193. // empty value appearing in NullFields will be sent to the server as
  1194. // null. It is an error if a field in this list has a non-empty value.
  1195. // This may be used to include null fields in Patch requests.
  1196. NullFields []string `json:"-"`
  1197. }
  1198. func (s *BatchClearValuesRequest) MarshalJSON() ([]byte, error) {
  1199. type NoMethod BatchClearValuesRequest
  1200. raw := NoMethod(*s)
  1201. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1202. }
  1203. // BatchClearValuesResponse: The response when clearing a range of
  1204. // values in a spreadsheet.
  1205. type BatchClearValuesResponse struct {
  1206. // ClearedRanges: The ranges that were cleared, in A1 notation.
  1207. // (If the requests were for an unbounded range or a ranger larger
  1208. // than the bounds of the sheet, this will be the actual ranges
  1209. // that were cleared, bounded to the sheet's limits.)
  1210. ClearedRanges []string `json:"clearedRanges,omitempty"`
  1211. // SpreadsheetId: The spreadsheet the updates were applied to.
  1212. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1213. // ServerResponse contains the HTTP response code and headers from the
  1214. // server.
  1215. googleapi.ServerResponse `json:"-"`
  1216. // ForceSendFields is a list of field names (e.g. "ClearedRanges") to
  1217. // unconditionally include in API requests. By default, fields with
  1218. // empty values are omitted from API requests. However, any non-pointer,
  1219. // non-interface field appearing in ForceSendFields will be sent to the
  1220. // server regardless of whether the field is empty or not. This may be
  1221. // used to include empty fields in Patch requests.
  1222. ForceSendFields []string `json:"-"`
  1223. // NullFields is a list of field names (e.g. "ClearedRanges") to include
  1224. // in API requests with the JSON null value. By default, fields with
  1225. // empty values are omitted from API requests. However, any field with
  1226. // an empty value appearing in NullFields will be sent to the server as
  1227. // null. It is an error if a field in this list has a non-empty value.
  1228. // This may be used to include null fields in Patch requests.
  1229. NullFields []string `json:"-"`
  1230. }
  1231. func (s *BatchClearValuesResponse) MarshalJSON() ([]byte, error) {
  1232. type NoMethod BatchClearValuesResponse
  1233. raw := NoMethod(*s)
  1234. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1235. }
  1236. // BatchGetValuesByDataFilterRequest: The request for retrieving a range
  1237. // of values in a spreadsheet selected by a
  1238. // set of DataFilters.
  1239. type BatchGetValuesByDataFilterRequest struct {
  1240. // DataFilters: The data filters used to match the ranges of values to
  1241. // retrieve. Ranges
  1242. // that match any of the specified data filters will be included in
  1243. // the
  1244. // response.
  1245. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  1246. // DateTimeRenderOption: How dates, times, and durations should be
  1247. // represented in the output.
  1248. // This is ignored if value_render_option is
  1249. // FORMATTED_VALUE.
  1250. // The default dateTime render option is
  1251. // [DateTimeRenderOption.SERIAL_NUMBER].
  1252. //
  1253. // Possible values:
  1254. // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration
  1255. // fields to be output
  1256. // as doubles in "serial number" format, as popularized by Lotus
  1257. // 1-2-3.
  1258. // The whole number portion of the value (left of the decimal)
  1259. // counts
  1260. // the days since December 30th 1899. The fractional portion (right
  1261. // of
  1262. // the decimal) counts the time as a fraction of the day. For
  1263. // example,
  1264. // January 1st 1900 at noon would be 2.5, 2 because it's 2 days
  1265. // after
  1266. // December 30st 1899, and .5 because noon is half a day. February
  1267. // 1st
  1268. // 1900 at 3pm would be 33.625. This correctly treats the year 1900
  1269. // as
  1270. // not a leap year.
  1271. // "FORMATTED_STRING" - Instructs date, time, datetime, and duration
  1272. // fields to be output
  1273. // as strings in their given number format (which is dependent
  1274. // on the spreadsheet locale).
  1275. DateTimeRenderOption string `json:"dateTimeRenderOption,omitempty"`
  1276. // MajorDimension: The major dimension that results should use.
  1277. //
  1278. // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  1279. // then a request that selects that range and sets `majorDimension=ROWS`
  1280. // will
  1281. // return `[[1,2],[3,4]]`,
  1282. // whereas a request that sets `majorDimension=COLUMNS` will
  1283. // return
  1284. // `[[1,3],[2,4]]`.
  1285. //
  1286. // Possible values:
  1287. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  1288. // "ROWS" - Operates on the rows of a sheet.
  1289. // "COLUMNS" - Operates on the columns of a sheet.
  1290. MajorDimension string `json:"majorDimension,omitempty"`
  1291. // ValueRenderOption: How values should be represented in the
  1292. // output.
  1293. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  1294. //
  1295. // Possible values:
  1296. // "FORMATTED_VALUE" - Values will be calculated & formatted in the
  1297. // reply according to the
  1298. // cell's formatting. Formatting is based on the spreadsheet's
  1299. // locale,
  1300. // not the requesting user's locale.
  1301. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1302. // currency,
  1303. // then `A2` would return "$1.23".
  1304. // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted
  1305. // in the reply.
  1306. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1307. // currency,
  1308. // then `A2` would return the number `1.23`.
  1309. // "FORMULA" - Values will not be calculated. The reply will include
  1310. // the formulas.
  1311. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1312. // currency,
  1313. // then A2 would return "=A1".
  1314. ValueRenderOption string `json:"valueRenderOption,omitempty"`
  1315. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  1316. // unconditionally include in API requests. By default, fields with
  1317. // empty values are omitted from API requests. However, any non-pointer,
  1318. // non-interface field appearing in ForceSendFields will be sent to the
  1319. // server regardless of whether the field is empty or not. This may be
  1320. // used to include empty fields in Patch requests.
  1321. ForceSendFields []string `json:"-"`
  1322. // NullFields is a list of field names (e.g. "DataFilters") to include
  1323. // in API requests with the JSON null value. By default, fields with
  1324. // empty values are omitted from API requests. However, any field with
  1325. // an empty value appearing in NullFields will be sent to the server as
  1326. // null. It is an error if a field in this list has a non-empty value.
  1327. // This may be used to include null fields in Patch requests.
  1328. NullFields []string `json:"-"`
  1329. }
  1330. func (s *BatchGetValuesByDataFilterRequest) MarshalJSON() ([]byte, error) {
  1331. type NoMethod BatchGetValuesByDataFilterRequest
  1332. raw := NoMethod(*s)
  1333. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1334. }
  1335. // BatchGetValuesByDataFilterResponse: The response when retrieving more
  1336. // than one range of values in a spreadsheet
  1337. // selected by DataFilters.
  1338. type BatchGetValuesByDataFilterResponse struct {
  1339. // SpreadsheetId: The ID of the spreadsheet the data was retrieved from.
  1340. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1341. // ValueRanges: The requested values with the list of data filters that
  1342. // matched them.
  1343. ValueRanges []*MatchedValueRange `json:"valueRanges,omitempty"`
  1344. // ServerResponse contains the HTTP response code and headers from the
  1345. // server.
  1346. googleapi.ServerResponse `json:"-"`
  1347. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  1348. // unconditionally include in API requests. By default, fields with
  1349. // empty values are omitted from API requests. However, any non-pointer,
  1350. // non-interface field appearing in ForceSendFields will be sent to the
  1351. // server regardless of whether the field is empty or not. This may be
  1352. // used to include empty fields in Patch requests.
  1353. ForceSendFields []string `json:"-"`
  1354. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  1355. // in API requests with the JSON null value. By default, fields with
  1356. // empty values are omitted from API requests. However, any field with
  1357. // an empty value appearing in NullFields will be sent to the server as
  1358. // null. It is an error if a field in this list has a non-empty value.
  1359. // This may be used to include null fields in Patch requests.
  1360. NullFields []string `json:"-"`
  1361. }
  1362. func (s *BatchGetValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  1363. type NoMethod BatchGetValuesByDataFilterResponse
  1364. raw := NoMethod(*s)
  1365. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1366. }
  1367. // BatchGetValuesResponse: The response when retrieving more than one
  1368. // range of values in a spreadsheet.
  1369. type BatchGetValuesResponse struct {
  1370. // SpreadsheetId: The ID of the spreadsheet the data was retrieved from.
  1371. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1372. // ValueRanges: The requested values. The order of the ValueRanges is
  1373. // the same as the
  1374. // order of the requested ranges.
  1375. ValueRanges []*ValueRange `json:"valueRanges,omitempty"`
  1376. // ServerResponse contains the HTTP response code and headers from the
  1377. // server.
  1378. googleapi.ServerResponse `json:"-"`
  1379. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  1380. // unconditionally include in API requests. By default, fields with
  1381. // empty values are omitted from API requests. However, any non-pointer,
  1382. // non-interface field appearing in ForceSendFields will be sent to the
  1383. // server regardless of whether the field is empty or not. This may be
  1384. // used to include empty fields in Patch requests.
  1385. ForceSendFields []string `json:"-"`
  1386. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  1387. // in API requests with the JSON null value. By default, fields with
  1388. // empty values are omitted from API requests. However, any field with
  1389. // an empty value appearing in NullFields will be sent to the server as
  1390. // null. It is an error if a field in this list has a non-empty value.
  1391. // This may be used to include null fields in Patch requests.
  1392. NullFields []string `json:"-"`
  1393. }
  1394. func (s *BatchGetValuesResponse) MarshalJSON() ([]byte, error) {
  1395. type NoMethod BatchGetValuesResponse
  1396. raw := NoMethod(*s)
  1397. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1398. }
  1399. // BatchUpdateSpreadsheetRequest: The request for updating any aspect of
  1400. // a spreadsheet.
  1401. type BatchUpdateSpreadsheetRequest struct {
  1402. // IncludeSpreadsheetInResponse: Determines if the update response
  1403. // should include the spreadsheet
  1404. // resource.
  1405. IncludeSpreadsheetInResponse bool `json:"includeSpreadsheetInResponse,omitempty"`
  1406. // Requests: A list of updates to apply to the spreadsheet.
  1407. // Requests will be applied in the order they are specified.
  1408. // If any request is not valid, no requests will be applied.
  1409. Requests []*Request `json:"requests,omitempty"`
  1410. // ResponseIncludeGridData: True if grid data should be returned.
  1411. // Meaningful only if
  1412. // if include_spreadsheet_in_response is 'true'.
  1413. // This parameter is ignored if a field mask was set in the request.
  1414. ResponseIncludeGridData bool `json:"responseIncludeGridData,omitempty"`
  1415. // ResponseRanges: Limits the ranges included in the response
  1416. // spreadsheet.
  1417. // Meaningful only if include_spreadsheet_response is 'true'.
  1418. ResponseRanges []string `json:"responseRanges,omitempty"`
  1419. // ForceSendFields is a list of field names (e.g.
  1420. // "IncludeSpreadsheetInResponse") to unconditionally include in API
  1421. // requests. By default, fields with empty values are omitted from API
  1422. // requests. However, any non-pointer, non-interface field appearing in
  1423. // ForceSendFields will be sent to the server regardless of whether the
  1424. // field is empty or not. This may be used to include empty fields in
  1425. // Patch requests.
  1426. ForceSendFields []string `json:"-"`
  1427. // NullFields is a list of field names (e.g.
  1428. // "IncludeSpreadsheetInResponse") to include in API requests with the
  1429. // JSON null value. By default, fields with empty values are omitted
  1430. // from API requests. However, any field with an empty value appearing
  1431. // in NullFields will be sent to the server as null. It is an error if a
  1432. // field in this list has a non-empty value. This may be used to include
  1433. // null fields in Patch requests.
  1434. NullFields []string `json:"-"`
  1435. }
  1436. func (s *BatchUpdateSpreadsheetRequest) MarshalJSON() ([]byte, error) {
  1437. type NoMethod BatchUpdateSpreadsheetRequest
  1438. raw := NoMethod(*s)
  1439. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1440. }
  1441. // BatchUpdateSpreadsheetResponse: The reply for batch updating a
  1442. // spreadsheet.
  1443. type BatchUpdateSpreadsheetResponse struct {
  1444. // Replies: The reply of the updates. This maps 1:1 with the updates,
  1445. // although
  1446. // replies to some requests may be empty.
  1447. Replies []*Response `json:"replies,omitempty"`
  1448. // SpreadsheetId: The spreadsheet the updates were applied to.
  1449. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1450. // UpdatedSpreadsheet: The spreadsheet after updates were applied. This
  1451. // is only set
  1452. // if
  1453. // [BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response] is
  1454. // `true`.
  1455. UpdatedSpreadsheet *Spreadsheet `json:"updatedSpreadsheet,omitempty"`
  1456. // ServerResponse contains the HTTP response code and headers from the
  1457. // server.
  1458. googleapi.ServerResponse `json:"-"`
  1459. // ForceSendFields is a list of field names (e.g. "Replies") to
  1460. // unconditionally include in API requests. By default, fields with
  1461. // empty values are omitted from API requests. However, any non-pointer,
  1462. // non-interface field appearing in ForceSendFields will be sent to the
  1463. // server regardless of whether the field is empty or not. This may be
  1464. // used to include empty fields in Patch requests.
  1465. ForceSendFields []string `json:"-"`
  1466. // NullFields is a list of field names (e.g. "Replies") to include in
  1467. // API requests with the JSON null value. By default, fields with empty
  1468. // values are omitted from API requests. However, any field with an
  1469. // empty value appearing in NullFields will be sent to the server as
  1470. // null. It is an error if a field in this list has a non-empty value.
  1471. // This may be used to include null fields in Patch requests.
  1472. NullFields []string `json:"-"`
  1473. }
  1474. func (s *BatchUpdateSpreadsheetResponse) MarshalJSON() ([]byte, error) {
  1475. type NoMethod BatchUpdateSpreadsheetResponse
  1476. raw := NoMethod(*s)
  1477. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1478. }
  1479. // BatchUpdateValuesByDataFilterRequest: The request for updating more
  1480. // than one range of values in a spreadsheet.
  1481. type BatchUpdateValuesByDataFilterRequest struct {
  1482. // Data: The new values to apply to the spreadsheet. If more than one
  1483. // range is
  1484. // matched by the specified DataFilter the specified values will
  1485. // be
  1486. // applied to all of those ranges.
  1487. Data []*DataFilterValueRange `json:"data,omitempty"`
  1488. // IncludeValuesInResponse: Determines if the update response should
  1489. // include the values
  1490. // of the cells that were updated. By default, responses
  1491. // do not include the updated values. The `updatedData` field
  1492. // within
  1493. // each of the BatchUpdateValuesResponse.responses will contain
  1494. // the updated values. If the range to write was larger than than the
  1495. // range
  1496. // actually written, the response will include all values in the
  1497. // requested
  1498. // range (excluding trailing empty rows and columns).
  1499. IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"`
  1500. // ResponseDateTimeRenderOption: Determines how dates, times, and
  1501. // durations in the response should be
  1502. // rendered. This is ignored if response_value_render_option
  1503. // is
  1504. // FORMATTED_VALUE.
  1505. // The default dateTime render option
  1506. // is
  1507. // DateTimeRenderOption.SERIAL_NUMBER.
  1508. //
  1509. // Possible values:
  1510. // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration
  1511. // fields to be output
  1512. // as doubles in "serial number" format, as popularized by Lotus
  1513. // 1-2-3.
  1514. // The whole number portion of the value (left of the decimal)
  1515. // counts
  1516. // the days since December 30th 1899. The fractional portion (right
  1517. // of
  1518. // the decimal) counts the time as a fraction of the day. For
  1519. // example,
  1520. // January 1st 1900 at noon would be 2.5, 2 because it's 2 days
  1521. // after
  1522. // December 30st 1899, and .5 because noon is half a day. February
  1523. // 1st
  1524. // 1900 at 3pm would be 33.625. This correctly treats the year 1900
  1525. // as
  1526. // not a leap year.
  1527. // "FORMATTED_STRING" - Instructs date, time, datetime, and duration
  1528. // fields to be output
  1529. // as strings in their given number format (which is dependent
  1530. // on the spreadsheet locale).
  1531. ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"`
  1532. // ResponseValueRenderOption: Determines how values in the response
  1533. // should be rendered.
  1534. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  1535. //
  1536. // Possible values:
  1537. // "FORMATTED_VALUE" - Values will be calculated & formatted in the
  1538. // reply according to the
  1539. // cell's formatting. Formatting is based on the spreadsheet's
  1540. // locale,
  1541. // not the requesting user's locale.
  1542. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1543. // currency,
  1544. // then `A2` would return "$1.23".
  1545. // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted
  1546. // in the reply.
  1547. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1548. // currency,
  1549. // then `A2` would return the number `1.23`.
  1550. // "FORMULA" - Values will not be calculated. The reply will include
  1551. // the formulas.
  1552. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1553. // currency,
  1554. // then A2 would return "=A1".
  1555. ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"`
  1556. // ValueInputOption: How the input data should be interpreted.
  1557. //
  1558. // Possible values:
  1559. // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value
  1560. // must not be used.
  1561. // "RAW" - The values the user has entered will not be parsed and will
  1562. // be stored
  1563. // as-is.
  1564. // "USER_ENTERED" - The values will be parsed as if the user typed
  1565. // them into the UI.
  1566. // Numbers will stay as numbers, but strings may be converted to
  1567. // numbers,
  1568. // dates, etc. following the same rules that are applied when
  1569. // entering
  1570. // text into a cell via the Google Sheets UI.
  1571. ValueInputOption string `json:"valueInputOption,omitempty"`
  1572. // ForceSendFields is a list of field names (e.g. "Data") to
  1573. // unconditionally include in API requests. By default, fields with
  1574. // empty values are omitted from API requests. However, any non-pointer,
  1575. // non-interface field appearing in ForceSendFields will be sent to the
  1576. // server regardless of whether the field is empty or not. This may be
  1577. // used to include empty fields in Patch requests.
  1578. ForceSendFields []string `json:"-"`
  1579. // NullFields is a list of field names (e.g. "Data") to include in API
  1580. // requests with the JSON null value. By default, fields with empty
  1581. // values are omitted from API requests. However, any field with an
  1582. // empty value appearing in NullFields will be sent to the server as
  1583. // null. It is an error if a field in this list has a non-empty value.
  1584. // This may be used to include null fields in Patch requests.
  1585. NullFields []string `json:"-"`
  1586. }
  1587. func (s *BatchUpdateValuesByDataFilterRequest) MarshalJSON() ([]byte, error) {
  1588. type NoMethod BatchUpdateValuesByDataFilterRequest
  1589. raw := NoMethod(*s)
  1590. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1591. }
  1592. // BatchUpdateValuesByDataFilterResponse: The response when updating a
  1593. // range of values in a spreadsheet.
  1594. type BatchUpdateValuesByDataFilterResponse struct {
  1595. // Responses: The response for each range updated.
  1596. Responses []*UpdateValuesByDataFilterResponse `json:"responses,omitempty"`
  1597. // SpreadsheetId: The spreadsheet the updates were applied to.
  1598. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1599. // TotalUpdatedCells: The total number of cells updated.
  1600. TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"`
  1601. // TotalUpdatedColumns: The total number of columns where at least one
  1602. // cell in the column was
  1603. // updated.
  1604. TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"`
  1605. // TotalUpdatedRows: The total number of rows where at least one cell in
  1606. // the row was updated.
  1607. TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"`
  1608. // TotalUpdatedSheets: The total number of sheets where at least one
  1609. // cell in the sheet was
  1610. // updated.
  1611. TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"`
  1612. // ServerResponse contains the HTTP response code and headers from the
  1613. // server.
  1614. googleapi.ServerResponse `json:"-"`
  1615. // ForceSendFields is a list of field names (e.g. "Responses") to
  1616. // unconditionally include in API requests. By default, fields with
  1617. // empty values are omitted from API requests. However, any non-pointer,
  1618. // non-interface field appearing in ForceSendFields will be sent to the
  1619. // server regardless of whether the field is empty or not. This may be
  1620. // used to include empty fields in Patch requests.
  1621. ForceSendFields []string `json:"-"`
  1622. // NullFields is a list of field names (e.g. "Responses") to include in
  1623. // API requests with the JSON null value. By default, fields with empty
  1624. // values are omitted from API requests. However, any field with an
  1625. // empty value appearing in NullFields will be sent to the server as
  1626. // null. It is an error if a field in this list has a non-empty value.
  1627. // This may be used to include null fields in Patch requests.
  1628. NullFields []string `json:"-"`
  1629. }
  1630. func (s *BatchUpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  1631. type NoMethod BatchUpdateValuesByDataFilterResponse
  1632. raw := NoMethod(*s)
  1633. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1634. }
  1635. // BatchUpdateValuesRequest: The request for updating more than one
  1636. // range of values in a spreadsheet.
  1637. type BatchUpdateValuesRequest struct {
  1638. // Data: The new values to apply to the spreadsheet.
  1639. Data []*ValueRange `json:"data,omitempty"`
  1640. // IncludeValuesInResponse: Determines if the update response should
  1641. // include the values
  1642. // of the cells that were updated. By default, responses
  1643. // do not include the updated values. The `updatedData` field
  1644. // within
  1645. // each of the BatchUpdateValuesResponse.responses will contain
  1646. // the updated values. If the range to write was larger than than the
  1647. // range
  1648. // actually written, the response will include all values in the
  1649. // requested
  1650. // range (excluding trailing empty rows and columns).
  1651. IncludeValuesInResponse bool `json:"includeValuesInResponse,omitempty"`
  1652. // ResponseDateTimeRenderOption: Determines how dates, times, and
  1653. // durations in the response should be
  1654. // rendered. This is ignored if response_value_render_option
  1655. // is
  1656. // FORMATTED_VALUE.
  1657. // The default dateTime render option
  1658. // is
  1659. // DateTimeRenderOption.SERIAL_NUMBER.
  1660. //
  1661. // Possible values:
  1662. // "SERIAL_NUMBER" - Instructs date, time, datetime, and duration
  1663. // fields to be output
  1664. // as doubles in "serial number" format, as popularized by Lotus
  1665. // 1-2-3.
  1666. // The whole number portion of the value (left of the decimal)
  1667. // counts
  1668. // the days since December 30th 1899. The fractional portion (right
  1669. // of
  1670. // the decimal) counts the time as a fraction of the day. For
  1671. // example,
  1672. // January 1st 1900 at noon would be 2.5, 2 because it's 2 days
  1673. // after
  1674. // December 30st 1899, and .5 because noon is half a day. February
  1675. // 1st
  1676. // 1900 at 3pm would be 33.625. This correctly treats the year 1900
  1677. // as
  1678. // not a leap year.
  1679. // "FORMATTED_STRING" - Instructs date, time, datetime, and duration
  1680. // fields to be output
  1681. // as strings in their given number format (which is dependent
  1682. // on the spreadsheet locale).
  1683. ResponseDateTimeRenderOption string `json:"responseDateTimeRenderOption,omitempty"`
  1684. // ResponseValueRenderOption: Determines how values in the response
  1685. // should be rendered.
  1686. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  1687. //
  1688. // Possible values:
  1689. // "FORMATTED_VALUE" - Values will be calculated & formatted in the
  1690. // reply according to the
  1691. // cell's formatting. Formatting is based on the spreadsheet's
  1692. // locale,
  1693. // not the requesting user's locale.
  1694. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1695. // currency,
  1696. // then `A2` would return "$1.23".
  1697. // "UNFORMATTED_VALUE" - Values will be calculated, but not formatted
  1698. // in the reply.
  1699. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1700. // currency,
  1701. // then `A2` would return the number `1.23`.
  1702. // "FORMULA" - Values will not be calculated. The reply will include
  1703. // the formulas.
  1704. // For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as
  1705. // currency,
  1706. // then A2 would return "=A1".
  1707. ResponseValueRenderOption string `json:"responseValueRenderOption,omitempty"`
  1708. // ValueInputOption: How the input data should be interpreted.
  1709. //
  1710. // Possible values:
  1711. // "INPUT_VALUE_OPTION_UNSPECIFIED" - Default input value. This value
  1712. // must not be used.
  1713. // "RAW" - The values the user has entered will not be parsed and will
  1714. // be stored
  1715. // as-is.
  1716. // "USER_ENTERED" - The values will be parsed as if the user typed
  1717. // them into the UI.
  1718. // Numbers will stay as numbers, but strings may be converted to
  1719. // numbers,
  1720. // dates, etc. following the same rules that are applied when
  1721. // entering
  1722. // text into a cell via the Google Sheets UI.
  1723. ValueInputOption string `json:"valueInputOption,omitempty"`
  1724. // ForceSendFields is a list of field names (e.g. "Data") to
  1725. // unconditionally include in API requests. By default, fields with
  1726. // empty values are omitted from API requests. However, any non-pointer,
  1727. // non-interface field appearing in ForceSendFields will be sent to the
  1728. // server regardless of whether the field is empty or not. This may be
  1729. // used to include empty fields in Patch requests.
  1730. ForceSendFields []string `json:"-"`
  1731. // NullFields is a list of field names (e.g. "Data") to include in API
  1732. // requests with the JSON null value. By default, fields with empty
  1733. // values are omitted from API requests. However, any field with an
  1734. // empty value appearing in NullFields will be sent to the server as
  1735. // null. It is an error if a field in this list has a non-empty value.
  1736. // This may be used to include null fields in Patch requests.
  1737. NullFields []string `json:"-"`
  1738. }
  1739. func (s *BatchUpdateValuesRequest) MarshalJSON() ([]byte, error) {
  1740. type NoMethod BatchUpdateValuesRequest
  1741. raw := NoMethod(*s)
  1742. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1743. }
  1744. // BatchUpdateValuesResponse: The response when updating a range of
  1745. // values in a spreadsheet.
  1746. type BatchUpdateValuesResponse struct {
  1747. // Responses: One UpdateValuesResponse per requested range, in the same
  1748. // order as
  1749. // the requests appeared.
  1750. Responses []*UpdateValuesResponse `json:"responses,omitempty"`
  1751. // SpreadsheetId: The spreadsheet the updates were applied to.
  1752. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  1753. // TotalUpdatedCells: The total number of cells updated.
  1754. TotalUpdatedCells int64 `json:"totalUpdatedCells,omitempty"`
  1755. // TotalUpdatedColumns: The total number of columns where at least one
  1756. // cell in the column was
  1757. // updated.
  1758. TotalUpdatedColumns int64 `json:"totalUpdatedColumns,omitempty"`
  1759. // TotalUpdatedRows: The total number of rows where at least one cell in
  1760. // the row was updated.
  1761. TotalUpdatedRows int64 `json:"totalUpdatedRows,omitempty"`
  1762. // TotalUpdatedSheets: The total number of sheets where at least one
  1763. // cell in the sheet was
  1764. // updated.
  1765. TotalUpdatedSheets int64 `json:"totalUpdatedSheets,omitempty"`
  1766. // ServerResponse contains the HTTP response code and headers from the
  1767. // server.
  1768. googleapi.ServerResponse `json:"-"`
  1769. // ForceSendFields is a list of field names (e.g. "Responses") to
  1770. // unconditionally include in API requests. By default, fields with
  1771. // empty values are omitted from API requests. However, any non-pointer,
  1772. // non-interface field appearing in ForceSendFields will be sent to the
  1773. // server regardless of whether the field is empty or not. This may be
  1774. // used to include empty fields in Patch requests.
  1775. ForceSendFields []string `json:"-"`
  1776. // NullFields is a list of field names (e.g. "Responses") to include in
  1777. // API requests with the JSON null value. By default, fields with empty
  1778. // values are omitted from API requests. However, any field with an
  1779. // empty value appearing in NullFields will be sent to the server as
  1780. // null. It is an error if a field in this list has a non-empty value.
  1781. // This may be used to include null fields in Patch requests.
  1782. NullFields []string `json:"-"`
  1783. }
  1784. func (s *BatchUpdateValuesResponse) MarshalJSON() ([]byte, error) {
  1785. type NoMethod BatchUpdateValuesResponse
  1786. raw := NoMethod(*s)
  1787. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1788. }
  1789. // BooleanCondition: A condition that can evaluate to true or
  1790. // false.
  1791. // BooleanConditions are used by conditional formatting,
  1792. // data validation, and the criteria in filters.
  1793. type BooleanCondition struct {
  1794. // Type: The type of condition.
  1795. //
  1796. // Possible values:
  1797. // "CONDITION_TYPE_UNSPECIFIED" - The default value, do not use.
  1798. // "NUMBER_GREATER" - The cell's value must be greater than the
  1799. // condition's value.
  1800. // Supported by data validation, conditional formatting and
  1801. // filters.
  1802. // Requires a single ConditionValue.
  1803. // "NUMBER_GREATER_THAN_EQ" - The cell's value must be greater than or
  1804. // equal to the condition's value.
  1805. // Supported by data validation, conditional formatting and
  1806. // filters.
  1807. // Requires a single ConditionValue.
  1808. // "NUMBER_LESS" - The cell's value must be less than the condition's
  1809. // value.
  1810. // Supported by data validation, conditional formatting and
  1811. // filters.
  1812. // Requires a single ConditionValue.
  1813. // "NUMBER_LESS_THAN_EQ" - The cell's value must be less than or equal
  1814. // to the condition's value.
  1815. // Supported by data validation, conditional formatting and
  1816. // filters.
  1817. // Requires a single ConditionValue.
  1818. // "NUMBER_EQ" - The cell's value must be equal to the condition's
  1819. // value.
  1820. // Supported by data validation, conditional formatting and
  1821. // filters.
  1822. // Requires a single ConditionValue.
  1823. // "NUMBER_NOT_EQ" - The cell's value must be not equal to the
  1824. // condition's value.
  1825. // Supported by data validation, conditional formatting and
  1826. // filters.
  1827. // Requires a single ConditionValue.
  1828. // "NUMBER_BETWEEN" - The cell's value must be between the two
  1829. // condition values.
  1830. // Supported by data validation, conditional formatting and
  1831. // filters.
  1832. // Requires exactly two ConditionValues.
  1833. // "NUMBER_NOT_BETWEEN" - The cell's value must not be between the two
  1834. // condition values.
  1835. // Supported by data validation, conditional formatting and
  1836. // filters.
  1837. // Requires exactly two ConditionValues.
  1838. // "TEXT_CONTAINS" - The cell's value must contain the condition's
  1839. // value.
  1840. // Supported by data validation, conditional formatting and
  1841. // filters.
  1842. // Requires a single ConditionValue.
  1843. // "TEXT_NOT_CONTAINS" - The cell's value must not contain the
  1844. // condition's value.
  1845. // Supported by data validation, conditional formatting and
  1846. // filters.
  1847. // Requires a single ConditionValue.
  1848. // "TEXT_STARTS_WITH" - The cell's value must start with the
  1849. // condition's value.
  1850. // Supported by conditional formatting and filters.
  1851. // Requires a single ConditionValue.
  1852. // "TEXT_ENDS_WITH" - The cell's value must end with the condition's
  1853. // value.
  1854. // Supported by conditional formatting and filters.
  1855. // Requires a single ConditionValue.
  1856. // "TEXT_EQ" - The cell's value must be exactly the condition's
  1857. // value.
  1858. // Supported by data validation, conditional formatting and
  1859. // filters.
  1860. // Requires a single ConditionValue.
  1861. // "TEXT_IS_EMAIL" - The cell's value must be a valid email
  1862. // address.
  1863. // Supported by data validation.
  1864. // Requires no ConditionValues.
  1865. // "TEXT_IS_URL" - The cell's value must be a valid URL.
  1866. // Supported by data validation.
  1867. // Requires no ConditionValues.
  1868. // "DATE_EQ" - The cell's value must be the same date as the
  1869. // condition's value.
  1870. // Supported by data validation, conditional formatting and
  1871. // filters.
  1872. // Requires a single ConditionValue.
  1873. // "DATE_BEFORE" - The cell's value must be before the date of the
  1874. // condition's value.
  1875. // Supported by data validation, conditional formatting and
  1876. // filters.
  1877. // Requires a single ConditionValue
  1878. // that may be a relative date.
  1879. // "DATE_AFTER" - The cell's value must be after the date of the
  1880. // condition's value.
  1881. // Supported by data validation, conditional formatting and
  1882. // filters.
  1883. // Requires a single ConditionValue
  1884. // that may be a relative date.
  1885. // "DATE_ON_OR_BEFORE" - The cell's value must be on or before the
  1886. // date of the condition's value.
  1887. // Supported by data validation.
  1888. // Requires a single ConditionValue
  1889. // that may be a relative date.
  1890. // "DATE_ON_OR_AFTER" - The cell's value must be on or after the date
  1891. // of the condition's value.
  1892. // Supported by data validation.
  1893. // Requires a single ConditionValue
  1894. // that may be a relative date.
  1895. // "DATE_BETWEEN" - The cell's value must be between the dates of the
  1896. // two condition values.
  1897. // Supported by data validation.
  1898. // Requires exactly two ConditionValues.
  1899. // "DATE_NOT_BETWEEN" - The cell's value must be outside the dates of
  1900. // the two condition values.
  1901. // Supported by data validation.
  1902. // Requires exactly two ConditionValues.
  1903. // "DATE_IS_VALID" - The cell's value must be a date.
  1904. // Supported by data validation.
  1905. // Requires no ConditionValues.
  1906. // "ONE_OF_RANGE" - The cell's value must be listed in the grid in
  1907. // condition value's range.
  1908. // Supported by data validation.
  1909. // Requires a single ConditionValue,
  1910. // and the value must be a valid range in A1 notation.
  1911. // "ONE_OF_LIST" - The cell's value must be in the list of condition
  1912. // values.
  1913. // Supported by data validation.
  1914. // Supports any number of condition values,
  1915. // one per item in the list.
  1916. // Formulas are not supported in the values.
  1917. // "BLANK" - The cell's value must be empty.
  1918. // Supported by conditional formatting and filters.
  1919. // Requires no ConditionValues.
  1920. // "NOT_BLANK" - The cell's value must not be empty.
  1921. // Supported by conditional formatting and filters.
  1922. // Requires no ConditionValues.
  1923. // "CUSTOM_FORMULA" - The condition's formula must evaluate to
  1924. // true.
  1925. // Supported by data validation, conditional formatting and
  1926. // filters.
  1927. // Requires a single ConditionValue.
  1928. // "BOOLEAN" - The cell's value must be TRUE/FALSE or in the list of
  1929. // condition values.
  1930. // Supported by data validation.
  1931. // Renders as a cell checkbox.
  1932. // Supports zero, one or two ConditionValues. No
  1933. // values indicates the cell must be TRUE or FALSE, where TRUE renders
  1934. // as
  1935. // checked and FALSE renders as unchecked. One value indicates the
  1936. // cell
  1937. // will render as checked when it contains that value and unchecked when
  1938. // it
  1939. // is blank. Two values indicate that the cell will render as checked
  1940. // when
  1941. // it contains the first value and unchecked when it contains the
  1942. // second
  1943. // value. For example, ["Yes","No"] indicates that the cell will render
  1944. // a
  1945. // checked box when it has the value "Yes" and an unchecked box when it
  1946. // has
  1947. // the value "No".
  1948. Type string `json:"type,omitempty"`
  1949. // Values: The values of the condition. The number of supported values
  1950. // depends
  1951. // on the condition type. Some support zero values,
  1952. // others one or two values,
  1953. // and ConditionType.ONE_OF_LIST supports an arbitrary number of values.
  1954. Values []*ConditionValue `json:"values,omitempty"`
  1955. // ForceSendFields is a list of field names (e.g. "Type") to
  1956. // unconditionally include in API requests. By default, fields with
  1957. // empty values are omitted from API requests. However, any non-pointer,
  1958. // non-interface field appearing in ForceSendFields will be sent to the
  1959. // server regardless of whether the field is empty or not. This may be
  1960. // used to include empty fields in Patch requests.
  1961. ForceSendFields []string `json:"-"`
  1962. // NullFields is a list of field names (e.g. "Type") to include in API
  1963. // requests with the JSON null value. By default, fields with empty
  1964. // values are omitted from API requests. However, any field with an
  1965. // empty value appearing in NullFields will be sent to the server as
  1966. // null. It is an error if a field in this list has a non-empty value.
  1967. // This may be used to include null fields in Patch requests.
  1968. NullFields []string `json:"-"`
  1969. }
  1970. func (s *BooleanCondition) MarshalJSON() ([]byte, error) {
  1971. type NoMethod BooleanCondition
  1972. raw := NoMethod(*s)
  1973. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1974. }
  1975. // BooleanRule: A rule that may or may not match, depending on the
  1976. // condition.
  1977. type BooleanRule struct {
  1978. // Condition: The condition of the rule. If the condition evaluates to
  1979. // true,
  1980. // the format is applied.
  1981. Condition *BooleanCondition `json:"condition,omitempty"`
  1982. // Format: The format to apply.
  1983. // Conditional formatting can only apply a subset of formatting:
  1984. // bold, italic,
  1985. // strikethrough,
  1986. // foreground color &
  1987. // background color.
  1988. Format *CellFormat `json:"format,omitempty"`
  1989. // ForceSendFields is a list of field names (e.g. "Condition") to
  1990. // unconditionally include in API requests. By default, fields with
  1991. // empty values are omitted from API requests. However, any non-pointer,
  1992. // non-interface field appearing in ForceSendFields will be sent to the
  1993. // server regardless of whether the field is empty or not. This may be
  1994. // used to include empty fields in Patch requests.
  1995. ForceSendFields []string `json:"-"`
  1996. // NullFields is a list of field names (e.g. "Condition") to include in
  1997. // API requests with the JSON null value. By default, fields with empty
  1998. // values are omitted from API requests. However, any field with an
  1999. // empty value appearing in NullFields will be sent to the server as
  2000. // null. It is an error if a field in this list has a non-empty value.
  2001. // This may be used to include null fields in Patch requests.
  2002. NullFields []string `json:"-"`
  2003. }
  2004. func (s *BooleanRule) MarshalJSON() ([]byte, error) {
  2005. type NoMethod BooleanRule
  2006. raw := NoMethod(*s)
  2007. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2008. }
  2009. // Border: A border along a cell.
  2010. type Border struct {
  2011. // Color: The color of the border.
  2012. Color *Color `json:"color,omitempty"`
  2013. // Style: The style of the border.
  2014. //
  2015. // Possible values:
  2016. // "STYLE_UNSPECIFIED" - The style is not specified. Do not use this.
  2017. // "DOTTED" - The border is dotted.
  2018. // "DASHED" - The border is dashed.
  2019. // "SOLID" - The border is a thin solid line.
  2020. // "SOLID_MEDIUM" - The border is a medium solid line.
  2021. // "SOLID_THICK" - The border is a thick solid line.
  2022. // "NONE" - No border.
  2023. // Used only when updating a border in order to erase it.
  2024. // "DOUBLE" - The border is two solid lines.
  2025. Style string `json:"style,omitempty"`
  2026. // Width: The width of the border, in pixels.
  2027. // Deprecated; the width is determined by the "style" field.
  2028. Width int64 `json:"width,omitempty"`
  2029. // ForceSendFields is a list of field names (e.g. "Color") to
  2030. // unconditionally include in API requests. By default, fields with
  2031. // empty values are omitted from API requests. However, any non-pointer,
  2032. // non-interface field appearing in ForceSendFields will be sent to the
  2033. // server regardless of whether the field is empty or not. This may be
  2034. // used to include empty fields in Patch requests.
  2035. ForceSendFields []string `json:"-"`
  2036. // NullFields is a list of field names (e.g. "Color") to include in API
  2037. // requests with the JSON null value. By default, fields with empty
  2038. // values are omitted from API requests. However, any field with an
  2039. // empty value appearing in NullFields will be sent to the server as
  2040. // null. It is an error if a field in this list has a non-empty value.
  2041. // This may be used to include null fields in Patch requests.
  2042. NullFields []string `json:"-"`
  2043. }
  2044. func (s *Border) MarshalJSON() ([]byte, error) {
  2045. type NoMethod Border
  2046. raw := NoMethod(*s)
  2047. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2048. }
  2049. // Borders: The borders of the cell.
  2050. type Borders struct {
  2051. // Bottom: The bottom border of the cell.
  2052. Bottom *Border `json:"bottom,omitempty"`
  2053. // Left: The left border of the cell.
  2054. Left *Border `json:"left,omitempty"`
  2055. // Right: The right border of the cell.
  2056. Right *Border `json:"right,omitempty"`
  2057. // Top: The top border of the cell.
  2058. Top *Border `json:"top,omitempty"`
  2059. // ForceSendFields is a list of field names (e.g. "Bottom") to
  2060. // unconditionally include in API requests. By default, fields with
  2061. // empty values are omitted from API requests. However, any non-pointer,
  2062. // non-interface field appearing in ForceSendFields will be sent to the
  2063. // server regardless of whether the field is empty or not. This may be
  2064. // used to include empty fields in Patch requests.
  2065. ForceSendFields []string `json:"-"`
  2066. // NullFields is a list of field names (e.g. "Bottom") to include in API
  2067. // requests with the JSON null value. By default, fields with empty
  2068. // values are omitted from API requests. However, any field with an
  2069. // empty value appearing in NullFields will be sent to the server as
  2070. // null. It is an error if a field in this list has a non-empty value.
  2071. // This may be used to include null fields in Patch requests.
  2072. NullFields []string `json:"-"`
  2073. }
  2074. func (s *Borders) MarshalJSON() ([]byte, error) {
  2075. type NoMethod Borders
  2076. raw := NoMethod(*s)
  2077. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2078. }
  2079. // BubbleChartSpec: A <a
  2080. // href="/chart/interactive/docs/gallery/bubblechart">bubble chart</a>.
  2081. type BubbleChartSpec struct {
  2082. // BubbleBorderColor: The bubble border color.
  2083. BubbleBorderColor *Color `json:"bubbleBorderColor,omitempty"`
  2084. // BubbleLabels: The data containing the bubble labels. These do not
  2085. // need to be unique.
  2086. BubbleLabels *ChartData `json:"bubbleLabels,omitempty"`
  2087. // BubbleMaxRadiusSize: The max radius size of the bubbles, in
  2088. // pixels.
  2089. // If specified, the field must be a positive value.
  2090. BubbleMaxRadiusSize int64 `json:"bubbleMaxRadiusSize,omitempty"`
  2091. // BubbleMinRadiusSize: The minimum radius size of the bubbles, in
  2092. // pixels.
  2093. // If specific, the field must be a positive value.
  2094. BubbleMinRadiusSize int64 `json:"bubbleMinRadiusSize,omitempty"`
  2095. // BubbleOpacity: The opacity of the bubbles between 0 and 1.0.
  2096. // 0 is fully transparent and 1 is fully opaque.
  2097. BubbleOpacity float64 `json:"bubbleOpacity,omitempty"`
  2098. // BubbleSizes: The data contianing the bubble sizes. Bubble sizes are
  2099. // used to draw
  2100. // the bubbles at different sizes relative to each other.
  2101. // If specified, group_ids must also be specified. This field
  2102. // is
  2103. // optional.
  2104. BubbleSizes *ChartData `json:"bubbleSizes,omitempty"`
  2105. // BubbleTextStyle: The format of the text inside the bubbles.
  2106. // Underline and Strikethrough are not supported.
  2107. BubbleTextStyle *TextFormat `json:"bubbleTextStyle,omitempty"`
  2108. // Domain: The data containing the bubble x-values. These values locate
  2109. // the bubbles
  2110. // in the chart horizontally.
  2111. Domain *ChartData `json:"domain,omitempty"`
  2112. // GroupIds: The data containing the bubble group IDs. All bubbles with
  2113. // the same group
  2114. // ID are drawn in the same color. If bubble_sizes is specified
  2115. // then
  2116. // this field must also be specified but may contain blank values.
  2117. // This field is optional.
  2118. GroupIds *ChartData `json:"groupIds,omitempty"`
  2119. // LegendPosition: Where the legend of the chart should be drawn.
  2120. //
  2121. // Possible values:
  2122. // "BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
  2123. // use.
  2124. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  2125. // chart.
  2126. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  2127. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  2128. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  2129. // "NO_LEGEND" - No legend is rendered.
  2130. // "INSIDE_LEGEND" - The legend is rendered inside the chart area.
  2131. LegendPosition string `json:"legendPosition,omitempty"`
  2132. // Series: The data contianing the bubble y-values. These values locate
  2133. // the bubbles
  2134. // in the chart vertically.
  2135. Series *ChartData `json:"series,omitempty"`
  2136. // ForceSendFields is a list of field names (e.g. "BubbleBorderColor")
  2137. // to unconditionally include in API requests. By default, fields with
  2138. // empty values are omitted from API requests. However, any non-pointer,
  2139. // non-interface field appearing in ForceSendFields will be sent to the
  2140. // server regardless of whether the field is empty or not. This may be
  2141. // used to include empty fields in Patch requests.
  2142. ForceSendFields []string `json:"-"`
  2143. // NullFields is a list of field names (e.g. "BubbleBorderColor") to
  2144. // include in API requests with the JSON null value. By default, fields
  2145. // with empty values are omitted from API requests. However, any field
  2146. // with an empty value appearing in NullFields will be sent to the
  2147. // server as null. It is an error if a field in this list has a
  2148. // non-empty value. This may be used to include null fields in Patch
  2149. // requests.
  2150. NullFields []string `json:"-"`
  2151. }
  2152. func (s *BubbleChartSpec) MarshalJSON() ([]byte, error) {
  2153. type NoMethod BubbleChartSpec
  2154. raw := NoMethod(*s)
  2155. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2156. }
  2157. func (s *BubbleChartSpec) UnmarshalJSON(data []byte) error {
  2158. type NoMethod BubbleChartSpec
  2159. var s1 struct {
  2160. BubbleOpacity gensupport.JSONFloat64 `json:"bubbleOpacity"`
  2161. *NoMethod
  2162. }
  2163. s1.NoMethod = (*NoMethod)(s)
  2164. if err := json.Unmarshal(data, &s1); err != nil {
  2165. return err
  2166. }
  2167. s.BubbleOpacity = float64(s1.BubbleOpacity)
  2168. return nil
  2169. }
  2170. // CandlestickChartSpec: A <a
  2171. // href="/chart/interactive/docs/gallery/candlestickchart">candlestick
  2172. // chart</a>.
  2173. type CandlestickChartSpec struct {
  2174. // Data: The Candlestick chart data.
  2175. // Only one CandlestickData is supported.
  2176. Data []*CandlestickData `json:"data,omitempty"`
  2177. // Domain: The domain data (horizontal axis) for the candlestick chart.
  2178. // String data
  2179. // will be treated as discrete labels, other data will be treated
  2180. // as
  2181. // continuous values.
  2182. Domain *CandlestickDomain `json:"domain,omitempty"`
  2183. // ForceSendFields is a list of field names (e.g. "Data") to
  2184. // unconditionally include in API requests. By default, fields with
  2185. // empty values are omitted from API requests. However, any non-pointer,
  2186. // non-interface field appearing in ForceSendFields will be sent to the
  2187. // server regardless of whether the field is empty or not. This may be
  2188. // used to include empty fields in Patch requests.
  2189. ForceSendFields []string `json:"-"`
  2190. // NullFields is a list of field names (e.g. "Data") to include in API
  2191. // requests with the JSON null value. By default, fields with empty
  2192. // values are omitted from API requests. However, any field with an
  2193. // empty value appearing in NullFields will be sent to the server as
  2194. // null. It is an error if a field in this list has a non-empty value.
  2195. // This may be used to include null fields in Patch requests.
  2196. NullFields []string `json:"-"`
  2197. }
  2198. func (s *CandlestickChartSpec) MarshalJSON() ([]byte, error) {
  2199. type NoMethod CandlestickChartSpec
  2200. raw := NoMethod(*s)
  2201. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2202. }
  2203. // CandlestickData: The Candlestick chart data, each containing the low,
  2204. // open, close, and high
  2205. // values for a series.
  2206. type CandlestickData struct {
  2207. // CloseSeries: The range data (vertical axis) for the close/final value
  2208. // for each candle.
  2209. // This is the top of the candle body. If greater than the open value
  2210. // the
  2211. // candle will be filled. Otherwise the candle will be hollow.
  2212. CloseSeries *CandlestickSeries `json:"closeSeries,omitempty"`
  2213. // HighSeries: The range data (vertical axis) for the high/maximum value
  2214. // for each
  2215. // candle. This is the top of the candle's center line.
  2216. HighSeries *CandlestickSeries `json:"highSeries,omitempty"`
  2217. // LowSeries: The range data (vertical axis) for the low/minimum value
  2218. // for each candle.
  2219. // This is the bottom of the candle's center line.
  2220. LowSeries *CandlestickSeries `json:"lowSeries,omitempty"`
  2221. // OpenSeries: The range data (vertical axis) for the open/initial value
  2222. // for each
  2223. // candle. This is the bottom of the candle body. If less than the
  2224. // close
  2225. // value the candle will be filled. Otherwise the candle will be
  2226. // hollow.
  2227. OpenSeries *CandlestickSeries `json:"openSeries,omitempty"`
  2228. // ForceSendFields is a list of field names (e.g. "CloseSeries") to
  2229. // unconditionally include in API requests. By default, fields with
  2230. // empty values are omitted from API requests. However, any non-pointer,
  2231. // non-interface field appearing in ForceSendFields will be sent to the
  2232. // server regardless of whether the field is empty or not. This may be
  2233. // used to include empty fields in Patch requests.
  2234. ForceSendFields []string `json:"-"`
  2235. // NullFields is a list of field names (e.g. "CloseSeries") to include
  2236. // in API requests with the JSON null value. By default, fields with
  2237. // empty values are omitted from API requests. However, any field with
  2238. // an empty value appearing in NullFields will be sent to the server as
  2239. // null. It is an error if a field in this list has a non-empty value.
  2240. // This may be used to include null fields in Patch requests.
  2241. NullFields []string `json:"-"`
  2242. }
  2243. func (s *CandlestickData) MarshalJSON() ([]byte, error) {
  2244. type NoMethod CandlestickData
  2245. raw := NoMethod(*s)
  2246. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2247. }
  2248. // CandlestickDomain: The domain of a CandlestickChart.
  2249. type CandlestickDomain struct {
  2250. // Data: The data of the CandlestickDomain.
  2251. Data *ChartData `json:"data,omitempty"`
  2252. // Reversed: True to reverse the order of the domain values (horizontal
  2253. // axis).
  2254. Reversed bool `json:"reversed,omitempty"`
  2255. // ForceSendFields is a list of field names (e.g. "Data") to
  2256. // unconditionally include in API requests. By default, fields with
  2257. // empty values are omitted from API requests. However, any non-pointer,
  2258. // non-interface field appearing in ForceSendFields will be sent to the
  2259. // server regardless of whether the field is empty or not. This may be
  2260. // used to include empty fields in Patch requests.
  2261. ForceSendFields []string `json:"-"`
  2262. // NullFields is a list of field names (e.g. "Data") to include in API
  2263. // requests with the JSON null value. By default, fields with empty
  2264. // values are omitted from API requests. However, any field with an
  2265. // empty value appearing in NullFields will be sent to the server as
  2266. // null. It is an error if a field in this list has a non-empty value.
  2267. // This may be used to include null fields in Patch requests.
  2268. NullFields []string `json:"-"`
  2269. }
  2270. func (s *CandlestickDomain) MarshalJSON() ([]byte, error) {
  2271. type NoMethod CandlestickDomain
  2272. raw := NoMethod(*s)
  2273. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2274. }
  2275. // CandlestickSeries: The series of a CandlestickData.
  2276. type CandlestickSeries struct {
  2277. // Data: The data of the CandlestickSeries.
  2278. Data *ChartData `json:"data,omitempty"`
  2279. // ForceSendFields is a list of field names (e.g. "Data") to
  2280. // unconditionally include in API requests. By default, fields with
  2281. // empty values are omitted from API requests. However, any non-pointer,
  2282. // non-interface field appearing in ForceSendFields will be sent to the
  2283. // server regardless of whether the field is empty or not. This may be
  2284. // used to include empty fields in Patch requests.
  2285. ForceSendFields []string `json:"-"`
  2286. // NullFields is a list of field names (e.g. "Data") to include in API
  2287. // requests with the JSON null value. By default, fields with empty
  2288. // values are omitted from API requests. However, any field with an
  2289. // empty value appearing in NullFields will be sent to the server as
  2290. // null. It is an error if a field in this list has a non-empty value.
  2291. // This may be used to include null fields in Patch requests.
  2292. NullFields []string `json:"-"`
  2293. }
  2294. func (s *CandlestickSeries) MarshalJSON() ([]byte, error) {
  2295. type NoMethod CandlestickSeries
  2296. raw := NoMethod(*s)
  2297. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2298. }
  2299. // CellData: Data about a specific cell.
  2300. type CellData struct {
  2301. // DataValidation: A data validation rule on the cell, if any.
  2302. //
  2303. // When writing, the new data validation rule will overwrite any prior
  2304. // rule.
  2305. DataValidation *DataValidationRule `json:"dataValidation,omitempty"`
  2306. // EffectiveFormat: The effective format being used by the cell.
  2307. // This includes the results of applying any conditional formatting
  2308. // and,
  2309. // if the cell contains a formula, the computed number format.
  2310. // If the effective format is the default format, effective format
  2311. // will
  2312. // not be written.
  2313. // This field is read-only.
  2314. EffectiveFormat *CellFormat `json:"effectiveFormat,omitempty"`
  2315. // EffectiveValue: The effective value of the cell. For cells with
  2316. // formulas, this is
  2317. // the calculated value. For cells with literals, this is
  2318. // the same as the user_entered_value.
  2319. // This field is read-only.
  2320. EffectiveValue *ExtendedValue `json:"effectiveValue,omitempty"`
  2321. // FormattedValue: The formatted value of the cell.
  2322. // This is the value as it's shown to the user.
  2323. // This field is read-only.
  2324. FormattedValue string `json:"formattedValue,omitempty"`
  2325. // Hyperlink: A hyperlink this cell points to, if any.
  2326. // This field is read-only. (To set it, use a `=HYPERLINK` formula
  2327. // in the userEnteredValue.formulaValue
  2328. // field.)
  2329. Hyperlink string `json:"hyperlink,omitempty"`
  2330. // Note: Any note on the cell.
  2331. Note string `json:"note,omitempty"`
  2332. // PivotTable: A pivot table anchored at this cell. The size of pivot
  2333. // table itself
  2334. // is computed dynamically based on its data, grouping, filters,
  2335. // values,
  2336. // etc. Only the top-left cell of the pivot table contains the pivot
  2337. // table
  2338. // definition. The other cells will contain the calculated values of
  2339. // the
  2340. // results of the pivot in their effective_value fields.
  2341. PivotTable *PivotTable `json:"pivotTable,omitempty"`
  2342. // TextFormatRuns: Runs of rich text applied to subsections of the cell.
  2343. // Runs are only valid
  2344. // on user entered strings, not formulas, bools, or numbers.
  2345. // Runs start at specific indexes in the text and continue until the
  2346. // next
  2347. // run. Properties of a run will continue unless explicitly changed
  2348. // in a subsequent run (and properties of the first run will
  2349. // continue
  2350. // the properties of the cell unless explicitly changed).
  2351. //
  2352. // When writing, the new runs will overwrite any prior runs. When
  2353. // writing a
  2354. // new user_entered_value, previous runs are erased.
  2355. TextFormatRuns []*TextFormatRun `json:"textFormatRuns,omitempty"`
  2356. // UserEnteredFormat: The format the user entered for the cell.
  2357. //
  2358. // When writing, the new format will be merged with the existing format.
  2359. UserEnteredFormat *CellFormat `json:"userEnteredFormat,omitempty"`
  2360. // UserEnteredValue: The value the user entered in the cell. e.g,
  2361. // `1234`, `'Hello'`, or `=NOW()`
  2362. // Note: Dates, Times and DateTimes are represented as doubles in
  2363. // serial number format.
  2364. UserEnteredValue *ExtendedValue `json:"userEnteredValue,omitempty"`
  2365. // ForceSendFields is a list of field names (e.g. "DataValidation") to
  2366. // unconditionally include in API requests. By default, fields with
  2367. // empty values are omitted from API requests. However, any non-pointer,
  2368. // non-interface field appearing in ForceSendFields will be sent to the
  2369. // server regardless of whether the field is empty or not. This may be
  2370. // used to include empty fields in Patch requests.
  2371. ForceSendFields []string `json:"-"`
  2372. // NullFields is a list of field names (e.g. "DataValidation") to
  2373. // include in API requests with the JSON null value. By default, fields
  2374. // with empty values are omitted from API requests. However, any field
  2375. // with an empty value appearing in NullFields will be sent to the
  2376. // server as null. It is an error if a field in this list has a
  2377. // non-empty value. This may be used to include null fields in Patch
  2378. // requests.
  2379. NullFields []string `json:"-"`
  2380. }
  2381. func (s *CellData) MarshalJSON() ([]byte, error) {
  2382. type NoMethod CellData
  2383. raw := NoMethod(*s)
  2384. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2385. }
  2386. // CellFormat: The format of a cell.
  2387. type CellFormat struct {
  2388. // BackgroundColor: The background color of the cell.
  2389. BackgroundColor *Color `json:"backgroundColor,omitempty"`
  2390. // Borders: The borders of the cell.
  2391. Borders *Borders `json:"borders,omitempty"`
  2392. // HorizontalAlignment: The horizontal alignment of the value in the
  2393. // cell.
  2394. //
  2395. // Possible values:
  2396. // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not
  2397. // specified. Do not use this.
  2398. // "LEFT" - The text is explicitly aligned to the left of the cell.
  2399. // "CENTER" - The text is explicitly aligned to the center of the
  2400. // cell.
  2401. // "RIGHT" - The text is explicitly aligned to the right of the cell.
  2402. HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
  2403. // HyperlinkDisplayType: How a hyperlink, if it exists, should be
  2404. // displayed in the cell.
  2405. //
  2406. // Possible values:
  2407. // "HYPERLINK_DISPLAY_TYPE_UNSPECIFIED" - The default value: the
  2408. // hyperlink is rendered. Do not use this.
  2409. // "LINKED" - A hyperlink should be explicitly rendered.
  2410. // "PLAIN_TEXT" - A hyperlink should not be rendered.
  2411. HyperlinkDisplayType string `json:"hyperlinkDisplayType,omitempty"`
  2412. // NumberFormat: A format describing how number values should be
  2413. // represented to the user.
  2414. NumberFormat *NumberFormat `json:"numberFormat,omitempty"`
  2415. // Padding: The padding of the cell.
  2416. Padding *Padding `json:"padding,omitempty"`
  2417. // TextDirection: The direction of the text in the cell.
  2418. //
  2419. // Possible values:
  2420. // "TEXT_DIRECTION_UNSPECIFIED" - The text direction is not specified.
  2421. // Do not use this.
  2422. // "LEFT_TO_RIGHT" - The text direction of left-to-right was set by
  2423. // the user.
  2424. // "RIGHT_TO_LEFT" - The text direction of right-to-left was set by
  2425. // the user.
  2426. TextDirection string `json:"textDirection,omitempty"`
  2427. // TextFormat: The format of the text in the cell (unless overridden by
  2428. // a format run).
  2429. TextFormat *TextFormat `json:"textFormat,omitempty"`
  2430. // TextRotation: The rotation applied to text in a cell
  2431. TextRotation *TextRotation `json:"textRotation,omitempty"`
  2432. // VerticalAlignment: The vertical alignment of the value in the cell.
  2433. //
  2434. // Possible values:
  2435. // "VERTICAL_ALIGN_UNSPECIFIED" - The vertical alignment is not
  2436. // specified. Do not use this.
  2437. // "TOP" - The text is explicitly aligned to the top of the cell.
  2438. // "MIDDLE" - The text is explicitly aligned to the middle of the
  2439. // cell.
  2440. // "BOTTOM" - The text is explicitly aligned to the bottom of the
  2441. // cell.
  2442. VerticalAlignment string `json:"verticalAlignment,omitempty"`
  2443. // WrapStrategy: The wrap strategy for the value in the cell.
  2444. //
  2445. // Possible values:
  2446. // "WRAP_STRATEGY_UNSPECIFIED" - The default value, do not use.
  2447. // "OVERFLOW_CELL" - Lines that are longer than the cell width will be
  2448. // written in the next
  2449. // cell over, so long as that cell is empty. If the next cell over
  2450. // is
  2451. // non-empty, this behaves the same as CLIP. The text will never wrap
  2452. // to the next line unless the user manually inserts a new
  2453. // line.
  2454. // Example:
  2455. //
  2456. // | First sentence. |
  2457. // | Manual newline that is very long. <- Text continues into next
  2458. // cell
  2459. // | Next newline. |
  2460. // "LEGACY_WRAP" - This wrap strategy represents the old Google Sheets
  2461. // wrap strategy where
  2462. // words that are longer than a line are clipped rather than broken.
  2463. // This
  2464. // strategy is not supported on all platforms and is being phased
  2465. // out.
  2466. // Example:
  2467. //
  2468. // | Cell has a |
  2469. // | loooooooooo| <- Word is clipped.
  2470. // | word. |
  2471. // "CLIP" - Lines that are longer than the cell width will be
  2472. // clipped.
  2473. // The text will never wrap to the next line unless the user
  2474. // manually
  2475. // inserts a new line.
  2476. // Example:
  2477. //
  2478. // | First sentence. |
  2479. // | Manual newline t| <- Text is clipped
  2480. // | Next newline. |
  2481. // "WRAP" - Words that are longer than a line are wrapped at the
  2482. // character level
  2483. // rather than clipped.
  2484. // Example:
  2485. //
  2486. // | Cell has a |
  2487. // | loooooooooo| <- Word is broken.
  2488. // | ong word. |
  2489. WrapStrategy string `json:"wrapStrategy,omitempty"`
  2490. // ForceSendFields is a list of field names (e.g. "BackgroundColor") to
  2491. // unconditionally include in API requests. By default, fields with
  2492. // empty values are omitted from API requests. However, any non-pointer,
  2493. // non-interface field appearing in ForceSendFields will be sent to the
  2494. // server regardless of whether the field is empty or not. This may be
  2495. // used to include empty fields in Patch requests.
  2496. ForceSendFields []string `json:"-"`
  2497. // NullFields is a list of field names (e.g. "BackgroundColor") to
  2498. // include in API requests with the JSON null value. By default, fields
  2499. // with empty values are omitted from API requests. However, any field
  2500. // with an empty value appearing in NullFields will be sent to the
  2501. // server as null. It is an error if a field in this list has a
  2502. // non-empty value. This may be used to include null fields in Patch
  2503. // requests.
  2504. NullFields []string `json:"-"`
  2505. }
  2506. func (s *CellFormat) MarshalJSON() ([]byte, error) {
  2507. type NoMethod CellFormat
  2508. raw := NoMethod(*s)
  2509. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2510. }
  2511. // ChartData: The data included in a domain or series.
  2512. type ChartData struct {
  2513. // SourceRange: The source ranges of the data.
  2514. SourceRange *ChartSourceRange `json:"sourceRange,omitempty"`
  2515. // ForceSendFields is a list of field names (e.g. "SourceRange") to
  2516. // unconditionally include in API requests. By default, fields with
  2517. // empty values are omitted from API requests. However, any non-pointer,
  2518. // non-interface field appearing in ForceSendFields will be sent to the
  2519. // server regardless of whether the field is empty or not. This may be
  2520. // used to include empty fields in Patch requests.
  2521. ForceSendFields []string `json:"-"`
  2522. // NullFields is a list of field names (e.g. "SourceRange") to include
  2523. // in API requests with the JSON null value. By default, fields with
  2524. // empty values are omitted from API requests. However, any field with
  2525. // an empty value appearing in NullFields will be sent to the server as
  2526. // null. It is an error if a field in this list has a non-empty value.
  2527. // This may be used to include null fields in Patch requests.
  2528. NullFields []string `json:"-"`
  2529. }
  2530. func (s *ChartData) MarshalJSON() ([]byte, error) {
  2531. type NoMethod ChartData
  2532. raw := NoMethod(*s)
  2533. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2534. }
  2535. // ChartSourceRange: Source ranges for a chart.
  2536. type ChartSourceRange struct {
  2537. // Sources: The ranges of data for a series or domain.
  2538. // Exactly one dimension must have a length of 1,
  2539. // and all sources in the list must have the same dimension
  2540. // with length 1.
  2541. // The domain (if it exists) & all series must have the same number
  2542. // of source ranges. If using more than one source range, then the
  2543. // source
  2544. // range at a given offset must be in order and contiguous across the
  2545. // domain
  2546. // and series.
  2547. //
  2548. // For example, these are valid configurations:
  2549. //
  2550. // domain sources: A1:A5
  2551. // series1 sources: B1:B5
  2552. // series2 sources: D6:D10
  2553. //
  2554. // domain sources: A1:A5, C10:C12
  2555. // series1 sources: B1:B5, D10:D12
  2556. // series2 sources: C1:C5, E10:E12
  2557. Sources []*GridRange `json:"sources,omitempty"`
  2558. // ForceSendFields is a list of field names (e.g. "Sources") to
  2559. // unconditionally include in API requests. By default, fields with
  2560. // empty values are omitted from API requests. However, any non-pointer,
  2561. // non-interface field appearing in ForceSendFields will be sent to the
  2562. // server regardless of whether the field is empty or not. This may be
  2563. // used to include empty fields in Patch requests.
  2564. ForceSendFields []string `json:"-"`
  2565. // NullFields is a list of field names (e.g. "Sources") to include in
  2566. // API requests with the JSON null value. By default, fields with empty
  2567. // values are omitted from API requests. However, any field with an
  2568. // empty value appearing in NullFields will be sent to the server as
  2569. // null. It is an error if a field in this list has a non-empty value.
  2570. // This may be used to include null fields in Patch requests.
  2571. NullFields []string `json:"-"`
  2572. }
  2573. func (s *ChartSourceRange) MarshalJSON() ([]byte, error) {
  2574. type NoMethod ChartSourceRange
  2575. raw := NoMethod(*s)
  2576. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2577. }
  2578. // ChartSpec: The specifications of a chart.
  2579. type ChartSpec struct {
  2580. // AltText: The alternative text that describes the chart. This is
  2581. // often used
  2582. // for accessibility.
  2583. AltText string `json:"altText,omitempty"`
  2584. // BackgroundColor: The background color of the entire chart.
  2585. // Not applicable to Org charts.
  2586. BackgroundColor *Color `json:"backgroundColor,omitempty"`
  2587. // BasicChart: A basic chart specification, can be one of many kinds of
  2588. // charts.
  2589. // See BasicChartType for the list of all
  2590. // charts this supports.
  2591. BasicChart *BasicChartSpec `json:"basicChart,omitempty"`
  2592. // BubbleChart: A bubble chart specification.
  2593. BubbleChart *BubbleChartSpec `json:"bubbleChart,omitempty"`
  2594. // CandlestickChart: A candlestick chart specification.
  2595. CandlestickChart *CandlestickChartSpec `json:"candlestickChart,omitempty"`
  2596. // FontName: The name of the font to use by default for all chart text
  2597. // (e.g. title,
  2598. // axis labels, legend). If a font is specified for a specific part of
  2599. // the
  2600. // chart it will override this font name.
  2601. FontName string `json:"fontName,omitempty"`
  2602. // HiddenDimensionStrategy: Determines how the charts will use hidden
  2603. // rows or columns.
  2604. //
  2605. // Possible values:
  2606. // "CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED" - Default value, do
  2607. // not use.
  2608. // "SKIP_HIDDEN_ROWS_AND_COLUMNS" - Charts will skip hidden rows and
  2609. // columns.
  2610. // "SKIP_HIDDEN_ROWS" - Charts will skip hidden rows only.
  2611. // "SKIP_HIDDEN_COLUMNS" - Charts will skip hidden columns only.
  2612. // "SHOW_ALL" - Charts will not skip any hidden rows or columns.
  2613. HiddenDimensionStrategy string `json:"hiddenDimensionStrategy,omitempty"`
  2614. // HistogramChart: A histogram chart specification.
  2615. HistogramChart *HistogramChartSpec `json:"histogramChart,omitempty"`
  2616. // Maximized: True to make a chart fill the entire space in which it's
  2617. // rendered with
  2618. // minimum padding. False to use the default padding.
  2619. // (Not applicable to Geo and Org charts.)
  2620. Maximized bool `json:"maximized,omitempty"`
  2621. // OrgChart: An org chart specification.
  2622. OrgChart *OrgChartSpec `json:"orgChart,omitempty"`
  2623. // PieChart: A pie chart specification.
  2624. PieChart *PieChartSpec `json:"pieChart,omitempty"`
  2625. // Subtitle: The subtitle of the chart.
  2626. Subtitle string `json:"subtitle,omitempty"`
  2627. // SubtitleTextFormat: The subtitle text format.
  2628. // Strikethrough and underline are not supported.
  2629. SubtitleTextFormat *TextFormat `json:"subtitleTextFormat,omitempty"`
  2630. // SubtitleTextPosition: The subtitle text position.
  2631. // This field is optional.
  2632. SubtitleTextPosition *TextPosition `json:"subtitleTextPosition,omitempty"`
  2633. // Title: The title of the chart.
  2634. Title string `json:"title,omitempty"`
  2635. // TitleTextFormat: The title text format.
  2636. // Strikethrough and underline are not supported.
  2637. TitleTextFormat *TextFormat `json:"titleTextFormat,omitempty"`
  2638. // TitleTextPosition: The title text position.
  2639. // This field is optional.
  2640. TitleTextPosition *TextPosition `json:"titleTextPosition,omitempty"`
  2641. // TreemapChart: A treemap chart specification.
  2642. TreemapChart *TreemapChartSpec `json:"treemapChart,omitempty"`
  2643. // WaterfallChart: A waterfall chart specification.
  2644. WaterfallChart *WaterfallChartSpec `json:"waterfallChart,omitempty"`
  2645. // ForceSendFields is a list of field names (e.g. "AltText") to
  2646. // unconditionally include in API requests. By default, fields with
  2647. // empty values are omitted from API requests. However, any non-pointer,
  2648. // non-interface field appearing in ForceSendFields will be sent to the
  2649. // server regardless of whether the field is empty or not. This may be
  2650. // used to include empty fields in Patch requests.
  2651. ForceSendFields []string `json:"-"`
  2652. // NullFields is a list of field names (e.g. "AltText") to include in
  2653. // API requests with the JSON null value. By default, fields with empty
  2654. // values are omitted from API requests. However, any field with an
  2655. // empty value appearing in NullFields will be sent to the server as
  2656. // null. It is an error if a field in this list has a non-empty value.
  2657. // This may be used to include null fields in Patch requests.
  2658. NullFields []string `json:"-"`
  2659. }
  2660. func (s *ChartSpec) MarshalJSON() ([]byte, error) {
  2661. type NoMethod ChartSpec
  2662. raw := NoMethod(*s)
  2663. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2664. }
  2665. // ClearBasicFilterRequest: Clears the basic filter, if any exists on
  2666. // the sheet.
  2667. type ClearBasicFilterRequest struct {
  2668. // SheetId: The sheet ID on which the basic filter should be cleared.
  2669. SheetId int64 `json:"sheetId,omitempty"`
  2670. // ForceSendFields is a list of field names (e.g. "SheetId") to
  2671. // unconditionally include in API requests. By default, fields with
  2672. // empty values are omitted from API requests. However, any non-pointer,
  2673. // non-interface field appearing in ForceSendFields will be sent to the
  2674. // server regardless of whether the field is empty or not. This may be
  2675. // used to include empty fields in Patch requests.
  2676. ForceSendFields []string `json:"-"`
  2677. // NullFields is a list of field names (e.g. "SheetId") to include in
  2678. // API requests with the JSON null value. By default, fields with empty
  2679. // values are omitted from API requests. However, any field with an
  2680. // empty value appearing in NullFields will be sent to the server as
  2681. // null. It is an error if a field in this list has a non-empty value.
  2682. // This may be used to include null fields in Patch requests.
  2683. NullFields []string `json:"-"`
  2684. }
  2685. func (s *ClearBasicFilterRequest) MarshalJSON() ([]byte, error) {
  2686. type NoMethod ClearBasicFilterRequest
  2687. raw := NoMethod(*s)
  2688. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2689. }
  2690. // ClearValuesRequest: The request for clearing a range of values in a
  2691. // spreadsheet.
  2692. type ClearValuesRequest struct {
  2693. }
  2694. // ClearValuesResponse: The response when clearing a range of values in
  2695. // a spreadsheet.
  2696. type ClearValuesResponse struct {
  2697. // ClearedRange: The range (in A1 notation) that was cleared.
  2698. // (If the request was for an unbounded range or a ranger larger
  2699. // than the bounds of the sheet, this will be the actual range
  2700. // that was cleared, bounded to the sheet's limits.)
  2701. ClearedRange string `json:"clearedRange,omitempty"`
  2702. // SpreadsheetId: The spreadsheet the updates were applied to.
  2703. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  2704. // ServerResponse contains the HTTP response code and headers from the
  2705. // server.
  2706. googleapi.ServerResponse `json:"-"`
  2707. // ForceSendFields is a list of field names (e.g. "ClearedRange") 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. "ClearedRange") to include
  2715. // in API requests with the JSON null value. By default, fields with
  2716. // empty values are omitted from API requests. However, any field with
  2717. // an 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 *ClearValuesResponse) MarshalJSON() ([]byte, error) {
  2723. type NoMethod ClearValuesResponse
  2724. raw := NoMethod(*s)
  2725. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2726. }
  2727. // Color: Represents a color in the RGBA color space. This
  2728. // representation is designed
  2729. // for simplicity of conversion to/from color representations in
  2730. // various
  2731. // languages over compactness; for example, the fields of this
  2732. // representation
  2733. // can be trivially provided to the constructor of "java.awt.Color" in
  2734. // Java; it
  2735. // can also be trivially provided to UIColor's
  2736. // "+colorWithRed:green:blue:alpha"
  2737. // method in iOS; and, with just a little work, it can be easily
  2738. // formatted into
  2739. // a CSS "rgba()" string in JavaScript, as well. Here are some
  2740. // examples:
  2741. //
  2742. // Example (Java):
  2743. //
  2744. // import com.google.type.Color;
  2745. //
  2746. // // ...
  2747. // public static java.awt.Color fromProto(Color protocolor) {
  2748. // float alpha = protocolor.hasAlpha()
  2749. // ? protocolor.getAlpha().getValue()
  2750. // : 1.0;
  2751. //
  2752. // return new java.awt.Color(
  2753. // protocolor.getRed(),
  2754. // protocolor.getGreen(),
  2755. // protocolor.getBlue(),
  2756. // alpha);
  2757. // }
  2758. //
  2759. // public static Color toProto(java.awt.Color color) {
  2760. // float red = (float) color.getRed();
  2761. // float green = (float) color.getGreen();
  2762. // float blue = (float) color.getBlue();
  2763. // float denominator = 255.0;
  2764. // Color.Builder resultBuilder =
  2765. // Color
  2766. // .newBuilder()
  2767. // .setRed(red / denominator)
  2768. // .setGreen(green / denominator)
  2769. // .setBlue(blue / denominator);
  2770. // int alpha = color.getAlpha();
  2771. // if (alpha != 255) {
  2772. // result.setAlpha(
  2773. // FloatValue
  2774. // .newBuilder()
  2775. // .setValue(((float) alpha) / denominator)
  2776. // .build());
  2777. // }
  2778. // return resultBuilder.build();
  2779. // }
  2780. // // ...
  2781. //
  2782. // Example (iOS / Obj-C):
  2783. //
  2784. // // ...
  2785. // static UIColor* fromProto(Color* protocolor) {
  2786. // float red = [protocolor red];
  2787. // float green = [protocolor green];
  2788. // float blue = [protocolor blue];
  2789. // FloatValue* alpha_wrapper = [protocolor alpha];
  2790. // float alpha = 1.0;
  2791. // if (alpha_wrapper != nil) {
  2792. // alpha = [alpha_wrapper value];
  2793. // }
  2794. // return [UIColor colorWithRed:red green:green blue:blue
  2795. // alpha:alpha];
  2796. // }
  2797. //
  2798. // static Color* toProto(UIColor* color) {
  2799. // CGFloat red, green, blue, alpha;
  2800. // if (![color getRed:&red green:&green blue:&blue
  2801. // alpha:&alpha]) {
  2802. // return nil;
  2803. // }
  2804. // Color* result = [Color alloc] init];
  2805. // [result setRed:red];
  2806. // [result setGreen:green];
  2807. // [result setBlue:blue];
  2808. // if (alpha <= 0.9999) {
  2809. // [result setAlpha:floatWrapperWithValue(alpha)];
  2810. // }
  2811. // [result autorelease];
  2812. // return result;
  2813. // }
  2814. // // ...
  2815. //
  2816. // Example (JavaScript):
  2817. //
  2818. // // ...
  2819. //
  2820. // var protoToCssColor = function(rgb_color) {
  2821. // var redFrac = rgb_color.red || 0.0;
  2822. // var greenFrac = rgb_color.green || 0.0;
  2823. // var blueFrac = rgb_color.blue || 0.0;
  2824. // var red = Math.floor(redFrac * 255);
  2825. // var green = Math.floor(greenFrac * 255);
  2826. // var blue = Math.floor(blueFrac * 255);
  2827. //
  2828. // if (!('alpha' in rgb_color)) {
  2829. // return rgbToCssColor_(red, green, blue);
  2830. // }
  2831. //
  2832. // var alphaFrac = rgb_color.alpha.value || 0.0;
  2833. // var rgbParams = [red, green, blue].join(',');
  2834. // return ['rgba(', rgbParams, ',', alphaFrac, ')'].join('');
  2835. // };
  2836. //
  2837. // var rgbToCssColor_ = function(red, green, blue) {
  2838. // var rgbNumber = new Number((red << 16) | (green << 8) | blue);
  2839. // var hexString = rgbNumber.toString(16);
  2840. // var missingZeros = 6 - hexString.length;
  2841. // var resultBuilder = ['#'];
  2842. // for (var i = 0; i < missingZeros; i++) {
  2843. // resultBuilder.push('0');
  2844. // }
  2845. // resultBuilder.push(hexString);
  2846. // return resultBuilder.join('');
  2847. // };
  2848. //
  2849. // // ...
  2850. type Color struct {
  2851. // Alpha: The fraction of this color that should be applied to the
  2852. // pixel. That is,
  2853. // the final pixel color is defined by the equation:
  2854. //
  2855. // pixel color = alpha * (this color) + (1.0 - alpha) * (background
  2856. // color)
  2857. //
  2858. // This means that a value of 1.0 corresponds to a solid color,
  2859. // whereas
  2860. // a value of 0.0 corresponds to a completely transparent color.
  2861. // This
  2862. // uses a wrapper message rather than a simple float scalar so that it
  2863. // is
  2864. // possible to distinguish between a default value and the value being
  2865. // unset.
  2866. // If omitted, this color object is to be rendered as a solid color
  2867. // (as if the alpha value had been explicitly given with a value of
  2868. // 1.0).
  2869. Alpha float64 `json:"alpha,omitempty"`
  2870. // Blue: The amount of blue in the color as a value in the interval [0,
  2871. // 1].
  2872. Blue float64 `json:"blue,omitempty"`
  2873. // Green: The amount of green in the color as a value in the interval
  2874. // [0, 1].
  2875. Green float64 `json:"green,omitempty"`
  2876. // Red: The amount of red in the color as a value in the interval [0,
  2877. // 1].
  2878. Red float64 `json:"red,omitempty"`
  2879. // ForceSendFields is a list of field names (e.g. "Alpha") to
  2880. // unconditionally include in API requests. By default, fields with
  2881. // empty values are omitted from API requests. However, any non-pointer,
  2882. // non-interface field appearing in ForceSendFields will be sent to the
  2883. // server regardless of whether the field is empty or not. This may be
  2884. // used to include empty fields in Patch requests.
  2885. ForceSendFields []string `json:"-"`
  2886. // NullFields is a list of field names (e.g. "Alpha") to include in API
  2887. // requests with the JSON null value. By default, fields with empty
  2888. // values are omitted from API requests. However, any field with an
  2889. // empty value appearing in NullFields will be sent to the server as
  2890. // null. It is an error if a field in this list has a non-empty value.
  2891. // This may be used to include null fields in Patch requests.
  2892. NullFields []string `json:"-"`
  2893. }
  2894. func (s *Color) MarshalJSON() ([]byte, error) {
  2895. type NoMethod Color
  2896. raw := NoMethod(*s)
  2897. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2898. }
  2899. func (s *Color) UnmarshalJSON(data []byte) error {
  2900. type NoMethod Color
  2901. var s1 struct {
  2902. Alpha gensupport.JSONFloat64 `json:"alpha"`
  2903. Blue gensupport.JSONFloat64 `json:"blue"`
  2904. Green gensupport.JSONFloat64 `json:"green"`
  2905. Red gensupport.JSONFloat64 `json:"red"`
  2906. *NoMethod
  2907. }
  2908. s1.NoMethod = (*NoMethod)(s)
  2909. if err := json.Unmarshal(data, &s1); err != nil {
  2910. return err
  2911. }
  2912. s.Alpha = float64(s1.Alpha)
  2913. s.Blue = float64(s1.Blue)
  2914. s.Green = float64(s1.Green)
  2915. s.Red = float64(s1.Red)
  2916. return nil
  2917. }
  2918. // ConditionValue: The value of the condition.
  2919. type ConditionValue struct {
  2920. // RelativeDate: A relative date (based on the current date).
  2921. // Valid only if the type is
  2922. // DATE_BEFORE,
  2923. // DATE_AFTER,
  2924. // DATE_ON_OR_BEFORE or
  2925. // DATE_ON_OR_AFTER.
  2926. //
  2927. // Relative dates are not supported in data validation.
  2928. // They are supported only in conditional formatting and
  2929. // conditional filters.
  2930. //
  2931. // Possible values:
  2932. // "RELATIVE_DATE_UNSPECIFIED" - Default value, do not use.
  2933. // "PAST_YEAR" - The value is one year before today.
  2934. // "PAST_MONTH" - The value is one month before today.
  2935. // "PAST_WEEK" - The value is one week before today.
  2936. // "YESTERDAY" - The value is yesterday.
  2937. // "TODAY" - The value is today.
  2938. // "TOMORROW" - The value is tomorrow.
  2939. RelativeDate string `json:"relativeDate,omitempty"`
  2940. // UserEnteredValue: A value the condition is based on.
  2941. // The value is parsed as if the user typed into a cell.
  2942. // Formulas are supported (and must begin with an `=` or a '+').
  2943. UserEnteredValue string `json:"userEnteredValue,omitempty"`
  2944. // ForceSendFields is a list of field names (e.g. "RelativeDate") to
  2945. // unconditionally include in API requests. By default, fields with
  2946. // empty values are omitted from API requests. However, any non-pointer,
  2947. // non-interface field appearing in ForceSendFields will be sent to the
  2948. // server regardless of whether the field is empty or not. This may be
  2949. // used to include empty fields in Patch requests.
  2950. ForceSendFields []string `json:"-"`
  2951. // NullFields is a list of field names (e.g. "RelativeDate") to include
  2952. // in API requests with the JSON null value. By default, fields with
  2953. // empty values are omitted from API requests. However, any field with
  2954. // an empty value appearing in NullFields will be sent to the server as
  2955. // null. It is an error if a field in this list has a non-empty value.
  2956. // This may be used to include null fields in Patch requests.
  2957. NullFields []string `json:"-"`
  2958. }
  2959. func (s *ConditionValue) MarshalJSON() ([]byte, error) {
  2960. type NoMethod ConditionValue
  2961. raw := NoMethod(*s)
  2962. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2963. }
  2964. // ConditionalFormatRule: A rule describing a conditional format.
  2965. type ConditionalFormatRule struct {
  2966. // BooleanRule: The formatting is either "on" or "off" according to the
  2967. // rule.
  2968. BooleanRule *BooleanRule `json:"booleanRule,omitempty"`
  2969. // GradientRule: The formatting will vary based on the gradients in the
  2970. // rule.
  2971. GradientRule *GradientRule `json:"gradientRule,omitempty"`
  2972. // Ranges: The ranges that are formatted if the condition is true.
  2973. // All the ranges must be on the same grid.
  2974. Ranges []*GridRange `json:"ranges,omitempty"`
  2975. // ForceSendFields is a list of field names (e.g. "BooleanRule") to
  2976. // unconditionally include in API requests. By default, fields with
  2977. // empty values are omitted from API requests. However, any non-pointer,
  2978. // non-interface field appearing in ForceSendFields will be sent to the
  2979. // server regardless of whether the field is empty or not. This may be
  2980. // used to include empty fields in Patch requests.
  2981. ForceSendFields []string `json:"-"`
  2982. // NullFields is a list of field names (e.g. "BooleanRule") to include
  2983. // in API requests with the JSON null value. By default, fields with
  2984. // empty values are omitted from API requests. However, any field with
  2985. // an empty value appearing in NullFields will be sent to the server as
  2986. // null. It is an error if a field in this list has a non-empty value.
  2987. // This may be used to include null fields in Patch requests.
  2988. NullFields []string `json:"-"`
  2989. }
  2990. func (s *ConditionalFormatRule) MarshalJSON() ([]byte, error) {
  2991. type NoMethod ConditionalFormatRule
  2992. raw := NoMethod(*s)
  2993. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2994. }
  2995. // CopyPasteRequest: Copies data from the source to the destination.
  2996. type CopyPasteRequest struct {
  2997. // Destination: The location to paste to. If the range covers a span
  2998. // that's
  2999. // a multiple of the source's height or width, then the
  3000. // data will be repeated to fill in the destination range.
  3001. // If the range is smaller than the source range, the entire
  3002. // source data will still be copied (beyond the end of the destination
  3003. // range).
  3004. Destination *GridRange `json:"destination,omitempty"`
  3005. // PasteOrientation: How that data should be oriented when pasting.
  3006. //
  3007. // Possible values:
  3008. // "NORMAL" - Paste normally.
  3009. // "TRANSPOSE" - Paste transposed, where all rows become columns and
  3010. // vice versa.
  3011. PasteOrientation string `json:"pasteOrientation,omitempty"`
  3012. // PasteType: What kind of data to paste.
  3013. //
  3014. // Possible values:
  3015. // "PASTE_NORMAL" - Paste values, formulas, formats, and merges.
  3016. // "PASTE_VALUES" - Paste the values ONLY without formats, formulas,
  3017. // or merges.
  3018. // "PASTE_FORMAT" - Paste the format and data validation only.
  3019. // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders.
  3020. // "PASTE_FORMULA" - Paste the formulas only.
  3021. // "PASTE_DATA_VALIDATION" - Paste the data validation only.
  3022. // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting
  3023. // rules only.
  3024. PasteType string `json:"pasteType,omitempty"`
  3025. // Source: The source range to copy.
  3026. Source *GridRange `json:"source,omitempty"`
  3027. // ForceSendFields is a list of field names (e.g. "Destination") to
  3028. // unconditionally include in API requests. By default, fields with
  3029. // empty values are omitted from API requests. However, any non-pointer,
  3030. // non-interface field appearing in ForceSendFields will be sent to the
  3031. // server regardless of whether the field is empty or not. This may be
  3032. // used to include empty fields in Patch requests.
  3033. ForceSendFields []string `json:"-"`
  3034. // NullFields is a list of field names (e.g. "Destination") to include
  3035. // in API requests with the JSON null value. By default, fields with
  3036. // empty values are omitted from API requests. However, any field with
  3037. // an empty value appearing in NullFields will be sent to the server as
  3038. // null. It is an error if a field in this list has a non-empty value.
  3039. // This may be used to include null fields in Patch requests.
  3040. NullFields []string `json:"-"`
  3041. }
  3042. func (s *CopyPasteRequest) MarshalJSON() ([]byte, error) {
  3043. type NoMethod CopyPasteRequest
  3044. raw := NoMethod(*s)
  3045. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3046. }
  3047. // CopySheetToAnotherSpreadsheetRequest: The request to copy a sheet
  3048. // across spreadsheets.
  3049. type CopySheetToAnotherSpreadsheetRequest struct {
  3050. // DestinationSpreadsheetId: The ID of the spreadsheet to copy the sheet
  3051. // to.
  3052. DestinationSpreadsheetId string `json:"destinationSpreadsheetId,omitempty"`
  3053. // ForceSendFields is a list of field names (e.g.
  3054. // "DestinationSpreadsheetId") to unconditionally include in API
  3055. // requests. By default, fields with empty values are omitted from API
  3056. // requests. However, any non-pointer, non-interface field appearing in
  3057. // ForceSendFields will be sent to the server regardless of whether the
  3058. // field is empty or not. This may be used to include empty fields in
  3059. // Patch requests.
  3060. ForceSendFields []string `json:"-"`
  3061. // NullFields is a list of field names (e.g. "DestinationSpreadsheetId")
  3062. // to include in API requests with the JSON null value. By default,
  3063. // fields with empty values are omitted from API requests. However, any
  3064. // field with an empty value appearing in NullFields will be sent to the
  3065. // server as null. It is an error if a field in this list has a
  3066. // non-empty value. This may be used to include null fields in Patch
  3067. // requests.
  3068. NullFields []string `json:"-"`
  3069. }
  3070. func (s *CopySheetToAnotherSpreadsheetRequest) MarshalJSON() ([]byte, error) {
  3071. type NoMethod CopySheetToAnotherSpreadsheetRequest
  3072. raw := NoMethod(*s)
  3073. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3074. }
  3075. // CreateDeveloperMetadataRequest: A request to create developer
  3076. // metadata.
  3077. type CreateDeveloperMetadataRequest struct {
  3078. // DeveloperMetadata: The developer metadata to create.
  3079. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  3080. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  3081. // to unconditionally include in API requests. By default, fields with
  3082. // empty values are omitted from API requests. However, any non-pointer,
  3083. // non-interface field appearing in ForceSendFields will be sent to the
  3084. // server regardless of whether the field is empty or not. This may be
  3085. // used to include empty fields in Patch requests.
  3086. ForceSendFields []string `json:"-"`
  3087. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  3088. // include in API requests with the JSON null value. By default, fields
  3089. // with empty values are omitted from API requests. However, any field
  3090. // with an empty value appearing in NullFields will be sent to the
  3091. // server as null. It is an error if a field in this list has a
  3092. // non-empty value. This may be used to include null fields in Patch
  3093. // requests.
  3094. NullFields []string `json:"-"`
  3095. }
  3096. func (s *CreateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  3097. type NoMethod CreateDeveloperMetadataRequest
  3098. raw := NoMethod(*s)
  3099. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3100. }
  3101. // CreateDeveloperMetadataResponse: The response from creating developer
  3102. // metadata.
  3103. type CreateDeveloperMetadataResponse struct {
  3104. // DeveloperMetadata: The developer metadata that was created.
  3105. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  3106. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  3107. // to unconditionally include in API requests. By default, fields with
  3108. // empty values are omitted from API requests. However, any non-pointer,
  3109. // non-interface field appearing in ForceSendFields will be sent to the
  3110. // server regardless of whether the field is empty or not. This may be
  3111. // used to include empty fields in Patch requests.
  3112. ForceSendFields []string `json:"-"`
  3113. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  3114. // include in API requests with the JSON null value. By default, fields
  3115. // with empty values are omitted from API requests. However, any field
  3116. // with an empty value appearing in NullFields will be sent to the
  3117. // server as null. It is an error if a field in this list has a
  3118. // non-empty value. This may be used to include null fields in Patch
  3119. // requests.
  3120. NullFields []string `json:"-"`
  3121. }
  3122. func (s *CreateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  3123. type NoMethod CreateDeveloperMetadataResponse
  3124. raw := NoMethod(*s)
  3125. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3126. }
  3127. // CutPasteRequest: Moves data from the source to the destination.
  3128. type CutPasteRequest struct {
  3129. // Destination: The top-left coordinate where the data should be pasted.
  3130. Destination *GridCoordinate `json:"destination,omitempty"`
  3131. // PasteType: What kind of data to paste. All the source data will be
  3132. // cut, regardless
  3133. // of what is pasted.
  3134. //
  3135. // Possible values:
  3136. // "PASTE_NORMAL" - Paste values, formulas, formats, and merges.
  3137. // "PASTE_VALUES" - Paste the values ONLY without formats, formulas,
  3138. // or merges.
  3139. // "PASTE_FORMAT" - Paste the format and data validation only.
  3140. // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders.
  3141. // "PASTE_FORMULA" - Paste the formulas only.
  3142. // "PASTE_DATA_VALIDATION" - Paste the data validation only.
  3143. // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting
  3144. // rules only.
  3145. PasteType string `json:"pasteType,omitempty"`
  3146. // Source: The source data to cut.
  3147. Source *GridRange `json:"source,omitempty"`
  3148. // ForceSendFields is a list of field names (e.g. "Destination") to
  3149. // unconditionally include in API requests. By default, fields with
  3150. // empty values are omitted from API requests. However, any non-pointer,
  3151. // non-interface field appearing in ForceSendFields will be sent to the
  3152. // server regardless of whether the field is empty or not. This may be
  3153. // used to include empty fields in Patch requests.
  3154. ForceSendFields []string `json:"-"`
  3155. // NullFields is a list of field names (e.g. "Destination") to include
  3156. // in API requests with the JSON null value. By default, fields with
  3157. // empty values are omitted from API requests. However, any field with
  3158. // an empty value appearing in NullFields will be sent to the server as
  3159. // null. It is an error if a field in this list has a non-empty value.
  3160. // This may be used to include null fields in Patch requests.
  3161. NullFields []string `json:"-"`
  3162. }
  3163. func (s *CutPasteRequest) MarshalJSON() ([]byte, error) {
  3164. type NoMethod CutPasteRequest
  3165. raw := NoMethod(*s)
  3166. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3167. }
  3168. // DataFilter: Filter that describes what data should be selected or
  3169. // returned from a
  3170. // request.
  3171. type DataFilter struct {
  3172. // A1Range: Selects data that matches the specified A1 range.
  3173. A1Range string `json:"a1Range,omitempty"`
  3174. // DeveloperMetadataLookup: Selects data associated with the developer
  3175. // metadata matching the criteria
  3176. // described by this DeveloperMetadataLookup.
  3177. DeveloperMetadataLookup *DeveloperMetadataLookup `json:"developerMetadataLookup,omitempty"`
  3178. // GridRange: Selects data that matches the range described by the
  3179. // GridRange.
  3180. GridRange *GridRange `json:"gridRange,omitempty"`
  3181. // ForceSendFields is a list of field names (e.g. "A1Range") to
  3182. // unconditionally include in API requests. By default, fields with
  3183. // empty values are omitted from API requests. However, any non-pointer,
  3184. // non-interface field appearing in ForceSendFields will be sent to the
  3185. // server regardless of whether the field is empty or not. This may be
  3186. // used to include empty fields in Patch requests.
  3187. ForceSendFields []string `json:"-"`
  3188. // NullFields is a list of field names (e.g. "A1Range") to include in
  3189. // API requests with the JSON null value. By default, fields with empty
  3190. // values are omitted from API requests. However, any field with an
  3191. // empty value appearing in NullFields will be sent to the server as
  3192. // null. It is an error if a field in this list has a non-empty value.
  3193. // This may be used to include null fields in Patch requests.
  3194. NullFields []string `json:"-"`
  3195. }
  3196. func (s *DataFilter) MarshalJSON() ([]byte, error) {
  3197. type NoMethod DataFilter
  3198. raw := NoMethod(*s)
  3199. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3200. }
  3201. // DataFilterValueRange: A range of values whose location is specified
  3202. // by a DataFilter.
  3203. type DataFilterValueRange struct {
  3204. // DataFilter: The data filter describing the location of the values in
  3205. // the spreadsheet.
  3206. DataFilter *DataFilter `json:"dataFilter,omitempty"`
  3207. // MajorDimension: The major dimension of the values.
  3208. //
  3209. // Possible values:
  3210. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  3211. // "ROWS" - Operates on the rows of a sheet.
  3212. // "COLUMNS" - Operates on the columns of a sheet.
  3213. MajorDimension string `json:"majorDimension,omitempty"`
  3214. // Values: The data to be written. If the provided values exceed any of
  3215. // the ranges
  3216. // matched by the data filter then the request will fail. If the
  3217. // provided
  3218. // values are less than the matched ranges only the specified values
  3219. // will be
  3220. // written, existing values in the matched ranges will remain
  3221. // unaffected.
  3222. Values [][]interface{} `json:"values,omitempty"`
  3223. // ForceSendFields is a list of field names (e.g. "DataFilter") to
  3224. // unconditionally include in API requests. By default, fields with
  3225. // empty values are omitted from API requests. However, any non-pointer,
  3226. // non-interface field appearing in ForceSendFields will be sent to the
  3227. // server regardless of whether the field is empty or not. This may be
  3228. // used to include empty fields in Patch requests.
  3229. ForceSendFields []string `json:"-"`
  3230. // NullFields is a list of field names (e.g. "DataFilter") to include in
  3231. // API requests with the JSON null value. By default, fields with empty
  3232. // values are omitted from API requests. However, any field with an
  3233. // empty value appearing in NullFields will be sent to the server as
  3234. // null. It is an error if a field in this list has a non-empty value.
  3235. // This may be used to include null fields in Patch requests.
  3236. NullFields []string `json:"-"`
  3237. }
  3238. func (s *DataFilterValueRange) MarshalJSON() ([]byte, error) {
  3239. type NoMethod DataFilterValueRange
  3240. raw := NoMethod(*s)
  3241. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3242. }
  3243. // DataValidationRule: A data validation rule.
  3244. type DataValidationRule struct {
  3245. // Condition: The condition that data in the cell must match.
  3246. Condition *BooleanCondition `json:"condition,omitempty"`
  3247. // InputMessage: A message to show the user when adding data to the
  3248. // cell.
  3249. InputMessage string `json:"inputMessage,omitempty"`
  3250. // ShowCustomUi: True if the UI should be customized based on the kind
  3251. // of condition.
  3252. // If true, "List" conditions will show a dropdown.
  3253. ShowCustomUi bool `json:"showCustomUi,omitempty"`
  3254. // Strict: True if invalid data should be rejected.
  3255. Strict bool `json:"strict,omitempty"`
  3256. // ForceSendFields is a list of field names (e.g. "Condition") to
  3257. // unconditionally include in API requests. By default, fields with
  3258. // empty values are omitted from API requests. However, any non-pointer,
  3259. // non-interface field appearing in ForceSendFields will be sent to the
  3260. // server regardless of whether the field is empty or not. This may be
  3261. // used to include empty fields in Patch requests.
  3262. ForceSendFields []string `json:"-"`
  3263. // NullFields is a list of field names (e.g. "Condition") to include in
  3264. // API requests with the JSON null value. By default, fields with empty
  3265. // values are omitted from API requests. However, any field with an
  3266. // empty value appearing in NullFields will be sent to the server as
  3267. // null. It is an error if a field in this list has a non-empty value.
  3268. // This may be used to include null fields in Patch requests.
  3269. NullFields []string `json:"-"`
  3270. }
  3271. func (s *DataValidationRule) MarshalJSON() ([]byte, error) {
  3272. type NoMethod DataValidationRule
  3273. raw := NoMethod(*s)
  3274. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3275. }
  3276. // DateTimeRule: Allows you to organize the date-time values in a source
  3277. // data column into
  3278. // buckets based on selected parts of their date or time values. For
  3279. // example,
  3280. // consider a pivot table showing sales transactions by date:
  3281. //
  3282. // +----------+--------------+
  3283. // | Date | SUM of Sales |
  3284. // +----------+--------------+
  3285. // | 1/1/2017 | $621.14 |
  3286. // | 2/3/2017 | $708.84 |
  3287. // | 5/8/2017 | $326.84 |
  3288. // ...
  3289. // +----------+--------------+
  3290. // Applying a date-time group rule with a DateTimeRuleType of
  3291. // YEAR_MONTH
  3292. // results in the following pivot table.
  3293. //
  3294. // +--------------+--------------+
  3295. // | Grouped Date | SUM of Sales |
  3296. // +--------------+--------------+
  3297. // | 2017-Jan | $53,731.78 |
  3298. // | 2017-Feb | $83,475.32 |
  3299. // | 2017-Mar | $94,385.05 |
  3300. // ...
  3301. // +--------------+--------------+
  3302. type DateTimeRule struct {
  3303. // Type: The type of date-time grouping to apply.
  3304. //
  3305. // Possible values:
  3306. // "DATE_TIME_RULE_TYPE_UNSPECIFIED" - The default type, do not use.
  3307. // "SECOND" - Group dates by second, from 0 to 59.
  3308. // "MINUTE" - Group dates by minute, from 0 to 59.
  3309. // "HOUR" - Group dates by hour using a 24-hour system, from 0 to 23.
  3310. // "HOUR_MINUTE" - Group dates by hour and minute using a 24-hour
  3311. // system, for example 19:45.
  3312. // "HOUR_MINUTE_AMPM" - Group dates by hour and minute using a 12-hour
  3313. // system, for example 7:45
  3314. // PM. The AM/PM designation is translated based on the
  3315. // spreadsheet
  3316. // locale.
  3317. // "DAY_OF_WEEK" - Group dates by day of week, for example Sunday. The
  3318. // days of the week will
  3319. // be translated based on the spreadsheet locale.
  3320. // "DAY_OF_YEAR" - Group dates by day of year, from 1 to 366. Note
  3321. // that dates after Feb. 29
  3322. // fall in different buckets in leap years than in non-leap years.
  3323. // "DAY_OF_MONTH" - Group dates by day of month, from 1 to 31.
  3324. // "DAY_MONTH" - Group dates by day and month, for example 22-Nov. The
  3325. // month is
  3326. // translated based on the spreadsheet locale.
  3327. // "MONTH" - Group dates by month, for example Nov. The month is
  3328. // translated based
  3329. // on the spreadsheet locale.
  3330. // "QUARTER" - Group dates by quarter, for example Q1 (which
  3331. // represents Jan-Mar).
  3332. // "YEAR" - Group dates by year, for example 2008.
  3333. // "YEAR_MONTH" - Group dates by year and month, for example 2008-Nov.
  3334. // The month is
  3335. // translated based on the spreadsheet locale.
  3336. // "YEAR_QUARTER" - Group dates by year and quarter, for example 2008
  3337. // Q4.
  3338. // "YEAR_MONTH_DAY" - Group dates by year, month, and day, for example
  3339. // 2008-11-22.
  3340. Type string `json:"type,omitempty"`
  3341. // ForceSendFields is a list of field names (e.g. "Type") to
  3342. // unconditionally include in API requests. By default, fields with
  3343. // empty values are omitted from API requests. However, any non-pointer,
  3344. // non-interface field appearing in ForceSendFields will be sent to the
  3345. // server regardless of whether the field is empty or not. This may be
  3346. // used to include empty fields in Patch requests.
  3347. ForceSendFields []string `json:"-"`
  3348. // NullFields is a list of field names (e.g. "Type") to include in API
  3349. // requests with the JSON null value. By default, fields with empty
  3350. // values are omitted from API requests. However, any field with an
  3351. // empty value appearing in NullFields will be sent to the server as
  3352. // null. It is an error if a field in this list has a non-empty value.
  3353. // This may be used to include null fields in Patch requests.
  3354. NullFields []string `json:"-"`
  3355. }
  3356. func (s *DateTimeRule) MarshalJSON() ([]byte, error) {
  3357. type NoMethod DateTimeRule
  3358. raw := NoMethod(*s)
  3359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3360. }
  3361. // DeleteBandingRequest: Removes the banded range with the given ID from
  3362. // the spreadsheet.
  3363. type DeleteBandingRequest struct {
  3364. // BandedRangeId: The ID of the banded range to delete.
  3365. BandedRangeId int64 `json:"bandedRangeId,omitempty"`
  3366. // ForceSendFields is a list of field names (e.g. "BandedRangeId") to
  3367. // unconditionally include in API requests. By default, fields with
  3368. // empty values are omitted from API requests. However, any non-pointer,
  3369. // non-interface field appearing in ForceSendFields will be sent to the
  3370. // server regardless of whether the field is empty or not. This may be
  3371. // used to include empty fields in Patch requests.
  3372. ForceSendFields []string `json:"-"`
  3373. // NullFields is a list of field names (e.g. "BandedRangeId") to include
  3374. // in API requests with the JSON null value. By default, fields with
  3375. // empty values are omitted from API requests. However, any field with
  3376. // an empty value appearing in NullFields will be sent to the server as
  3377. // null. It is an error if a field in this list has a non-empty value.
  3378. // This may be used to include null fields in Patch requests.
  3379. NullFields []string `json:"-"`
  3380. }
  3381. func (s *DeleteBandingRequest) MarshalJSON() ([]byte, error) {
  3382. type NoMethod DeleteBandingRequest
  3383. raw := NoMethod(*s)
  3384. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3385. }
  3386. // DeleteConditionalFormatRuleRequest: Deletes a conditional format rule
  3387. // at the given index.
  3388. // All subsequent rules' indexes are decremented.
  3389. type DeleteConditionalFormatRuleRequest struct {
  3390. // Index: The zero-based index of the rule to be deleted.
  3391. Index int64 `json:"index,omitempty"`
  3392. // SheetId: The sheet the rule is being deleted from.
  3393. SheetId int64 `json:"sheetId,omitempty"`
  3394. // ForceSendFields is a list of field names (e.g. "Index") to
  3395. // unconditionally include in API requests. By default, fields with
  3396. // empty values are omitted from API requests. However, any non-pointer,
  3397. // non-interface field appearing in ForceSendFields will be sent to the
  3398. // server regardless of whether the field is empty or not. This may be
  3399. // used to include empty fields in Patch requests.
  3400. ForceSendFields []string `json:"-"`
  3401. // NullFields is a list of field names (e.g. "Index") to include in API
  3402. // requests with the JSON null value. By default, fields with empty
  3403. // values are omitted from API requests. However, any field with an
  3404. // empty value appearing in NullFields will be sent to the server as
  3405. // null. It is an error if a field in this list has a non-empty value.
  3406. // This may be used to include null fields in Patch requests.
  3407. NullFields []string `json:"-"`
  3408. }
  3409. func (s *DeleteConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
  3410. type NoMethod DeleteConditionalFormatRuleRequest
  3411. raw := NoMethod(*s)
  3412. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3413. }
  3414. // DeleteConditionalFormatRuleResponse: The result of deleting a
  3415. // conditional format rule.
  3416. type DeleteConditionalFormatRuleResponse struct {
  3417. // Rule: The rule that was deleted.
  3418. Rule *ConditionalFormatRule `json:"rule,omitempty"`
  3419. // ForceSendFields is a list of field names (e.g. "Rule") to
  3420. // unconditionally include in API requests. By default, fields with
  3421. // empty values are omitted from API requests. However, any non-pointer,
  3422. // non-interface field appearing in ForceSendFields will be sent to the
  3423. // server regardless of whether the field is empty or not. This may be
  3424. // used to include empty fields in Patch requests.
  3425. ForceSendFields []string `json:"-"`
  3426. // NullFields is a list of field names (e.g. "Rule") to include in API
  3427. // requests with the JSON null value. By default, fields with empty
  3428. // values are omitted from API requests. However, any field with an
  3429. // empty value appearing in NullFields will be sent to the server as
  3430. // null. It is an error if a field in this list has a non-empty value.
  3431. // This may be used to include null fields in Patch requests.
  3432. NullFields []string `json:"-"`
  3433. }
  3434. func (s *DeleteConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) {
  3435. type NoMethod DeleteConditionalFormatRuleResponse
  3436. raw := NoMethod(*s)
  3437. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3438. }
  3439. // DeleteDeveloperMetadataRequest: A request to delete developer
  3440. // metadata.
  3441. type DeleteDeveloperMetadataRequest struct {
  3442. // DataFilter: The data filter describing the criteria used to select
  3443. // which developer
  3444. // metadata entry to delete.
  3445. DataFilter *DataFilter `json:"dataFilter,omitempty"`
  3446. // ForceSendFields is a list of field names (e.g. "DataFilter") to
  3447. // unconditionally include in API requests. By default, fields with
  3448. // empty values are omitted from API requests. However, any non-pointer,
  3449. // non-interface field appearing in ForceSendFields will be sent to the
  3450. // server regardless of whether the field is empty or not. This may be
  3451. // used to include empty fields in Patch requests.
  3452. ForceSendFields []string `json:"-"`
  3453. // NullFields is a list of field names (e.g. "DataFilter") to include in
  3454. // API requests with the JSON null value. By default, fields with empty
  3455. // values are omitted from API requests. However, any field with an
  3456. // empty value appearing in NullFields will be sent to the server as
  3457. // null. It is an error if a field in this list has a non-empty value.
  3458. // This may be used to include null fields in Patch requests.
  3459. NullFields []string `json:"-"`
  3460. }
  3461. func (s *DeleteDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  3462. type NoMethod DeleteDeveloperMetadataRequest
  3463. raw := NoMethod(*s)
  3464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3465. }
  3466. // DeleteDeveloperMetadataResponse: The response from deleting developer
  3467. // metadata.
  3468. type DeleteDeveloperMetadataResponse struct {
  3469. // DeletedDeveloperMetadata: The metadata that was deleted.
  3470. DeletedDeveloperMetadata []*DeveloperMetadata `json:"deletedDeveloperMetadata,omitempty"`
  3471. // ForceSendFields is a list of field names (e.g.
  3472. // "DeletedDeveloperMetadata") to unconditionally include in API
  3473. // requests. By default, fields with empty values are omitted from API
  3474. // requests. However, any non-pointer, non-interface field appearing in
  3475. // ForceSendFields will be sent to the server regardless of whether the
  3476. // field is empty or not. This may be used to include empty fields in
  3477. // Patch requests.
  3478. ForceSendFields []string `json:"-"`
  3479. // NullFields is a list of field names (e.g. "DeletedDeveloperMetadata")
  3480. // to include in API requests with the JSON null value. By default,
  3481. // fields with empty values are omitted from API requests. However, any
  3482. // field with an empty value appearing in NullFields will be sent to the
  3483. // server as null. It is an error if a field in this list has a
  3484. // non-empty value. This may be used to include null fields in Patch
  3485. // requests.
  3486. NullFields []string `json:"-"`
  3487. }
  3488. func (s *DeleteDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  3489. type NoMethod DeleteDeveloperMetadataResponse
  3490. raw := NoMethod(*s)
  3491. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3492. }
  3493. // DeleteDimensionGroupRequest: Deletes a group over the specified range
  3494. // by decrementing the depth of the
  3495. // dimensions in the range.
  3496. //
  3497. // For example, assume the sheet has a depth-1 group over B:E and a
  3498. // depth-2
  3499. // group over C:D. Deleting a group over D:E leaves the sheet with
  3500. // a
  3501. // depth-1 group over B:D and a depth-2 group over C:C.
  3502. type DeleteDimensionGroupRequest struct {
  3503. // Range: The range of the group to be deleted.
  3504. Range *DimensionRange `json:"range,omitempty"`
  3505. // ForceSendFields is a list of field names (e.g. "Range") to
  3506. // unconditionally include in API requests. By default, fields with
  3507. // empty values are omitted from API requests. However, any non-pointer,
  3508. // non-interface field appearing in ForceSendFields will be sent to the
  3509. // server regardless of whether the field is empty or not. This may be
  3510. // used to include empty fields in Patch requests.
  3511. ForceSendFields []string `json:"-"`
  3512. // NullFields is a list of field names (e.g. "Range") to include in API
  3513. // requests with the JSON null value. By default, fields with empty
  3514. // values are omitted from API requests. However, any field with an
  3515. // empty value appearing in NullFields will be sent to the server as
  3516. // null. It is an error if a field in this list has a non-empty value.
  3517. // This may be used to include null fields in Patch requests.
  3518. NullFields []string `json:"-"`
  3519. }
  3520. func (s *DeleteDimensionGroupRequest) MarshalJSON() ([]byte, error) {
  3521. type NoMethod DeleteDimensionGroupRequest
  3522. raw := NoMethod(*s)
  3523. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3524. }
  3525. // DeleteDimensionGroupResponse: The result of deleting a group.
  3526. type DeleteDimensionGroupResponse struct {
  3527. // DimensionGroups: All groups of a dimension after deleting a group
  3528. // from that dimension.
  3529. DimensionGroups []*DimensionGroup `json:"dimensionGroups,omitempty"`
  3530. // ForceSendFields is a list of field names (e.g. "DimensionGroups") to
  3531. // unconditionally include in API requests. By default, fields with
  3532. // empty values are omitted from API requests. However, any non-pointer,
  3533. // non-interface field appearing in ForceSendFields will be sent to the
  3534. // server regardless of whether the field is empty or not. This may be
  3535. // used to include empty fields in Patch requests.
  3536. ForceSendFields []string `json:"-"`
  3537. // NullFields is a list of field names (e.g. "DimensionGroups") to
  3538. // include in API requests with the JSON null value. By default, fields
  3539. // with empty values are omitted from API requests. However, any field
  3540. // with an empty value appearing in NullFields will be sent to the
  3541. // server as null. It is an error if a field in this list has a
  3542. // non-empty value. This may be used to include null fields in Patch
  3543. // requests.
  3544. NullFields []string `json:"-"`
  3545. }
  3546. func (s *DeleteDimensionGroupResponse) MarshalJSON() ([]byte, error) {
  3547. type NoMethod DeleteDimensionGroupResponse
  3548. raw := NoMethod(*s)
  3549. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3550. }
  3551. // DeleteDimensionRequest: Deletes the dimensions from the sheet.
  3552. type DeleteDimensionRequest struct {
  3553. // Range: The dimensions to delete from the sheet.
  3554. Range *DimensionRange `json:"range,omitempty"`
  3555. // ForceSendFields is a list of field names (e.g. "Range") to
  3556. // unconditionally include in API requests. By default, fields with
  3557. // empty values are omitted from API requests. However, any non-pointer,
  3558. // non-interface field appearing in ForceSendFields will be sent to the
  3559. // server regardless of whether the field is empty or not. This may be
  3560. // used to include empty fields in Patch requests.
  3561. ForceSendFields []string `json:"-"`
  3562. // NullFields is a list of field names (e.g. "Range") to include in API
  3563. // requests with the JSON null value. By default, fields with empty
  3564. // values are omitted from API requests. However, any field with an
  3565. // empty value appearing in NullFields will be sent to the server as
  3566. // null. It is an error if a field in this list has a non-empty value.
  3567. // This may be used to include null fields in Patch requests.
  3568. NullFields []string `json:"-"`
  3569. }
  3570. func (s *DeleteDimensionRequest) MarshalJSON() ([]byte, error) {
  3571. type NoMethod DeleteDimensionRequest
  3572. raw := NoMethod(*s)
  3573. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3574. }
  3575. // DeleteEmbeddedObjectRequest: Deletes the embedded object with the
  3576. // given ID.
  3577. type DeleteEmbeddedObjectRequest struct {
  3578. // ObjectId: The ID of the embedded object to delete.
  3579. ObjectId int64 `json:"objectId,omitempty"`
  3580. // ForceSendFields is a list of field names (e.g. "ObjectId") to
  3581. // unconditionally include in API requests. By default, fields with
  3582. // empty values are omitted from API requests. However, any non-pointer,
  3583. // non-interface field appearing in ForceSendFields will be sent to the
  3584. // server regardless of whether the field is empty or not. This may be
  3585. // used to include empty fields in Patch requests.
  3586. ForceSendFields []string `json:"-"`
  3587. // NullFields is a list of field names (e.g. "ObjectId") to include in
  3588. // API requests with the JSON null value. By default, fields with empty
  3589. // values are omitted from API requests. However, any field with an
  3590. // empty value appearing in NullFields will be sent to the server as
  3591. // null. It is an error if a field in this list has a non-empty value.
  3592. // This may be used to include null fields in Patch requests.
  3593. NullFields []string `json:"-"`
  3594. }
  3595. func (s *DeleteEmbeddedObjectRequest) MarshalJSON() ([]byte, error) {
  3596. type NoMethod DeleteEmbeddedObjectRequest
  3597. raw := NoMethod(*s)
  3598. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3599. }
  3600. // DeleteFilterViewRequest: Deletes a particular filter view.
  3601. type DeleteFilterViewRequest struct {
  3602. // FilterId: The ID of the filter to delete.
  3603. FilterId int64 `json:"filterId,omitempty"`
  3604. // ForceSendFields is a list of field names (e.g. "FilterId") to
  3605. // unconditionally include in API requests. By default, fields with
  3606. // empty values are omitted from API requests. However, any non-pointer,
  3607. // non-interface field appearing in ForceSendFields will be sent to the
  3608. // server regardless of whether the field is empty or not. This may be
  3609. // used to include empty fields in Patch requests.
  3610. ForceSendFields []string `json:"-"`
  3611. // NullFields is a list of field names (e.g. "FilterId") to include in
  3612. // API requests with the JSON null value. By default, fields with empty
  3613. // values are omitted from API requests. However, any field with an
  3614. // empty value appearing in NullFields will be sent to the server as
  3615. // null. It is an error if a field in this list has a non-empty value.
  3616. // This may be used to include null fields in Patch requests.
  3617. NullFields []string `json:"-"`
  3618. }
  3619. func (s *DeleteFilterViewRequest) MarshalJSON() ([]byte, error) {
  3620. type NoMethod DeleteFilterViewRequest
  3621. raw := NoMethod(*s)
  3622. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3623. }
  3624. // DeleteNamedRangeRequest: Removes the named range with the given ID
  3625. // from the spreadsheet.
  3626. type DeleteNamedRangeRequest struct {
  3627. // NamedRangeId: The ID of the named range to delete.
  3628. NamedRangeId string `json:"namedRangeId,omitempty"`
  3629. // ForceSendFields is a list of field names (e.g. "NamedRangeId") to
  3630. // unconditionally include in API requests. By default, fields with
  3631. // empty values are omitted from API requests. However, any non-pointer,
  3632. // non-interface field appearing in ForceSendFields will be sent to the
  3633. // server regardless of whether the field is empty or not. This may be
  3634. // used to include empty fields in Patch requests.
  3635. ForceSendFields []string `json:"-"`
  3636. // NullFields is a list of field names (e.g. "NamedRangeId") to include
  3637. // in API requests with the JSON null value. By default, fields with
  3638. // empty values are omitted from API requests. However, any field with
  3639. // an empty value appearing in NullFields will be sent to the server as
  3640. // null. It is an error if a field in this list has a non-empty value.
  3641. // This may be used to include null fields in Patch requests.
  3642. NullFields []string `json:"-"`
  3643. }
  3644. func (s *DeleteNamedRangeRequest) MarshalJSON() ([]byte, error) {
  3645. type NoMethod DeleteNamedRangeRequest
  3646. raw := NoMethod(*s)
  3647. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3648. }
  3649. // DeleteProtectedRangeRequest: Deletes the protected range with the
  3650. // given ID.
  3651. type DeleteProtectedRangeRequest struct {
  3652. // ProtectedRangeId: The ID of the protected range to delete.
  3653. ProtectedRangeId int64 `json:"protectedRangeId,omitempty"`
  3654. // ForceSendFields is a list of field names (e.g. "ProtectedRangeId") to
  3655. // unconditionally include in API requests. By default, fields with
  3656. // empty values are omitted from API requests. However, any non-pointer,
  3657. // non-interface field appearing in ForceSendFields will be sent to the
  3658. // server regardless of whether the field is empty or not. This may be
  3659. // used to include empty fields in Patch requests.
  3660. ForceSendFields []string `json:"-"`
  3661. // NullFields is a list of field names (e.g. "ProtectedRangeId") to
  3662. // include in API requests with the JSON null value. By default, fields
  3663. // with empty values are omitted from API requests. However, any field
  3664. // with an empty value appearing in NullFields will be sent to the
  3665. // server as null. It is an error if a field in this list has a
  3666. // non-empty value. This may be used to include null fields in Patch
  3667. // requests.
  3668. NullFields []string `json:"-"`
  3669. }
  3670. func (s *DeleteProtectedRangeRequest) MarshalJSON() ([]byte, error) {
  3671. type NoMethod DeleteProtectedRangeRequest
  3672. raw := NoMethod(*s)
  3673. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3674. }
  3675. // DeleteRangeRequest: Deletes a range of cells, shifting other cells
  3676. // into the deleted area.
  3677. type DeleteRangeRequest struct {
  3678. // Range: The range of cells to delete.
  3679. Range *GridRange `json:"range,omitempty"`
  3680. // ShiftDimension: The dimension from which deleted cells will be
  3681. // replaced with.
  3682. // If ROWS, existing cells will be shifted upward to
  3683. // replace the deleted cells. If COLUMNS, existing cells
  3684. // will be shifted left to replace the deleted cells.
  3685. //
  3686. // Possible values:
  3687. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  3688. // "ROWS" - Operates on the rows of a sheet.
  3689. // "COLUMNS" - Operates on the columns of a sheet.
  3690. ShiftDimension string `json:"shiftDimension,omitempty"`
  3691. // ForceSendFields is a list of field names (e.g. "Range") to
  3692. // unconditionally include in API requests. By default, fields with
  3693. // empty values are omitted from API requests. However, any non-pointer,
  3694. // non-interface field appearing in ForceSendFields will be sent to the
  3695. // server regardless of whether the field is empty or not. This may be
  3696. // used to include empty fields in Patch requests.
  3697. ForceSendFields []string `json:"-"`
  3698. // NullFields is a list of field names (e.g. "Range") to include in API
  3699. // requests with the JSON null value. By default, fields with empty
  3700. // values are omitted from API requests. However, any field with an
  3701. // empty value appearing in NullFields will be sent to the server as
  3702. // null. It is an error if a field in this list has a non-empty value.
  3703. // This may be used to include null fields in Patch requests.
  3704. NullFields []string `json:"-"`
  3705. }
  3706. func (s *DeleteRangeRequest) MarshalJSON() ([]byte, error) {
  3707. type NoMethod DeleteRangeRequest
  3708. raw := NoMethod(*s)
  3709. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3710. }
  3711. // DeleteSheetRequest: Deletes the requested sheet.
  3712. type DeleteSheetRequest struct {
  3713. // SheetId: The ID of the sheet to delete.
  3714. SheetId int64 `json:"sheetId,omitempty"`
  3715. // ForceSendFields is a list of field names (e.g. "SheetId") to
  3716. // unconditionally include in API requests. By default, fields with
  3717. // empty values are omitted from API requests. However, any non-pointer,
  3718. // non-interface field appearing in ForceSendFields will be sent to the
  3719. // server regardless of whether the field is empty or not. This may be
  3720. // used to include empty fields in Patch requests.
  3721. ForceSendFields []string `json:"-"`
  3722. // NullFields is a list of field names (e.g. "SheetId") to include in
  3723. // API requests with the JSON null value. By default, fields with empty
  3724. // values are omitted from API requests. However, any field with an
  3725. // empty value appearing in NullFields will be sent to the server as
  3726. // null. It is an error if a field in this list has a non-empty value.
  3727. // This may be used to include null fields in Patch requests.
  3728. NullFields []string `json:"-"`
  3729. }
  3730. func (s *DeleteSheetRequest) MarshalJSON() ([]byte, error) {
  3731. type NoMethod DeleteSheetRequest
  3732. raw := NoMethod(*s)
  3733. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3734. }
  3735. // DeveloperMetadata: Developer metadata associated with a location or
  3736. // object in a spreadsheet.
  3737. // Developer metadata may be used to associate arbitrary data with
  3738. // various
  3739. // parts of a spreadsheet and will remain associated at those locations
  3740. // as they
  3741. // move around and the spreadsheet is edited. For example, if
  3742. // developer
  3743. // metadata is associated with row 5 and another row is then
  3744. // subsequently
  3745. // inserted above row 5, that original metadata will still be associated
  3746. // with
  3747. // the row it was first associated with (what is now row 6). If the
  3748. // associated
  3749. // object is deleted its metadata is deleted too.
  3750. type DeveloperMetadata struct {
  3751. // Location: The location where the metadata is associated.
  3752. Location *DeveloperMetadataLocation `json:"location,omitempty"`
  3753. // MetadataId: The spreadsheet-scoped unique ID that identifies the
  3754. // metadata. IDs may be
  3755. // specified when metadata is created, otherwise one will be
  3756. // randomly
  3757. // generated and assigned. Must be positive.
  3758. MetadataId int64 `json:"metadataId,omitempty"`
  3759. // MetadataKey: The metadata key. There may be multiple metadata in a
  3760. // spreadsheet with the
  3761. // same key. Developer metadata must always have a key specified.
  3762. MetadataKey string `json:"metadataKey,omitempty"`
  3763. // MetadataValue: Data associated with the metadata's key.
  3764. MetadataValue string `json:"metadataValue,omitempty"`
  3765. // Visibility: The metadata visibility. Developer metadata must always
  3766. // have a visibility
  3767. // specified.
  3768. //
  3769. // Possible values:
  3770. // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value.
  3771. // "DOCUMENT" - Document-visible metadata is accessible from any
  3772. // developer project with
  3773. // access to the document.
  3774. // "PROJECT" - Project-visible metadata is only visible to and
  3775. // accessible by the developer
  3776. // project that created the metadata.
  3777. Visibility string `json:"visibility,omitempty"`
  3778. // ServerResponse contains the HTTP response code and headers from the
  3779. // server.
  3780. googleapi.ServerResponse `json:"-"`
  3781. // ForceSendFields is a list of field names (e.g. "Location") to
  3782. // unconditionally include in API requests. By default, fields with
  3783. // empty values are omitted from API requests. However, any non-pointer,
  3784. // non-interface field appearing in ForceSendFields will be sent to the
  3785. // server regardless of whether the field is empty or not. This may be
  3786. // used to include empty fields in Patch requests.
  3787. ForceSendFields []string `json:"-"`
  3788. // NullFields is a list of field names (e.g. "Location") to include in
  3789. // API requests with the JSON null value. By default, fields with empty
  3790. // values are omitted from API requests. However, any field with an
  3791. // empty value appearing in NullFields will be sent to the server as
  3792. // null. It is an error if a field in this list has a non-empty value.
  3793. // This may be used to include null fields in Patch requests.
  3794. NullFields []string `json:"-"`
  3795. }
  3796. func (s *DeveloperMetadata) MarshalJSON() ([]byte, error) {
  3797. type NoMethod DeveloperMetadata
  3798. raw := NoMethod(*s)
  3799. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3800. }
  3801. // DeveloperMetadataLocation: A location where metadata may be
  3802. // associated in a spreadsheet.
  3803. type DeveloperMetadataLocation struct {
  3804. // DimensionRange: Represents the row or column when metadata is
  3805. // associated with
  3806. // a dimension. The specified DimensionRange must represent a single
  3807. // row
  3808. // or column; it cannot be unbounded or span multiple rows or columns.
  3809. DimensionRange *DimensionRange `json:"dimensionRange,omitempty"`
  3810. // LocationType: The type of location this object represents. This
  3811. // field is read-only.
  3812. //
  3813. // Possible values:
  3814. // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value.
  3815. // "ROW" - Developer metadata associated on an entire row dimension.
  3816. // "COLUMN" - Developer metadata associated on an entire column
  3817. // dimension.
  3818. // "SHEET" - Developer metadata associated on an entire sheet.
  3819. // "SPREADSHEET" - Developer metadata associated on the entire
  3820. // spreadsheet.
  3821. LocationType string `json:"locationType,omitempty"`
  3822. // SheetId: The ID of the sheet when metadata is associated with an
  3823. // entire sheet.
  3824. SheetId int64 `json:"sheetId,omitempty"`
  3825. // Spreadsheet: True when metadata is associated with an entire
  3826. // spreadsheet.
  3827. Spreadsheet bool `json:"spreadsheet,omitempty"`
  3828. // ForceSendFields is a list of field names (e.g. "DimensionRange") to
  3829. // unconditionally include in API requests. By default, fields with
  3830. // empty values are omitted from API requests. However, any non-pointer,
  3831. // non-interface field appearing in ForceSendFields will be sent to the
  3832. // server regardless of whether the field is empty or not. This may be
  3833. // used to include empty fields in Patch requests.
  3834. ForceSendFields []string `json:"-"`
  3835. // NullFields is a list of field names (e.g. "DimensionRange") to
  3836. // include in API requests with the JSON null value. By default, fields
  3837. // with empty values are omitted from API requests. However, any field
  3838. // with an empty value appearing in NullFields will be sent to the
  3839. // server as null. It is an error if a field in this list has a
  3840. // non-empty value. This may be used to include null fields in Patch
  3841. // requests.
  3842. NullFields []string `json:"-"`
  3843. }
  3844. func (s *DeveloperMetadataLocation) MarshalJSON() ([]byte, error) {
  3845. type NoMethod DeveloperMetadataLocation
  3846. raw := NoMethod(*s)
  3847. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3848. }
  3849. // DeveloperMetadataLookup: Selects DeveloperMetadata that matches all
  3850. // of the specified fields. For
  3851. // example, if only a metadata ID is specified this considers
  3852. // the
  3853. // DeveloperMetadata with that particular unique ID. If a metadata key
  3854. // is
  3855. // specified, this considers all developer metadata with that key. If
  3856. // a
  3857. // key, visibility, and location type are all specified, this considers
  3858. // all
  3859. // developer metadata with that key and visibility that are associated
  3860. // with a
  3861. // location of that type. In general, this
  3862. // selects all DeveloperMetadata that matches the intersection of all
  3863. // the
  3864. // specified fields; any field or combination of fields may be
  3865. // specified.
  3866. type DeveloperMetadataLookup struct {
  3867. // LocationMatchingStrategy: Determines how this lookup matches the
  3868. // location. If this field is
  3869. // specified as EXACT, only developer metadata associated on the
  3870. // exact
  3871. // location specified is matched. If this field is specified to
  3872. // INTERSECTING,
  3873. // developer metadata associated on intersecting locations is
  3874. // also
  3875. // matched. If left unspecified, this field assumes a default value
  3876. // of
  3877. // INTERSECTING.
  3878. // If this field is specified, a metadataLocation
  3879. // must also be specified.
  3880. //
  3881. // Possible values:
  3882. // "DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED" -
  3883. // Default value. This value must not be used.
  3884. // "EXACT_LOCATION" - Indicates that a specified location should be
  3885. // matched exactly. For
  3886. // example, if row three were specified as a location this matching
  3887. // strategy
  3888. // would only match developer metadata also associated on row three.
  3889. // Metadata
  3890. // associated on other locations would not be considered.
  3891. // "INTERSECTING_LOCATION" - Indicates that a specified location
  3892. // should match that exact location as
  3893. // well as any intersecting locations. For example, if row three
  3894. // were
  3895. // specified as a location this matching strategy would match
  3896. // developer
  3897. // metadata associated on row three as well as metadata associated
  3898. // on
  3899. // locations that intersect row three. If, for instance, there was
  3900. // developer
  3901. // metadata associated on column B, this matching strategy would also
  3902. // match
  3903. // that location because column B intersects row three.
  3904. LocationMatchingStrategy string `json:"locationMatchingStrategy,omitempty"`
  3905. // LocationType: Limits the selected developer metadata to those entries
  3906. // which are
  3907. // associated with locations of the specified type. For example, when
  3908. // this
  3909. // field is specified as ROW this lookup
  3910. // only considers developer metadata associated on rows. If the field
  3911. // is left
  3912. // unspecified, all location types are considered. This field cannot
  3913. // be
  3914. // specified as SPREADSHEET when
  3915. // the locationMatchingStrategy
  3916. // is specified as INTERSECTING or when the
  3917. // metadataLocation is specified as a
  3918. // non-spreadsheet location: spreadsheet metadata cannot intersect any
  3919. // other
  3920. // developer metadata location. This field also must be left
  3921. // unspecified when
  3922. // the locationMatchingStrategy
  3923. // is specified as EXACT.
  3924. //
  3925. // Possible values:
  3926. // "DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED" - Default value.
  3927. // "ROW" - Developer metadata associated on an entire row dimension.
  3928. // "COLUMN" - Developer metadata associated on an entire column
  3929. // dimension.
  3930. // "SHEET" - Developer metadata associated on an entire sheet.
  3931. // "SPREADSHEET" - Developer metadata associated on the entire
  3932. // spreadsheet.
  3933. LocationType string `json:"locationType,omitempty"`
  3934. // MetadataId: Limits the selected developer metadata to that which has
  3935. // a matching
  3936. // DeveloperMetadata.metadata_id.
  3937. MetadataId int64 `json:"metadataId,omitempty"`
  3938. // MetadataKey: Limits the selected developer metadata to that which has
  3939. // a matching
  3940. // DeveloperMetadata.metadata_key.
  3941. MetadataKey string `json:"metadataKey,omitempty"`
  3942. // MetadataLocation: Limits the selected developer metadata to those
  3943. // entries associated with
  3944. // the specified location. This field either matches exact locations or
  3945. // all
  3946. // intersecting locations according the
  3947. // specified
  3948. // locationMatchingStrategy.
  3949. MetadataLocation *DeveloperMetadataLocation `json:"metadataLocation,omitempty"`
  3950. // MetadataValue: Limits the selected developer metadata to that which
  3951. // has a matching
  3952. // DeveloperMetadata.metadata_value.
  3953. MetadataValue string `json:"metadataValue,omitempty"`
  3954. // Visibility: Limits the selected developer metadata to that which has
  3955. // a matching
  3956. // DeveloperMetadata.visibility. If left unspecified, all
  3957. // developer
  3958. // metadata visibile to the requesting project is considered.
  3959. //
  3960. // Possible values:
  3961. // "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" - Default value.
  3962. // "DOCUMENT" - Document-visible metadata is accessible from any
  3963. // developer project with
  3964. // access to the document.
  3965. // "PROJECT" - Project-visible metadata is only visible to and
  3966. // accessible by the developer
  3967. // project that created the metadata.
  3968. Visibility string `json:"visibility,omitempty"`
  3969. // ForceSendFields is a list of field names (e.g.
  3970. // "LocationMatchingStrategy") to unconditionally include in API
  3971. // requests. By default, fields with empty values are omitted from API
  3972. // requests. However, any non-pointer, non-interface field appearing in
  3973. // ForceSendFields will be sent to the server regardless of whether the
  3974. // field is empty or not. This may be used to include empty fields in
  3975. // Patch requests.
  3976. ForceSendFields []string `json:"-"`
  3977. // NullFields is a list of field names (e.g. "LocationMatchingStrategy")
  3978. // to include in API requests with the JSON null value. By default,
  3979. // fields with empty values are omitted from API requests. However, any
  3980. // field with an empty value appearing in NullFields will be sent to the
  3981. // server as null. It is an error if a field in this list has a
  3982. // non-empty value. This may be used to include null fields in Patch
  3983. // requests.
  3984. NullFields []string `json:"-"`
  3985. }
  3986. func (s *DeveloperMetadataLookup) MarshalJSON() ([]byte, error) {
  3987. type NoMethod DeveloperMetadataLookup
  3988. raw := NoMethod(*s)
  3989. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3990. }
  3991. // DimensionGroup: A group over an interval of rows or columns on a
  3992. // sheet, which can contain or
  3993. // be contained within other groups. A group can be collapsed or
  3994. // expanded as a
  3995. // unit on the sheet.
  3996. type DimensionGroup struct {
  3997. // Collapsed: This field is true if this group is collapsed. A collapsed
  3998. // group remains
  3999. // collapsed if an overlapping group at a shallower depth is
  4000. // expanded.
  4001. //
  4002. // A true value does not imply that all dimensions within the group
  4003. // are
  4004. // hidden, since a dimension's visibility can change independently from
  4005. // this
  4006. // group property. However, when this property is updated, all
  4007. // dimensions
  4008. // within it are set to hidden if this field is true, or set to visible
  4009. // if
  4010. // this field is false.
  4011. Collapsed bool `json:"collapsed,omitempty"`
  4012. // Depth: The depth of the group, representing how many groups have a
  4013. // range that
  4014. // wholly contains the range of this group.
  4015. Depth int64 `json:"depth,omitempty"`
  4016. // Range: The range over which this group exists.
  4017. Range *DimensionRange `json:"range,omitempty"`
  4018. // ForceSendFields is a list of field names (e.g. "Collapsed") to
  4019. // unconditionally include in API requests. By default, fields with
  4020. // empty values are omitted from API requests. However, any non-pointer,
  4021. // non-interface field appearing in ForceSendFields will be sent to the
  4022. // server regardless of whether the field is empty or not. This may be
  4023. // used to include empty fields in Patch requests.
  4024. ForceSendFields []string `json:"-"`
  4025. // NullFields is a list of field names (e.g. "Collapsed") to include in
  4026. // API requests with the JSON null value. By default, fields with empty
  4027. // values are omitted from API requests. However, any field with an
  4028. // empty value appearing in NullFields will be sent to the server as
  4029. // null. It is an error if a field in this list has a non-empty value.
  4030. // This may be used to include null fields in Patch requests.
  4031. NullFields []string `json:"-"`
  4032. }
  4033. func (s *DimensionGroup) MarshalJSON() ([]byte, error) {
  4034. type NoMethod DimensionGroup
  4035. raw := NoMethod(*s)
  4036. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4037. }
  4038. // DimensionProperties: Properties about a dimension.
  4039. type DimensionProperties struct {
  4040. // DeveloperMetadata: The developer metadata associated with a single
  4041. // row or column.
  4042. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  4043. // HiddenByFilter: True if this dimension is being filtered.
  4044. // This field is read-only.
  4045. HiddenByFilter bool `json:"hiddenByFilter,omitempty"`
  4046. // HiddenByUser: True if this dimension is explicitly hidden.
  4047. HiddenByUser bool `json:"hiddenByUser,omitempty"`
  4048. // PixelSize: The height (if a row) or width (if a column) of the
  4049. // dimension in pixels.
  4050. PixelSize int64 `json:"pixelSize,omitempty"`
  4051. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  4052. // to unconditionally include in API requests. By default, fields with
  4053. // empty values are omitted from API requests. However, any non-pointer,
  4054. // non-interface field appearing in ForceSendFields will be sent to the
  4055. // server regardless of whether the field is empty or not. This may be
  4056. // used to include empty fields in Patch requests.
  4057. ForceSendFields []string `json:"-"`
  4058. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  4059. // include in API requests with the JSON null value. By default, fields
  4060. // with empty values are omitted from API requests. However, any field
  4061. // with an empty value appearing in NullFields will be sent to the
  4062. // server as null. It is an error if a field in this list has a
  4063. // non-empty value. This may be used to include null fields in Patch
  4064. // requests.
  4065. NullFields []string `json:"-"`
  4066. }
  4067. func (s *DimensionProperties) MarshalJSON() ([]byte, error) {
  4068. type NoMethod DimensionProperties
  4069. raw := NoMethod(*s)
  4070. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4071. }
  4072. // DimensionRange: A range along a single dimension on a sheet.
  4073. // All indexes are zero-based.
  4074. // Indexes are half open: the start index is inclusive
  4075. // and the end index is exclusive.
  4076. // Missing indexes indicate the range is unbounded on that side.
  4077. type DimensionRange struct {
  4078. // Dimension: The dimension of the span.
  4079. //
  4080. // Possible values:
  4081. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  4082. // "ROWS" - Operates on the rows of a sheet.
  4083. // "COLUMNS" - Operates on the columns of a sheet.
  4084. Dimension string `json:"dimension,omitempty"`
  4085. // EndIndex: The end (exclusive) of the span, or not set if unbounded.
  4086. EndIndex int64 `json:"endIndex,omitempty"`
  4087. // SheetId: The sheet this span is on.
  4088. SheetId int64 `json:"sheetId,omitempty"`
  4089. // StartIndex: The start (inclusive) of the span, or not set if
  4090. // unbounded.
  4091. StartIndex int64 `json:"startIndex,omitempty"`
  4092. // ForceSendFields is a list of field names (e.g. "Dimension") to
  4093. // unconditionally include in API requests. By default, fields with
  4094. // empty values are omitted from API requests. However, any non-pointer,
  4095. // non-interface field appearing in ForceSendFields will be sent to the
  4096. // server regardless of whether the field is empty or not. This may be
  4097. // used to include empty fields in Patch requests.
  4098. ForceSendFields []string `json:"-"`
  4099. // NullFields is a list of field names (e.g. "Dimension") to include in
  4100. // API requests with the JSON null value. By default, fields with empty
  4101. // values are omitted from API requests. However, any field with an
  4102. // empty value appearing in NullFields will be sent to the server as
  4103. // null. It is an error if a field in this list has a non-empty value.
  4104. // This may be used to include null fields in Patch requests.
  4105. NullFields []string `json:"-"`
  4106. }
  4107. func (s *DimensionRange) MarshalJSON() ([]byte, error) {
  4108. type NoMethod DimensionRange
  4109. raw := NoMethod(*s)
  4110. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4111. }
  4112. // DuplicateFilterViewRequest: Duplicates a particular filter view.
  4113. type DuplicateFilterViewRequest struct {
  4114. // FilterId: The ID of the filter being duplicated.
  4115. FilterId int64 `json:"filterId,omitempty"`
  4116. // ForceSendFields is a list of field names (e.g. "FilterId") to
  4117. // unconditionally include in API requests. By default, fields with
  4118. // empty values are omitted from API requests. However, any non-pointer,
  4119. // non-interface field appearing in ForceSendFields will be sent to the
  4120. // server regardless of whether the field is empty or not. This may be
  4121. // used to include empty fields in Patch requests.
  4122. ForceSendFields []string `json:"-"`
  4123. // NullFields is a list of field names (e.g. "FilterId") to include in
  4124. // API requests with the JSON null value. By default, fields with empty
  4125. // values are omitted from API requests. However, any field with an
  4126. // empty value appearing in NullFields will be sent to the server as
  4127. // null. It is an error if a field in this list has a non-empty value.
  4128. // This may be used to include null fields in Patch requests.
  4129. NullFields []string `json:"-"`
  4130. }
  4131. func (s *DuplicateFilterViewRequest) MarshalJSON() ([]byte, error) {
  4132. type NoMethod DuplicateFilterViewRequest
  4133. raw := NoMethod(*s)
  4134. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4135. }
  4136. // DuplicateFilterViewResponse: The result of a filter view being
  4137. // duplicated.
  4138. type DuplicateFilterViewResponse struct {
  4139. // Filter: The newly created filter.
  4140. Filter *FilterView `json:"filter,omitempty"`
  4141. // ForceSendFields is a list of field names (e.g. "Filter") to
  4142. // unconditionally include in API requests. By default, fields with
  4143. // empty values are omitted from API requests. However, any non-pointer,
  4144. // non-interface field appearing in ForceSendFields will be sent to the
  4145. // server regardless of whether the field is empty or not. This may be
  4146. // used to include empty fields in Patch requests.
  4147. ForceSendFields []string `json:"-"`
  4148. // NullFields is a list of field names (e.g. "Filter") to include in API
  4149. // requests with the JSON null value. By default, fields with empty
  4150. // values are omitted from API requests. However, any field with an
  4151. // empty value appearing in NullFields will be sent to the server as
  4152. // null. It is an error if a field in this list has a non-empty value.
  4153. // This may be used to include null fields in Patch requests.
  4154. NullFields []string `json:"-"`
  4155. }
  4156. func (s *DuplicateFilterViewResponse) MarshalJSON() ([]byte, error) {
  4157. type NoMethod DuplicateFilterViewResponse
  4158. raw := NoMethod(*s)
  4159. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4160. }
  4161. // DuplicateSheetRequest: Duplicates the contents of a sheet.
  4162. type DuplicateSheetRequest struct {
  4163. // InsertSheetIndex: The zero-based index where the new sheet should be
  4164. // inserted.
  4165. // The index of all sheets after this are incremented.
  4166. InsertSheetIndex int64 `json:"insertSheetIndex,omitempty"`
  4167. // NewSheetId: If set, the ID of the new sheet. If not set, an ID is
  4168. // chosen.
  4169. // If set, the ID must not conflict with any existing sheet ID.
  4170. // If set, it must be non-negative.
  4171. NewSheetId int64 `json:"newSheetId,omitempty"`
  4172. // NewSheetName: The name of the new sheet. If empty, a new name is
  4173. // chosen for you.
  4174. NewSheetName string `json:"newSheetName,omitempty"`
  4175. // SourceSheetId: The sheet to duplicate.
  4176. SourceSheetId int64 `json:"sourceSheetId,omitempty"`
  4177. // ForceSendFields is a list of field names (e.g. "InsertSheetIndex") to
  4178. // unconditionally include in API requests. By default, fields with
  4179. // empty values are omitted from API requests. However, any non-pointer,
  4180. // non-interface field appearing in ForceSendFields will be sent to the
  4181. // server regardless of whether the field is empty or not. This may be
  4182. // used to include empty fields in Patch requests.
  4183. ForceSendFields []string `json:"-"`
  4184. // NullFields is a list of field names (e.g. "InsertSheetIndex") to
  4185. // include in API requests with the JSON null value. By default, fields
  4186. // with empty values are omitted from API requests. However, any field
  4187. // with an empty value appearing in NullFields will be sent to the
  4188. // server as null. It is an error if a field in this list has a
  4189. // non-empty value. This may be used to include null fields in Patch
  4190. // requests.
  4191. NullFields []string `json:"-"`
  4192. }
  4193. func (s *DuplicateSheetRequest) MarshalJSON() ([]byte, error) {
  4194. type NoMethod DuplicateSheetRequest
  4195. raw := NoMethod(*s)
  4196. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4197. }
  4198. // DuplicateSheetResponse: The result of duplicating a sheet.
  4199. type DuplicateSheetResponse struct {
  4200. // Properties: The properties of the duplicate sheet.
  4201. Properties *SheetProperties `json:"properties,omitempty"`
  4202. // ForceSendFields is a list of field names (e.g. "Properties") to
  4203. // unconditionally include in API requests. By default, fields with
  4204. // empty values are omitted from API requests. However, any non-pointer,
  4205. // non-interface field appearing in ForceSendFields will be sent to the
  4206. // server regardless of whether the field is empty or not. This may be
  4207. // used to include empty fields in Patch requests.
  4208. ForceSendFields []string `json:"-"`
  4209. // NullFields is a list of field names (e.g. "Properties") to include in
  4210. // API requests with the JSON null value. By default, fields with empty
  4211. // values are omitted from API requests. However, any field with an
  4212. // empty value appearing in NullFields will be sent to the server as
  4213. // null. It is an error if a field in this list has a non-empty value.
  4214. // This may be used to include null fields in Patch requests.
  4215. NullFields []string `json:"-"`
  4216. }
  4217. func (s *DuplicateSheetResponse) MarshalJSON() ([]byte, error) {
  4218. type NoMethod DuplicateSheetResponse
  4219. raw := NoMethod(*s)
  4220. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4221. }
  4222. // Editors: The editors of a protected range.
  4223. type Editors struct {
  4224. // DomainUsersCanEdit: True if anyone in the document's domain has edit
  4225. // access to the protected
  4226. // range. Domain protection is only supported on documents within a
  4227. // domain.
  4228. DomainUsersCanEdit bool `json:"domainUsersCanEdit,omitempty"`
  4229. // Groups: The email addresses of groups with edit access to the
  4230. // protected range.
  4231. Groups []string `json:"groups,omitempty"`
  4232. // Users: The email addresses of users with edit access to the protected
  4233. // range.
  4234. Users []string `json:"users,omitempty"`
  4235. // ForceSendFields is a list of field names (e.g. "DomainUsersCanEdit")
  4236. // to unconditionally include in API requests. By default, fields with
  4237. // empty values are omitted from API requests. However, any non-pointer,
  4238. // non-interface field appearing in ForceSendFields will be sent to the
  4239. // server regardless of whether the field is empty or not. This may be
  4240. // used to include empty fields in Patch requests.
  4241. ForceSendFields []string `json:"-"`
  4242. // NullFields is a list of field names (e.g. "DomainUsersCanEdit") to
  4243. // include in API requests with the JSON null value. By default, fields
  4244. // with empty values are omitted from API requests. However, any field
  4245. // with an empty value appearing in NullFields will be sent to the
  4246. // server as null. It is an error if a field in this list has a
  4247. // non-empty value. This may be used to include null fields in Patch
  4248. // requests.
  4249. NullFields []string `json:"-"`
  4250. }
  4251. func (s *Editors) MarshalJSON() ([]byte, error) {
  4252. type NoMethod Editors
  4253. raw := NoMethod(*s)
  4254. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4255. }
  4256. // EmbeddedChart: A chart embedded in a sheet.
  4257. type EmbeddedChart struct {
  4258. // ChartId: The ID of the chart.
  4259. ChartId int64 `json:"chartId,omitempty"`
  4260. // Position: The position of the chart.
  4261. Position *EmbeddedObjectPosition `json:"position,omitempty"`
  4262. // Spec: The specification of the chart.
  4263. Spec *ChartSpec `json:"spec,omitempty"`
  4264. // ForceSendFields is a list of field names (e.g. "ChartId") to
  4265. // unconditionally include in API requests. By default, fields with
  4266. // empty values are omitted from API requests. However, any non-pointer,
  4267. // non-interface field appearing in ForceSendFields will be sent to the
  4268. // server regardless of whether the field is empty or not. This may be
  4269. // used to include empty fields in Patch requests.
  4270. ForceSendFields []string `json:"-"`
  4271. // NullFields is a list of field names (e.g. "ChartId") to include in
  4272. // API requests with the JSON null value. By default, fields with empty
  4273. // values are omitted from API requests. However, any field with an
  4274. // empty value appearing in NullFields will be sent to the server as
  4275. // null. It is an error if a field in this list has a non-empty value.
  4276. // This may be used to include null fields in Patch requests.
  4277. NullFields []string `json:"-"`
  4278. }
  4279. func (s *EmbeddedChart) MarshalJSON() ([]byte, error) {
  4280. type NoMethod EmbeddedChart
  4281. raw := NoMethod(*s)
  4282. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4283. }
  4284. // EmbeddedObjectPosition: The position of an embedded object such as a
  4285. // chart.
  4286. type EmbeddedObjectPosition struct {
  4287. // NewSheet: If true, the embedded object is put on a new sheet whose
  4288. // ID
  4289. // is chosen for you. Used only when writing.
  4290. NewSheet bool `json:"newSheet,omitempty"`
  4291. // OverlayPosition: The position at which the object is overlaid on top
  4292. // of a grid.
  4293. OverlayPosition *OverlayPosition `json:"overlayPosition,omitempty"`
  4294. // SheetId: The sheet this is on. Set only if the embedded object
  4295. // is on its own sheet. Must be non-negative.
  4296. SheetId int64 `json:"sheetId,omitempty"`
  4297. // ForceSendFields is a list of field names (e.g. "NewSheet") to
  4298. // unconditionally include in API requests. By default, fields with
  4299. // empty values are omitted from API requests. However, any non-pointer,
  4300. // non-interface field appearing in ForceSendFields will be sent to the
  4301. // server regardless of whether the field is empty or not. This may be
  4302. // used to include empty fields in Patch requests.
  4303. ForceSendFields []string `json:"-"`
  4304. // NullFields is a list of field names (e.g. "NewSheet") to include in
  4305. // API requests with the JSON null value. By default, fields with empty
  4306. // values are omitted from API requests. However, any field with an
  4307. // empty value appearing in NullFields will be sent to the server as
  4308. // null. It is an error if a field in this list has a non-empty value.
  4309. // This may be used to include null fields in Patch requests.
  4310. NullFields []string `json:"-"`
  4311. }
  4312. func (s *EmbeddedObjectPosition) MarshalJSON() ([]byte, error) {
  4313. type NoMethod EmbeddedObjectPosition
  4314. raw := NoMethod(*s)
  4315. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4316. }
  4317. // ErrorValue: An error in a cell.
  4318. type ErrorValue struct {
  4319. // Message: A message with more information about the error
  4320. // (in the spreadsheet's locale).
  4321. Message string `json:"message,omitempty"`
  4322. // Type: The type of error.
  4323. //
  4324. // Possible values:
  4325. // "ERROR_TYPE_UNSPECIFIED" - The default error type, do not use this.
  4326. // "ERROR" - Corresponds to the `#ERROR!` error.
  4327. // "NULL_VALUE" - Corresponds to the `#NULL!` error.
  4328. // "DIVIDE_BY_ZERO" - Corresponds to the `#DIV/0` error.
  4329. // "VALUE" - Corresponds to the `#VALUE!` error.
  4330. // "REF" - Corresponds to the `#REF!` error.
  4331. // "NAME" - Corresponds to the `#NAME?` error.
  4332. // "NUM" - Corresponds to the `#NUM`! error.
  4333. // "N_A" - Corresponds to the `#N/A` error.
  4334. // "LOADING" - Corresponds to the `Loading...` state.
  4335. Type string `json:"type,omitempty"`
  4336. // ForceSendFields is a list of field names (e.g. "Message") to
  4337. // unconditionally include in API requests. By default, fields with
  4338. // empty values are omitted from API requests. However, any non-pointer,
  4339. // non-interface field appearing in ForceSendFields will be sent to the
  4340. // server regardless of whether the field is empty or not. This may be
  4341. // used to include empty fields in Patch requests.
  4342. ForceSendFields []string `json:"-"`
  4343. // NullFields is a list of field names (e.g. "Message") to include in
  4344. // API requests with the JSON null value. By default, fields with empty
  4345. // values are omitted from API requests. However, any field with an
  4346. // empty value appearing in NullFields will be sent to the server as
  4347. // null. It is an error if a field in this list has a non-empty value.
  4348. // This may be used to include null fields in Patch requests.
  4349. NullFields []string `json:"-"`
  4350. }
  4351. func (s *ErrorValue) MarshalJSON() ([]byte, error) {
  4352. type NoMethod ErrorValue
  4353. raw := NoMethod(*s)
  4354. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4355. }
  4356. // ExtendedValue: The kinds of value that a cell in a spreadsheet can
  4357. // have.
  4358. type ExtendedValue struct {
  4359. // BoolValue: Represents a boolean value.
  4360. BoolValue bool `json:"boolValue,omitempty"`
  4361. // ErrorValue: Represents an error.
  4362. // This field is read-only.
  4363. ErrorValue *ErrorValue `json:"errorValue,omitempty"`
  4364. // FormulaValue: Represents a formula.
  4365. FormulaValue string `json:"formulaValue,omitempty"`
  4366. // NumberValue: Represents a double value.
  4367. // Note: Dates, Times and DateTimes are represented as doubles
  4368. // in
  4369. // "serial number" format.
  4370. NumberValue float64 `json:"numberValue,omitempty"`
  4371. // StringValue: Represents a string value.
  4372. // Leading single quotes are not included. For example, if the user
  4373. // typed
  4374. // `'123` into the UI, this would be represented as a `stringValue`
  4375. // of
  4376. // "123".
  4377. StringValue string `json:"stringValue,omitempty"`
  4378. // ForceSendFields is a list of field names (e.g. "BoolValue") to
  4379. // unconditionally include in API requests. By default, fields with
  4380. // empty values are omitted from API requests. However, any non-pointer,
  4381. // non-interface field appearing in ForceSendFields will be sent to the
  4382. // server regardless of whether the field is empty or not. This may be
  4383. // used to include empty fields in Patch requests.
  4384. ForceSendFields []string `json:"-"`
  4385. // NullFields is a list of field names (e.g. "BoolValue") to include in
  4386. // API requests with the JSON null value. By default, fields with empty
  4387. // values are omitted from API requests. However, any field with an
  4388. // empty value appearing in NullFields will be sent to the server as
  4389. // null. It is an error if a field in this list has a non-empty value.
  4390. // This may be used to include null fields in Patch requests.
  4391. NullFields []string `json:"-"`
  4392. }
  4393. func (s *ExtendedValue) MarshalJSON() ([]byte, error) {
  4394. type NoMethod ExtendedValue
  4395. raw := NoMethod(*s)
  4396. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4397. }
  4398. func (s *ExtendedValue) UnmarshalJSON(data []byte) error {
  4399. type NoMethod ExtendedValue
  4400. var s1 struct {
  4401. NumberValue gensupport.JSONFloat64 `json:"numberValue"`
  4402. *NoMethod
  4403. }
  4404. s1.NoMethod = (*NoMethod)(s)
  4405. if err := json.Unmarshal(data, &s1); err != nil {
  4406. return err
  4407. }
  4408. s.NumberValue = float64(s1.NumberValue)
  4409. return nil
  4410. }
  4411. // FilterCriteria: Criteria for showing/hiding rows in a filter or
  4412. // filter view.
  4413. type FilterCriteria struct {
  4414. // Condition: A condition that must be true for values to be
  4415. // shown.
  4416. // (This does not override hiddenValues -- if a value is listed there,
  4417. // it will still be hidden.)
  4418. Condition *BooleanCondition `json:"condition,omitempty"`
  4419. // HiddenValues: Values that should be hidden.
  4420. HiddenValues []string `json:"hiddenValues,omitempty"`
  4421. // ForceSendFields is a list of field names (e.g. "Condition") to
  4422. // unconditionally include in API requests. By default, fields with
  4423. // empty values are omitted from API requests. However, any non-pointer,
  4424. // non-interface field appearing in ForceSendFields will be sent to the
  4425. // server regardless of whether the field is empty or not. This may be
  4426. // used to include empty fields in Patch requests.
  4427. ForceSendFields []string `json:"-"`
  4428. // NullFields is a list of field names (e.g. "Condition") to include in
  4429. // API requests with the JSON null value. By default, fields with empty
  4430. // values are omitted from API requests. However, any field with an
  4431. // empty value appearing in NullFields will be sent to the server as
  4432. // null. It is an error if a field in this list has a non-empty value.
  4433. // This may be used to include null fields in Patch requests.
  4434. NullFields []string `json:"-"`
  4435. }
  4436. func (s *FilterCriteria) MarshalJSON() ([]byte, error) {
  4437. type NoMethod FilterCriteria
  4438. raw := NoMethod(*s)
  4439. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4440. }
  4441. // FilterView: A filter view.
  4442. type FilterView struct {
  4443. // Criteria: The criteria for showing/hiding values per column.
  4444. // The map's key is the column index, and the value is the criteria
  4445. // for
  4446. // that column.
  4447. Criteria map[string]FilterCriteria `json:"criteria,omitempty"`
  4448. // FilterViewId: The ID of the filter view.
  4449. FilterViewId int64 `json:"filterViewId,omitempty"`
  4450. // NamedRangeId: The named range this filter view is backed by, if
  4451. // any.
  4452. //
  4453. // When writing, only one of range or named_range_id
  4454. // may be set.
  4455. NamedRangeId string `json:"namedRangeId,omitempty"`
  4456. // Range: The range this filter view covers.
  4457. //
  4458. // When writing, only one of range or named_range_id
  4459. // may be set.
  4460. Range *GridRange `json:"range,omitempty"`
  4461. // SortSpecs: The sort order per column. Later specifications are used
  4462. // when values
  4463. // are equal in the earlier specifications.
  4464. SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
  4465. // Title: The name of the filter view.
  4466. Title string `json:"title,omitempty"`
  4467. // ForceSendFields is a list of field names (e.g. "Criteria") to
  4468. // unconditionally include in API requests. By default, fields with
  4469. // empty values are omitted from API requests. However, any non-pointer,
  4470. // non-interface field appearing in ForceSendFields will be sent to the
  4471. // server regardless of whether the field is empty or not. This may be
  4472. // used to include empty fields in Patch requests.
  4473. ForceSendFields []string `json:"-"`
  4474. // NullFields is a list of field names (e.g. "Criteria") to include in
  4475. // API requests with the JSON null value. By default, fields with empty
  4476. // values are omitted from API requests. However, any field with an
  4477. // empty value appearing in NullFields will be sent to the server as
  4478. // null. It is an error if a field in this list has a non-empty value.
  4479. // This may be used to include null fields in Patch requests.
  4480. NullFields []string `json:"-"`
  4481. }
  4482. func (s *FilterView) MarshalJSON() ([]byte, error) {
  4483. type NoMethod FilterView
  4484. raw := NoMethod(*s)
  4485. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4486. }
  4487. // FindReplaceRequest: Finds and replaces data in cells over a range,
  4488. // sheet, or all sheets.
  4489. type FindReplaceRequest struct {
  4490. // AllSheets: True to find/replace over all sheets.
  4491. AllSheets bool `json:"allSheets,omitempty"`
  4492. // Find: The value to search.
  4493. Find string `json:"find,omitempty"`
  4494. // IncludeFormulas: True if the search should include cells with
  4495. // formulas.
  4496. // False to skip cells with formulas.
  4497. IncludeFormulas bool `json:"includeFormulas,omitempty"`
  4498. // MatchCase: True if the search is case sensitive.
  4499. MatchCase bool `json:"matchCase,omitempty"`
  4500. // MatchEntireCell: True if the find value should match the entire cell.
  4501. MatchEntireCell bool `json:"matchEntireCell,omitempty"`
  4502. // Range: The range to find/replace over.
  4503. Range *GridRange `json:"range,omitempty"`
  4504. // Replacement: The value to use as the replacement.
  4505. Replacement string `json:"replacement,omitempty"`
  4506. // SearchByRegex: True if the find value is a regex.
  4507. // The regular expression and replacement should follow Java regex
  4508. // rules
  4509. // at
  4510. // https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
  4511. // The replacement string is allowed to refer to capturing groups.
  4512. // For example, if one cell has the contents "Google Sheets" and
  4513. // another
  4514. // has "Google Docs", then searching for "o.* (.*)" with a
  4515. // replacement of
  4516. // "$1 Rocks" would change the contents of the cells to
  4517. // "GSheets Rocks" and "GDocs Rocks" respectively.
  4518. SearchByRegex bool `json:"searchByRegex,omitempty"`
  4519. // SheetId: The sheet to find/replace over.
  4520. SheetId int64 `json:"sheetId,omitempty"`
  4521. // ForceSendFields is a list of field names (e.g. "AllSheets") to
  4522. // unconditionally include in API requests. By default, fields with
  4523. // empty values are omitted from API requests. However, any non-pointer,
  4524. // non-interface field appearing in ForceSendFields will be sent to the
  4525. // server regardless of whether the field is empty or not. This may be
  4526. // used to include empty fields in Patch requests.
  4527. ForceSendFields []string `json:"-"`
  4528. // NullFields is a list of field names (e.g. "AllSheets") to include in
  4529. // API requests with the JSON null value. By default, fields with empty
  4530. // values are omitted from API requests. However, any field with an
  4531. // empty value appearing in NullFields will be sent to the server as
  4532. // null. It is an error if a field in this list has a non-empty value.
  4533. // This may be used to include null fields in Patch requests.
  4534. NullFields []string `json:"-"`
  4535. }
  4536. func (s *FindReplaceRequest) MarshalJSON() ([]byte, error) {
  4537. type NoMethod FindReplaceRequest
  4538. raw := NoMethod(*s)
  4539. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4540. }
  4541. // FindReplaceResponse: The result of the find/replace.
  4542. type FindReplaceResponse struct {
  4543. // FormulasChanged: The number of formula cells changed.
  4544. FormulasChanged int64 `json:"formulasChanged,omitempty"`
  4545. // OccurrencesChanged: The number of occurrences (possibly multiple
  4546. // within a cell) changed.
  4547. // For example, if replacing "e" with "o" in "Google Sheets", this
  4548. // would
  4549. // be "3" because "Google Sheets" -> "Googlo Shoots".
  4550. OccurrencesChanged int64 `json:"occurrencesChanged,omitempty"`
  4551. // RowsChanged: The number of rows changed.
  4552. RowsChanged int64 `json:"rowsChanged,omitempty"`
  4553. // SheetsChanged: The number of sheets changed.
  4554. SheetsChanged int64 `json:"sheetsChanged,omitempty"`
  4555. // ValuesChanged: The number of non-formula cells changed.
  4556. ValuesChanged int64 `json:"valuesChanged,omitempty"`
  4557. // ForceSendFields is a list of field names (e.g. "FormulasChanged") to
  4558. // unconditionally include in API requests. By default, fields with
  4559. // empty values are omitted from API requests. However, any non-pointer,
  4560. // non-interface field appearing in ForceSendFields will be sent to the
  4561. // server regardless of whether the field is empty or not. This may be
  4562. // used to include empty fields in Patch requests.
  4563. ForceSendFields []string `json:"-"`
  4564. // NullFields is a list of field names (e.g. "FormulasChanged") to
  4565. // include in API requests with the JSON null value. By default, fields
  4566. // with empty values are omitted from API requests. However, any field
  4567. // with an empty value appearing in NullFields will be sent to the
  4568. // server as null. It is an error if a field in this list has a
  4569. // non-empty value. This may be used to include null fields in Patch
  4570. // requests.
  4571. NullFields []string `json:"-"`
  4572. }
  4573. func (s *FindReplaceResponse) MarshalJSON() ([]byte, error) {
  4574. type NoMethod FindReplaceResponse
  4575. raw := NoMethod(*s)
  4576. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4577. }
  4578. // GetSpreadsheetByDataFilterRequest: The request for retrieving a
  4579. // Spreadsheet.
  4580. type GetSpreadsheetByDataFilterRequest struct {
  4581. // DataFilters: The DataFilters used to select which ranges to retrieve
  4582. // from
  4583. // the spreadsheet.
  4584. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  4585. // IncludeGridData: True if grid data should be returned.
  4586. // This parameter is ignored if a field mask was set in the request.
  4587. IncludeGridData bool `json:"includeGridData,omitempty"`
  4588. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  4589. // unconditionally include in API requests. By default, fields with
  4590. // empty values are omitted from API requests. However, any non-pointer,
  4591. // non-interface field appearing in ForceSendFields will be sent to the
  4592. // server regardless of whether the field is empty or not. This may be
  4593. // used to include empty fields in Patch requests.
  4594. ForceSendFields []string `json:"-"`
  4595. // NullFields is a list of field names (e.g. "DataFilters") to include
  4596. // in API requests with the JSON null value. By default, fields with
  4597. // empty values are omitted from API requests. However, any field with
  4598. // an empty value appearing in NullFields will be sent to the server as
  4599. // null. It is an error if a field in this list has a non-empty value.
  4600. // This may be used to include null fields in Patch requests.
  4601. NullFields []string `json:"-"`
  4602. }
  4603. func (s *GetSpreadsheetByDataFilterRequest) MarshalJSON() ([]byte, error) {
  4604. type NoMethod GetSpreadsheetByDataFilterRequest
  4605. raw := NoMethod(*s)
  4606. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4607. }
  4608. // GradientRule: A rule that applies a gradient color scale format,
  4609. // based on
  4610. // the interpolation points listed. The format of a cell will vary
  4611. // based on its contents as compared to the values of the
  4612. // interpolation
  4613. // points.
  4614. type GradientRule struct {
  4615. // Maxpoint: The final interpolation point.
  4616. Maxpoint *InterpolationPoint `json:"maxpoint,omitempty"`
  4617. // Midpoint: An optional midway interpolation point.
  4618. Midpoint *InterpolationPoint `json:"midpoint,omitempty"`
  4619. // Minpoint: The starting interpolation point.
  4620. Minpoint *InterpolationPoint `json:"minpoint,omitempty"`
  4621. // ForceSendFields is a list of field names (e.g. "Maxpoint") to
  4622. // unconditionally include in API requests. By default, fields with
  4623. // empty values are omitted from API requests. However, any non-pointer,
  4624. // non-interface field appearing in ForceSendFields will be sent to the
  4625. // server regardless of whether the field is empty or not. This may be
  4626. // used to include empty fields in Patch requests.
  4627. ForceSendFields []string `json:"-"`
  4628. // NullFields is a list of field names (e.g. "Maxpoint") to include in
  4629. // API requests with the JSON null value. By default, fields with empty
  4630. // values are omitted from API requests. However, any field with an
  4631. // empty value appearing in NullFields will be sent to the server as
  4632. // null. It is an error if a field in this list has a non-empty value.
  4633. // This may be used to include null fields in Patch requests.
  4634. NullFields []string `json:"-"`
  4635. }
  4636. func (s *GradientRule) MarshalJSON() ([]byte, error) {
  4637. type NoMethod GradientRule
  4638. raw := NoMethod(*s)
  4639. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4640. }
  4641. // GridCoordinate: A coordinate in a sheet.
  4642. // All indexes are zero-based.
  4643. type GridCoordinate struct {
  4644. // ColumnIndex: The column index of the coordinate.
  4645. ColumnIndex int64 `json:"columnIndex,omitempty"`
  4646. // RowIndex: The row index of the coordinate.
  4647. RowIndex int64 `json:"rowIndex,omitempty"`
  4648. // SheetId: The sheet this coordinate is on.
  4649. SheetId int64 `json:"sheetId,omitempty"`
  4650. // ForceSendFields is a list of field names (e.g. "ColumnIndex") to
  4651. // unconditionally include in API requests. By default, fields with
  4652. // empty values are omitted from API requests. However, any non-pointer,
  4653. // non-interface field appearing in ForceSendFields will be sent to the
  4654. // server regardless of whether the field is empty or not. This may be
  4655. // used to include empty fields in Patch requests.
  4656. ForceSendFields []string `json:"-"`
  4657. // NullFields is a list of field names (e.g. "ColumnIndex") to include
  4658. // in API requests with the JSON null value. By default, fields with
  4659. // empty values are omitted from API requests. However, any field with
  4660. // an empty value appearing in NullFields will be sent to the server as
  4661. // null. It is an error if a field in this list has a non-empty value.
  4662. // This may be used to include null fields in Patch requests.
  4663. NullFields []string `json:"-"`
  4664. }
  4665. func (s *GridCoordinate) MarshalJSON() ([]byte, error) {
  4666. type NoMethod GridCoordinate
  4667. raw := NoMethod(*s)
  4668. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4669. }
  4670. // GridData: Data in the grid, as well as metadata about the dimensions.
  4671. type GridData struct {
  4672. // ColumnMetadata: Metadata about the requested columns in the grid,
  4673. // starting with the column
  4674. // in start_column.
  4675. ColumnMetadata []*DimensionProperties `json:"columnMetadata,omitempty"`
  4676. // RowData: The data in the grid, one entry per row,
  4677. // starting with the row in startRow.
  4678. // The values in RowData will correspond to columns starting
  4679. // at start_column.
  4680. RowData []*RowData `json:"rowData,omitempty"`
  4681. // RowMetadata: Metadata about the requested rows in the grid, starting
  4682. // with the row
  4683. // in start_row.
  4684. RowMetadata []*DimensionProperties `json:"rowMetadata,omitempty"`
  4685. // StartColumn: The first column this GridData refers to, zero-based.
  4686. StartColumn int64 `json:"startColumn,omitempty"`
  4687. // StartRow: The first row this GridData refers to, zero-based.
  4688. StartRow int64 `json:"startRow,omitempty"`
  4689. // ForceSendFields is a list of field names (e.g. "ColumnMetadata") to
  4690. // unconditionally include in API requests. By default, fields with
  4691. // empty values are omitted from API requests. However, any non-pointer,
  4692. // non-interface field appearing in ForceSendFields will be sent to the
  4693. // server regardless of whether the field is empty or not. This may be
  4694. // used to include empty fields in Patch requests.
  4695. ForceSendFields []string `json:"-"`
  4696. // NullFields is a list of field names (e.g. "ColumnMetadata") to
  4697. // include in API requests with the JSON null value. By default, fields
  4698. // with empty values are omitted from API requests. However, any field
  4699. // with an empty value appearing in NullFields will be sent to the
  4700. // server as null. It is an error if a field in this list has a
  4701. // non-empty value. This may be used to include null fields in Patch
  4702. // requests.
  4703. NullFields []string `json:"-"`
  4704. }
  4705. func (s *GridData) MarshalJSON() ([]byte, error) {
  4706. type NoMethod GridData
  4707. raw := NoMethod(*s)
  4708. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4709. }
  4710. // GridProperties: Properties of a grid.
  4711. type GridProperties struct {
  4712. // ColumnCount: The number of columns in the grid.
  4713. ColumnCount int64 `json:"columnCount,omitempty"`
  4714. // ColumnGroupControlAfter: True if the column grouping control toggle
  4715. // is shown after the group.
  4716. ColumnGroupControlAfter bool `json:"columnGroupControlAfter,omitempty"`
  4717. // FrozenColumnCount: The number of columns that are frozen in the grid.
  4718. FrozenColumnCount int64 `json:"frozenColumnCount,omitempty"`
  4719. // FrozenRowCount: The number of rows that are frozen in the grid.
  4720. FrozenRowCount int64 `json:"frozenRowCount,omitempty"`
  4721. // HideGridlines: True if the grid isn't showing gridlines in the UI.
  4722. HideGridlines bool `json:"hideGridlines,omitempty"`
  4723. // RowCount: The number of rows in the grid.
  4724. RowCount int64 `json:"rowCount,omitempty"`
  4725. // RowGroupControlAfter: True if the row grouping control toggle is
  4726. // shown after the group.
  4727. RowGroupControlAfter bool `json:"rowGroupControlAfter,omitempty"`
  4728. // ForceSendFields is a list of field names (e.g. "ColumnCount") to
  4729. // unconditionally include in API requests. By default, fields with
  4730. // empty values are omitted from API requests. However, any non-pointer,
  4731. // non-interface field appearing in ForceSendFields will be sent to the
  4732. // server regardless of whether the field is empty or not. This may be
  4733. // used to include empty fields in Patch requests.
  4734. ForceSendFields []string `json:"-"`
  4735. // NullFields is a list of field names (e.g. "ColumnCount") to include
  4736. // in API requests with the JSON null value. By default, fields with
  4737. // empty values are omitted from API requests. However, any field with
  4738. // an empty value appearing in NullFields will be sent to the server as
  4739. // null. It is an error if a field in this list has a non-empty value.
  4740. // This may be used to include null fields in Patch requests.
  4741. NullFields []string `json:"-"`
  4742. }
  4743. func (s *GridProperties) MarshalJSON() ([]byte, error) {
  4744. type NoMethod GridProperties
  4745. raw := NoMethod(*s)
  4746. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4747. }
  4748. // GridRange: A range on a sheet.
  4749. // All indexes are zero-based.
  4750. // Indexes are half open, e.g the start index is inclusive
  4751. // and the end index is exclusive -- [start_index, end_index).
  4752. // Missing indexes indicate the range is unbounded on that side.
  4753. //
  4754. // For example, if "Sheet1" is sheet ID 0, then:
  4755. //
  4756. // `Sheet1!A1:A1 == sheet_id: 0,
  4757. // start_row_index: 0, end_row_index: 1,
  4758. // start_column_index: 0, end_column_index: 1`
  4759. //
  4760. // `Sheet1!A3:B4 == sheet_id: 0,
  4761. // start_row_index: 2, end_row_index: 4,
  4762. // start_column_index: 0, end_column_index: 2`
  4763. //
  4764. // `Sheet1!A:B == sheet_id: 0,
  4765. // start_column_index: 0, end_column_index: 2`
  4766. //
  4767. // `Sheet1!A5:B == sheet_id: 0,
  4768. // start_row_index: 4,
  4769. // start_column_index: 0, end_column_index: 2`
  4770. //
  4771. // `Sheet1 == sheet_id:0`
  4772. //
  4773. // The start index must always be less than or equal to the end
  4774. // index.
  4775. // If the start index equals the end index, then the range is
  4776. // empty.
  4777. // Empty ranges are typically not meaningful and are usually rendered in
  4778. // the
  4779. // UI as `#REF!`.
  4780. type GridRange struct {
  4781. // EndColumnIndex: The end column (exclusive) of the range, or not set
  4782. // if unbounded.
  4783. EndColumnIndex int64 `json:"endColumnIndex,omitempty"`
  4784. // EndRowIndex: The end row (exclusive) of the range, or not set if
  4785. // unbounded.
  4786. EndRowIndex int64 `json:"endRowIndex,omitempty"`
  4787. // SheetId: The sheet this range is on.
  4788. SheetId int64 `json:"sheetId,omitempty"`
  4789. // StartColumnIndex: The start column (inclusive) of the range, or not
  4790. // set if unbounded.
  4791. StartColumnIndex int64 `json:"startColumnIndex,omitempty"`
  4792. // StartRowIndex: The start row (inclusive) of the range, or not set if
  4793. // unbounded.
  4794. StartRowIndex int64 `json:"startRowIndex,omitempty"`
  4795. // ForceSendFields is a list of field names (e.g. "EndColumnIndex") to
  4796. // unconditionally include in API requests. By default, fields with
  4797. // empty values are omitted from API requests. However, any non-pointer,
  4798. // non-interface field appearing in ForceSendFields will be sent to the
  4799. // server regardless of whether the field is empty or not. This may be
  4800. // used to include empty fields in Patch requests.
  4801. ForceSendFields []string `json:"-"`
  4802. // NullFields is a list of field names (e.g. "EndColumnIndex") to
  4803. // include in API requests with the JSON null value. By default, fields
  4804. // with empty values are omitted from API requests. However, any field
  4805. // with an empty value appearing in NullFields will be sent to the
  4806. // server as null. It is an error if a field in this list has a
  4807. // non-empty value. This may be used to include null fields in Patch
  4808. // requests.
  4809. NullFields []string `json:"-"`
  4810. }
  4811. func (s *GridRange) MarshalJSON() ([]byte, error) {
  4812. type NoMethod GridRange
  4813. raw := NoMethod(*s)
  4814. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4815. }
  4816. // HistogramChartSpec: A <a
  4817. // href="/chart/interactive/docs/gallery/histogram">histogram
  4818. // chart</a>.
  4819. // A histogram chart groups data items into bins, displaying each bin as
  4820. // a
  4821. // column of stacked items. Histograms are used to display the
  4822. // distribution
  4823. // of a dataset. Each column of items represents a range into which
  4824. // those
  4825. // items fall. The number of bins can be chosen automatically or
  4826. // specified
  4827. // explicitly.
  4828. type HistogramChartSpec struct {
  4829. // BucketSize: By default the bucket size (the range of values stacked
  4830. // in a single
  4831. // column) is chosen automatically, but it may be overridden here.
  4832. // E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 -
  4833. // 3.0, etc.
  4834. // Cannot be negative.
  4835. // This field is optional.
  4836. BucketSize float64 `json:"bucketSize,omitempty"`
  4837. // LegendPosition: The position of the chart legend.
  4838. //
  4839. // Possible values:
  4840. // "HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do
  4841. // not use.
  4842. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  4843. // chart.
  4844. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  4845. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  4846. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  4847. // "NO_LEGEND" - No legend is rendered.
  4848. // "INSIDE_LEGEND" - The legend is rendered inside the chart area.
  4849. LegendPosition string `json:"legendPosition,omitempty"`
  4850. // OutlierPercentile: The outlier percentile is used to ensure that
  4851. // outliers do not adversely
  4852. // affect the calculation of bucket sizes. For example, setting an
  4853. // outlier
  4854. // percentile of 0.05 indicates that the top and bottom 5% of values
  4855. // when
  4856. // calculating buckets. The values are still included in the chart,
  4857. // they will
  4858. // be added to the first or last buckets instead of their own
  4859. // buckets.
  4860. // Must be between 0.0 and 0.5.
  4861. OutlierPercentile float64 `json:"outlierPercentile,omitempty"`
  4862. // Series: The series for a histogram may be either a single series of
  4863. // values to be
  4864. // bucketed or multiple series, each of the same length, containing the
  4865. // name
  4866. // of the series followed by the values to be bucketed for that series.
  4867. Series []*HistogramSeries `json:"series,omitempty"`
  4868. // ShowItemDividers: Whether horizontal divider lines should be
  4869. // displayed between items in each
  4870. // column.
  4871. ShowItemDividers bool `json:"showItemDividers,omitempty"`
  4872. // ForceSendFields is a list of field names (e.g. "BucketSize") to
  4873. // unconditionally include in API requests. By default, fields with
  4874. // empty values are omitted from API requests. However, any non-pointer,
  4875. // non-interface field appearing in ForceSendFields will be sent to the
  4876. // server regardless of whether the field is empty or not. This may be
  4877. // used to include empty fields in Patch requests.
  4878. ForceSendFields []string `json:"-"`
  4879. // NullFields is a list of field names (e.g. "BucketSize") to include in
  4880. // API requests with the JSON null value. By default, fields with empty
  4881. // values are omitted from API requests. However, any field with an
  4882. // empty value appearing in NullFields will be sent to the server as
  4883. // null. It is an error if a field in this list has a non-empty value.
  4884. // This may be used to include null fields in Patch requests.
  4885. NullFields []string `json:"-"`
  4886. }
  4887. func (s *HistogramChartSpec) MarshalJSON() ([]byte, error) {
  4888. type NoMethod HistogramChartSpec
  4889. raw := NoMethod(*s)
  4890. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4891. }
  4892. func (s *HistogramChartSpec) UnmarshalJSON(data []byte) error {
  4893. type NoMethod HistogramChartSpec
  4894. var s1 struct {
  4895. BucketSize gensupport.JSONFloat64 `json:"bucketSize"`
  4896. OutlierPercentile gensupport.JSONFloat64 `json:"outlierPercentile"`
  4897. *NoMethod
  4898. }
  4899. s1.NoMethod = (*NoMethod)(s)
  4900. if err := json.Unmarshal(data, &s1); err != nil {
  4901. return err
  4902. }
  4903. s.BucketSize = float64(s1.BucketSize)
  4904. s.OutlierPercentile = float64(s1.OutlierPercentile)
  4905. return nil
  4906. }
  4907. // HistogramRule: Allows you to organize the numeric values in a source
  4908. // data column into
  4909. // buckets of a constant size. All values from HistogramRule.start
  4910. // to
  4911. // HistogramRule.end are placed into groups of
  4912. // size
  4913. // HistogramRule.interval. In addition, all values
  4914. // below
  4915. // HistogramRule.start are placed in one group, and all values
  4916. // above
  4917. // HistogramRule.end are placed in another. Only
  4918. // HistogramRule.interval is required, though if HistogramRule.start
  4919. // and HistogramRule.end are both provided, HistogramRule.start must
  4920. // be less than HistogramRule.end. For example, a pivot table
  4921. // showing
  4922. // average purchase amount by age that has 50+ rows:
  4923. //
  4924. // +-----+-------------------+
  4925. // | Age | AVERAGE of Amount |
  4926. // +-----+-------------------+
  4927. // | 16 | $27.13 |
  4928. // | 17 | $5.24 |
  4929. // | 18 | $20.15 |
  4930. // ...
  4931. // +-----+-------------------+
  4932. // could be turned into a pivot table that looks like the one below
  4933. // by
  4934. // applying a histogram group rule with a HistogramRule.start of 25,
  4935. // an HistogramRule.interval of 20, and an HistogramRule.end
  4936. // of 65.
  4937. //
  4938. // +-------------+-------------------+
  4939. // | Grouped Age | AVERAGE of Amount |
  4940. // +-------------+-------------------+
  4941. // | < 25 | $19.34 |
  4942. // | 25-45 | $31.43 |
  4943. // | 45-65 | $35.87 |
  4944. // | > 65 | $27.55 |
  4945. // +-------------+-------------------+
  4946. // | Grand Total | $29.12 |
  4947. // +-------------+-------------------+
  4948. type HistogramRule struct {
  4949. // End: The maximum value at which items are placed into buckets
  4950. // of constant size. Values above end are lumped into a single
  4951. // bucket.
  4952. // This field is optional.
  4953. End float64 `json:"end,omitempty"`
  4954. // Interval: The size of the buckets that are created. Must be positive.
  4955. Interval float64 `json:"interval,omitempty"`
  4956. // Start: The minimum value at which items are placed into buckets
  4957. // of constant size. Values below start are lumped into a single
  4958. // bucket.
  4959. // This field is optional.
  4960. Start float64 `json:"start,omitempty"`
  4961. // ForceSendFields is a list of field names (e.g. "End") to
  4962. // unconditionally include in API requests. By default, fields with
  4963. // empty values are omitted from API requests. However, any non-pointer,
  4964. // non-interface field appearing in ForceSendFields will be sent to the
  4965. // server regardless of whether the field is empty or not. This may be
  4966. // used to include empty fields in Patch requests.
  4967. ForceSendFields []string `json:"-"`
  4968. // NullFields is a list of field names (e.g. "End") to include in API
  4969. // requests with the JSON null value. By default, fields with empty
  4970. // values are omitted from API requests. However, any field with an
  4971. // empty value appearing in NullFields will be sent to the server as
  4972. // null. It is an error if a field in this list has a non-empty value.
  4973. // This may be used to include null fields in Patch requests.
  4974. NullFields []string `json:"-"`
  4975. }
  4976. func (s *HistogramRule) MarshalJSON() ([]byte, error) {
  4977. type NoMethod HistogramRule
  4978. raw := NoMethod(*s)
  4979. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4980. }
  4981. func (s *HistogramRule) UnmarshalJSON(data []byte) error {
  4982. type NoMethod HistogramRule
  4983. var s1 struct {
  4984. End gensupport.JSONFloat64 `json:"end"`
  4985. Interval gensupport.JSONFloat64 `json:"interval"`
  4986. Start gensupport.JSONFloat64 `json:"start"`
  4987. *NoMethod
  4988. }
  4989. s1.NoMethod = (*NoMethod)(s)
  4990. if err := json.Unmarshal(data, &s1); err != nil {
  4991. return err
  4992. }
  4993. s.End = float64(s1.End)
  4994. s.Interval = float64(s1.Interval)
  4995. s.Start = float64(s1.Start)
  4996. return nil
  4997. }
  4998. // HistogramSeries: A histogram series containing the series color and
  4999. // data.
  5000. type HistogramSeries struct {
  5001. // BarColor: The color of the column representing this series in each
  5002. // bucket.
  5003. // This field is optional.
  5004. BarColor *Color `json:"barColor,omitempty"`
  5005. // Data: The data for this histogram series.
  5006. Data *ChartData `json:"data,omitempty"`
  5007. // ForceSendFields is a list of field names (e.g. "BarColor") to
  5008. // unconditionally include in API requests. By default, fields with
  5009. // empty values are omitted from API requests. However, any non-pointer,
  5010. // non-interface field appearing in ForceSendFields will be sent to the
  5011. // server regardless of whether the field is empty or not. This may be
  5012. // used to include empty fields in Patch requests.
  5013. ForceSendFields []string `json:"-"`
  5014. // NullFields is a list of field names (e.g. "BarColor") to include in
  5015. // API requests with the JSON null value. By default, fields with empty
  5016. // values are omitted from API requests. However, any field with an
  5017. // empty value appearing in NullFields will be sent to the server as
  5018. // null. It is an error if a field in this list has a non-empty value.
  5019. // This may be used to include null fields in Patch requests.
  5020. NullFields []string `json:"-"`
  5021. }
  5022. func (s *HistogramSeries) MarshalJSON() ([]byte, error) {
  5023. type NoMethod HistogramSeries
  5024. raw := NoMethod(*s)
  5025. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5026. }
  5027. // InsertDimensionRequest: Inserts rows or columns in a sheet at a
  5028. // particular index.
  5029. type InsertDimensionRequest struct {
  5030. // InheritFromBefore: Whether dimension properties should be extended
  5031. // from the dimensions
  5032. // before or after the newly inserted dimensions.
  5033. // True to inherit from the dimensions before (in which case the
  5034. // start
  5035. // index must be greater than 0), and false to inherit from the
  5036. // dimensions
  5037. // after.
  5038. //
  5039. // For example, if row index 0 has red background and row index 1
  5040. // has a green background, then inserting 2 rows at index 1 can
  5041. // inherit
  5042. // either the green or red background. If `inheritFromBefore` is
  5043. // true,
  5044. // the two new rows will be red (because the row before the insertion
  5045. // point
  5046. // was red), whereas if `inheritFromBefore` is false, the two new rows
  5047. // will
  5048. // be green (because the row after the insertion point was green).
  5049. InheritFromBefore bool `json:"inheritFromBefore,omitempty"`
  5050. // Range: The dimensions to insert. Both the start and end indexes must
  5051. // be bounded.
  5052. Range *DimensionRange `json:"range,omitempty"`
  5053. // ForceSendFields is a list of field names (e.g. "InheritFromBefore")
  5054. // to unconditionally include in API requests. By default, fields with
  5055. // empty values are omitted from API requests. However, any non-pointer,
  5056. // non-interface field appearing in ForceSendFields will be sent to the
  5057. // server regardless of whether the field is empty or not. This may be
  5058. // used to include empty fields in Patch requests.
  5059. ForceSendFields []string `json:"-"`
  5060. // NullFields is a list of field names (e.g. "InheritFromBefore") to
  5061. // include in API requests with the JSON null value. By default, fields
  5062. // with empty values are omitted from API requests. However, any field
  5063. // with an empty value appearing in NullFields will be sent to the
  5064. // server as null. It is an error if a field in this list has a
  5065. // non-empty value. This may be used to include null fields in Patch
  5066. // requests.
  5067. NullFields []string `json:"-"`
  5068. }
  5069. func (s *InsertDimensionRequest) MarshalJSON() ([]byte, error) {
  5070. type NoMethod InsertDimensionRequest
  5071. raw := NoMethod(*s)
  5072. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5073. }
  5074. // InsertRangeRequest: Inserts cells into a range, shifting the existing
  5075. // cells over or down.
  5076. type InsertRangeRequest struct {
  5077. // Range: The range to insert new cells into.
  5078. Range *GridRange `json:"range,omitempty"`
  5079. // ShiftDimension: The dimension which will be shifted when inserting
  5080. // cells.
  5081. // If ROWS, existing cells will be shifted down.
  5082. // If COLUMNS, existing cells will be shifted right.
  5083. //
  5084. // Possible values:
  5085. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  5086. // "ROWS" - Operates on the rows of a sheet.
  5087. // "COLUMNS" - Operates on the columns of a sheet.
  5088. ShiftDimension string `json:"shiftDimension,omitempty"`
  5089. // ForceSendFields is a list of field names (e.g. "Range") to
  5090. // unconditionally include in API requests. By default, fields with
  5091. // empty values are omitted from API requests. However, any non-pointer,
  5092. // non-interface field appearing in ForceSendFields will be sent to the
  5093. // server regardless of whether the field is empty or not. This may be
  5094. // used to include empty fields in Patch requests.
  5095. ForceSendFields []string `json:"-"`
  5096. // NullFields is a list of field names (e.g. "Range") to include in API
  5097. // requests with the JSON null value. By default, fields with empty
  5098. // values are omitted from API requests. However, any field with an
  5099. // empty value appearing in NullFields will be sent to the server as
  5100. // null. It is an error if a field in this list has a non-empty value.
  5101. // This may be used to include null fields in Patch requests.
  5102. NullFields []string `json:"-"`
  5103. }
  5104. func (s *InsertRangeRequest) MarshalJSON() ([]byte, error) {
  5105. type NoMethod InsertRangeRequest
  5106. raw := NoMethod(*s)
  5107. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5108. }
  5109. // InterpolationPoint: A single interpolation point on a gradient
  5110. // conditional format.
  5111. // These pin the gradient color scale according to the color,
  5112. // type and value chosen.
  5113. type InterpolationPoint struct {
  5114. // Color: The color this interpolation point should use.
  5115. Color *Color `json:"color,omitempty"`
  5116. // Type: How the value should be interpreted.
  5117. //
  5118. // Possible values:
  5119. // "INTERPOLATION_POINT_TYPE_UNSPECIFIED" - The default value, do not
  5120. // use.
  5121. // "MIN" - The interpolation point uses the minimum value in the
  5122. // cells over the range of the conditional format.
  5123. // "MAX" - The interpolation point uses the maximum value in the
  5124. // cells over the range of the conditional format.
  5125. // "NUMBER" - The interpolation point uses exactly the value
  5126. // in
  5127. // InterpolationPoint.value.
  5128. // "PERCENT" - The interpolation point is the given percentage
  5129. // over
  5130. // all the cells in the range of the conditional format.
  5131. // This is equivalent to NUMBER if the value was:
  5132. // `=(MAX(FLATTEN(range)) * (value / 100))
  5133. // + (MIN(FLATTEN(range)) * (1 - (value / 100)))`
  5134. // (where errors in the range are ignored when flattening).
  5135. // "PERCENTILE" - The interpolation point is the given percentile
  5136. // over all the cells in the range of the conditional format.
  5137. // This is equivalent to NUMBER if the value
  5138. // was:
  5139. // `=PERCENTILE(FLATTEN(range), value / 100)`
  5140. // (where errors in the range are ignored when flattening).
  5141. Type string `json:"type,omitempty"`
  5142. // Value: The value this interpolation point uses. May be a
  5143. // formula.
  5144. // Unused if type is MIN or
  5145. // MAX.
  5146. Value string `json:"value,omitempty"`
  5147. // ForceSendFields is a list of field names (e.g. "Color") to
  5148. // unconditionally include in API requests. By default, fields with
  5149. // empty values are omitted from API requests. However, any non-pointer,
  5150. // non-interface field appearing in ForceSendFields will be sent to the
  5151. // server regardless of whether the field is empty or not. This may be
  5152. // used to include empty fields in Patch requests.
  5153. ForceSendFields []string `json:"-"`
  5154. // NullFields is a list of field names (e.g. "Color") to include in API
  5155. // requests with the JSON null value. By default, fields with empty
  5156. // values are omitted from API requests. However, any field with an
  5157. // empty value appearing in NullFields will be sent to the server as
  5158. // null. It is an error if a field in this list has a non-empty value.
  5159. // This may be used to include null fields in Patch requests.
  5160. NullFields []string `json:"-"`
  5161. }
  5162. func (s *InterpolationPoint) MarshalJSON() ([]byte, error) {
  5163. type NoMethod InterpolationPoint
  5164. raw := NoMethod(*s)
  5165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5166. }
  5167. // IterativeCalculationSettings: Settings to control how circular
  5168. // dependencies are resolved with iterative
  5169. // calculation.
  5170. type IterativeCalculationSettings struct {
  5171. // ConvergenceThreshold: When iterative calculation is enabled and
  5172. // successive results differ by
  5173. // less than this threshold value, the calculation rounds stop.
  5174. ConvergenceThreshold float64 `json:"convergenceThreshold,omitempty"`
  5175. // MaxIterations: When iterative calculation is enabled, the maximum
  5176. // number of calculation
  5177. // rounds to perform.
  5178. MaxIterations int64 `json:"maxIterations,omitempty"`
  5179. // ForceSendFields is a list of field names (e.g.
  5180. // "ConvergenceThreshold") to unconditionally include in API requests.
  5181. // By default, fields with empty values are omitted from API requests.
  5182. // However, any non-pointer, non-interface field appearing in
  5183. // ForceSendFields will be sent to the server regardless of whether the
  5184. // field is empty or not. This may be used to include empty fields in
  5185. // Patch requests.
  5186. ForceSendFields []string `json:"-"`
  5187. // NullFields is a list of field names (e.g. "ConvergenceThreshold") to
  5188. // include in API requests with the JSON null value. By default, fields
  5189. // with empty values are omitted from API requests. However, any field
  5190. // with an empty value appearing in NullFields will be sent to the
  5191. // server as null. It is an error if a field in this list has a
  5192. // non-empty value. This may be used to include null fields in Patch
  5193. // requests.
  5194. NullFields []string `json:"-"`
  5195. }
  5196. func (s *IterativeCalculationSettings) MarshalJSON() ([]byte, error) {
  5197. type NoMethod IterativeCalculationSettings
  5198. raw := NoMethod(*s)
  5199. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5200. }
  5201. func (s *IterativeCalculationSettings) UnmarshalJSON(data []byte) error {
  5202. type NoMethod IterativeCalculationSettings
  5203. var s1 struct {
  5204. ConvergenceThreshold gensupport.JSONFloat64 `json:"convergenceThreshold"`
  5205. *NoMethod
  5206. }
  5207. s1.NoMethod = (*NoMethod)(s)
  5208. if err := json.Unmarshal(data, &s1); err != nil {
  5209. return err
  5210. }
  5211. s.ConvergenceThreshold = float64(s1.ConvergenceThreshold)
  5212. return nil
  5213. }
  5214. // LineStyle: Properties that describe the style of a line.
  5215. type LineStyle struct {
  5216. // Type: The dash type of the line.
  5217. //
  5218. // Possible values:
  5219. // "LINE_DASH_TYPE_UNSPECIFIED" - Default value, do not use.
  5220. // "INVISIBLE" - No dash type, which is equivalent to a non-visible
  5221. // line.
  5222. // "CUSTOM" - A custom dash for a line. Modifying the exact custom
  5223. // dash style is
  5224. // currently unsupported.
  5225. // "SOLID" - A solid line.
  5226. // "DOTTED" - A dotted line.
  5227. // "MEDIUM_DASHED" - A dashed line where the dashes have "medium"
  5228. // length.
  5229. // "MEDIUM_DASHED_DOTTED" - A line that alternates between a "medium"
  5230. // dash and a dot.
  5231. // "LONG_DASHED" - A dashed line where the dashes have "long" length.
  5232. // "LONG_DASHED_DOTTED" - A line that alternates between a "long" dash
  5233. // and a dot.
  5234. Type string `json:"type,omitempty"`
  5235. // Width: The thickness of the line, in px.
  5236. Width int64 `json:"width,omitempty"`
  5237. // ForceSendFields is a list of field names (e.g. "Type") to
  5238. // unconditionally include in API requests. By default, fields with
  5239. // empty values are omitted from API requests. However, any non-pointer,
  5240. // non-interface field appearing in ForceSendFields will be sent to the
  5241. // server regardless of whether the field is empty or not. This may be
  5242. // used to include empty fields in Patch requests.
  5243. ForceSendFields []string `json:"-"`
  5244. // NullFields is a list of field names (e.g. "Type") to include in API
  5245. // requests with the JSON null value. By default, fields with empty
  5246. // values are omitted from API requests. However, any field with an
  5247. // empty value appearing in NullFields will be sent to the server as
  5248. // null. It is an error if a field in this list has a non-empty value.
  5249. // This may be used to include null fields in Patch requests.
  5250. NullFields []string `json:"-"`
  5251. }
  5252. func (s *LineStyle) MarshalJSON() ([]byte, error) {
  5253. type NoMethod LineStyle
  5254. raw := NoMethod(*s)
  5255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5256. }
  5257. // ManualRule: Allows you to manually organize the values in a source
  5258. // data column into
  5259. // buckets with names of your choosing. For example, a pivot table
  5260. // that
  5261. // aggregates population by state:
  5262. //
  5263. // +-------+-------------------+
  5264. // | State | SUM of Population |
  5265. // +-------+-------------------+
  5266. // | AK | 0.7 |
  5267. // | AL | 4.8 |
  5268. // | AR | 2.9 |
  5269. // ...
  5270. // +-------+-------------------+
  5271. // could be turned into a pivot table that aggregates population by time
  5272. // zone
  5273. // by providing a list of groups (for example, groupName =
  5274. // 'Central',
  5275. // items = ['AL', 'AR', 'IA', ...]) to a manual group rule.
  5276. // Note that a similar effect could be achieved by adding a time zone
  5277. // column
  5278. // to the source data and adjusting the pivot table.
  5279. //
  5280. // +-----------+-------------------+
  5281. // | Time Zone | SUM of Population |
  5282. // +-----------+-------------------+
  5283. // | Central | 106.3 |
  5284. // | Eastern | 151.9 |
  5285. // | Mountain | 17.4 |
  5286. // ...
  5287. // +-----------+-------------------+
  5288. type ManualRule struct {
  5289. // Groups: The list of group names and the corresponding items from the
  5290. // source data
  5291. // that map to each group name.
  5292. Groups []*ManualRuleGroup `json:"groups,omitempty"`
  5293. // ForceSendFields is a list of field names (e.g. "Groups") to
  5294. // unconditionally include in API requests. By default, fields with
  5295. // empty values are omitted from API requests. However, any non-pointer,
  5296. // non-interface field appearing in ForceSendFields will be sent to the
  5297. // server regardless of whether the field is empty or not. This may be
  5298. // used to include empty fields in Patch requests.
  5299. ForceSendFields []string `json:"-"`
  5300. // NullFields is a list of field names (e.g. "Groups") to include in API
  5301. // requests with the JSON null value. By default, fields with empty
  5302. // values are omitted from API requests. However, any field with an
  5303. // empty value appearing in NullFields will be sent to the server as
  5304. // null. It is an error if a field in this list has a non-empty value.
  5305. // This may be used to include null fields in Patch requests.
  5306. NullFields []string `json:"-"`
  5307. }
  5308. func (s *ManualRule) MarshalJSON() ([]byte, error) {
  5309. type NoMethod ManualRule
  5310. raw := NoMethod(*s)
  5311. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5312. }
  5313. // ManualRuleGroup: A group name and a list of items from the source
  5314. // data that should be placed
  5315. // in the group with this name.
  5316. type ManualRuleGroup struct {
  5317. // GroupName: The group name, which must be a string. Each group in a
  5318. // given
  5319. // ManualRule must have a unique group name.
  5320. GroupName *ExtendedValue `json:"groupName,omitempty"`
  5321. // Items: The items in the source data that should be placed into this
  5322. // group. Each
  5323. // item may be a string, number, or boolean. Items may appear in at most
  5324. // one
  5325. // group within a given ManualRule. Items that do not appear in
  5326. // any
  5327. // group will appear on their own.
  5328. Items []*ExtendedValue `json:"items,omitempty"`
  5329. // ForceSendFields is a list of field names (e.g. "GroupName") to
  5330. // unconditionally include in API requests. By default, fields with
  5331. // empty values are omitted from API requests. However, any non-pointer,
  5332. // non-interface field appearing in ForceSendFields will be sent to the
  5333. // server regardless of whether the field is empty or not. This may be
  5334. // used to include empty fields in Patch requests.
  5335. ForceSendFields []string `json:"-"`
  5336. // NullFields is a list of field names (e.g. "GroupName") to include in
  5337. // API requests with the JSON null value. By default, fields with empty
  5338. // values are omitted from API requests. However, any field with an
  5339. // empty value appearing in NullFields will be sent to the server as
  5340. // null. It is an error if a field in this list has a non-empty value.
  5341. // This may be used to include null fields in Patch requests.
  5342. NullFields []string `json:"-"`
  5343. }
  5344. func (s *ManualRuleGroup) MarshalJSON() ([]byte, error) {
  5345. type NoMethod ManualRuleGroup
  5346. raw := NoMethod(*s)
  5347. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5348. }
  5349. // MatchedDeveloperMetadata: A developer metadata entry and the data
  5350. // filters specified in the original
  5351. // request that matched it.
  5352. type MatchedDeveloperMetadata struct {
  5353. // DataFilters: All filters matching the returned developer metadata.
  5354. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  5355. // DeveloperMetadata: The developer metadata matching the specified
  5356. // filters.
  5357. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  5358. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  5359. // unconditionally include in API requests. By default, fields with
  5360. // empty values are omitted from API requests. However, any non-pointer,
  5361. // non-interface field appearing in ForceSendFields will be sent to the
  5362. // server regardless of whether the field is empty or not. This may be
  5363. // used to include empty fields in Patch requests.
  5364. ForceSendFields []string `json:"-"`
  5365. // NullFields is a list of field names (e.g. "DataFilters") to include
  5366. // in API requests with the JSON null value. By default, fields with
  5367. // empty values are omitted from API requests. However, any field with
  5368. // an empty value appearing in NullFields will be sent to the server as
  5369. // null. It is an error if a field in this list has a non-empty value.
  5370. // This may be used to include null fields in Patch requests.
  5371. NullFields []string `json:"-"`
  5372. }
  5373. func (s *MatchedDeveloperMetadata) MarshalJSON() ([]byte, error) {
  5374. type NoMethod MatchedDeveloperMetadata
  5375. raw := NoMethod(*s)
  5376. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5377. }
  5378. // MatchedValueRange: A value range that was matched by one or more data
  5379. // filers.
  5380. type MatchedValueRange struct {
  5381. // DataFilters: The DataFilters from the request that matched the range
  5382. // of
  5383. // values.
  5384. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  5385. // ValueRange: The values matched by the DataFilter.
  5386. ValueRange *ValueRange `json:"valueRange,omitempty"`
  5387. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  5388. // unconditionally include in API requests. By default, fields with
  5389. // empty values are omitted from API requests. However, any non-pointer,
  5390. // non-interface field appearing in ForceSendFields will be sent to the
  5391. // server regardless of whether the field is empty or not. This may be
  5392. // used to include empty fields in Patch requests.
  5393. ForceSendFields []string `json:"-"`
  5394. // NullFields is a list of field names (e.g. "DataFilters") to include
  5395. // in API requests with the JSON null value. By default, fields with
  5396. // empty values are omitted from API requests. However, any field with
  5397. // an empty value appearing in NullFields will be sent to the server as
  5398. // null. It is an error if a field in this list has a non-empty value.
  5399. // This may be used to include null fields in Patch requests.
  5400. NullFields []string `json:"-"`
  5401. }
  5402. func (s *MatchedValueRange) MarshalJSON() ([]byte, error) {
  5403. type NoMethod MatchedValueRange
  5404. raw := NoMethod(*s)
  5405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5406. }
  5407. // MergeCellsRequest: Merges all cells in the range.
  5408. type MergeCellsRequest struct {
  5409. // MergeType: How the cells should be merged.
  5410. //
  5411. // Possible values:
  5412. // "MERGE_ALL" - Create a single merge from the range
  5413. // "MERGE_COLUMNS" - Create a merge for each column in the range
  5414. // "MERGE_ROWS" - Create a merge for each row in the range
  5415. MergeType string `json:"mergeType,omitempty"`
  5416. // Range: The range of cells to merge.
  5417. Range *GridRange `json:"range,omitempty"`
  5418. // ForceSendFields is a list of field names (e.g. "MergeType") to
  5419. // unconditionally include in API requests. By default, fields with
  5420. // empty values are omitted from API requests. However, any non-pointer,
  5421. // non-interface field appearing in ForceSendFields will be sent to the
  5422. // server regardless of whether the field is empty or not. This may be
  5423. // used to include empty fields in Patch requests.
  5424. ForceSendFields []string `json:"-"`
  5425. // NullFields is a list of field names (e.g. "MergeType") to include in
  5426. // API requests with the JSON null value. By default, fields with empty
  5427. // values are omitted from API requests. However, any field with an
  5428. // empty value appearing in NullFields will be sent to the server as
  5429. // null. It is an error if a field in this list has a non-empty value.
  5430. // This may be used to include null fields in Patch requests.
  5431. NullFields []string `json:"-"`
  5432. }
  5433. func (s *MergeCellsRequest) MarshalJSON() ([]byte, error) {
  5434. type NoMethod MergeCellsRequest
  5435. raw := NoMethod(*s)
  5436. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5437. }
  5438. // MoveDimensionRequest: Moves one or more rows or columns.
  5439. type MoveDimensionRequest struct {
  5440. // DestinationIndex: The zero-based start index of where to move the
  5441. // source data to,
  5442. // based on the coordinates *before* the source data is removed
  5443. // from the grid. Existing data will be shifted down or
  5444. // right
  5445. // (depending on the dimension) to make room for the moved
  5446. // dimensions.
  5447. // The source dimensions are removed from the grid, so the
  5448. // the data may end up in a different index than specified.
  5449. //
  5450. // For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to
  5451. // move
  5452. // "1" and "2" to between "3" and "4", the source would be
  5453. // `ROWS [1..3)`,and the destination index would be "4"
  5454. // (the zero-based index of row 5).
  5455. // The end result would be `A1..A5` of `0, 3, 1, 2, 4`.
  5456. DestinationIndex int64 `json:"destinationIndex,omitempty"`
  5457. // Source: The source dimensions to move.
  5458. Source *DimensionRange `json:"source,omitempty"`
  5459. // ForceSendFields is a list of field names (e.g. "DestinationIndex") to
  5460. // unconditionally include in API requests. By default, fields with
  5461. // empty values are omitted from API requests. However, any non-pointer,
  5462. // non-interface field appearing in ForceSendFields will be sent to the
  5463. // server regardless of whether the field is empty or not. This may be
  5464. // used to include empty fields in Patch requests.
  5465. ForceSendFields []string `json:"-"`
  5466. // NullFields is a list of field names (e.g. "DestinationIndex") to
  5467. // include in API requests with the JSON null value. By default, fields
  5468. // with empty values are omitted from API requests. However, any field
  5469. // with an empty value appearing in NullFields will be sent to the
  5470. // server as null. It is an error if a field in this list has a
  5471. // non-empty value. This may be used to include null fields in Patch
  5472. // requests.
  5473. NullFields []string `json:"-"`
  5474. }
  5475. func (s *MoveDimensionRequest) MarshalJSON() ([]byte, error) {
  5476. type NoMethod MoveDimensionRequest
  5477. raw := NoMethod(*s)
  5478. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5479. }
  5480. // NamedRange: A named range.
  5481. type NamedRange struct {
  5482. // Name: The name of the named range.
  5483. Name string `json:"name,omitempty"`
  5484. // NamedRangeId: The ID of the named range.
  5485. NamedRangeId string `json:"namedRangeId,omitempty"`
  5486. // Range: The range this represents.
  5487. Range *GridRange `json:"range,omitempty"`
  5488. // ForceSendFields is a list of field names (e.g. "Name") to
  5489. // unconditionally include in API requests. By default, fields with
  5490. // empty values are omitted from API requests. However, any non-pointer,
  5491. // non-interface field appearing in ForceSendFields will be sent to the
  5492. // server regardless of whether the field is empty or not. This may be
  5493. // used to include empty fields in Patch requests.
  5494. ForceSendFields []string `json:"-"`
  5495. // NullFields is a list of field names (e.g. "Name") to include in API
  5496. // requests with the JSON null value. By default, fields with empty
  5497. // values are omitted from API requests. However, any field with an
  5498. // empty value appearing in NullFields will be sent to the server as
  5499. // null. It is an error if a field in this list has a non-empty value.
  5500. // This may be used to include null fields in Patch requests.
  5501. NullFields []string `json:"-"`
  5502. }
  5503. func (s *NamedRange) MarshalJSON() ([]byte, error) {
  5504. type NoMethod NamedRange
  5505. raw := NoMethod(*s)
  5506. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5507. }
  5508. // NumberFormat: The number format of a cell.
  5509. type NumberFormat struct {
  5510. // Pattern: Pattern string used for formatting. If not set, a default
  5511. // pattern based on
  5512. // the user's locale will be used if necessary for the given type.
  5513. // See the [Date and Number Formats guide](/sheets/api/guides/formats)
  5514. // for more
  5515. // information about the supported patterns.
  5516. Pattern string `json:"pattern,omitempty"`
  5517. // Type: The type of the number format.
  5518. // When writing, this field must be set.
  5519. //
  5520. // Possible values:
  5521. // "NUMBER_FORMAT_TYPE_UNSPECIFIED" - The number format is not
  5522. // specified
  5523. // and is based on the contents of the cell.
  5524. // Do not explicitly use this.
  5525. // "TEXT" - Text formatting, e.g `1000.12`
  5526. // "NUMBER" - Number formatting, e.g, `1,000.12`
  5527. // "PERCENT" - Percent formatting, e.g `10.12%`
  5528. // "CURRENCY" - Currency formatting, e.g `$1,000.12`
  5529. // "DATE" - Date formatting, e.g `9/26/2008`
  5530. // "TIME" - Time formatting, e.g `3:59:00 PM`
  5531. // "DATE_TIME" - Date+Time formatting, e.g `9/26/08 15:59:00`
  5532. // "SCIENTIFIC" - Scientific number formatting, e.g `1.01E+03`
  5533. Type string `json:"type,omitempty"`
  5534. // ForceSendFields is a list of field names (e.g. "Pattern") to
  5535. // unconditionally include in API requests. By default, fields with
  5536. // empty values are omitted from API requests. However, any non-pointer,
  5537. // non-interface field appearing in ForceSendFields will be sent to the
  5538. // server regardless of whether the field is empty or not. This may be
  5539. // used to include empty fields in Patch requests.
  5540. ForceSendFields []string `json:"-"`
  5541. // NullFields is a list of field names (e.g. "Pattern") to include in
  5542. // API requests with the JSON null value. By default, fields with empty
  5543. // values are omitted from API requests. However, any field with an
  5544. // empty value appearing in NullFields will be sent to the server as
  5545. // null. It is an error if a field in this list has a non-empty value.
  5546. // This may be used to include null fields in Patch requests.
  5547. NullFields []string `json:"-"`
  5548. }
  5549. func (s *NumberFormat) MarshalJSON() ([]byte, error) {
  5550. type NoMethod NumberFormat
  5551. raw := NoMethod(*s)
  5552. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5553. }
  5554. // OrgChartSpec: An <a
  5555. // href="/chart/interactive/docs/gallery/orgchart">org chart</a>.
  5556. // Org charts require a unique set of labels in labels and
  5557. // may
  5558. // optionally include parent_labels and tooltips.
  5559. // parent_labels contain, for each node, the label identifying the
  5560. // parent
  5561. // node. tooltips contain, for each node, an optional tooltip.
  5562. //
  5563. // For example, to describe an OrgChart with Alice as the CEO, Bob as
  5564. // the
  5565. // President (reporting to Alice) and Cathy as VP of Sales (also
  5566. // reporting to
  5567. // Alice), have labels contain "Alice", "Bob", "Cathy",
  5568. // parent_labels contain "", "Alice", "Alice" and tooltips
  5569. // contain
  5570. // "CEO", "President", "VP Sales".
  5571. type OrgChartSpec struct {
  5572. // Labels: The data containing the labels for all the nodes in the
  5573. // chart. Labels
  5574. // must be unique.
  5575. Labels *ChartData `json:"labels,omitempty"`
  5576. // NodeColor: The color of the org chart nodes.
  5577. NodeColor *Color `json:"nodeColor,omitempty"`
  5578. // NodeSize: The size of the org chart nodes.
  5579. //
  5580. // Possible values:
  5581. // "ORG_CHART_LABEL_SIZE_UNSPECIFIED" - Default value, do not use.
  5582. // "SMALL" - The small org chart node size.
  5583. // "MEDIUM" - The medium org chart node size.
  5584. // "LARGE" - The large org chart node size.
  5585. NodeSize string `json:"nodeSize,omitempty"`
  5586. // ParentLabels: The data containing the label of the parent for the
  5587. // corresponding node.
  5588. // A blank value indicates that the node has no parent and is a
  5589. // top-level
  5590. // node.
  5591. // This field is optional.
  5592. ParentLabels *ChartData `json:"parentLabels,omitempty"`
  5593. // SelectedNodeColor: The color of the selected org chart nodes.
  5594. SelectedNodeColor *Color `json:"selectedNodeColor,omitempty"`
  5595. // Tooltips: The data containing the tooltip for the corresponding node.
  5596. // A blank value
  5597. // results in no tooltip being displayed for the node.
  5598. // This field is optional.
  5599. Tooltips *ChartData `json:"tooltips,omitempty"`
  5600. // ForceSendFields is a list of field names (e.g. "Labels") to
  5601. // unconditionally include in API requests. By default, fields with
  5602. // empty values are omitted from API requests. However, any non-pointer,
  5603. // non-interface field appearing in ForceSendFields will be sent to the
  5604. // server regardless of whether the field is empty or not. This may be
  5605. // used to include empty fields in Patch requests.
  5606. ForceSendFields []string `json:"-"`
  5607. // NullFields is a list of field names (e.g. "Labels") to include in API
  5608. // requests with the JSON null value. By default, fields with empty
  5609. // values are omitted from API requests. However, any field with an
  5610. // empty value appearing in NullFields will be sent to the server as
  5611. // null. It is an error if a field in this list has a non-empty value.
  5612. // This may be used to include null fields in Patch requests.
  5613. NullFields []string `json:"-"`
  5614. }
  5615. func (s *OrgChartSpec) MarshalJSON() ([]byte, error) {
  5616. type NoMethod OrgChartSpec
  5617. raw := NoMethod(*s)
  5618. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5619. }
  5620. // OverlayPosition: The location an object is overlaid on top of a grid.
  5621. type OverlayPosition struct {
  5622. // AnchorCell: The cell the object is anchored to.
  5623. AnchorCell *GridCoordinate `json:"anchorCell,omitempty"`
  5624. // HeightPixels: The height of the object, in pixels. Defaults to 371.
  5625. HeightPixels int64 `json:"heightPixels,omitempty"`
  5626. // OffsetXPixels: The horizontal offset, in pixels, that the object is
  5627. // offset
  5628. // from the anchor cell.
  5629. OffsetXPixels int64 `json:"offsetXPixels,omitempty"`
  5630. // OffsetYPixels: The vertical offset, in pixels, that the object is
  5631. // offset
  5632. // from the anchor cell.
  5633. OffsetYPixels int64 `json:"offsetYPixels,omitempty"`
  5634. // WidthPixels: The width of the object, in pixels. Defaults to 600.
  5635. WidthPixels int64 `json:"widthPixels,omitempty"`
  5636. // ForceSendFields is a list of field names (e.g. "AnchorCell") to
  5637. // unconditionally include in API requests. By default, fields with
  5638. // empty values are omitted from API requests. However, any non-pointer,
  5639. // non-interface field appearing in ForceSendFields will be sent to the
  5640. // server regardless of whether the field is empty or not. This may be
  5641. // used to include empty fields in Patch requests.
  5642. ForceSendFields []string `json:"-"`
  5643. // NullFields is a list of field names (e.g. "AnchorCell") to include in
  5644. // API requests with the JSON null value. By default, fields with empty
  5645. // values are omitted from API requests. However, any field with an
  5646. // empty value appearing in NullFields will be sent to the server as
  5647. // null. It is an error if a field in this list has a non-empty value.
  5648. // This may be used to include null fields in Patch requests.
  5649. NullFields []string `json:"-"`
  5650. }
  5651. func (s *OverlayPosition) MarshalJSON() ([]byte, error) {
  5652. type NoMethod OverlayPosition
  5653. raw := NoMethod(*s)
  5654. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5655. }
  5656. // Padding: The amount of padding around the cell, in pixels.
  5657. // When updating padding, every field must be specified.
  5658. type Padding struct {
  5659. // Bottom: The bottom padding of the cell.
  5660. Bottom int64 `json:"bottom,omitempty"`
  5661. // Left: The left padding of the cell.
  5662. Left int64 `json:"left,omitempty"`
  5663. // Right: The right padding of the cell.
  5664. Right int64 `json:"right,omitempty"`
  5665. // Top: The top padding of the cell.
  5666. Top int64 `json:"top,omitempty"`
  5667. // ForceSendFields is a list of field names (e.g. "Bottom") to
  5668. // unconditionally include in API requests. By default, fields with
  5669. // empty values are omitted from API requests. However, any non-pointer,
  5670. // non-interface field appearing in ForceSendFields will be sent to the
  5671. // server regardless of whether the field is empty or not. This may be
  5672. // used to include empty fields in Patch requests.
  5673. ForceSendFields []string `json:"-"`
  5674. // NullFields is a list of field names (e.g. "Bottom") to include in API
  5675. // requests with the JSON null value. By default, fields with empty
  5676. // values are omitted from API requests. However, any field with an
  5677. // empty value appearing in NullFields will be sent to the server as
  5678. // null. It is an error if a field in this list has a non-empty value.
  5679. // This may be used to include null fields in Patch requests.
  5680. NullFields []string `json:"-"`
  5681. }
  5682. func (s *Padding) MarshalJSON() ([]byte, error) {
  5683. type NoMethod Padding
  5684. raw := NoMethod(*s)
  5685. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5686. }
  5687. // PasteDataRequest: Inserts data into the spreadsheet starting at the
  5688. // specified coordinate.
  5689. type PasteDataRequest struct {
  5690. // Coordinate: The coordinate at which the data should start being
  5691. // inserted.
  5692. Coordinate *GridCoordinate `json:"coordinate,omitempty"`
  5693. // Data: The data to insert.
  5694. Data string `json:"data,omitempty"`
  5695. // Delimiter: The delimiter in the data.
  5696. Delimiter string `json:"delimiter,omitempty"`
  5697. // Html: True if the data is HTML.
  5698. Html bool `json:"html,omitempty"`
  5699. // Type: How the data should be pasted.
  5700. //
  5701. // Possible values:
  5702. // "PASTE_NORMAL" - Paste values, formulas, formats, and merges.
  5703. // "PASTE_VALUES" - Paste the values ONLY without formats, formulas,
  5704. // or merges.
  5705. // "PASTE_FORMAT" - Paste the format and data validation only.
  5706. // "PASTE_NO_BORDERS" - Like PASTE_NORMAL but without borders.
  5707. // "PASTE_FORMULA" - Paste the formulas only.
  5708. // "PASTE_DATA_VALIDATION" - Paste the data validation only.
  5709. // "PASTE_CONDITIONAL_FORMATTING" - Paste the conditional formatting
  5710. // rules only.
  5711. Type string `json:"type,omitempty"`
  5712. // ForceSendFields is a list of field names (e.g. "Coordinate") to
  5713. // unconditionally include in API requests. By default, fields with
  5714. // empty values are omitted from API requests. However, any non-pointer,
  5715. // non-interface field appearing in ForceSendFields will be sent to the
  5716. // server regardless of whether the field is empty or not. This may be
  5717. // used to include empty fields in Patch requests.
  5718. ForceSendFields []string `json:"-"`
  5719. // NullFields is a list of field names (e.g. "Coordinate") to include in
  5720. // API requests with the JSON null value. By default, fields with empty
  5721. // values are omitted from API requests. However, any field with an
  5722. // empty value appearing in NullFields will be sent to the server as
  5723. // null. It is an error if a field in this list has a non-empty value.
  5724. // This may be used to include null fields in Patch requests.
  5725. NullFields []string `json:"-"`
  5726. }
  5727. func (s *PasteDataRequest) MarshalJSON() ([]byte, error) {
  5728. type NoMethod PasteDataRequest
  5729. raw := NoMethod(*s)
  5730. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5731. }
  5732. // PieChartSpec: A <a
  5733. // href="/chart/interactive/docs/gallery/piechart">pie chart</a>.
  5734. type PieChartSpec struct {
  5735. // Domain: The data that covers the domain of the pie chart.
  5736. Domain *ChartData `json:"domain,omitempty"`
  5737. // LegendPosition: Where the legend of the pie chart should be drawn.
  5738. //
  5739. // Possible values:
  5740. // "PIE_CHART_LEGEND_POSITION_UNSPECIFIED" - Default value, do not
  5741. // use.
  5742. // "BOTTOM_LEGEND" - The legend is rendered on the bottom of the
  5743. // chart.
  5744. // "LEFT_LEGEND" - The legend is rendered on the left of the chart.
  5745. // "RIGHT_LEGEND" - The legend is rendered on the right of the chart.
  5746. // "TOP_LEGEND" - The legend is rendered on the top of the chart.
  5747. // "NO_LEGEND" - No legend is rendered.
  5748. // "LABELED_LEGEND" - Each pie slice has a label attached to it.
  5749. LegendPosition string `json:"legendPosition,omitempty"`
  5750. // PieHole: The size of the hole in the pie chart.
  5751. PieHole float64 `json:"pieHole,omitempty"`
  5752. // Series: The data that covers the one and only series of the pie
  5753. // chart.
  5754. Series *ChartData `json:"series,omitempty"`
  5755. // ThreeDimensional: True if the pie is three dimensional.
  5756. ThreeDimensional bool `json:"threeDimensional,omitempty"`
  5757. // ForceSendFields is a list of field names (e.g. "Domain") to
  5758. // unconditionally include in API requests. By default, fields with
  5759. // empty values are omitted from API requests. However, any non-pointer,
  5760. // non-interface field appearing in ForceSendFields will be sent to the
  5761. // server regardless of whether the field is empty or not. This may be
  5762. // used to include empty fields in Patch requests.
  5763. ForceSendFields []string `json:"-"`
  5764. // NullFields is a list of field names (e.g. "Domain") to include in API
  5765. // requests with the JSON null value. By default, fields with empty
  5766. // values are omitted from API requests. However, any field with an
  5767. // empty value appearing in NullFields will be sent to the server as
  5768. // null. It is an error if a field in this list has a non-empty value.
  5769. // This may be used to include null fields in Patch requests.
  5770. NullFields []string `json:"-"`
  5771. }
  5772. func (s *PieChartSpec) MarshalJSON() ([]byte, error) {
  5773. type NoMethod PieChartSpec
  5774. raw := NoMethod(*s)
  5775. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5776. }
  5777. func (s *PieChartSpec) UnmarshalJSON(data []byte) error {
  5778. type NoMethod PieChartSpec
  5779. var s1 struct {
  5780. PieHole gensupport.JSONFloat64 `json:"pieHole"`
  5781. *NoMethod
  5782. }
  5783. s1.NoMethod = (*NoMethod)(s)
  5784. if err := json.Unmarshal(data, &s1); err != nil {
  5785. return err
  5786. }
  5787. s.PieHole = float64(s1.PieHole)
  5788. return nil
  5789. }
  5790. // PivotFilterCriteria: Criteria for showing/hiding rows in a pivot
  5791. // table.
  5792. type PivotFilterCriteria struct {
  5793. // VisibleValues: Values that should be included. Values not listed
  5794. // here are excluded.
  5795. VisibleValues []string `json:"visibleValues,omitempty"`
  5796. // ForceSendFields is a list of field names (e.g. "VisibleValues") to
  5797. // unconditionally include in API requests. By default, fields with
  5798. // empty values are omitted from API requests. However, any non-pointer,
  5799. // non-interface field appearing in ForceSendFields will be sent to the
  5800. // server regardless of whether the field is empty or not. This may be
  5801. // used to include empty fields in Patch requests.
  5802. ForceSendFields []string `json:"-"`
  5803. // NullFields is a list of field names (e.g. "VisibleValues") to include
  5804. // in API requests with the JSON null value. By default, fields with
  5805. // empty values are omitted from API requests. However, any field with
  5806. // an empty value appearing in NullFields will be sent to the server as
  5807. // null. It is an error if a field in this list has a non-empty value.
  5808. // This may be used to include null fields in Patch requests.
  5809. NullFields []string `json:"-"`
  5810. }
  5811. func (s *PivotFilterCriteria) MarshalJSON() ([]byte, error) {
  5812. type NoMethod PivotFilterCriteria
  5813. raw := NoMethod(*s)
  5814. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5815. }
  5816. // PivotGroup: A single grouping (either row or column) in a pivot
  5817. // table.
  5818. type PivotGroup struct {
  5819. // GroupRule: The group rule to apply to this row/column group.
  5820. GroupRule *PivotGroupRule `json:"groupRule,omitempty"`
  5821. // Label: The labels to use for the row/column groups which can be
  5822. // customized. For
  5823. // example, in the following pivot table, the row label is `Region`
  5824. // (which
  5825. // could be renamed to `State`) and the column label is `Product`
  5826. // (which
  5827. // could be renamed `Item`). Pivot tables created before December 2017
  5828. // do
  5829. // not have header labels. If you'd like to add header labels to an
  5830. // existing
  5831. // pivot table, please delete the existing pivot table and then create a
  5832. // new
  5833. // pivot table with same parameters.
  5834. //
  5835. // +--------------+---------+-------+
  5836. // | SUM of Units | Product | |
  5837. // | Region | Pen | Paper |
  5838. // +--------------+---------+-------+
  5839. // | New York | 345 | 98 |
  5840. // | Oregon | 234 | 123 |
  5841. // | Tennessee | 531 | 415 |
  5842. // +--------------+---------+-------+
  5843. // | Grand Total | 1110 | 636 |
  5844. // +--------------+---------+-------+
  5845. Label string `json:"label,omitempty"`
  5846. // RepeatHeadings: True if the headings in this pivot group should be
  5847. // repeated.
  5848. // This is only valid for row groupings and is ignored by columns.
  5849. //
  5850. // By default, we minimize repitition of headings by not showing
  5851. // higher
  5852. // level headings where they are the same. For example, even though
  5853. // the
  5854. // third row below corresponds to "Q1 Mar", "Q1" is not shown because
  5855. // it is redundant with previous rows. Setting repeat_headings to
  5856. // true
  5857. // would cause "Q1" to be repeated for "Feb" and "Mar".
  5858. //
  5859. // +--------------+
  5860. // | Q1 | Jan |
  5861. // | | Feb |
  5862. // | | Mar |
  5863. // +--------+-----+
  5864. // | Q1 Total |
  5865. // +--------------+
  5866. RepeatHeadings bool `json:"repeatHeadings,omitempty"`
  5867. // ShowTotals: True if the pivot table should include the totals for
  5868. // this grouping.
  5869. ShowTotals bool `json:"showTotals,omitempty"`
  5870. // SortOrder: The order the values in this group should be sorted.
  5871. //
  5872. // Possible values:
  5873. // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this.
  5874. // "ASCENDING" - Sort ascending.
  5875. // "DESCENDING" - Sort descending.
  5876. SortOrder string `json:"sortOrder,omitempty"`
  5877. // SourceColumnOffset: The column offset of the source range that this
  5878. // grouping is based on.
  5879. //
  5880. // For example, if the source was `C10:E15`, a `sourceColumnOffset` of
  5881. // `0`
  5882. // means this group refers to column `C`, whereas the offset `1` would
  5883. // refer
  5884. // to column `D`.
  5885. SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"`
  5886. // ValueBucket: The bucket of the opposite pivot group to sort by.
  5887. // If not specified, sorting is alphabetical by this group's values.
  5888. ValueBucket *PivotGroupSortValueBucket `json:"valueBucket,omitempty"`
  5889. // ValueMetadata: Metadata about values in the grouping.
  5890. ValueMetadata []*PivotGroupValueMetadata `json:"valueMetadata,omitempty"`
  5891. // ForceSendFields is a list of field names (e.g. "GroupRule") to
  5892. // unconditionally include in API requests. By default, fields with
  5893. // empty values are omitted from API requests. However, any non-pointer,
  5894. // non-interface field appearing in ForceSendFields will be sent to the
  5895. // server regardless of whether the field is empty or not. This may be
  5896. // used to include empty fields in Patch requests.
  5897. ForceSendFields []string `json:"-"`
  5898. // NullFields is a list of field names (e.g. "GroupRule") to include in
  5899. // API requests with the JSON null value. By default, fields with empty
  5900. // values are omitted from API requests. However, any field with an
  5901. // empty value appearing in NullFields will be sent to the server as
  5902. // null. It is an error if a field in this list has a non-empty value.
  5903. // This may be used to include null fields in Patch requests.
  5904. NullFields []string `json:"-"`
  5905. }
  5906. func (s *PivotGroup) MarshalJSON() ([]byte, error) {
  5907. type NoMethod PivotGroup
  5908. raw := NoMethod(*s)
  5909. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5910. }
  5911. // PivotGroupRule: An optional setting on a PivotGroup that defines
  5912. // buckets for the values
  5913. // in the source data column rather than breaking out each individual
  5914. // value.
  5915. // Only one PivotGroup with a group rule may be added for each column
  5916. // in
  5917. // the source data, though on any given column you may add both
  5918. // a
  5919. // PivotGroup that has a rule and a PivotGroup that does not.
  5920. type PivotGroupRule struct {
  5921. // DateTimeRule: A DateTimeRule.
  5922. DateTimeRule *DateTimeRule `json:"dateTimeRule,omitempty"`
  5923. // HistogramRule: A HistogramRule.
  5924. HistogramRule *HistogramRule `json:"histogramRule,omitempty"`
  5925. // ManualRule: A ManualRule.
  5926. ManualRule *ManualRule `json:"manualRule,omitempty"`
  5927. // ForceSendFields is a list of field names (e.g. "DateTimeRule") to
  5928. // unconditionally include in API requests. By default, fields with
  5929. // empty values are omitted from API requests. However, any non-pointer,
  5930. // non-interface field appearing in ForceSendFields will be sent to the
  5931. // server regardless of whether the field is empty or not. This may be
  5932. // used to include empty fields in Patch requests.
  5933. ForceSendFields []string `json:"-"`
  5934. // NullFields is a list of field names (e.g. "DateTimeRule") to include
  5935. // in API requests with the JSON null value. By default, fields with
  5936. // empty values are omitted from API requests. However, any field with
  5937. // an empty value appearing in NullFields will be sent to the server as
  5938. // null. It is an error if a field in this list has a non-empty value.
  5939. // This may be used to include null fields in Patch requests.
  5940. NullFields []string `json:"-"`
  5941. }
  5942. func (s *PivotGroupRule) MarshalJSON() ([]byte, error) {
  5943. type NoMethod PivotGroupRule
  5944. raw := NoMethod(*s)
  5945. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5946. }
  5947. // PivotGroupSortValueBucket: Information about which values in a pivot
  5948. // group should be used for sorting.
  5949. type PivotGroupSortValueBucket struct {
  5950. // Buckets: Determines the bucket from which values are chosen to
  5951. // sort.
  5952. //
  5953. // For example, in a pivot table with one row group & two column
  5954. // groups,
  5955. // the row group can list up to two values. The first value
  5956. // corresponds
  5957. // to a value within the first column group, and the second
  5958. // value
  5959. // corresponds to a value in the second column group. If no values
  5960. // are listed, this would indicate that the row should be sorted
  5961. // according
  5962. // to the "Grand Total" over the column groups. If a single value is
  5963. // listed,
  5964. // this would correspond to using the "Total" of that bucket.
  5965. Buckets []*ExtendedValue `json:"buckets,omitempty"`
  5966. // ValuesIndex: The offset in the PivotTable.values list which the
  5967. // values in this
  5968. // grouping should be sorted by.
  5969. ValuesIndex int64 `json:"valuesIndex,omitempty"`
  5970. // ForceSendFields is a list of field names (e.g. "Buckets") to
  5971. // unconditionally include in API requests. By default, fields with
  5972. // empty values are omitted from API requests. However, any non-pointer,
  5973. // non-interface field appearing in ForceSendFields will be sent to the
  5974. // server regardless of whether the field is empty or not. This may be
  5975. // used to include empty fields in Patch requests.
  5976. ForceSendFields []string `json:"-"`
  5977. // NullFields is a list of field names (e.g. "Buckets") to include in
  5978. // API requests with the JSON null value. By default, fields with empty
  5979. // values are omitted from API requests. However, any field with an
  5980. // empty value appearing in NullFields will be sent to the server as
  5981. // null. It is an error if a field in this list has a non-empty value.
  5982. // This may be used to include null fields in Patch requests.
  5983. NullFields []string `json:"-"`
  5984. }
  5985. func (s *PivotGroupSortValueBucket) MarshalJSON() ([]byte, error) {
  5986. type NoMethod PivotGroupSortValueBucket
  5987. raw := NoMethod(*s)
  5988. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5989. }
  5990. // PivotGroupValueMetadata: Metadata about a value in a pivot grouping.
  5991. type PivotGroupValueMetadata struct {
  5992. // Collapsed: True if the data corresponding to the value is collapsed.
  5993. Collapsed bool `json:"collapsed,omitempty"`
  5994. // Value: The calculated value the metadata corresponds to.
  5995. // (Note that formulaValue is not valid,
  5996. // because the values will be calculated.)
  5997. Value *ExtendedValue `json:"value,omitempty"`
  5998. // ForceSendFields is a list of field names (e.g. "Collapsed") to
  5999. // unconditionally include in API requests. By default, fields with
  6000. // empty values are omitted from API requests. However, any non-pointer,
  6001. // non-interface field appearing in ForceSendFields will be sent to the
  6002. // server regardless of whether the field is empty or not. This may be
  6003. // used to include empty fields in Patch requests.
  6004. ForceSendFields []string `json:"-"`
  6005. // NullFields is a list of field names (e.g. "Collapsed") to include in
  6006. // API requests with the JSON null value. By default, fields with empty
  6007. // values are omitted from API requests. However, any field with an
  6008. // empty value appearing in NullFields will be sent to the server as
  6009. // null. It is an error if a field in this list has a non-empty value.
  6010. // This may be used to include null fields in Patch requests.
  6011. NullFields []string `json:"-"`
  6012. }
  6013. func (s *PivotGroupValueMetadata) MarshalJSON() ([]byte, error) {
  6014. type NoMethod PivotGroupValueMetadata
  6015. raw := NoMethod(*s)
  6016. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6017. }
  6018. // PivotTable: A pivot table.
  6019. type PivotTable struct {
  6020. // Columns: Each column grouping in the pivot table.
  6021. Columns []*PivotGroup `json:"columns,omitempty"`
  6022. // Criteria: An optional mapping of filters per source column
  6023. // offset.
  6024. //
  6025. // The filters are applied before aggregating data into the pivot
  6026. // table.
  6027. // The map's key is the column offset of the source range that you want
  6028. // to
  6029. // filter, and the value is the criteria for that column.
  6030. //
  6031. // For example, if the source was `C10:E15`, a key of `0` will have the
  6032. // filter
  6033. // for column `C`, whereas the key `1` is for column `D`.
  6034. Criteria map[string]PivotFilterCriteria `json:"criteria,omitempty"`
  6035. // Rows: Each row grouping in the pivot table.
  6036. Rows []*PivotGroup `json:"rows,omitempty"`
  6037. // Source: The range the pivot table is reading data from.
  6038. Source *GridRange `json:"source,omitempty"`
  6039. // ValueLayout: Whether values should be listed horizontally (as
  6040. // columns)
  6041. // or vertically (as rows).
  6042. //
  6043. // Possible values:
  6044. // "HORIZONTAL" - Values are laid out horizontally (as columns).
  6045. // "VERTICAL" - Values are laid out vertically (as rows).
  6046. ValueLayout string `json:"valueLayout,omitempty"`
  6047. // Values: A list of values to include in the pivot table.
  6048. Values []*PivotValue `json:"values,omitempty"`
  6049. // ForceSendFields is a list of field names (e.g. "Columns") to
  6050. // unconditionally include in API requests. By default, fields with
  6051. // empty values are omitted from API requests. However, any non-pointer,
  6052. // non-interface field appearing in ForceSendFields will be sent to the
  6053. // server regardless of whether the field is empty or not. This may be
  6054. // used to include empty fields in Patch requests.
  6055. ForceSendFields []string `json:"-"`
  6056. // NullFields is a list of field names (e.g. "Columns") to include in
  6057. // API requests with the JSON null value. By default, fields with empty
  6058. // values are omitted from API requests. However, any field with an
  6059. // empty value appearing in NullFields will be sent to the server as
  6060. // null. It is an error if a field in this list has a non-empty value.
  6061. // This may be used to include null fields in Patch requests.
  6062. NullFields []string `json:"-"`
  6063. }
  6064. func (s *PivotTable) MarshalJSON() ([]byte, error) {
  6065. type NoMethod PivotTable
  6066. raw := NoMethod(*s)
  6067. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6068. }
  6069. // PivotValue: The definition of how a value in a pivot table should be
  6070. // calculated.
  6071. type PivotValue struct {
  6072. // CalculatedDisplayType: If specified, indicates that pivot values
  6073. // should be displayed as
  6074. // the result of a calculation with another pivot value. For example,
  6075. // if
  6076. // calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all
  6077. // the
  6078. // pivot values are displayed as the percentage of the grand total.
  6079. // In
  6080. // the Sheets UI, this is referred to as "Show As" in the value section
  6081. // of a
  6082. // pivot table.
  6083. //
  6084. // Possible values:
  6085. // "PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED" - Default value,
  6086. // do not use.
  6087. // "PERCENT_OF_ROW_TOTAL" - Shows the pivot values as percentage of
  6088. // the row total values.
  6089. // "PERCENT_OF_COLUMN_TOTAL" - Shows the pivot values as percentage of
  6090. // the column total values.
  6091. // "PERCENT_OF_GRAND_TOTAL" - Shows the pivot values as percentage of
  6092. // the grand total values.
  6093. CalculatedDisplayType string `json:"calculatedDisplayType,omitempty"`
  6094. // Formula: A custom formula to calculate the value. The formula must
  6095. // start
  6096. // with an `=` character.
  6097. Formula string `json:"formula,omitempty"`
  6098. // Name: A name to use for the value.
  6099. Name string `json:"name,omitempty"`
  6100. // SourceColumnOffset: The column offset of the source range that this
  6101. // value reads from.
  6102. //
  6103. // For example, if the source was `C10:E15`, a `sourceColumnOffset` of
  6104. // `0`
  6105. // means this value refers to column `C`, whereas the offset `1`
  6106. // would
  6107. // refer to column `D`.
  6108. SourceColumnOffset int64 `json:"sourceColumnOffset,omitempty"`
  6109. // SummarizeFunction: A function to summarize the value.
  6110. // If formula is set, the only supported values are
  6111. // SUM and
  6112. // CUSTOM.
  6113. // If sourceColumnOffset is set, then `CUSTOM`
  6114. // is not supported.
  6115. //
  6116. // Possible values:
  6117. // "PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED" - The default, do not
  6118. // use.
  6119. // "SUM" - Corresponds to the `SUM` function.
  6120. // "COUNTA" - Corresponds to the `COUNTA` function.
  6121. // "COUNT" - Corresponds to the `COUNT` function.
  6122. // "COUNTUNIQUE" - Corresponds to the `COUNTUNIQUE` function.
  6123. // "AVERAGE" - Corresponds to the `AVERAGE` function.
  6124. // "MAX" - Corresponds to the `MAX` function.
  6125. // "MIN" - Corresponds to the `MIN` function.
  6126. // "MEDIAN" - Corresponds to the `MEDIAN` function.
  6127. // "PRODUCT" - Corresponds to the `PRODUCT` function.
  6128. // "STDEV" - Corresponds to the `STDEV` function.
  6129. // "STDEVP" - Corresponds to the `STDEVP` function.
  6130. // "VAR" - Corresponds to the `VAR` function.
  6131. // "VARP" - Corresponds to the `VARP` function.
  6132. // "CUSTOM" - Indicates the formula should be used as-is.
  6133. // Only valid if PivotValue.formula was set.
  6134. SummarizeFunction string `json:"summarizeFunction,omitempty"`
  6135. // ForceSendFields is a list of field names (e.g.
  6136. // "CalculatedDisplayType") to unconditionally include in API requests.
  6137. // By default, fields with empty values are omitted from API requests.
  6138. // However, any non-pointer, non-interface field appearing in
  6139. // ForceSendFields will be sent to the server regardless of whether the
  6140. // field is empty or not. This may be used to include empty fields in
  6141. // Patch requests.
  6142. ForceSendFields []string `json:"-"`
  6143. // NullFields is a list of field names (e.g. "CalculatedDisplayType") to
  6144. // include in API requests with the JSON null value. By default, fields
  6145. // with empty values are omitted from API requests. However, any field
  6146. // with an empty value appearing in NullFields will be sent to the
  6147. // server as null. It is an error if a field in this list has a
  6148. // non-empty value. This may be used to include null fields in Patch
  6149. // requests.
  6150. NullFields []string `json:"-"`
  6151. }
  6152. func (s *PivotValue) MarshalJSON() ([]byte, error) {
  6153. type NoMethod PivotValue
  6154. raw := NoMethod(*s)
  6155. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6156. }
  6157. // ProtectedRange: A protected range.
  6158. type ProtectedRange struct {
  6159. // Description: The description of this protected range.
  6160. Description string `json:"description,omitempty"`
  6161. // Editors: The users and groups with edit access to the protected
  6162. // range.
  6163. // This field is only visible to users with edit access to the
  6164. // protected
  6165. // range and the document.
  6166. // Editors are not supported with warning_only protection.
  6167. Editors *Editors `json:"editors,omitempty"`
  6168. // NamedRangeId: The named range this protected range is backed by, if
  6169. // any.
  6170. //
  6171. // When writing, only one of range or named_range_id
  6172. // may be set.
  6173. NamedRangeId string `json:"namedRangeId,omitempty"`
  6174. // ProtectedRangeId: The ID of the protected range.
  6175. // This field is read-only.
  6176. ProtectedRangeId int64 `json:"protectedRangeId,omitempty"`
  6177. // Range: The range that is being protected.
  6178. // The range may be fully unbounded, in which case this is considered
  6179. // a protected sheet.
  6180. //
  6181. // When writing, only one of range or named_range_id
  6182. // may be set.
  6183. Range *GridRange `json:"range,omitempty"`
  6184. // RequestingUserCanEdit: True if the user who requested this protected
  6185. // range can edit the
  6186. // protected area.
  6187. // This field is read-only.
  6188. RequestingUserCanEdit bool `json:"requestingUserCanEdit,omitempty"`
  6189. // UnprotectedRanges: The list of unprotected ranges within a protected
  6190. // sheet.
  6191. // Unprotected ranges are only supported on protected sheets.
  6192. UnprotectedRanges []*GridRange `json:"unprotectedRanges,omitempty"`
  6193. // WarningOnly: True if this protected range will show a warning when
  6194. // editing.
  6195. // Warning-based protection means that every user can edit data in
  6196. // the
  6197. // protected range, except editing will prompt a warning asking the
  6198. // user
  6199. // to confirm the edit.
  6200. //
  6201. // When writing: if this field is true, then editors is
  6202. // ignored.
  6203. // Additionally, if this field is changed from true to false and
  6204. // the
  6205. // `editors` field is not set (nor included in the field mask), then
  6206. // the editors will be set to all the editors in the document.
  6207. WarningOnly bool `json:"warningOnly,omitempty"`
  6208. // ForceSendFields is a list of field names (e.g. "Description") to
  6209. // unconditionally include in API requests. By default, fields with
  6210. // empty values are omitted from API requests. However, any non-pointer,
  6211. // non-interface field appearing in ForceSendFields will be sent to the
  6212. // server regardless of whether the field is empty or not. This may be
  6213. // used to include empty fields in Patch requests.
  6214. ForceSendFields []string `json:"-"`
  6215. // NullFields is a list of field names (e.g. "Description") to include
  6216. // in API requests with the JSON null value. By default, fields with
  6217. // empty values are omitted from API requests. However, any field with
  6218. // an empty value appearing in NullFields will be sent to the server as
  6219. // null. It is an error if a field in this list has a non-empty value.
  6220. // This may be used to include null fields in Patch requests.
  6221. NullFields []string `json:"-"`
  6222. }
  6223. func (s *ProtectedRange) MarshalJSON() ([]byte, error) {
  6224. type NoMethod ProtectedRange
  6225. raw := NoMethod(*s)
  6226. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6227. }
  6228. // RandomizeRangeRequest: Randomizes the order of the rows in a range.
  6229. type RandomizeRangeRequest struct {
  6230. // Range: The range to randomize.
  6231. Range *GridRange `json:"range,omitempty"`
  6232. // ForceSendFields is a list of field names (e.g. "Range") to
  6233. // unconditionally include in API requests. By default, fields with
  6234. // empty values are omitted from API requests. However, any non-pointer,
  6235. // non-interface field appearing in ForceSendFields will be sent to the
  6236. // server regardless of whether the field is empty or not. This may be
  6237. // used to include empty fields in Patch requests.
  6238. ForceSendFields []string `json:"-"`
  6239. // NullFields is a list of field names (e.g. "Range") to include in API
  6240. // requests with the JSON null value. By default, fields with empty
  6241. // values are omitted from API requests. However, any field with an
  6242. // empty value appearing in NullFields will be sent to the server as
  6243. // null. It is an error if a field in this list has a non-empty value.
  6244. // This may be used to include null fields in Patch requests.
  6245. NullFields []string `json:"-"`
  6246. }
  6247. func (s *RandomizeRangeRequest) MarshalJSON() ([]byte, error) {
  6248. type NoMethod RandomizeRangeRequest
  6249. raw := NoMethod(*s)
  6250. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6251. }
  6252. // RepeatCellRequest: Updates all cells in the range to the values in
  6253. // the given Cell object.
  6254. // Only the fields listed in the fields field are updated; others
  6255. // are
  6256. // unchanged.
  6257. //
  6258. // If writing a cell with a formula, the formula's ranges will
  6259. // automatically
  6260. // increment for each field in the range.
  6261. // For example, if writing a cell with formula `=A1` into range
  6262. // B2:C4,
  6263. // B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`,
  6264. // C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`.
  6265. //
  6266. // To keep the formula's ranges static, use the `$` indicator.
  6267. // For example, use the formula `=$A$1` to prevent both the row and
  6268. // the
  6269. // column from incrementing.
  6270. type RepeatCellRequest struct {
  6271. // Cell: The data to write.
  6272. Cell *CellData `json:"cell,omitempty"`
  6273. // Fields: The fields that should be updated. At least one field must
  6274. // be specified.
  6275. // The root `cell` is implied and should not be specified.
  6276. // A single "*" can be used as short-hand for listing every field.
  6277. Fields string `json:"fields,omitempty"`
  6278. // Range: The range to repeat the cell in.
  6279. Range *GridRange `json:"range,omitempty"`
  6280. // ForceSendFields is a list of field names (e.g. "Cell") to
  6281. // unconditionally include in API requests. By default, fields with
  6282. // empty values are omitted from API requests. However, any non-pointer,
  6283. // non-interface field appearing in ForceSendFields will be sent to the
  6284. // server regardless of whether the field is empty or not. This may be
  6285. // used to include empty fields in Patch requests.
  6286. ForceSendFields []string `json:"-"`
  6287. // NullFields is a list of field names (e.g. "Cell") to include in API
  6288. // requests with the JSON null value. By default, fields with empty
  6289. // values are omitted from API requests. However, any field with an
  6290. // empty value appearing in NullFields will be sent to the server as
  6291. // null. It is an error if a field in this list has a non-empty value.
  6292. // This may be used to include null fields in Patch requests.
  6293. NullFields []string `json:"-"`
  6294. }
  6295. func (s *RepeatCellRequest) MarshalJSON() ([]byte, error) {
  6296. type NoMethod RepeatCellRequest
  6297. raw := NoMethod(*s)
  6298. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6299. }
  6300. // Request: A single kind of update to apply to a spreadsheet.
  6301. type Request struct {
  6302. // AddBanding: Adds a new banded range
  6303. AddBanding *AddBandingRequest `json:"addBanding,omitempty"`
  6304. // AddChart: Adds a chart.
  6305. AddChart *AddChartRequest `json:"addChart,omitempty"`
  6306. // AddConditionalFormatRule: Adds a new conditional format rule.
  6307. AddConditionalFormatRule *AddConditionalFormatRuleRequest `json:"addConditionalFormatRule,omitempty"`
  6308. // AddDimensionGroup: Creates a group over the specified range.
  6309. AddDimensionGroup *AddDimensionGroupRequest `json:"addDimensionGroup,omitempty"`
  6310. // AddFilterView: Adds a filter view.
  6311. AddFilterView *AddFilterViewRequest `json:"addFilterView,omitempty"`
  6312. // AddNamedRange: Adds a named range.
  6313. AddNamedRange *AddNamedRangeRequest `json:"addNamedRange,omitempty"`
  6314. // AddProtectedRange: Adds a protected range.
  6315. AddProtectedRange *AddProtectedRangeRequest `json:"addProtectedRange,omitempty"`
  6316. // AddSheet: Adds a sheet.
  6317. AddSheet *AddSheetRequest `json:"addSheet,omitempty"`
  6318. // AppendCells: Appends cells after the last row with data in a sheet.
  6319. AppendCells *AppendCellsRequest `json:"appendCells,omitempty"`
  6320. // AppendDimension: Appends dimensions to the end of a sheet.
  6321. AppendDimension *AppendDimensionRequest `json:"appendDimension,omitempty"`
  6322. // AutoFill: Automatically fills in more data based on existing data.
  6323. AutoFill *AutoFillRequest `json:"autoFill,omitempty"`
  6324. // AutoResizeDimensions: Automatically resizes one or more dimensions
  6325. // based on the contents
  6326. // of the cells in that dimension.
  6327. AutoResizeDimensions *AutoResizeDimensionsRequest `json:"autoResizeDimensions,omitempty"`
  6328. // ClearBasicFilter: Clears the basic filter on a sheet.
  6329. ClearBasicFilter *ClearBasicFilterRequest `json:"clearBasicFilter,omitempty"`
  6330. // CopyPaste: Copies data from one area and pastes it to another.
  6331. CopyPaste *CopyPasteRequest `json:"copyPaste,omitempty"`
  6332. // CreateDeveloperMetadata: Creates new developer metadata
  6333. CreateDeveloperMetadata *CreateDeveloperMetadataRequest `json:"createDeveloperMetadata,omitempty"`
  6334. // CutPaste: Cuts data from one area and pastes it to another.
  6335. CutPaste *CutPasteRequest `json:"cutPaste,omitempty"`
  6336. // DeleteBanding: Removes a banded range
  6337. DeleteBanding *DeleteBandingRequest `json:"deleteBanding,omitempty"`
  6338. // DeleteConditionalFormatRule: Deletes an existing conditional format
  6339. // rule.
  6340. DeleteConditionalFormatRule *DeleteConditionalFormatRuleRequest `json:"deleteConditionalFormatRule,omitempty"`
  6341. // DeleteDeveloperMetadata: Deletes developer metadata
  6342. DeleteDeveloperMetadata *DeleteDeveloperMetadataRequest `json:"deleteDeveloperMetadata,omitempty"`
  6343. // DeleteDimension: Deletes rows or columns in a sheet.
  6344. DeleteDimension *DeleteDimensionRequest `json:"deleteDimension,omitempty"`
  6345. // DeleteDimensionGroup: Deletes a group over the specified range.
  6346. DeleteDimensionGroup *DeleteDimensionGroupRequest `json:"deleteDimensionGroup,omitempty"`
  6347. // DeleteEmbeddedObject: Deletes an embedded object (e.g, chart, image)
  6348. // in a sheet.
  6349. DeleteEmbeddedObject *DeleteEmbeddedObjectRequest `json:"deleteEmbeddedObject,omitempty"`
  6350. // DeleteFilterView: Deletes a filter view from a sheet.
  6351. DeleteFilterView *DeleteFilterViewRequest `json:"deleteFilterView,omitempty"`
  6352. // DeleteNamedRange: Deletes a named range.
  6353. DeleteNamedRange *DeleteNamedRangeRequest `json:"deleteNamedRange,omitempty"`
  6354. // DeleteProtectedRange: Deletes a protected range.
  6355. DeleteProtectedRange *DeleteProtectedRangeRequest `json:"deleteProtectedRange,omitempty"`
  6356. // DeleteRange: Deletes a range of cells from a sheet, shifting the
  6357. // remaining cells.
  6358. DeleteRange *DeleteRangeRequest `json:"deleteRange,omitempty"`
  6359. // DeleteSheet: Deletes a sheet.
  6360. DeleteSheet *DeleteSheetRequest `json:"deleteSheet,omitempty"`
  6361. // DuplicateFilterView: Duplicates a filter view.
  6362. DuplicateFilterView *DuplicateFilterViewRequest `json:"duplicateFilterView,omitempty"`
  6363. // DuplicateSheet: Duplicates a sheet.
  6364. DuplicateSheet *DuplicateSheetRequest `json:"duplicateSheet,omitempty"`
  6365. // FindReplace: Finds and replaces occurrences of some text with other
  6366. // text.
  6367. FindReplace *FindReplaceRequest `json:"findReplace,omitempty"`
  6368. // InsertDimension: Inserts new rows or columns in a sheet.
  6369. InsertDimension *InsertDimensionRequest `json:"insertDimension,omitempty"`
  6370. // InsertRange: Inserts new cells in a sheet, shifting the existing
  6371. // cells.
  6372. InsertRange *InsertRangeRequest `json:"insertRange,omitempty"`
  6373. // MergeCells: Merges cells together.
  6374. MergeCells *MergeCellsRequest `json:"mergeCells,omitempty"`
  6375. // MoveDimension: Moves rows or columns to another location in a sheet.
  6376. MoveDimension *MoveDimensionRequest `json:"moveDimension,omitempty"`
  6377. // PasteData: Pastes data (HTML or delimited) into a sheet.
  6378. PasteData *PasteDataRequest `json:"pasteData,omitempty"`
  6379. // RandomizeRange: Randomizes the order of the rows in a range.
  6380. RandomizeRange *RandomizeRangeRequest `json:"randomizeRange,omitempty"`
  6381. // RepeatCell: Repeats a single cell across a range.
  6382. RepeatCell *RepeatCellRequest `json:"repeatCell,omitempty"`
  6383. // SetBasicFilter: Sets the basic filter on a sheet.
  6384. SetBasicFilter *SetBasicFilterRequest `json:"setBasicFilter,omitempty"`
  6385. // SetDataValidation: Sets data validation for one or more cells.
  6386. SetDataValidation *SetDataValidationRequest `json:"setDataValidation,omitempty"`
  6387. // SortRange: Sorts data in a range.
  6388. SortRange *SortRangeRequest `json:"sortRange,omitempty"`
  6389. // TextToColumns: Converts a column of text into many columns of text.
  6390. TextToColumns *TextToColumnsRequest `json:"textToColumns,omitempty"`
  6391. // UnmergeCells: Unmerges merged cells.
  6392. UnmergeCells *UnmergeCellsRequest `json:"unmergeCells,omitempty"`
  6393. // UpdateBanding: Updates a banded range
  6394. UpdateBanding *UpdateBandingRequest `json:"updateBanding,omitempty"`
  6395. // UpdateBorders: Updates the borders in a range of cells.
  6396. UpdateBorders *UpdateBordersRequest `json:"updateBorders,omitempty"`
  6397. // UpdateCells: Updates many cells at once.
  6398. UpdateCells *UpdateCellsRequest `json:"updateCells,omitempty"`
  6399. // UpdateChartSpec: Updates a chart's specifications.
  6400. UpdateChartSpec *UpdateChartSpecRequest `json:"updateChartSpec,omitempty"`
  6401. // UpdateConditionalFormatRule: Updates an existing conditional format
  6402. // rule.
  6403. UpdateConditionalFormatRule *UpdateConditionalFormatRuleRequest `json:"updateConditionalFormatRule,omitempty"`
  6404. // UpdateDeveloperMetadata: Updates an existing developer metadata entry
  6405. UpdateDeveloperMetadata *UpdateDeveloperMetadataRequest `json:"updateDeveloperMetadata,omitempty"`
  6406. // UpdateDimensionGroup: Updates the state of the specified group.
  6407. UpdateDimensionGroup *UpdateDimensionGroupRequest `json:"updateDimensionGroup,omitempty"`
  6408. // UpdateDimensionProperties: Updates dimensions' properties.
  6409. UpdateDimensionProperties *UpdateDimensionPropertiesRequest `json:"updateDimensionProperties,omitempty"`
  6410. // UpdateEmbeddedObjectPosition: Updates an embedded object's (e.g.
  6411. // chart, image) position.
  6412. UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionRequest `json:"updateEmbeddedObjectPosition,omitempty"`
  6413. // UpdateFilterView: Updates the properties of a filter view.
  6414. UpdateFilterView *UpdateFilterViewRequest `json:"updateFilterView,omitempty"`
  6415. // UpdateNamedRange: Updates a named range.
  6416. UpdateNamedRange *UpdateNamedRangeRequest `json:"updateNamedRange,omitempty"`
  6417. // UpdateProtectedRange: Updates a protected range.
  6418. UpdateProtectedRange *UpdateProtectedRangeRequest `json:"updateProtectedRange,omitempty"`
  6419. // UpdateSheetProperties: Updates a sheet's properties.
  6420. UpdateSheetProperties *UpdateSheetPropertiesRequest `json:"updateSheetProperties,omitempty"`
  6421. // UpdateSpreadsheetProperties: Updates the spreadsheet's properties.
  6422. UpdateSpreadsheetProperties *UpdateSpreadsheetPropertiesRequest `json:"updateSpreadsheetProperties,omitempty"`
  6423. // ForceSendFields is a list of field names (e.g. "AddBanding") to
  6424. // unconditionally include in API requests. By default, fields with
  6425. // empty values are omitted from API requests. However, any non-pointer,
  6426. // non-interface field appearing in ForceSendFields will be sent to the
  6427. // server regardless of whether the field is empty or not. This may be
  6428. // used to include empty fields in Patch requests.
  6429. ForceSendFields []string `json:"-"`
  6430. // NullFields is a list of field names (e.g. "AddBanding") to include in
  6431. // API requests with the JSON null value. By default, fields with empty
  6432. // values are omitted from API requests. However, any field with an
  6433. // empty value appearing in NullFields will be sent to the server as
  6434. // null. It is an error if a field in this list has a non-empty value.
  6435. // This may be used to include null fields in Patch requests.
  6436. NullFields []string `json:"-"`
  6437. }
  6438. func (s *Request) MarshalJSON() ([]byte, error) {
  6439. type NoMethod Request
  6440. raw := NoMethod(*s)
  6441. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6442. }
  6443. // Response: A single response from an update.
  6444. type Response struct {
  6445. // AddBanding: A reply from adding a banded range.
  6446. AddBanding *AddBandingResponse `json:"addBanding,omitempty"`
  6447. // AddChart: A reply from adding a chart.
  6448. AddChart *AddChartResponse `json:"addChart,omitempty"`
  6449. // AddDimensionGroup: A reply from adding a dimension group.
  6450. AddDimensionGroup *AddDimensionGroupResponse `json:"addDimensionGroup,omitempty"`
  6451. // AddFilterView: A reply from adding a filter view.
  6452. AddFilterView *AddFilterViewResponse `json:"addFilterView,omitempty"`
  6453. // AddNamedRange: A reply from adding a named range.
  6454. AddNamedRange *AddNamedRangeResponse `json:"addNamedRange,omitempty"`
  6455. // AddProtectedRange: A reply from adding a protected range.
  6456. AddProtectedRange *AddProtectedRangeResponse `json:"addProtectedRange,omitempty"`
  6457. // AddSheet: A reply from adding a sheet.
  6458. AddSheet *AddSheetResponse `json:"addSheet,omitempty"`
  6459. // CreateDeveloperMetadata: A reply from creating a developer metadata
  6460. // entry.
  6461. CreateDeveloperMetadata *CreateDeveloperMetadataResponse `json:"createDeveloperMetadata,omitempty"`
  6462. // DeleteConditionalFormatRule: A reply from deleting a conditional
  6463. // format rule.
  6464. DeleteConditionalFormatRule *DeleteConditionalFormatRuleResponse `json:"deleteConditionalFormatRule,omitempty"`
  6465. // DeleteDeveloperMetadata: A reply from deleting a developer metadata
  6466. // entry.
  6467. DeleteDeveloperMetadata *DeleteDeveloperMetadataResponse `json:"deleteDeveloperMetadata,omitempty"`
  6468. // DeleteDimensionGroup: A reply from deleting a dimension group.
  6469. DeleteDimensionGroup *DeleteDimensionGroupResponse `json:"deleteDimensionGroup,omitempty"`
  6470. // DuplicateFilterView: A reply from duplicating a filter view.
  6471. DuplicateFilterView *DuplicateFilterViewResponse `json:"duplicateFilterView,omitempty"`
  6472. // DuplicateSheet: A reply from duplicating a sheet.
  6473. DuplicateSheet *DuplicateSheetResponse `json:"duplicateSheet,omitempty"`
  6474. // FindReplace: A reply from doing a find/replace.
  6475. FindReplace *FindReplaceResponse `json:"findReplace,omitempty"`
  6476. // UpdateConditionalFormatRule: A reply from updating a conditional
  6477. // format rule.
  6478. UpdateConditionalFormatRule *UpdateConditionalFormatRuleResponse `json:"updateConditionalFormatRule,omitempty"`
  6479. // UpdateDeveloperMetadata: A reply from updating a developer metadata
  6480. // entry.
  6481. UpdateDeveloperMetadata *UpdateDeveloperMetadataResponse `json:"updateDeveloperMetadata,omitempty"`
  6482. // UpdateEmbeddedObjectPosition: A reply from updating an embedded
  6483. // object's position.
  6484. UpdateEmbeddedObjectPosition *UpdateEmbeddedObjectPositionResponse `json:"updateEmbeddedObjectPosition,omitempty"`
  6485. // ForceSendFields is a list of field names (e.g. "AddBanding") to
  6486. // unconditionally include in API requests. By default, fields with
  6487. // empty values are omitted from API requests. However, any non-pointer,
  6488. // non-interface field appearing in ForceSendFields will be sent to the
  6489. // server regardless of whether the field is empty or not. This may be
  6490. // used to include empty fields in Patch requests.
  6491. ForceSendFields []string `json:"-"`
  6492. // NullFields is a list of field names (e.g. "AddBanding") to include in
  6493. // API requests with the JSON null value. By default, fields with empty
  6494. // values are omitted from API requests. However, any field with an
  6495. // empty value appearing in NullFields will be sent to the server as
  6496. // null. It is an error if a field in this list has a non-empty value.
  6497. // This may be used to include null fields in Patch requests.
  6498. NullFields []string `json:"-"`
  6499. }
  6500. func (s *Response) MarshalJSON() ([]byte, error) {
  6501. type NoMethod Response
  6502. raw := NoMethod(*s)
  6503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6504. }
  6505. // RowData: Data about each cell in a row.
  6506. type RowData struct {
  6507. // Values: The values in the row, one per column.
  6508. Values []*CellData `json:"values,omitempty"`
  6509. // ForceSendFields is a list of field names (e.g. "Values") to
  6510. // unconditionally include in API requests. By default, fields with
  6511. // empty values are omitted from API requests. However, any non-pointer,
  6512. // non-interface field appearing in ForceSendFields will be sent to the
  6513. // server regardless of whether the field is empty or not. This may be
  6514. // used to include empty fields in Patch requests.
  6515. ForceSendFields []string `json:"-"`
  6516. // NullFields is a list of field names (e.g. "Values") to include in API
  6517. // requests with the JSON null value. By default, fields with empty
  6518. // values are omitted from API requests. However, any field with an
  6519. // empty value appearing in NullFields will be sent to the server as
  6520. // null. It is an error if a field in this list has a non-empty value.
  6521. // This may be used to include null fields in Patch requests.
  6522. NullFields []string `json:"-"`
  6523. }
  6524. func (s *RowData) MarshalJSON() ([]byte, error) {
  6525. type NoMethod RowData
  6526. raw := NoMethod(*s)
  6527. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6528. }
  6529. // SearchDeveloperMetadataRequest: A request to retrieve all developer
  6530. // metadata matching the set of specified
  6531. // criteria.
  6532. type SearchDeveloperMetadataRequest struct {
  6533. // DataFilters: The data filters describing the criteria used to
  6534. // determine which
  6535. // DeveloperMetadata entries to return. DeveloperMetadata matching any
  6536. // of the
  6537. // specified filters will be included in the response.
  6538. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  6539. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  6540. // unconditionally include in API requests. By default, fields with
  6541. // empty values are omitted from API requests. However, any non-pointer,
  6542. // non-interface field appearing in ForceSendFields will be sent to the
  6543. // server regardless of whether the field is empty or not. This may be
  6544. // used to include empty fields in Patch requests.
  6545. ForceSendFields []string `json:"-"`
  6546. // NullFields is a list of field names (e.g. "DataFilters") to include
  6547. // in API requests with the JSON null value. By default, fields with
  6548. // empty values are omitted from API requests. However, any field with
  6549. // an empty value appearing in NullFields will be sent to the server as
  6550. // null. It is an error if a field in this list has a non-empty value.
  6551. // This may be used to include null fields in Patch requests.
  6552. NullFields []string `json:"-"`
  6553. }
  6554. func (s *SearchDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  6555. type NoMethod SearchDeveloperMetadataRequest
  6556. raw := NoMethod(*s)
  6557. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6558. }
  6559. // SearchDeveloperMetadataResponse: A reply to a developer metadata
  6560. // search request.
  6561. type SearchDeveloperMetadataResponse struct {
  6562. // MatchedDeveloperMetadata: The metadata matching the criteria of the
  6563. // search request.
  6564. MatchedDeveloperMetadata []*MatchedDeveloperMetadata `json:"matchedDeveloperMetadata,omitempty"`
  6565. // ServerResponse contains the HTTP response code and headers from the
  6566. // server.
  6567. googleapi.ServerResponse `json:"-"`
  6568. // ForceSendFields is a list of field names (e.g.
  6569. // "MatchedDeveloperMetadata") to unconditionally include in API
  6570. // requests. By default, fields with empty values are omitted from API
  6571. // requests. However, any non-pointer, non-interface field appearing in
  6572. // ForceSendFields will be sent to the server regardless of whether the
  6573. // field is empty or not. This may be used to include empty fields in
  6574. // Patch requests.
  6575. ForceSendFields []string `json:"-"`
  6576. // NullFields is a list of field names (e.g. "MatchedDeveloperMetadata")
  6577. // to include in API requests with the JSON null value. By default,
  6578. // fields with empty values are omitted from API requests. However, any
  6579. // field with an empty value appearing in NullFields will be sent to the
  6580. // server as null. It is an error if a field in this list has a
  6581. // non-empty value. This may be used to include null fields in Patch
  6582. // requests.
  6583. NullFields []string `json:"-"`
  6584. }
  6585. func (s *SearchDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  6586. type NoMethod SearchDeveloperMetadataResponse
  6587. raw := NoMethod(*s)
  6588. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6589. }
  6590. // SetBasicFilterRequest: Sets the basic filter associated with a sheet.
  6591. type SetBasicFilterRequest struct {
  6592. // Filter: The filter to set.
  6593. Filter *BasicFilter `json:"filter,omitempty"`
  6594. // ForceSendFields is a list of field names (e.g. "Filter") to
  6595. // unconditionally include in API requests. By default, fields with
  6596. // empty values are omitted from API requests. However, any non-pointer,
  6597. // non-interface field appearing in ForceSendFields will be sent to the
  6598. // server regardless of whether the field is empty or not. This may be
  6599. // used to include empty fields in Patch requests.
  6600. ForceSendFields []string `json:"-"`
  6601. // NullFields is a list of field names (e.g. "Filter") to include in API
  6602. // requests with the JSON null value. By default, fields with empty
  6603. // values are omitted from API requests. However, any field with an
  6604. // empty value appearing in NullFields will be sent to the server as
  6605. // null. It is an error if a field in this list has a non-empty value.
  6606. // This may be used to include null fields in Patch requests.
  6607. NullFields []string `json:"-"`
  6608. }
  6609. func (s *SetBasicFilterRequest) MarshalJSON() ([]byte, error) {
  6610. type NoMethod SetBasicFilterRequest
  6611. raw := NoMethod(*s)
  6612. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6613. }
  6614. // SetDataValidationRequest: Sets a data validation rule to every cell
  6615. // in the range.
  6616. // To clear validation in a range, call this with no rule specified.
  6617. type SetDataValidationRequest struct {
  6618. // Range: The range the data validation rule should apply to.
  6619. Range *GridRange `json:"range,omitempty"`
  6620. // Rule: The data validation rule to set on each cell in the range,
  6621. // or empty to clear the data validation in the range.
  6622. Rule *DataValidationRule `json:"rule,omitempty"`
  6623. // ForceSendFields is a list of field names (e.g. "Range") to
  6624. // unconditionally include in API requests. By default, fields with
  6625. // empty values are omitted from API requests. However, any non-pointer,
  6626. // non-interface field appearing in ForceSendFields will be sent to the
  6627. // server regardless of whether the field is empty or not. This may be
  6628. // used to include empty fields in Patch requests.
  6629. ForceSendFields []string `json:"-"`
  6630. // NullFields is a list of field names (e.g. "Range") to include in API
  6631. // requests with the JSON null value. By default, fields with empty
  6632. // values are omitted from API requests. However, any field with an
  6633. // empty value appearing in NullFields will be sent to the server as
  6634. // null. It is an error if a field in this list has a non-empty value.
  6635. // This may be used to include null fields in Patch requests.
  6636. NullFields []string `json:"-"`
  6637. }
  6638. func (s *SetDataValidationRequest) MarshalJSON() ([]byte, error) {
  6639. type NoMethod SetDataValidationRequest
  6640. raw := NoMethod(*s)
  6641. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6642. }
  6643. // Sheet: A sheet in a spreadsheet.
  6644. type Sheet struct {
  6645. // BandedRanges: The banded (alternating colors) ranges on this sheet.
  6646. BandedRanges []*BandedRange `json:"bandedRanges,omitempty"`
  6647. // BasicFilter: The filter on this sheet, if any.
  6648. BasicFilter *BasicFilter `json:"basicFilter,omitempty"`
  6649. // Charts: The specifications of every chart on this sheet.
  6650. Charts []*EmbeddedChart `json:"charts,omitempty"`
  6651. // ColumnGroups: All column groups on this sheet, ordered by increasing
  6652. // range start index,
  6653. // then by group depth.
  6654. ColumnGroups []*DimensionGroup `json:"columnGroups,omitempty"`
  6655. // ConditionalFormats: The conditional format rules in this sheet.
  6656. ConditionalFormats []*ConditionalFormatRule `json:"conditionalFormats,omitempty"`
  6657. // Data: Data in the grid, if this is a grid sheet.
  6658. // The number of GridData objects returned is dependent on the number
  6659. // of
  6660. // ranges requested on this sheet. For example, if this is
  6661. // representing
  6662. // `Sheet1`, and the spreadsheet was requested with
  6663. // ranges
  6664. // `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will
  6665. // have a
  6666. // startRow/startColumn of `0`,
  6667. // while the second one will have `startRow 14` (zero-based row 15),
  6668. // and `startColumn 3` (zero-based column D).
  6669. Data []*GridData `json:"data,omitempty"`
  6670. // DeveloperMetadata: The developer metadata associated with a sheet.
  6671. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  6672. // FilterViews: The filter views in this sheet.
  6673. FilterViews []*FilterView `json:"filterViews,omitempty"`
  6674. // Merges: The ranges that are merged together.
  6675. Merges []*GridRange `json:"merges,omitempty"`
  6676. // Properties: The properties of the sheet.
  6677. Properties *SheetProperties `json:"properties,omitempty"`
  6678. // ProtectedRanges: The protected ranges in this sheet.
  6679. ProtectedRanges []*ProtectedRange `json:"protectedRanges,omitempty"`
  6680. // RowGroups: All row groups on this sheet, ordered by increasing range
  6681. // start index, then
  6682. // by group depth.
  6683. RowGroups []*DimensionGroup `json:"rowGroups,omitempty"`
  6684. // ForceSendFields is a list of field names (e.g. "BandedRanges") to
  6685. // unconditionally include in API requests. By default, fields with
  6686. // empty values are omitted from API requests. However, any non-pointer,
  6687. // non-interface field appearing in ForceSendFields will be sent to the
  6688. // server regardless of whether the field is empty or not. This may be
  6689. // used to include empty fields in Patch requests.
  6690. ForceSendFields []string `json:"-"`
  6691. // NullFields is a list of field names (e.g. "BandedRanges") to include
  6692. // in API requests with the JSON null value. By default, fields with
  6693. // empty values are omitted from API requests. However, any field with
  6694. // an empty value appearing in NullFields will be sent to the server as
  6695. // null. It is an error if a field in this list has a non-empty value.
  6696. // This may be used to include null fields in Patch requests.
  6697. NullFields []string `json:"-"`
  6698. }
  6699. func (s *Sheet) MarshalJSON() ([]byte, error) {
  6700. type NoMethod Sheet
  6701. raw := NoMethod(*s)
  6702. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6703. }
  6704. // SheetProperties: Properties of a sheet.
  6705. type SheetProperties struct {
  6706. // GridProperties: Additional properties of the sheet if this sheet is a
  6707. // grid.
  6708. // (If the sheet is an object sheet, containing a chart or image,
  6709. // then
  6710. // this field will be absent.)
  6711. // When writing it is an error to set any grid properties on non-grid
  6712. // sheets.
  6713. GridProperties *GridProperties `json:"gridProperties,omitempty"`
  6714. // Hidden: True if the sheet is hidden in the UI, false if it's visible.
  6715. Hidden bool `json:"hidden,omitempty"`
  6716. // Index: The index of the sheet within the spreadsheet.
  6717. // When adding or updating sheet properties, if this field
  6718. // is excluded then the sheet is added or moved to the end
  6719. // of the sheet list. When updating sheet indices or inserting
  6720. // sheets, movement is considered in "before the move" indexes.
  6721. // For example, if there were 3 sheets (S1, S2, S3) in order to
  6722. // move S1 ahead of S2 the index would have to be set to 2. A
  6723. // sheet
  6724. // index update request is ignored if the requested index is
  6725. // identical to the sheets current index or if the requested new
  6726. // index is equal to the current sheet index + 1.
  6727. Index int64 `json:"index,omitempty"`
  6728. // RightToLeft: True if the sheet is an RTL sheet instead of an LTR
  6729. // sheet.
  6730. RightToLeft bool `json:"rightToLeft,omitempty"`
  6731. // SheetId: The ID of the sheet. Must be non-negative.
  6732. // This field cannot be changed once set.
  6733. SheetId int64 `json:"sheetId,omitempty"`
  6734. // SheetType: The type of sheet. Defaults to GRID.
  6735. // This field cannot be changed once set.
  6736. //
  6737. // Possible values:
  6738. // "SHEET_TYPE_UNSPECIFIED" - Default value, do not use.
  6739. // "GRID" - The sheet is a grid.
  6740. // "OBJECT" - The sheet has no grid and instead has an object like a
  6741. // chart or image.
  6742. SheetType string `json:"sheetType,omitempty"`
  6743. // TabColor: The color of the tab in the UI.
  6744. TabColor *Color `json:"tabColor,omitempty"`
  6745. // Title: The name of the sheet.
  6746. Title string `json:"title,omitempty"`
  6747. // ServerResponse contains the HTTP response code and headers from the
  6748. // server.
  6749. googleapi.ServerResponse `json:"-"`
  6750. // ForceSendFields is a list of field names (e.g. "GridProperties") to
  6751. // unconditionally include in API requests. By default, fields with
  6752. // empty values are omitted from API requests. However, any non-pointer,
  6753. // non-interface field appearing in ForceSendFields will be sent to the
  6754. // server regardless of whether the field is empty or not. This may be
  6755. // used to include empty fields in Patch requests.
  6756. ForceSendFields []string `json:"-"`
  6757. // NullFields is a list of field names (e.g. "GridProperties") to
  6758. // include in API requests with the JSON null value. By default, fields
  6759. // with empty values are omitted from API requests. However, any field
  6760. // with an empty value appearing in NullFields will be sent to the
  6761. // server as null. It is an error if a field in this list has a
  6762. // non-empty value. This may be used to include null fields in Patch
  6763. // requests.
  6764. NullFields []string `json:"-"`
  6765. }
  6766. func (s *SheetProperties) MarshalJSON() ([]byte, error) {
  6767. type NoMethod SheetProperties
  6768. raw := NoMethod(*s)
  6769. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6770. }
  6771. // SortRangeRequest: Sorts data in rows based on a sort order per
  6772. // column.
  6773. type SortRangeRequest struct {
  6774. // Range: The range to sort.
  6775. Range *GridRange `json:"range,omitempty"`
  6776. // SortSpecs: The sort order per column. Later specifications are used
  6777. // when values
  6778. // are equal in the earlier specifications.
  6779. SortSpecs []*SortSpec `json:"sortSpecs,omitempty"`
  6780. // ForceSendFields is a list of field names (e.g. "Range") to
  6781. // unconditionally include in API requests. By default, fields with
  6782. // empty values are omitted from API requests. However, any non-pointer,
  6783. // non-interface field appearing in ForceSendFields will be sent to the
  6784. // server regardless of whether the field is empty or not. This may be
  6785. // used to include empty fields in Patch requests.
  6786. ForceSendFields []string `json:"-"`
  6787. // NullFields is a list of field names (e.g. "Range") to include in API
  6788. // requests with the JSON null value. By default, fields with empty
  6789. // values are omitted from API requests. However, any field with an
  6790. // empty value appearing in NullFields will be sent to the server as
  6791. // null. It is an error if a field in this list has a non-empty value.
  6792. // This may be used to include null fields in Patch requests.
  6793. NullFields []string `json:"-"`
  6794. }
  6795. func (s *SortRangeRequest) MarshalJSON() ([]byte, error) {
  6796. type NoMethod SortRangeRequest
  6797. raw := NoMethod(*s)
  6798. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6799. }
  6800. // SortSpec: A sort order associated with a specific column or row.
  6801. type SortSpec struct {
  6802. // DimensionIndex: The dimension the sort should be applied to.
  6803. DimensionIndex int64 `json:"dimensionIndex,omitempty"`
  6804. // SortOrder: The order data should be sorted.
  6805. //
  6806. // Possible values:
  6807. // "SORT_ORDER_UNSPECIFIED" - Default value, do not use this.
  6808. // "ASCENDING" - Sort ascending.
  6809. // "DESCENDING" - Sort descending.
  6810. SortOrder string `json:"sortOrder,omitempty"`
  6811. // ForceSendFields is a list of field names (e.g. "DimensionIndex") to
  6812. // unconditionally include in API requests. By default, fields with
  6813. // empty values are omitted from API requests. However, any non-pointer,
  6814. // non-interface field appearing in ForceSendFields will be sent to the
  6815. // server regardless of whether the field is empty or not. This may be
  6816. // used to include empty fields in Patch requests.
  6817. ForceSendFields []string `json:"-"`
  6818. // NullFields is a list of field names (e.g. "DimensionIndex") to
  6819. // include in API requests with the JSON null value. By default, fields
  6820. // with empty values are omitted from API requests. However, any field
  6821. // with an empty value appearing in NullFields will be sent to the
  6822. // server as null. It is an error if a field in this list has a
  6823. // non-empty value. This may be used to include null fields in Patch
  6824. // requests.
  6825. NullFields []string `json:"-"`
  6826. }
  6827. func (s *SortSpec) MarshalJSON() ([]byte, error) {
  6828. type NoMethod SortSpec
  6829. raw := NoMethod(*s)
  6830. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6831. }
  6832. // SourceAndDestination: A combination of a source range and how to
  6833. // extend that source.
  6834. type SourceAndDestination struct {
  6835. // Dimension: The dimension that data should be filled into.
  6836. //
  6837. // Possible values:
  6838. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  6839. // "ROWS" - Operates on the rows of a sheet.
  6840. // "COLUMNS" - Operates on the columns of a sheet.
  6841. Dimension string `json:"dimension,omitempty"`
  6842. // FillLength: The number of rows or columns that data should be filled
  6843. // into.
  6844. // Positive numbers expand beyond the last row or last column
  6845. // of the source. Negative numbers expand before the first row
  6846. // or first column of the source.
  6847. FillLength int64 `json:"fillLength,omitempty"`
  6848. // Source: The location of the data to use as the source of the
  6849. // autofill.
  6850. Source *GridRange `json:"source,omitempty"`
  6851. // ForceSendFields is a list of field names (e.g. "Dimension") to
  6852. // unconditionally include in API requests. By default, fields with
  6853. // empty values are omitted from API requests. However, any non-pointer,
  6854. // non-interface field appearing in ForceSendFields will be sent to the
  6855. // server regardless of whether the field is empty or not. This may be
  6856. // used to include empty fields in Patch requests.
  6857. ForceSendFields []string `json:"-"`
  6858. // NullFields is a list of field names (e.g. "Dimension") to include in
  6859. // API requests with the JSON null value. By default, fields with empty
  6860. // values are omitted from API requests. However, any field with an
  6861. // empty value appearing in NullFields will be sent to the server as
  6862. // null. It is an error if a field in this list has a non-empty value.
  6863. // This may be used to include null fields in Patch requests.
  6864. NullFields []string `json:"-"`
  6865. }
  6866. func (s *SourceAndDestination) MarshalJSON() ([]byte, error) {
  6867. type NoMethod SourceAndDestination
  6868. raw := NoMethod(*s)
  6869. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6870. }
  6871. // Spreadsheet: Resource that represents a spreadsheet.
  6872. type Spreadsheet struct {
  6873. // DeveloperMetadata: The developer metadata associated with a
  6874. // spreadsheet.
  6875. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  6876. // NamedRanges: The named ranges defined in a spreadsheet.
  6877. NamedRanges []*NamedRange `json:"namedRanges,omitempty"`
  6878. // Properties: Overall properties of a spreadsheet.
  6879. Properties *SpreadsheetProperties `json:"properties,omitempty"`
  6880. // Sheets: The sheets that are part of a spreadsheet.
  6881. Sheets []*Sheet `json:"sheets,omitempty"`
  6882. // SpreadsheetId: The ID of the spreadsheet.
  6883. // This field is read-only.
  6884. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  6885. // SpreadsheetUrl: The url of the spreadsheet.
  6886. // This field is read-only.
  6887. SpreadsheetUrl string `json:"spreadsheetUrl,omitempty"`
  6888. // ServerResponse contains the HTTP response code and headers from the
  6889. // server.
  6890. googleapi.ServerResponse `json:"-"`
  6891. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  6892. // to unconditionally include in API requests. By default, fields with
  6893. // empty values are omitted from API requests. However, any non-pointer,
  6894. // non-interface field appearing in ForceSendFields will be sent to the
  6895. // server regardless of whether the field is empty or not. This may be
  6896. // used to include empty fields in Patch requests.
  6897. ForceSendFields []string `json:"-"`
  6898. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  6899. // include in API requests with the JSON null value. By default, fields
  6900. // with empty values are omitted from API requests. However, any field
  6901. // with an empty value appearing in NullFields will be sent to the
  6902. // server as null. It is an error if a field in this list has a
  6903. // non-empty value. This may be used to include null fields in Patch
  6904. // requests.
  6905. NullFields []string `json:"-"`
  6906. }
  6907. func (s *Spreadsheet) MarshalJSON() ([]byte, error) {
  6908. type NoMethod Spreadsheet
  6909. raw := NoMethod(*s)
  6910. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6911. }
  6912. // SpreadsheetProperties: Properties of a spreadsheet.
  6913. type SpreadsheetProperties struct {
  6914. // AutoRecalc: The amount of time to wait before volatile functions are
  6915. // recalculated.
  6916. //
  6917. // Possible values:
  6918. // "RECALCULATION_INTERVAL_UNSPECIFIED" - Default value. This value
  6919. // must not be used.
  6920. // "ON_CHANGE" - Volatile functions are updated on every change.
  6921. // "MINUTE" - Volatile functions are updated on every change and every
  6922. // minute.
  6923. // "HOUR" - Volatile functions are updated on every change and hourly.
  6924. AutoRecalc string `json:"autoRecalc,omitempty"`
  6925. // DefaultFormat: The default format of all cells in the
  6926. // spreadsheet.
  6927. // CellData.effectiveFormat will not be set if
  6928. // the cell's format is equal to this default format. This field is
  6929. // read-only.
  6930. DefaultFormat *CellFormat `json:"defaultFormat,omitempty"`
  6931. // IterativeCalculationSettings: Determines whether and how circular
  6932. // references are resolved with iterative
  6933. // calculation. Absence of this field means that circular references
  6934. // will
  6935. // result in calculation errors.
  6936. IterativeCalculationSettings *IterativeCalculationSettings `json:"iterativeCalculationSettings,omitempty"`
  6937. // Locale: The locale of the spreadsheet in one of the following
  6938. // formats:
  6939. //
  6940. // * an ISO 639-1 language code such as `en`
  6941. //
  6942. // * an ISO 639-2 language code such as `fil`, if no 639-1 code
  6943. // exists
  6944. //
  6945. // * a combination of the ISO language code and country code, such as
  6946. // `en_US`
  6947. //
  6948. // Note: when updating this field, not all locales/languages are
  6949. // supported.
  6950. Locale string `json:"locale,omitempty"`
  6951. // TimeZone: The time zone of the spreadsheet, in CLDR format such
  6952. // as
  6953. // `America/New_York`. If the time zone isn't recognized, this may
  6954. // be a custom time zone such as `GMT-07:00`.
  6955. TimeZone string `json:"timeZone,omitempty"`
  6956. // Title: The title of the spreadsheet.
  6957. Title string `json:"title,omitempty"`
  6958. // ForceSendFields is a list of field names (e.g. "AutoRecalc") to
  6959. // unconditionally include in API requests. By default, fields with
  6960. // empty values are omitted from API requests. However, any non-pointer,
  6961. // non-interface field appearing in ForceSendFields will be sent to the
  6962. // server regardless of whether the field is empty or not. This may be
  6963. // used to include empty fields in Patch requests.
  6964. ForceSendFields []string `json:"-"`
  6965. // NullFields is a list of field names (e.g. "AutoRecalc") to include in
  6966. // API requests with the JSON null value. By default, fields with empty
  6967. // values are omitted from API requests. However, any field with an
  6968. // empty value appearing in NullFields will be sent to the server as
  6969. // null. It is an error if a field in this list has a non-empty value.
  6970. // This may be used to include null fields in Patch requests.
  6971. NullFields []string `json:"-"`
  6972. }
  6973. func (s *SpreadsheetProperties) MarshalJSON() ([]byte, error) {
  6974. type NoMethod SpreadsheetProperties
  6975. raw := NoMethod(*s)
  6976. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6977. }
  6978. // TextFormat: The format of a run of text in a cell.
  6979. // Absent values indicate that the field isn't specified.
  6980. type TextFormat struct {
  6981. // Bold: True if the text is bold.
  6982. Bold bool `json:"bold,omitempty"`
  6983. // FontFamily: The font family.
  6984. FontFamily string `json:"fontFamily,omitempty"`
  6985. // FontSize: The size of the font.
  6986. FontSize int64 `json:"fontSize,omitempty"`
  6987. // ForegroundColor: The foreground color of the text.
  6988. ForegroundColor *Color `json:"foregroundColor,omitempty"`
  6989. // Italic: True if the text is italicized.
  6990. Italic bool `json:"italic,omitempty"`
  6991. // Strikethrough: True if the text has a strikethrough.
  6992. Strikethrough bool `json:"strikethrough,omitempty"`
  6993. // Underline: True if the text is underlined.
  6994. Underline bool `json:"underline,omitempty"`
  6995. // ForceSendFields is a list of field names (e.g. "Bold") to
  6996. // unconditionally include in API requests. By default, fields with
  6997. // empty values are omitted from API requests. However, any non-pointer,
  6998. // non-interface field appearing in ForceSendFields will be sent to the
  6999. // server regardless of whether the field is empty or not. This may be
  7000. // used to include empty fields in Patch requests.
  7001. ForceSendFields []string `json:"-"`
  7002. // NullFields is a list of field names (e.g. "Bold") to include in API
  7003. // requests with the JSON null value. By default, fields with empty
  7004. // values are omitted from API requests. However, any field with an
  7005. // empty value appearing in NullFields will be sent to the server as
  7006. // null. It is an error if a field in this list has a non-empty value.
  7007. // This may be used to include null fields in Patch requests.
  7008. NullFields []string `json:"-"`
  7009. }
  7010. func (s *TextFormat) MarshalJSON() ([]byte, error) {
  7011. type NoMethod TextFormat
  7012. raw := NoMethod(*s)
  7013. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7014. }
  7015. // TextFormatRun: A run of a text format. The format of this run
  7016. // continues until the start
  7017. // index of the next run.
  7018. // When updating, all fields must be set.
  7019. type TextFormatRun struct {
  7020. // Format: The format of this run. Absent values inherit the cell's
  7021. // format.
  7022. Format *TextFormat `json:"format,omitempty"`
  7023. // StartIndex: The character index where this run starts.
  7024. StartIndex int64 `json:"startIndex,omitempty"`
  7025. // ForceSendFields is a list of field names (e.g. "Format") to
  7026. // unconditionally include in API requests. By default, fields with
  7027. // empty values are omitted from API requests. However, any non-pointer,
  7028. // non-interface field appearing in ForceSendFields will be sent to the
  7029. // server regardless of whether the field is empty or not. This may be
  7030. // used to include empty fields in Patch requests.
  7031. ForceSendFields []string `json:"-"`
  7032. // NullFields is a list of field names (e.g. "Format") to include in API
  7033. // requests with the JSON null value. By default, fields with empty
  7034. // values are omitted from API requests. However, any field with an
  7035. // empty value appearing in NullFields will be sent to the server as
  7036. // null. It is an error if a field in this list has a non-empty value.
  7037. // This may be used to include null fields in Patch requests.
  7038. NullFields []string `json:"-"`
  7039. }
  7040. func (s *TextFormatRun) MarshalJSON() ([]byte, error) {
  7041. type NoMethod TextFormatRun
  7042. raw := NoMethod(*s)
  7043. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7044. }
  7045. // TextPosition: Position settings for text.
  7046. type TextPosition struct {
  7047. // HorizontalAlignment: Horizontal alignment setting for the piece of
  7048. // text.
  7049. //
  7050. // Possible values:
  7051. // "HORIZONTAL_ALIGN_UNSPECIFIED" - The horizontal alignment is not
  7052. // specified. Do not use this.
  7053. // "LEFT" - The text is explicitly aligned to the left of the cell.
  7054. // "CENTER" - The text is explicitly aligned to the center of the
  7055. // cell.
  7056. // "RIGHT" - The text is explicitly aligned to the right of the cell.
  7057. HorizontalAlignment string `json:"horizontalAlignment,omitempty"`
  7058. // ForceSendFields is a list of field names (e.g. "HorizontalAlignment")
  7059. // to unconditionally include in API requests. By default, fields with
  7060. // empty values are omitted from API requests. However, any non-pointer,
  7061. // non-interface field appearing in ForceSendFields will be sent to the
  7062. // server regardless of whether the field is empty or not. This may be
  7063. // used to include empty fields in Patch requests.
  7064. ForceSendFields []string `json:"-"`
  7065. // NullFields is a list of field names (e.g. "HorizontalAlignment") to
  7066. // include in API requests with the JSON null value. By default, fields
  7067. // with empty values are omitted from API requests. However, any field
  7068. // with an empty value appearing in NullFields will be sent to the
  7069. // server as null. It is an error if a field in this list has a
  7070. // non-empty value. This may be used to include null fields in Patch
  7071. // requests.
  7072. NullFields []string `json:"-"`
  7073. }
  7074. func (s *TextPosition) MarshalJSON() ([]byte, error) {
  7075. type NoMethod TextPosition
  7076. raw := NoMethod(*s)
  7077. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7078. }
  7079. // TextRotation: The rotation applied to text in a cell.
  7080. type TextRotation struct {
  7081. // Angle: The angle between the standard orientation and the desired
  7082. // orientation.
  7083. // Measured in degrees. Valid values are between -90 and 90.
  7084. // Positive
  7085. // angles are angled upwards, negative are angled downwards.
  7086. //
  7087. // Note: For LTR text direction positive angles are in the
  7088. // counterclockwise
  7089. // direction, whereas for RTL they are in the clockwise direction
  7090. Angle int64 `json:"angle,omitempty"`
  7091. // Vertical: If true, text reads top to bottom, but the orientation of
  7092. // individual
  7093. // characters is unchanged.
  7094. // For example:
  7095. //
  7096. // | V |
  7097. // | e |
  7098. // | r |
  7099. // | t |
  7100. // | i |
  7101. // | c |
  7102. // | a |
  7103. // | l |
  7104. Vertical bool `json:"vertical,omitempty"`
  7105. // ForceSendFields is a list of field names (e.g. "Angle") to
  7106. // unconditionally include in API requests. By default, fields with
  7107. // empty values are omitted from API requests. However, any non-pointer,
  7108. // non-interface field appearing in ForceSendFields will be sent to the
  7109. // server regardless of whether the field is empty or not. This may be
  7110. // used to include empty fields in Patch requests.
  7111. ForceSendFields []string `json:"-"`
  7112. // NullFields is a list of field names (e.g. "Angle") to include in API
  7113. // requests with the JSON null value. By default, fields with empty
  7114. // values are omitted from API requests. However, any field with an
  7115. // empty value appearing in NullFields will be sent to the server as
  7116. // null. It is an error if a field in this list has a non-empty value.
  7117. // This may be used to include null fields in Patch requests.
  7118. NullFields []string `json:"-"`
  7119. }
  7120. func (s *TextRotation) MarshalJSON() ([]byte, error) {
  7121. type NoMethod TextRotation
  7122. raw := NoMethod(*s)
  7123. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7124. }
  7125. // TextToColumnsRequest: Splits a column of text into multiple
  7126. // columns,
  7127. // based on a delimiter in each cell.
  7128. type TextToColumnsRequest struct {
  7129. // Delimiter: The delimiter to use. Used only if delimiterType
  7130. // is
  7131. // CUSTOM.
  7132. Delimiter string `json:"delimiter,omitempty"`
  7133. // DelimiterType: The delimiter type to use.
  7134. //
  7135. // Possible values:
  7136. // "DELIMITER_TYPE_UNSPECIFIED" - Default value. This value must not
  7137. // be used.
  7138. // "COMMA" - ","
  7139. // "SEMICOLON" - ";"
  7140. // "PERIOD" - "."
  7141. // "SPACE" - " "
  7142. // "CUSTOM" - A custom value as defined in delimiter.
  7143. // "AUTODETECT" - Automatically detect columns.
  7144. DelimiterType string `json:"delimiterType,omitempty"`
  7145. // Source: The source data range. This must span exactly one column.
  7146. Source *GridRange `json:"source,omitempty"`
  7147. // ForceSendFields is a list of field names (e.g. "Delimiter") to
  7148. // unconditionally include in API requests. By default, fields with
  7149. // empty values are omitted from API requests. However, any non-pointer,
  7150. // non-interface field appearing in ForceSendFields will be sent to the
  7151. // server regardless of whether the field is empty or not. This may be
  7152. // used to include empty fields in Patch requests.
  7153. ForceSendFields []string `json:"-"`
  7154. // NullFields is a list of field names (e.g. "Delimiter") to include in
  7155. // API requests with the JSON null value. By default, fields with empty
  7156. // values are omitted from API requests. However, any field with an
  7157. // empty value appearing in NullFields will be sent to the server as
  7158. // null. It is an error if a field in this list has a non-empty value.
  7159. // This may be used to include null fields in Patch requests.
  7160. NullFields []string `json:"-"`
  7161. }
  7162. func (s *TextToColumnsRequest) MarshalJSON() ([]byte, error) {
  7163. type NoMethod TextToColumnsRequest
  7164. raw := NoMethod(*s)
  7165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7166. }
  7167. // TreemapChartColorScale: A color scale for a treemap chart.
  7168. type TreemapChartColorScale struct {
  7169. // MaxValueColor: The background color for cells with a color value
  7170. // greater than or equal
  7171. // to maxValue. Defaults to #109618 if not
  7172. // specified.
  7173. MaxValueColor *Color `json:"maxValueColor,omitempty"`
  7174. // MidValueColor: The background color for cells with a color value at
  7175. // the midpoint between
  7176. // minValue and
  7177. // maxValue. Defaults to #efe6dc if not
  7178. // specified.
  7179. MidValueColor *Color `json:"midValueColor,omitempty"`
  7180. // MinValueColor: The background color for cells with a color value less
  7181. // than or equal to
  7182. // minValue. Defaults to #dc3912 if not
  7183. // specified.
  7184. MinValueColor *Color `json:"minValueColor,omitempty"`
  7185. // NoDataColor: The background color for cells that have no color data
  7186. // associated with
  7187. // them. Defaults to #000000 if not specified.
  7188. NoDataColor *Color `json:"noDataColor,omitempty"`
  7189. // ForceSendFields is a list of field names (e.g. "MaxValueColor") to
  7190. // unconditionally include in API requests. By default, fields with
  7191. // empty values are omitted from API requests. However, any non-pointer,
  7192. // non-interface field appearing in ForceSendFields will be sent to the
  7193. // server regardless of whether the field is empty or not. This may be
  7194. // used to include empty fields in Patch requests.
  7195. ForceSendFields []string `json:"-"`
  7196. // NullFields is a list of field names (e.g. "MaxValueColor") to include
  7197. // in API requests with the JSON null value. By default, fields with
  7198. // empty values are omitted from API requests. However, any field with
  7199. // an empty value appearing in NullFields will be sent to the server as
  7200. // null. It is an error if a field in this list has a non-empty value.
  7201. // This may be used to include null fields in Patch requests.
  7202. NullFields []string `json:"-"`
  7203. }
  7204. func (s *TreemapChartColorScale) MarshalJSON() ([]byte, error) {
  7205. type NoMethod TreemapChartColorScale
  7206. raw := NoMethod(*s)
  7207. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7208. }
  7209. // TreemapChartSpec: A <a
  7210. // href="/chart/interactive/docs/gallery/treemap">Treemap chart</a>.
  7211. type TreemapChartSpec struct {
  7212. // ColorData: The data that determines the background color of each
  7213. // treemap data cell.
  7214. // This field is optional. If not specified, size_data is used
  7215. // to
  7216. // determine background colors. If specified, the data is expected to
  7217. // be
  7218. // numeric. color_scale will determine how the values in this data map
  7219. // to
  7220. // data cell background colors.
  7221. ColorData *ChartData `json:"colorData,omitempty"`
  7222. // ColorScale: The color scale for data cells in the treemap chart. Data
  7223. // cells are
  7224. // assigned colors based on their color values. These color values come
  7225. // from
  7226. // color_data, or from size_data if color_data is not specified.
  7227. // Cells with color values less than or equal to min_value will
  7228. // have minValueColor as their
  7229. // background color. Cells with color values greater than or equal
  7230. // to
  7231. // max_value will have
  7232. // maxValueColor as their background
  7233. // color. Cells with color values between min_value and max_value
  7234. // will
  7235. // have background colors on a gradient between
  7236. // minValueColor and
  7237. // maxValueColor, the midpoint of
  7238. // the gradient being midValueColor.
  7239. // Cells with missing or non-numeric color values will have
  7240. // noDataColor as their background
  7241. // color.
  7242. ColorScale *TreemapChartColorScale `json:"colorScale,omitempty"`
  7243. // HeaderColor: The background color for header cells.
  7244. HeaderColor *Color `json:"headerColor,omitempty"`
  7245. // HideTooltips: True to hide tooltips.
  7246. HideTooltips bool `json:"hideTooltips,omitempty"`
  7247. // HintedLevels: The number of additional data levels beyond the labeled
  7248. // levels to be shown
  7249. // on the treemap chart. These levels are not interactive and are
  7250. // shown
  7251. // without their labels. Defaults to 0 if not specified.
  7252. HintedLevels int64 `json:"hintedLevels,omitempty"`
  7253. // Labels: The data that contains the treemap cell labels.
  7254. Labels *ChartData `json:"labels,omitempty"`
  7255. // Levels: The number of data levels to show on the treemap chart. These
  7256. // levels are
  7257. // interactive and are shown with their labels. Defaults to 2 if
  7258. // not
  7259. // specified.
  7260. Levels int64 `json:"levels,omitempty"`
  7261. // MaxValue: The maximum possible data value. Cells with values greater
  7262. // than this will
  7263. // have the same color as cells with this value. If not specified,
  7264. // defaults
  7265. // to the actual maximum value from color_data, or the maximum value
  7266. // from
  7267. // size_data if color_data is not specified.
  7268. MaxValue float64 `json:"maxValue,omitempty"`
  7269. // MinValue: The minimum possible data value. Cells with values less
  7270. // than this will
  7271. // have the same color as cells with this value. If not specified,
  7272. // defaults
  7273. // to the actual minimum value from color_data, or the minimum value
  7274. // from
  7275. // size_data if color_data is not specified.
  7276. MinValue float64 `json:"minValue,omitempty"`
  7277. // ParentLabels: The data the contains the treemap cells' parent labels.
  7278. ParentLabels *ChartData `json:"parentLabels,omitempty"`
  7279. // SizeData: The data that determines the size of each treemap data
  7280. // cell. This data is
  7281. // expected to be numeric. The cells corresponding to non-numeric or
  7282. // missing
  7283. // data will not be rendered. If color_data is not specified, this
  7284. // data
  7285. // is used to determine data cell background colors as well.
  7286. SizeData *ChartData `json:"sizeData,omitempty"`
  7287. // TextFormat: The text format for all labels on the chart.
  7288. TextFormat *TextFormat `json:"textFormat,omitempty"`
  7289. // ForceSendFields is a list of field names (e.g. "ColorData") to
  7290. // unconditionally include in API requests. By default, fields with
  7291. // empty values are omitted from API requests. However, any non-pointer,
  7292. // non-interface field appearing in ForceSendFields will be sent to the
  7293. // server regardless of whether the field is empty or not. This may be
  7294. // used to include empty fields in Patch requests.
  7295. ForceSendFields []string `json:"-"`
  7296. // NullFields is a list of field names (e.g. "ColorData") to include in
  7297. // API requests with the JSON null value. By default, fields with empty
  7298. // values are omitted from API requests. However, any field with an
  7299. // empty value appearing in NullFields will be sent to the server as
  7300. // null. It is an error if a field in this list has a non-empty value.
  7301. // This may be used to include null fields in Patch requests.
  7302. NullFields []string `json:"-"`
  7303. }
  7304. func (s *TreemapChartSpec) MarshalJSON() ([]byte, error) {
  7305. type NoMethod TreemapChartSpec
  7306. raw := NoMethod(*s)
  7307. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7308. }
  7309. func (s *TreemapChartSpec) UnmarshalJSON(data []byte) error {
  7310. type NoMethod TreemapChartSpec
  7311. var s1 struct {
  7312. MaxValue gensupport.JSONFloat64 `json:"maxValue"`
  7313. MinValue gensupport.JSONFloat64 `json:"minValue"`
  7314. *NoMethod
  7315. }
  7316. s1.NoMethod = (*NoMethod)(s)
  7317. if err := json.Unmarshal(data, &s1); err != nil {
  7318. return err
  7319. }
  7320. s.MaxValue = float64(s1.MaxValue)
  7321. s.MinValue = float64(s1.MinValue)
  7322. return nil
  7323. }
  7324. // UnmergeCellsRequest: Unmerges cells in the given range.
  7325. type UnmergeCellsRequest struct {
  7326. // Range: The range within which all cells should be unmerged.
  7327. // If the range spans multiple merges, all will be unmerged.
  7328. // The range must not partially span any merge.
  7329. Range *GridRange `json:"range,omitempty"`
  7330. // ForceSendFields is a list of field names (e.g. "Range") to
  7331. // unconditionally include in API requests. By default, fields with
  7332. // empty values are omitted from API requests. However, any non-pointer,
  7333. // non-interface field appearing in ForceSendFields will be sent to the
  7334. // server regardless of whether the field is empty or not. This may be
  7335. // used to include empty fields in Patch requests.
  7336. ForceSendFields []string `json:"-"`
  7337. // NullFields is a list of field names (e.g. "Range") to include in API
  7338. // requests with the JSON null value. By default, fields with empty
  7339. // values are omitted from API requests. However, any field with an
  7340. // empty value appearing in NullFields will be sent to the server as
  7341. // null. It is an error if a field in this list has a non-empty value.
  7342. // This may be used to include null fields in Patch requests.
  7343. NullFields []string `json:"-"`
  7344. }
  7345. func (s *UnmergeCellsRequest) MarshalJSON() ([]byte, error) {
  7346. type NoMethod UnmergeCellsRequest
  7347. raw := NoMethod(*s)
  7348. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7349. }
  7350. // UpdateBandingRequest: Updates properties of the supplied banded
  7351. // range.
  7352. type UpdateBandingRequest struct {
  7353. // BandedRange: The banded range to update with the new properties.
  7354. BandedRange *BandedRange `json:"bandedRange,omitempty"`
  7355. // Fields: The fields that should be updated. At least one field must
  7356. // be specified.
  7357. // The root `bandedRange` is implied and should not be specified.
  7358. // A single "*" can be used as short-hand for listing every field.
  7359. Fields string `json:"fields,omitempty"`
  7360. // ForceSendFields is a list of field names (e.g. "BandedRange") 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. "BandedRange") to include
  7368. // in API requests with the JSON null value. By default, fields with
  7369. // empty values are omitted from API requests. However, any field with
  7370. // an 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 *UpdateBandingRequest) MarshalJSON() ([]byte, error) {
  7376. type NoMethod UpdateBandingRequest
  7377. raw := NoMethod(*s)
  7378. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7379. }
  7380. // UpdateBordersRequest: Updates the borders of a range.
  7381. // If a field is not set in the request, that means the border remains
  7382. // as-is.
  7383. // For example, with two subsequent UpdateBordersRequest:
  7384. //
  7385. // 1. range: A1:A5 `{ top: RED, bottom: WHITE }`
  7386. // 2. range: A1:A5 `{ left: BLUE }`
  7387. //
  7388. // That would result in A1:A5 having a borders of
  7389. // `{ top: RED, bottom: WHITE, left: BLUE }`.
  7390. // If you want to clear a border, explicitly set the style to
  7391. // NONE.
  7392. type UpdateBordersRequest struct {
  7393. // Bottom: The border to put at the bottom of the range.
  7394. Bottom *Border `json:"bottom,omitempty"`
  7395. // InnerHorizontal: The horizontal border to put within the range.
  7396. InnerHorizontal *Border `json:"innerHorizontal,omitempty"`
  7397. // InnerVertical: The vertical border to put within the range.
  7398. InnerVertical *Border `json:"innerVertical,omitempty"`
  7399. // Left: The border to put at the left of the range.
  7400. Left *Border `json:"left,omitempty"`
  7401. // Range: The range whose borders should be updated.
  7402. Range *GridRange `json:"range,omitempty"`
  7403. // Right: The border to put at the right of the range.
  7404. Right *Border `json:"right,omitempty"`
  7405. // Top: The border to put at the top of the range.
  7406. Top *Border `json:"top,omitempty"`
  7407. // ForceSendFields is a list of field names (e.g. "Bottom") to
  7408. // unconditionally include in API requests. By default, fields with
  7409. // empty values are omitted from API requests. However, any non-pointer,
  7410. // non-interface field appearing in ForceSendFields will be sent to the
  7411. // server regardless of whether the field is empty or not. This may be
  7412. // used to include empty fields in Patch requests.
  7413. ForceSendFields []string `json:"-"`
  7414. // NullFields is a list of field names (e.g. "Bottom") to include in API
  7415. // requests with the JSON null value. By default, fields with empty
  7416. // values are omitted from API requests. However, any field with an
  7417. // empty value appearing in NullFields will be sent to the server as
  7418. // null. It is an error if a field in this list has a non-empty value.
  7419. // This may be used to include null fields in Patch requests.
  7420. NullFields []string `json:"-"`
  7421. }
  7422. func (s *UpdateBordersRequest) MarshalJSON() ([]byte, error) {
  7423. type NoMethod UpdateBordersRequest
  7424. raw := NoMethod(*s)
  7425. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7426. }
  7427. // UpdateCellsRequest: Updates all cells in a range with new data.
  7428. type UpdateCellsRequest struct {
  7429. // Fields: The fields of CellData that should be updated.
  7430. // At least one field must be specified.
  7431. // The root is the CellData; 'row.values.' should not be specified.
  7432. // A single "*" can be used as short-hand for listing every field.
  7433. Fields string `json:"fields,omitempty"`
  7434. // Range: The range to write data to.
  7435. //
  7436. // If the data in rows does not cover the entire requested range,
  7437. // the fields matching those set in fields will be cleared.
  7438. Range *GridRange `json:"range,omitempty"`
  7439. // Rows: The data to write.
  7440. Rows []*RowData `json:"rows,omitempty"`
  7441. // Start: The coordinate to start writing data at.
  7442. // Any number of rows and columns (including a different number
  7443. // of
  7444. // columns per row) may be written.
  7445. Start *GridCoordinate `json:"start,omitempty"`
  7446. // ForceSendFields is a list of field names (e.g. "Fields") to
  7447. // unconditionally include in API requests. By default, fields with
  7448. // empty values are omitted from API requests. However, any non-pointer,
  7449. // non-interface field appearing in ForceSendFields will be sent to the
  7450. // server regardless of whether the field is empty or not. This may be
  7451. // used to include empty fields in Patch requests.
  7452. ForceSendFields []string `json:"-"`
  7453. // NullFields is a list of field names (e.g. "Fields") to include in API
  7454. // requests with the JSON null value. By default, fields with empty
  7455. // values are omitted from API requests. However, any field with an
  7456. // empty value appearing in NullFields will be sent to the server as
  7457. // null. It is an error if a field in this list has a non-empty value.
  7458. // This may be used to include null fields in Patch requests.
  7459. NullFields []string `json:"-"`
  7460. }
  7461. func (s *UpdateCellsRequest) MarshalJSON() ([]byte, error) {
  7462. type NoMethod UpdateCellsRequest
  7463. raw := NoMethod(*s)
  7464. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7465. }
  7466. // UpdateChartSpecRequest: Updates a chart's specifications.
  7467. // (This does not move or resize a chart. To move or resize a chart,
  7468. // use
  7469. // UpdateEmbeddedObjectPositionRequest.)
  7470. type UpdateChartSpecRequest struct {
  7471. // ChartId: The ID of the chart to update.
  7472. ChartId int64 `json:"chartId,omitempty"`
  7473. // Spec: The specification to apply to the chart.
  7474. Spec *ChartSpec `json:"spec,omitempty"`
  7475. // ForceSendFields is a list of field names (e.g. "ChartId") to
  7476. // unconditionally include in API requests. By default, fields with
  7477. // empty values are omitted from API requests. However, any non-pointer,
  7478. // non-interface field appearing in ForceSendFields will be sent to the
  7479. // server regardless of whether the field is empty or not. This may be
  7480. // used to include empty fields in Patch requests.
  7481. ForceSendFields []string `json:"-"`
  7482. // NullFields is a list of field names (e.g. "ChartId") to include in
  7483. // API requests with the JSON null value. By default, fields with empty
  7484. // values are omitted from API requests. However, any field with an
  7485. // empty value appearing in NullFields will be sent to the server as
  7486. // null. It is an error if a field in this list has a non-empty value.
  7487. // This may be used to include null fields in Patch requests.
  7488. NullFields []string `json:"-"`
  7489. }
  7490. func (s *UpdateChartSpecRequest) MarshalJSON() ([]byte, error) {
  7491. type NoMethod UpdateChartSpecRequest
  7492. raw := NoMethod(*s)
  7493. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7494. }
  7495. // UpdateConditionalFormatRuleRequest: Updates a conditional format rule
  7496. // at the given index,
  7497. // or moves a conditional format rule to another index.
  7498. type UpdateConditionalFormatRuleRequest struct {
  7499. // Index: The zero-based index of the rule that should be replaced or
  7500. // moved.
  7501. Index int64 `json:"index,omitempty"`
  7502. // NewIndex: The zero-based new index the rule should end up at.
  7503. NewIndex int64 `json:"newIndex,omitempty"`
  7504. // Rule: The rule that should replace the rule at the given index.
  7505. Rule *ConditionalFormatRule `json:"rule,omitempty"`
  7506. // SheetId: The sheet of the rule to move. Required if new_index is
  7507. // set,
  7508. // unused otherwise.
  7509. SheetId int64 `json:"sheetId,omitempty"`
  7510. // ForceSendFields is a list of field names (e.g. "Index") to
  7511. // unconditionally include in API requests. By default, fields with
  7512. // empty values are omitted from API requests. However, any non-pointer,
  7513. // non-interface field appearing in ForceSendFields will be sent to the
  7514. // server regardless of whether the field is empty or not. This may be
  7515. // used to include empty fields in Patch requests.
  7516. ForceSendFields []string `json:"-"`
  7517. // NullFields is a list of field names (e.g. "Index") to include in API
  7518. // requests with the JSON null value. By default, fields with empty
  7519. // values are omitted from API requests. However, any field with an
  7520. // empty value appearing in NullFields will be sent to the server as
  7521. // null. It is an error if a field in this list has a non-empty value.
  7522. // This may be used to include null fields in Patch requests.
  7523. NullFields []string `json:"-"`
  7524. }
  7525. func (s *UpdateConditionalFormatRuleRequest) MarshalJSON() ([]byte, error) {
  7526. type NoMethod UpdateConditionalFormatRuleRequest
  7527. raw := NoMethod(*s)
  7528. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7529. }
  7530. // UpdateConditionalFormatRuleResponse: The result of updating a
  7531. // conditional format rule.
  7532. type UpdateConditionalFormatRuleResponse struct {
  7533. // NewIndex: The index of the new rule.
  7534. NewIndex int64 `json:"newIndex,omitempty"`
  7535. // NewRule: The new rule that replaced the old rule (if replacing),
  7536. // or the rule that was moved (if moved)
  7537. NewRule *ConditionalFormatRule `json:"newRule,omitempty"`
  7538. // OldIndex: The old index of the rule. Not set if a rule was
  7539. // replaced
  7540. // (because it is the same as new_index).
  7541. OldIndex int64 `json:"oldIndex,omitempty"`
  7542. // OldRule: The old (deleted) rule. Not set if a rule was moved
  7543. // (because it is the same as new_rule).
  7544. OldRule *ConditionalFormatRule `json:"oldRule,omitempty"`
  7545. // ForceSendFields is a list of field names (e.g. "NewIndex") to
  7546. // unconditionally include in API requests. By default, fields with
  7547. // empty values are omitted from API requests. However, any non-pointer,
  7548. // non-interface field appearing in ForceSendFields will be sent to the
  7549. // server regardless of whether the field is empty or not. This may be
  7550. // used to include empty fields in Patch requests.
  7551. ForceSendFields []string `json:"-"`
  7552. // NullFields is a list of field names (e.g. "NewIndex") to include in
  7553. // API requests with the JSON null value. By default, fields with empty
  7554. // values are omitted from API requests. However, any field with an
  7555. // empty value appearing in NullFields will be sent to the server as
  7556. // null. It is an error if a field in this list has a non-empty value.
  7557. // This may be used to include null fields in Patch requests.
  7558. NullFields []string `json:"-"`
  7559. }
  7560. func (s *UpdateConditionalFormatRuleResponse) MarshalJSON() ([]byte, error) {
  7561. type NoMethod UpdateConditionalFormatRuleResponse
  7562. raw := NoMethod(*s)
  7563. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7564. }
  7565. // UpdateDeveloperMetadataRequest: A request to update properties of
  7566. // developer metadata.
  7567. // Updates the properties of the developer metadata selected by the
  7568. // filters to
  7569. // the values provided in the DeveloperMetadata resource. Callers
  7570. // must
  7571. // specify the properties they wish to update in the fields parameter,
  7572. // as well
  7573. // as specify at least one DataFilter matching the metadata they wish
  7574. // to
  7575. // update.
  7576. type UpdateDeveloperMetadataRequest struct {
  7577. // DataFilters: The filters matching the developer metadata entries to
  7578. // update.
  7579. DataFilters []*DataFilter `json:"dataFilters,omitempty"`
  7580. // DeveloperMetadata: The value that all metadata matched by the data
  7581. // filters will be updated to.
  7582. DeveloperMetadata *DeveloperMetadata `json:"developerMetadata,omitempty"`
  7583. // Fields: The fields that should be updated. At least one field must
  7584. // be specified.
  7585. // The root `developerMetadata` is implied and should not be
  7586. // specified.
  7587. // A single "*" can be used as short-hand for listing every field.
  7588. Fields string `json:"fields,omitempty"`
  7589. // ForceSendFields is a list of field names (e.g. "DataFilters") to
  7590. // unconditionally include in API requests. By default, fields with
  7591. // empty values are omitted from API requests. However, any non-pointer,
  7592. // non-interface field appearing in ForceSendFields will be sent to the
  7593. // server regardless of whether the field is empty or not. This may be
  7594. // used to include empty fields in Patch requests.
  7595. ForceSendFields []string `json:"-"`
  7596. // NullFields is a list of field names (e.g. "DataFilters") to include
  7597. // in API requests with the JSON null value. By default, fields with
  7598. // empty values are omitted from API requests. However, any field with
  7599. // an empty value appearing in NullFields will be sent to the server as
  7600. // null. It is an error if a field in this list has a non-empty value.
  7601. // This may be used to include null fields in Patch requests.
  7602. NullFields []string `json:"-"`
  7603. }
  7604. func (s *UpdateDeveloperMetadataRequest) MarshalJSON() ([]byte, error) {
  7605. type NoMethod UpdateDeveloperMetadataRequest
  7606. raw := NoMethod(*s)
  7607. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7608. }
  7609. // UpdateDeveloperMetadataResponse: The response from updating developer
  7610. // metadata.
  7611. type UpdateDeveloperMetadataResponse struct {
  7612. // DeveloperMetadata: The updated developer metadata.
  7613. DeveloperMetadata []*DeveloperMetadata `json:"developerMetadata,omitempty"`
  7614. // ForceSendFields is a list of field names (e.g. "DeveloperMetadata")
  7615. // to unconditionally include in API requests. By default, fields with
  7616. // empty values are omitted from API requests. However, any non-pointer,
  7617. // non-interface field appearing in ForceSendFields will be sent to the
  7618. // server regardless of whether the field is empty or not. This may be
  7619. // used to include empty fields in Patch requests.
  7620. ForceSendFields []string `json:"-"`
  7621. // NullFields is a list of field names (e.g. "DeveloperMetadata") to
  7622. // include in API requests with the JSON null value. By default, fields
  7623. // with empty values are omitted from API requests. However, any field
  7624. // with an empty value appearing in NullFields will be sent to the
  7625. // server as null. It is an error if a field in this list has a
  7626. // non-empty value. This may be used to include null fields in Patch
  7627. // requests.
  7628. NullFields []string `json:"-"`
  7629. }
  7630. func (s *UpdateDeveloperMetadataResponse) MarshalJSON() ([]byte, error) {
  7631. type NoMethod UpdateDeveloperMetadataResponse
  7632. raw := NoMethod(*s)
  7633. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7634. }
  7635. // UpdateDimensionGroupRequest: Updates the state of the specified
  7636. // group.
  7637. type UpdateDimensionGroupRequest struct {
  7638. // DimensionGroup: The group whose state should be updated. The range
  7639. // and depth of the group
  7640. // should specify a valid group on the sheet, and all other fields
  7641. // updated.
  7642. DimensionGroup *DimensionGroup `json:"dimensionGroup,omitempty"`
  7643. // Fields: The fields that should be updated. At least one field must
  7644. // be specified.
  7645. // The root `dimensionGroup` is implied and should not be specified.
  7646. // A single "*" can be used as short-hand for listing every field.
  7647. Fields string `json:"fields,omitempty"`
  7648. // ForceSendFields is a list of field names (e.g. "DimensionGroup") to
  7649. // unconditionally include in API requests. By default, fields with
  7650. // empty values are omitted from API requests. However, any non-pointer,
  7651. // non-interface field appearing in ForceSendFields will be sent to the
  7652. // server regardless of whether the field is empty or not. This may be
  7653. // used to include empty fields in Patch requests.
  7654. ForceSendFields []string `json:"-"`
  7655. // NullFields is a list of field names (e.g. "DimensionGroup") to
  7656. // include in API requests with the JSON null value. By default, fields
  7657. // with empty values are omitted from API requests. However, any field
  7658. // with an empty value appearing in NullFields will be sent to the
  7659. // server as null. It is an error if a field in this list has a
  7660. // non-empty value. This may be used to include null fields in Patch
  7661. // requests.
  7662. NullFields []string `json:"-"`
  7663. }
  7664. func (s *UpdateDimensionGroupRequest) MarshalJSON() ([]byte, error) {
  7665. type NoMethod UpdateDimensionGroupRequest
  7666. raw := NoMethod(*s)
  7667. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7668. }
  7669. // UpdateDimensionPropertiesRequest: Updates properties of dimensions
  7670. // within the specified range.
  7671. type UpdateDimensionPropertiesRequest struct {
  7672. // Fields: The fields that should be updated. At least one field must
  7673. // be specified.
  7674. // The root `properties` is implied and should not be specified.
  7675. // A single "*" can be used as short-hand for listing every field.
  7676. Fields string `json:"fields,omitempty"`
  7677. // Properties: Properties to update.
  7678. Properties *DimensionProperties `json:"properties,omitempty"`
  7679. // Range: The rows or columns to update.
  7680. Range *DimensionRange `json:"range,omitempty"`
  7681. // ForceSendFields is a list of field names (e.g. "Fields") to
  7682. // unconditionally include in API requests. By default, fields with
  7683. // empty values are omitted from API requests. However, any non-pointer,
  7684. // non-interface field appearing in ForceSendFields will be sent to the
  7685. // server regardless of whether the field is empty or not. This may be
  7686. // used to include empty fields in Patch requests.
  7687. ForceSendFields []string `json:"-"`
  7688. // NullFields is a list of field names (e.g. "Fields") to include in API
  7689. // requests with the JSON null value. By default, fields with empty
  7690. // values are omitted from API requests. However, any field with an
  7691. // empty value appearing in NullFields will be sent to the server as
  7692. // null. It is an error if a field in this list has a non-empty value.
  7693. // This may be used to include null fields in Patch requests.
  7694. NullFields []string `json:"-"`
  7695. }
  7696. func (s *UpdateDimensionPropertiesRequest) MarshalJSON() ([]byte, error) {
  7697. type NoMethod UpdateDimensionPropertiesRequest
  7698. raw := NoMethod(*s)
  7699. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7700. }
  7701. // UpdateEmbeddedObjectPositionRequest: Update an embedded object's
  7702. // position (such as a moving or resizing a
  7703. // chart or image).
  7704. type UpdateEmbeddedObjectPositionRequest struct {
  7705. // Fields: The fields of OverlayPosition
  7706. // that should be updated when setting a new position. Used only
  7707. // if
  7708. // newPosition.overlayPosition
  7709. // is set, in which case at least one field must
  7710. // be specified. The root `newPosition.overlayPosition` is implied
  7711. // and
  7712. // should not be specified.
  7713. // A single "*" can be used as short-hand for listing every field.
  7714. Fields string `json:"fields,omitempty"`
  7715. // NewPosition: An explicit position to move the embedded object to.
  7716. // If newPosition.sheetId is set,
  7717. // a new sheet with that ID will be created.
  7718. // If newPosition.newSheet is set to true,
  7719. // a new sheet will be created with an ID that will be chosen for you.
  7720. NewPosition *EmbeddedObjectPosition `json:"newPosition,omitempty"`
  7721. // ObjectId: The ID of the object to moved.
  7722. ObjectId int64 `json:"objectId,omitempty"`
  7723. // ForceSendFields is a list of field names (e.g. "Fields") to
  7724. // unconditionally include in API requests. By default, fields with
  7725. // empty values are omitted from API requests. However, any non-pointer,
  7726. // non-interface field appearing in ForceSendFields will be sent to the
  7727. // server regardless of whether the field is empty or not. This may be
  7728. // used to include empty fields in Patch requests.
  7729. ForceSendFields []string `json:"-"`
  7730. // NullFields is a list of field names (e.g. "Fields") to include in API
  7731. // requests with the JSON null value. By default, fields with empty
  7732. // values are omitted from API requests. However, any field with an
  7733. // empty value appearing in NullFields will be sent to the server as
  7734. // null. It is an error if a field in this list has a non-empty value.
  7735. // This may be used to include null fields in Patch requests.
  7736. NullFields []string `json:"-"`
  7737. }
  7738. func (s *UpdateEmbeddedObjectPositionRequest) MarshalJSON() ([]byte, error) {
  7739. type NoMethod UpdateEmbeddedObjectPositionRequest
  7740. raw := NoMethod(*s)
  7741. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7742. }
  7743. // UpdateEmbeddedObjectPositionResponse: The result of updating an
  7744. // embedded object's position.
  7745. type UpdateEmbeddedObjectPositionResponse struct {
  7746. // Position: The new position of the embedded object.
  7747. Position *EmbeddedObjectPosition `json:"position,omitempty"`
  7748. // ForceSendFields is a list of field names (e.g. "Position") to
  7749. // unconditionally include in API requests. By default, fields with
  7750. // empty values are omitted from API requests. However, any non-pointer,
  7751. // non-interface field appearing in ForceSendFields will be sent to the
  7752. // server regardless of whether the field is empty or not. This may be
  7753. // used to include empty fields in Patch requests.
  7754. ForceSendFields []string `json:"-"`
  7755. // NullFields is a list of field names (e.g. "Position") to include in
  7756. // API requests with the JSON null value. By default, fields with empty
  7757. // values are omitted from API requests. However, any field with an
  7758. // empty value appearing in NullFields will be sent to the server as
  7759. // null. It is an error if a field in this list has a non-empty value.
  7760. // This may be used to include null fields in Patch requests.
  7761. NullFields []string `json:"-"`
  7762. }
  7763. func (s *UpdateEmbeddedObjectPositionResponse) MarshalJSON() ([]byte, error) {
  7764. type NoMethod UpdateEmbeddedObjectPositionResponse
  7765. raw := NoMethod(*s)
  7766. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7767. }
  7768. // UpdateFilterViewRequest: Updates properties of the filter view.
  7769. type UpdateFilterViewRequest struct {
  7770. // Fields: The fields that should be updated. At least one field must
  7771. // be specified.
  7772. // The root `filter` is implied and should not be specified.
  7773. // A single "*" can be used as short-hand for listing every field.
  7774. Fields string `json:"fields,omitempty"`
  7775. // Filter: The new properties of the filter view.
  7776. Filter *FilterView `json:"filter,omitempty"`
  7777. // ForceSendFields is a list of field names (e.g. "Fields") to
  7778. // unconditionally include in API requests. By default, fields with
  7779. // empty values are omitted from API requests. However, any non-pointer,
  7780. // non-interface field appearing in ForceSendFields will be sent to the
  7781. // server regardless of whether the field is empty or not. This may be
  7782. // used to include empty fields in Patch requests.
  7783. ForceSendFields []string `json:"-"`
  7784. // NullFields is a list of field names (e.g. "Fields") to include in API
  7785. // requests with the JSON null value. By default, fields with empty
  7786. // values are omitted from API requests. However, any field with an
  7787. // empty value appearing in NullFields will be sent to the server as
  7788. // null. It is an error if a field in this list has a non-empty value.
  7789. // This may be used to include null fields in Patch requests.
  7790. NullFields []string `json:"-"`
  7791. }
  7792. func (s *UpdateFilterViewRequest) MarshalJSON() ([]byte, error) {
  7793. type NoMethod UpdateFilterViewRequest
  7794. raw := NoMethod(*s)
  7795. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7796. }
  7797. // UpdateNamedRangeRequest: Updates properties of the named range with
  7798. // the specified
  7799. // namedRangeId.
  7800. type UpdateNamedRangeRequest struct {
  7801. // Fields: The fields that should be updated. At least one field must
  7802. // be specified.
  7803. // The root `namedRange` is implied and should not be specified.
  7804. // A single "*" can be used as short-hand for listing every field.
  7805. Fields string `json:"fields,omitempty"`
  7806. // NamedRange: The named range to update with the new properties.
  7807. NamedRange *NamedRange `json:"namedRange,omitempty"`
  7808. // ForceSendFields is a list of field names (e.g. "Fields") to
  7809. // unconditionally include in API requests. By default, fields with
  7810. // empty values are omitted from API requests. However, any non-pointer,
  7811. // non-interface field appearing in ForceSendFields will be sent to the
  7812. // server regardless of whether the field is empty or not. This may be
  7813. // used to include empty fields in Patch requests.
  7814. ForceSendFields []string `json:"-"`
  7815. // NullFields is a list of field names (e.g. "Fields") to include in API
  7816. // requests with the JSON null value. By default, fields with empty
  7817. // values are omitted from API requests. However, any field with an
  7818. // empty value appearing in NullFields will be sent to the server as
  7819. // null. It is an error if a field in this list has a non-empty value.
  7820. // This may be used to include null fields in Patch requests.
  7821. NullFields []string `json:"-"`
  7822. }
  7823. func (s *UpdateNamedRangeRequest) MarshalJSON() ([]byte, error) {
  7824. type NoMethod UpdateNamedRangeRequest
  7825. raw := NoMethod(*s)
  7826. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7827. }
  7828. // UpdateProtectedRangeRequest: Updates an existing protected range with
  7829. // the specified
  7830. // protectedRangeId.
  7831. type UpdateProtectedRangeRequest struct {
  7832. // Fields: The fields that should be updated. At least one field must
  7833. // be specified.
  7834. // The root `protectedRange` is implied and should not be specified.
  7835. // A single "*" can be used as short-hand for listing every field.
  7836. Fields string `json:"fields,omitempty"`
  7837. // ProtectedRange: The protected range to update with the new
  7838. // properties.
  7839. ProtectedRange *ProtectedRange `json:"protectedRange,omitempty"`
  7840. // ForceSendFields is a list of field names (e.g. "Fields") to
  7841. // unconditionally include in API requests. By default, fields with
  7842. // empty values are omitted from API requests. However, any non-pointer,
  7843. // non-interface field appearing in ForceSendFields will be sent to the
  7844. // server regardless of whether the field is empty or not. This may be
  7845. // used to include empty fields in Patch requests.
  7846. ForceSendFields []string `json:"-"`
  7847. // NullFields is a list of field names (e.g. "Fields") to include in API
  7848. // requests with the JSON null value. By default, fields with empty
  7849. // values are omitted from API requests. However, any field with an
  7850. // empty value appearing in NullFields will be sent to the server as
  7851. // null. It is an error if a field in this list has a non-empty value.
  7852. // This may be used to include null fields in Patch requests.
  7853. NullFields []string `json:"-"`
  7854. }
  7855. func (s *UpdateProtectedRangeRequest) MarshalJSON() ([]byte, error) {
  7856. type NoMethod UpdateProtectedRangeRequest
  7857. raw := NoMethod(*s)
  7858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7859. }
  7860. // UpdateSheetPropertiesRequest: Updates properties of the sheet with
  7861. // the specified
  7862. // sheetId.
  7863. type UpdateSheetPropertiesRequest struct {
  7864. // Fields: The fields that should be updated. At least one field must
  7865. // be specified.
  7866. // The root `properties` is implied and should not be specified.
  7867. // A single "*" can be used as short-hand for listing every field.
  7868. Fields string `json:"fields,omitempty"`
  7869. // Properties: The properties to update.
  7870. Properties *SheetProperties `json:"properties,omitempty"`
  7871. // ForceSendFields is a list of field names (e.g. "Fields") to
  7872. // unconditionally include in API requests. By default, fields with
  7873. // empty values are omitted from API requests. However, any non-pointer,
  7874. // non-interface field appearing in ForceSendFields will be sent to the
  7875. // server regardless of whether the field is empty or not. This may be
  7876. // used to include empty fields in Patch requests.
  7877. ForceSendFields []string `json:"-"`
  7878. // NullFields is a list of field names (e.g. "Fields") to include in API
  7879. // requests with the JSON null value. By default, fields with empty
  7880. // values are omitted from API requests. However, any field with an
  7881. // empty value appearing in NullFields will be sent to the server as
  7882. // null. It is an error if a field in this list has a non-empty value.
  7883. // This may be used to include null fields in Patch requests.
  7884. NullFields []string `json:"-"`
  7885. }
  7886. func (s *UpdateSheetPropertiesRequest) MarshalJSON() ([]byte, error) {
  7887. type NoMethod UpdateSheetPropertiesRequest
  7888. raw := NoMethod(*s)
  7889. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7890. }
  7891. // UpdateSpreadsheetPropertiesRequest: Updates properties of a
  7892. // spreadsheet.
  7893. type UpdateSpreadsheetPropertiesRequest struct {
  7894. // Fields: The fields that should be updated. At least one field must
  7895. // be specified.
  7896. // The root 'properties' is implied and should not be specified.
  7897. // A single "*" can be used as short-hand for listing every field.
  7898. Fields string `json:"fields,omitempty"`
  7899. // Properties: The properties to update.
  7900. Properties *SpreadsheetProperties `json:"properties,omitempty"`
  7901. // ForceSendFields is a list of field names (e.g. "Fields") to
  7902. // unconditionally include in API requests. By default, fields with
  7903. // empty values are omitted from API requests. However, any non-pointer,
  7904. // non-interface field appearing in ForceSendFields will be sent to the
  7905. // server regardless of whether the field is empty or not. This may be
  7906. // used to include empty fields in Patch requests.
  7907. ForceSendFields []string `json:"-"`
  7908. // NullFields is a list of field names (e.g. "Fields") to include in API
  7909. // requests with the JSON null value. By default, fields with empty
  7910. // values are omitted from API requests. However, any field with an
  7911. // empty value appearing in NullFields will be sent to the server as
  7912. // null. It is an error if a field in this list has a non-empty value.
  7913. // This may be used to include null fields in Patch requests.
  7914. NullFields []string `json:"-"`
  7915. }
  7916. func (s *UpdateSpreadsheetPropertiesRequest) MarshalJSON() ([]byte, error) {
  7917. type NoMethod UpdateSpreadsheetPropertiesRequest
  7918. raw := NoMethod(*s)
  7919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7920. }
  7921. // UpdateValuesByDataFilterResponse: The response when updating a range
  7922. // of values by a data filter in a
  7923. // spreadsheet.
  7924. type UpdateValuesByDataFilterResponse struct {
  7925. // DataFilter: The data filter that selected the range that was updated.
  7926. DataFilter *DataFilter `json:"dataFilter,omitempty"`
  7927. // UpdatedCells: The number of cells updated.
  7928. UpdatedCells int64 `json:"updatedCells,omitempty"`
  7929. // UpdatedColumns: The number of columns where at least one cell in the
  7930. // column was updated.
  7931. UpdatedColumns int64 `json:"updatedColumns,omitempty"`
  7932. // UpdatedData: The values of the cells in the range matched by the
  7933. // dataFilter after all
  7934. // updates were applied. This is only included if the
  7935. // request's
  7936. // `includeValuesInResponse` field was `true`.
  7937. UpdatedData *ValueRange `json:"updatedData,omitempty"`
  7938. // UpdatedRange: The range (in A1 notation) that updates were applied
  7939. // to.
  7940. UpdatedRange string `json:"updatedRange,omitempty"`
  7941. // UpdatedRows: The number of rows where at least one cell in the row
  7942. // was updated.
  7943. UpdatedRows int64 `json:"updatedRows,omitempty"`
  7944. // ForceSendFields is a list of field names (e.g. "DataFilter") to
  7945. // unconditionally include in API requests. By default, fields with
  7946. // empty values are omitted from API requests. However, any non-pointer,
  7947. // non-interface field appearing in ForceSendFields will be sent to the
  7948. // server regardless of whether the field is empty or not. This may be
  7949. // used to include empty fields in Patch requests.
  7950. ForceSendFields []string `json:"-"`
  7951. // NullFields is a list of field names (e.g. "DataFilter") to include in
  7952. // API requests with the JSON null value. By default, fields with empty
  7953. // values are omitted from API requests. However, any field with an
  7954. // empty value appearing in NullFields will be sent to the server as
  7955. // null. It is an error if a field in this list has a non-empty value.
  7956. // This may be used to include null fields in Patch requests.
  7957. NullFields []string `json:"-"`
  7958. }
  7959. func (s *UpdateValuesByDataFilterResponse) MarshalJSON() ([]byte, error) {
  7960. type NoMethod UpdateValuesByDataFilterResponse
  7961. raw := NoMethod(*s)
  7962. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7963. }
  7964. // UpdateValuesResponse: The response when updating a range of values in
  7965. // a spreadsheet.
  7966. type UpdateValuesResponse struct {
  7967. // SpreadsheetId: The spreadsheet the updates were applied to.
  7968. SpreadsheetId string `json:"spreadsheetId,omitempty"`
  7969. // UpdatedCells: The number of cells updated.
  7970. UpdatedCells int64 `json:"updatedCells,omitempty"`
  7971. // UpdatedColumns: The number of columns where at least one cell in the
  7972. // column was updated.
  7973. UpdatedColumns int64 `json:"updatedColumns,omitempty"`
  7974. // UpdatedData: The values of the cells after updates were applied.
  7975. // This is only included if the request's `includeValuesInResponse`
  7976. // field
  7977. // was `true`.
  7978. UpdatedData *ValueRange `json:"updatedData,omitempty"`
  7979. // UpdatedRange: The range (in A1 notation) that updates were applied
  7980. // to.
  7981. UpdatedRange string `json:"updatedRange,omitempty"`
  7982. // UpdatedRows: The number of rows where at least one cell in the row
  7983. // was updated.
  7984. UpdatedRows int64 `json:"updatedRows,omitempty"`
  7985. // ServerResponse contains the HTTP response code and headers from the
  7986. // server.
  7987. googleapi.ServerResponse `json:"-"`
  7988. // ForceSendFields is a list of field names (e.g. "SpreadsheetId") to
  7989. // unconditionally include in API requests. By default, fields with
  7990. // empty values are omitted from API requests. However, any non-pointer,
  7991. // non-interface field appearing in ForceSendFields will be sent to the
  7992. // server regardless of whether the field is empty or not. This may be
  7993. // used to include empty fields in Patch requests.
  7994. ForceSendFields []string `json:"-"`
  7995. // NullFields is a list of field names (e.g. "SpreadsheetId") to include
  7996. // in API requests with the JSON null value. By default, fields with
  7997. // empty values are omitted from API requests. However, any field with
  7998. // an empty value appearing in NullFields will be sent to the server as
  7999. // null. It is an error if a field in this list has a non-empty value.
  8000. // This may be used to include null fields in Patch requests.
  8001. NullFields []string `json:"-"`
  8002. }
  8003. func (s *UpdateValuesResponse) MarshalJSON() ([]byte, error) {
  8004. type NoMethod UpdateValuesResponse
  8005. raw := NoMethod(*s)
  8006. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8007. }
  8008. // ValueRange: Data within a range of the spreadsheet.
  8009. type ValueRange struct {
  8010. // MajorDimension: The major dimension of the values.
  8011. //
  8012. // For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  8013. // then requesting `range=A1:B2,majorDimension=ROWS` will
  8014. // return
  8015. // `[[1,2],[3,4]]`,
  8016. // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will
  8017. // return
  8018. // `[[1,3],[2,4]]`.
  8019. //
  8020. // For input, with `range=A1:B2,majorDimension=ROWS` then
  8021. // `[[1,2],[3,4]]`
  8022. // will set `A1=1,B1=2,A2=3,B2=4`. With
  8023. // `range=A1:B2,majorDimension=COLUMNS`
  8024. // then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`.
  8025. //
  8026. // When writing, if this field is not set, it defaults to ROWS.
  8027. //
  8028. // Possible values:
  8029. // "DIMENSION_UNSPECIFIED" - The default value, do not use.
  8030. // "ROWS" - Operates on the rows of a sheet.
  8031. // "COLUMNS" - Operates on the columns of a sheet.
  8032. MajorDimension string `json:"majorDimension,omitempty"`
  8033. // Range: The range the values cover, in A1 notation.
  8034. // For output, this range indicates the entire requested range,
  8035. // even though the values will exclude trailing rows and columns.
  8036. // When appending values, this field represents the range to search for
  8037. // a
  8038. // table, after which values will be appended.
  8039. Range string `json:"range,omitempty"`
  8040. // Values: The data that was read or to be written. This is an array of
  8041. // arrays,
  8042. // the outer array representing all the data and each inner
  8043. // array
  8044. // representing a major dimension. Each item in the inner
  8045. // array
  8046. // corresponds with one cell.
  8047. //
  8048. // For output, empty trailing rows and columns will not be
  8049. // included.
  8050. //
  8051. // For input, supported value types are: bool, string, and double.
  8052. // Null values will be skipped.
  8053. // To set a cell to an empty value, set the string value to an empty
  8054. // string.
  8055. Values [][]interface{} `json:"values,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. "MajorDimension") 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. "MajorDimension") to
  8067. // include in API requests with the JSON null value. By default, fields
  8068. // with empty values are omitted from API requests. However, any field
  8069. // with an empty value appearing in NullFields will be sent to the
  8070. // server as null. It is an error if a field in this list has a
  8071. // non-empty value. This may be used to include null fields in Patch
  8072. // requests.
  8073. NullFields []string `json:"-"`
  8074. }
  8075. func (s *ValueRange) MarshalJSON() ([]byte, error) {
  8076. type NoMethod ValueRange
  8077. raw := NoMethod(*s)
  8078. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8079. }
  8080. // WaterfallChartColumnStyle: Styles for a waterfall chart column.
  8081. type WaterfallChartColumnStyle struct {
  8082. // Color: The color of the column.
  8083. Color *Color `json:"color,omitempty"`
  8084. // Label: The label of the column's legend.
  8085. Label string `json:"label,omitempty"`
  8086. // ForceSendFields is a list of field names (e.g. "Color") to
  8087. // unconditionally include in API requests. By default, fields with
  8088. // empty values are omitted from API requests. However, any non-pointer,
  8089. // non-interface field appearing in ForceSendFields will be sent to the
  8090. // server regardless of whether the field is empty or not. This may be
  8091. // used to include empty fields in Patch requests.
  8092. ForceSendFields []string `json:"-"`
  8093. // NullFields is a list of field names (e.g. "Color") to include in API
  8094. // requests with the JSON null value. By default, fields with empty
  8095. // values are omitted from API requests. However, any field with an
  8096. // empty value appearing in NullFields will be sent to the server as
  8097. // null. It is an error if a field in this list has a non-empty value.
  8098. // This may be used to include null fields in Patch requests.
  8099. NullFields []string `json:"-"`
  8100. }
  8101. func (s *WaterfallChartColumnStyle) MarshalJSON() ([]byte, error) {
  8102. type NoMethod WaterfallChartColumnStyle
  8103. raw := NoMethod(*s)
  8104. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8105. }
  8106. // WaterfallChartCustomSubtotal: A custom subtotal column for a
  8107. // waterfall chart series.
  8108. type WaterfallChartCustomSubtotal struct {
  8109. // DataIsSubtotal: True if the data point at subtotal_index is the
  8110. // subtotal. If false,
  8111. // the subtotal will be computed and appear after the data point.
  8112. DataIsSubtotal bool `json:"dataIsSubtotal,omitempty"`
  8113. // Label: A label for the subtotal column.
  8114. Label string `json:"label,omitempty"`
  8115. // SubtotalIndex: The 0-based index of a data point within the series.
  8116. // If
  8117. // data_is_subtotal is true, the data point at this index is
  8118. // the
  8119. // subtotal. Otherwise, the subtotal appears after the data point
  8120. // with
  8121. // this index. A series can have multiple subtotals at arbitrary
  8122. // indices,
  8123. // but subtotals do not affect the indices of the data points.
  8124. // For
  8125. // example, if a series has three data points, their indices will
  8126. // always
  8127. // be 0, 1, and 2, regardless of how many subtotals exist on the series
  8128. // or
  8129. // what data points they are associated with.
  8130. SubtotalIndex int64 `json:"subtotalIndex,omitempty"`
  8131. // ForceSendFields is a list of field names (e.g. "DataIsSubtotal") to
  8132. // unconditionally include in API requests. By default, fields with
  8133. // empty values are omitted from API requests. However, any non-pointer,
  8134. // non-interface field appearing in ForceSendFields will be sent to the
  8135. // server regardless of whether the field is empty or not. This may be
  8136. // used to include empty fields in Patch requests.
  8137. ForceSendFields []string `json:"-"`
  8138. // NullFields is a list of field names (e.g. "DataIsSubtotal") to
  8139. // include in API requests with the JSON null value. By default, fields
  8140. // with empty values are omitted from API requests. However, any field
  8141. // with an empty value appearing in NullFields will be sent to the
  8142. // server as null. It is an error if a field in this list has a
  8143. // non-empty value. This may be used to include null fields in Patch
  8144. // requests.
  8145. NullFields []string `json:"-"`
  8146. }
  8147. func (s *WaterfallChartCustomSubtotal) MarshalJSON() ([]byte, error) {
  8148. type NoMethod WaterfallChartCustomSubtotal
  8149. raw := NoMethod(*s)
  8150. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8151. }
  8152. // WaterfallChartDomain: The domain of a waterfall chart.
  8153. type WaterfallChartDomain struct {
  8154. // Data: The data of the WaterfallChartDomain.
  8155. Data *ChartData `json:"data,omitempty"`
  8156. // Reversed: True to reverse the order of the domain values (horizontal
  8157. // axis).
  8158. Reversed bool `json:"reversed,omitempty"`
  8159. // ForceSendFields is a list of field names (e.g. "Data") to
  8160. // unconditionally include in API requests. By default, fields with
  8161. // empty values are omitted from API requests. However, any non-pointer,
  8162. // non-interface field appearing in ForceSendFields will be sent to the
  8163. // server regardless of whether the field is empty or not. This may be
  8164. // used to include empty fields in Patch requests.
  8165. ForceSendFields []string `json:"-"`
  8166. // NullFields is a list of field names (e.g. "Data") to include in API
  8167. // requests with the JSON null value. By default, fields with empty
  8168. // values are omitted from API requests. However, any field with an
  8169. // empty value appearing in NullFields will be sent to the server as
  8170. // null. It is an error if a field in this list has a non-empty value.
  8171. // This may be used to include null fields in Patch requests.
  8172. NullFields []string `json:"-"`
  8173. }
  8174. func (s *WaterfallChartDomain) MarshalJSON() ([]byte, error) {
  8175. type NoMethod WaterfallChartDomain
  8176. raw := NoMethod(*s)
  8177. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8178. }
  8179. // WaterfallChartSeries: A single series of data for a waterfall chart.
  8180. type WaterfallChartSeries struct {
  8181. // CustomSubtotals: Custom subtotal columns appearing in this series.
  8182. // The order in which
  8183. // subtotals are defined is not significant. Only one subtotal may
  8184. // be
  8185. // defined for each data point.
  8186. CustomSubtotals []*WaterfallChartCustomSubtotal `json:"customSubtotals,omitempty"`
  8187. // Data: The data being visualized in this series.
  8188. Data *ChartData `json:"data,omitempty"`
  8189. // HideTrailingSubtotal: True to hide the subtotal column from the end
  8190. // of the series. By default,
  8191. // a subtotal column will appear at the end of each series. Setting
  8192. // this
  8193. // field to true will hide that subtotal column for this series.
  8194. HideTrailingSubtotal bool `json:"hideTrailingSubtotal,omitempty"`
  8195. // NegativeColumnsStyle: Styles for all columns in this series with
  8196. // negative values.
  8197. NegativeColumnsStyle *WaterfallChartColumnStyle `json:"negativeColumnsStyle,omitempty"`
  8198. // PositiveColumnsStyle: Styles for all columns in this series with
  8199. // positive values.
  8200. PositiveColumnsStyle *WaterfallChartColumnStyle `json:"positiveColumnsStyle,omitempty"`
  8201. // SubtotalColumnsStyle: Styles for all subtotal columns in this series.
  8202. SubtotalColumnsStyle *WaterfallChartColumnStyle `json:"subtotalColumnsStyle,omitempty"`
  8203. // ForceSendFields is a list of field names (e.g. "CustomSubtotals") to
  8204. // unconditionally include in API requests. By default, fields with
  8205. // empty values are omitted from API requests. However, any non-pointer,
  8206. // non-interface field appearing in ForceSendFields will be sent to the
  8207. // server regardless of whether the field is empty or not. This may be
  8208. // used to include empty fields in Patch requests.
  8209. ForceSendFields []string `json:"-"`
  8210. // NullFields is a list of field names (e.g. "CustomSubtotals") to
  8211. // include in API requests with the JSON null value. By default, fields
  8212. // with empty values are omitted from API requests. However, any field
  8213. // with an empty value appearing in NullFields will be sent to the
  8214. // server as null. It is an error if a field in this list has a
  8215. // non-empty value. This may be used to include null fields in Patch
  8216. // requests.
  8217. NullFields []string `json:"-"`
  8218. }
  8219. func (s *WaterfallChartSeries) MarshalJSON() ([]byte, error) {
  8220. type NoMethod WaterfallChartSeries
  8221. raw := NoMethod(*s)
  8222. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8223. }
  8224. // WaterfallChartSpec: A waterfall chart.
  8225. type WaterfallChartSpec struct {
  8226. // ConnectorLineStyle: The line style for the connector lines.
  8227. ConnectorLineStyle *LineStyle `json:"connectorLineStyle,omitempty"`
  8228. // Domain: The domain data (horizontal axis) for the waterfall chart.
  8229. Domain *WaterfallChartDomain `json:"domain,omitempty"`
  8230. // FirstValueIsTotal: True to interpret the first value as a total.
  8231. FirstValueIsTotal bool `json:"firstValueIsTotal,omitempty"`
  8232. // HideConnectorLines: True to hide connector lines between columns.
  8233. HideConnectorLines bool `json:"hideConnectorLines,omitempty"`
  8234. // Series: The data this waterfall chart is visualizing.
  8235. Series []*WaterfallChartSeries `json:"series,omitempty"`
  8236. // StackedType: The stacked type.
  8237. //
  8238. // Possible values:
  8239. // "WATERFALL_STACKED_TYPE_UNSPECIFIED" - Default value, do not use.
  8240. // "STACKED" - Values corresponding to the same domain (horizontal
  8241. // axis) value will be
  8242. // stacked vertically.
  8243. // "SEQUENTIAL" - Series will spread out along the horizontal axis.
  8244. StackedType string `json:"stackedType,omitempty"`
  8245. // ForceSendFields is a list of field names (e.g. "ConnectorLineStyle")
  8246. // to unconditionally include in API requests. By default, fields with
  8247. // empty values are omitted from API requests. However, any non-pointer,
  8248. // non-interface field appearing in ForceSendFields will be sent to the
  8249. // server regardless of whether the field is empty or not. This may be
  8250. // used to include empty fields in Patch requests.
  8251. ForceSendFields []string `json:"-"`
  8252. // NullFields is a list of field names (e.g. "ConnectorLineStyle") to
  8253. // include in API requests with the JSON null value. By default, fields
  8254. // with empty values are omitted from API requests. However, any field
  8255. // with an empty value appearing in NullFields will be sent to the
  8256. // server as null. It is an error if a field in this list has a
  8257. // non-empty value. This may be used to include null fields in Patch
  8258. // requests.
  8259. NullFields []string `json:"-"`
  8260. }
  8261. func (s *WaterfallChartSpec) MarshalJSON() ([]byte, error) {
  8262. type NoMethod WaterfallChartSpec
  8263. raw := NoMethod(*s)
  8264. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8265. }
  8266. // method id "sheets.spreadsheets.batchUpdate":
  8267. type SpreadsheetsBatchUpdateCall struct {
  8268. s *Service
  8269. spreadsheetId string
  8270. batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest
  8271. urlParams_ gensupport.URLParams
  8272. ctx_ context.Context
  8273. header_ http.Header
  8274. }
  8275. // BatchUpdate: Applies one or more updates to the spreadsheet.
  8276. //
  8277. // Each request is validated before
  8278. // being applied. If any request is not valid then the entire request
  8279. // will
  8280. // fail and nothing will be applied.
  8281. //
  8282. // Some requests have replies to
  8283. // give you some information about how
  8284. // they are applied. The replies will mirror the requests. For
  8285. // example,
  8286. // if you applied 4 updates and the 3rd one had a reply, then
  8287. // the
  8288. // response will have 2 empty replies, the actual reply, and another
  8289. // empty
  8290. // reply, in that order.
  8291. //
  8292. // Due to the collaborative nature of spreadsheets, it is not guaranteed
  8293. // that
  8294. // the spreadsheet will reflect exactly your changes after this
  8295. // completes,
  8296. // however it is guaranteed that the updates in the request will
  8297. // be
  8298. // applied together atomically. Your changes may be altered with respect
  8299. // to
  8300. // collaborator changes. If there are no collaborators, the
  8301. // spreadsheet
  8302. // should reflect your changes.
  8303. func (r *SpreadsheetsService) BatchUpdate(spreadsheetId string, batchupdatespreadsheetrequest *BatchUpdateSpreadsheetRequest) *SpreadsheetsBatchUpdateCall {
  8304. c := &SpreadsheetsBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8305. c.spreadsheetId = spreadsheetId
  8306. c.batchupdatespreadsheetrequest = batchupdatespreadsheetrequest
  8307. return c
  8308. }
  8309. // Fields allows partial responses to be retrieved. See
  8310. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8311. // for more information.
  8312. func (c *SpreadsheetsBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsBatchUpdateCall {
  8313. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8314. return c
  8315. }
  8316. // Context sets the context to be used in this call's Do method. Any
  8317. // pending HTTP request will be aborted if the provided context is
  8318. // canceled.
  8319. func (c *SpreadsheetsBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsBatchUpdateCall {
  8320. c.ctx_ = ctx
  8321. return c
  8322. }
  8323. // Header returns an http.Header that can be modified by the caller to
  8324. // add HTTP headers to the request.
  8325. func (c *SpreadsheetsBatchUpdateCall) Header() http.Header {
  8326. if c.header_ == nil {
  8327. c.header_ = make(http.Header)
  8328. }
  8329. return c.header_
  8330. }
  8331. func (c *SpreadsheetsBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  8332. reqHeaders := make(http.Header)
  8333. for k, v := range c.header_ {
  8334. reqHeaders[k] = v
  8335. }
  8336. reqHeaders.Set("User-Agent", c.s.userAgent())
  8337. var body io.Reader = nil
  8338. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatespreadsheetrequest)
  8339. if err != nil {
  8340. return nil, err
  8341. }
  8342. reqHeaders.Set("Content-Type", "application/json")
  8343. c.urlParams_.Set("alt", alt)
  8344. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:batchUpdate")
  8345. urls += "?" + c.urlParams_.Encode()
  8346. req, _ := http.NewRequest("POST", urls, body)
  8347. req.Header = reqHeaders
  8348. googleapi.Expand(req.URL, map[string]string{
  8349. "spreadsheetId": c.spreadsheetId,
  8350. })
  8351. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8352. }
  8353. // Do executes the "sheets.spreadsheets.batchUpdate" call.
  8354. // Exactly one of *BatchUpdateSpreadsheetResponse or error will be
  8355. // non-nil. Any non-2xx status code is an error. Response headers are in
  8356. // either *BatchUpdateSpreadsheetResponse.ServerResponse.Header or (if a
  8357. // response was returned at all) in error.(*googleapi.Error).Header. Use
  8358. // googleapi.IsNotModified to check whether the returned error was
  8359. // because http.StatusNotModified was returned.
  8360. func (c *SpreadsheetsBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateSpreadsheetResponse, error) {
  8361. gensupport.SetOptions(c.urlParams_, opts...)
  8362. res, err := c.doRequest("json")
  8363. if res != nil && res.StatusCode == http.StatusNotModified {
  8364. if res.Body != nil {
  8365. res.Body.Close()
  8366. }
  8367. return nil, &googleapi.Error{
  8368. Code: res.StatusCode,
  8369. Header: res.Header,
  8370. }
  8371. }
  8372. if err != nil {
  8373. return nil, err
  8374. }
  8375. defer googleapi.CloseBody(res)
  8376. if err := googleapi.CheckResponse(res); err != nil {
  8377. return nil, err
  8378. }
  8379. ret := &BatchUpdateSpreadsheetResponse{
  8380. ServerResponse: googleapi.ServerResponse{
  8381. Header: res.Header,
  8382. HTTPStatusCode: res.StatusCode,
  8383. },
  8384. }
  8385. target := &ret
  8386. if err := gensupport.DecodeResponse(target, res); err != nil {
  8387. return nil, err
  8388. }
  8389. return ret, nil
  8390. // {
  8391. // "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.",
  8392. // "flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate",
  8393. // "httpMethod": "POST",
  8394. // "id": "sheets.spreadsheets.batchUpdate",
  8395. // "parameterOrder": [
  8396. // "spreadsheetId"
  8397. // ],
  8398. // "parameters": {
  8399. // "spreadsheetId": {
  8400. // "description": "The spreadsheet to apply the updates to.",
  8401. // "location": "path",
  8402. // "required": true,
  8403. // "type": "string"
  8404. // }
  8405. // },
  8406. // "path": "v4/spreadsheets/{spreadsheetId}:batchUpdate",
  8407. // "request": {
  8408. // "$ref": "BatchUpdateSpreadsheetRequest"
  8409. // },
  8410. // "response": {
  8411. // "$ref": "BatchUpdateSpreadsheetResponse"
  8412. // },
  8413. // "scopes": [
  8414. // "https://www.googleapis.com/auth/drive",
  8415. // "https://www.googleapis.com/auth/drive.file",
  8416. // "https://www.googleapis.com/auth/spreadsheets"
  8417. // ]
  8418. // }
  8419. }
  8420. // method id "sheets.spreadsheets.create":
  8421. type SpreadsheetsCreateCall struct {
  8422. s *Service
  8423. spreadsheet *Spreadsheet
  8424. urlParams_ gensupport.URLParams
  8425. ctx_ context.Context
  8426. header_ http.Header
  8427. }
  8428. // Create: Creates a spreadsheet, returning the newly created
  8429. // spreadsheet.
  8430. func (r *SpreadsheetsService) Create(spreadsheet *Spreadsheet) *SpreadsheetsCreateCall {
  8431. c := &SpreadsheetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8432. c.spreadsheet = spreadsheet
  8433. return c
  8434. }
  8435. // Fields allows partial responses to be retrieved. See
  8436. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8437. // for more information.
  8438. func (c *SpreadsheetsCreateCall) Fields(s ...googleapi.Field) *SpreadsheetsCreateCall {
  8439. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8440. return c
  8441. }
  8442. // Context sets the context to be used in this call's Do method. Any
  8443. // pending HTTP request will be aborted if the provided context is
  8444. // canceled.
  8445. func (c *SpreadsheetsCreateCall) Context(ctx context.Context) *SpreadsheetsCreateCall {
  8446. c.ctx_ = ctx
  8447. return c
  8448. }
  8449. // Header returns an http.Header that can be modified by the caller to
  8450. // add HTTP headers to the request.
  8451. func (c *SpreadsheetsCreateCall) Header() http.Header {
  8452. if c.header_ == nil {
  8453. c.header_ = make(http.Header)
  8454. }
  8455. return c.header_
  8456. }
  8457. func (c *SpreadsheetsCreateCall) doRequest(alt string) (*http.Response, error) {
  8458. reqHeaders := make(http.Header)
  8459. for k, v := range c.header_ {
  8460. reqHeaders[k] = v
  8461. }
  8462. reqHeaders.Set("User-Agent", c.s.userAgent())
  8463. var body io.Reader = nil
  8464. body, err := googleapi.WithoutDataWrapper.JSONReader(c.spreadsheet)
  8465. if err != nil {
  8466. return nil, err
  8467. }
  8468. reqHeaders.Set("Content-Type", "application/json")
  8469. c.urlParams_.Set("alt", alt)
  8470. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets")
  8471. urls += "?" + c.urlParams_.Encode()
  8472. req, _ := http.NewRequest("POST", urls, body)
  8473. req.Header = reqHeaders
  8474. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8475. }
  8476. // Do executes the "sheets.spreadsheets.create" call.
  8477. // Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx
  8478. // status code is an error. Response headers are in either
  8479. // *Spreadsheet.ServerResponse.Header or (if a response was returned at
  8480. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8481. // to check whether the returned error was because
  8482. // http.StatusNotModified was returned.
  8483. func (c *SpreadsheetsCreateCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) {
  8484. gensupport.SetOptions(c.urlParams_, opts...)
  8485. res, err := c.doRequest("json")
  8486. if res != nil && res.StatusCode == http.StatusNotModified {
  8487. if res.Body != nil {
  8488. res.Body.Close()
  8489. }
  8490. return nil, &googleapi.Error{
  8491. Code: res.StatusCode,
  8492. Header: res.Header,
  8493. }
  8494. }
  8495. if err != nil {
  8496. return nil, err
  8497. }
  8498. defer googleapi.CloseBody(res)
  8499. if err := googleapi.CheckResponse(res); err != nil {
  8500. return nil, err
  8501. }
  8502. ret := &Spreadsheet{
  8503. ServerResponse: googleapi.ServerResponse{
  8504. Header: res.Header,
  8505. HTTPStatusCode: res.StatusCode,
  8506. },
  8507. }
  8508. target := &ret
  8509. if err := gensupport.DecodeResponse(target, res); err != nil {
  8510. return nil, err
  8511. }
  8512. return ret, nil
  8513. // {
  8514. // "description": "Creates a spreadsheet, returning the newly created spreadsheet.",
  8515. // "flatPath": "v4/spreadsheets",
  8516. // "httpMethod": "POST",
  8517. // "id": "sheets.spreadsheets.create",
  8518. // "parameterOrder": [],
  8519. // "parameters": {},
  8520. // "path": "v4/spreadsheets",
  8521. // "request": {
  8522. // "$ref": "Spreadsheet"
  8523. // },
  8524. // "response": {
  8525. // "$ref": "Spreadsheet"
  8526. // },
  8527. // "scopes": [
  8528. // "https://www.googleapis.com/auth/drive",
  8529. // "https://www.googleapis.com/auth/drive.file",
  8530. // "https://www.googleapis.com/auth/spreadsheets"
  8531. // ]
  8532. // }
  8533. }
  8534. // method id "sheets.spreadsheets.get":
  8535. type SpreadsheetsGetCall struct {
  8536. s *Service
  8537. spreadsheetId string
  8538. urlParams_ gensupport.URLParams
  8539. ifNoneMatch_ string
  8540. ctx_ context.Context
  8541. header_ http.Header
  8542. }
  8543. // Get: Returns the spreadsheet at the given ID.
  8544. // The caller must specify the spreadsheet ID.
  8545. //
  8546. // By default, data within grids will not be returned.
  8547. // You can include grid data one of two ways:
  8548. //
  8549. // * Specify a field mask listing your desired fields using the `fields`
  8550. // URL
  8551. // parameter in HTTP
  8552. //
  8553. // * Set the includeGridData
  8554. // URL parameter to true. If a field mask is set, the
  8555. // `includeGridData`
  8556. // parameter is ignored
  8557. //
  8558. // For large spreadsheets, it is recommended to retrieve only the
  8559. // specific
  8560. // fields of the spreadsheet that you want.
  8561. //
  8562. // To retrieve only subsets of the spreadsheet, use the
  8563. // ranges URL parameter.
  8564. // Multiple ranges can be specified. Limiting the range will
  8565. // return only the portions of the spreadsheet that intersect the
  8566. // requested
  8567. // ranges. Ranges are specified using A1 notation.
  8568. func (r *SpreadsheetsService) Get(spreadsheetId string) *SpreadsheetsGetCall {
  8569. c := &SpreadsheetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8570. c.spreadsheetId = spreadsheetId
  8571. return c
  8572. }
  8573. // IncludeGridData sets the optional parameter "includeGridData": True
  8574. // if grid data should be returned.
  8575. // This parameter is ignored if a field mask was set in the request.
  8576. func (c *SpreadsheetsGetCall) IncludeGridData(includeGridData bool) *SpreadsheetsGetCall {
  8577. c.urlParams_.Set("includeGridData", fmt.Sprint(includeGridData))
  8578. return c
  8579. }
  8580. // Ranges sets the optional parameter "ranges": The ranges to retrieve
  8581. // from the spreadsheet.
  8582. func (c *SpreadsheetsGetCall) Ranges(ranges ...string) *SpreadsheetsGetCall {
  8583. c.urlParams_.SetMulti("ranges", append([]string{}, ranges...))
  8584. return c
  8585. }
  8586. // Fields allows partial responses to be retrieved. See
  8587. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8588. // for more information.
  8589. func (c *SpreadsheetsGetCall) Fields(s ...googleapi.Field) *SpreadsheetsGetCall {
  8590. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8591. return c
  8592. }
  8593. // IfNoneMatch sets the optional parameter which makes the operation
  8594. // fail if the object's ETag matches the given value. This is useful for
  8595. // getting updates only after the object has changed since the last
  8596. // request. Use googleapi.IsNotModified to check whether the response
  8597. // error from Do is the result of In-None-Match.
  8598. func (c *SpreadsheetsGetCall) IfNoneMatch(entityTag string) *SpreadsheetsGetCall {
  8599. c.ifNoneMatch_ = entityTag
  8600. return c
  8601. }
  8602. // Context sets the context to be used in this call's Do method. Any
  8603. // pending HTTP request will be aborted if the provided context is
  8604. // canceled.
  8605. func (c *SpreadsheetsGetCall) Context(ctx context.Context) *SpreadsheetsGetCall {
  8606. c.ctx_ = ctx
  8607. return c
  8608. }
  8609. // Header returns an http.Header that can be modified by the caller to
  8610. // add HTTP headers to the request.
  8611. func (c *SpreadsheetsGetCall) Header() http.Header {
  8612. if c.header_ == nil {
  8613. c.header_ = make(http.Header)
  8614. }
  8615. return c.header_
  8616. }
  8617. func (c *SpreadsheetsGetCall) doRequest(alt string) (*http.Response, error) {
  8618. reqHeaders := make(http.Header)
  8619. for k, v := range c.header_ {
  8620. reqHeaders[k] = v
  8621. }
  8622. reqHeaders.Set("User-Agent", c.s.userAgent())
  8623. if c.ifNoneMatch_ != "" {
  8624. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8625. }
  8626. var body io.Reader = nil
  8627. c.urlParams_.Set("alt", alt)
  8628. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}")
  8629. urls += "?" + c.urlParams_.Encode()
  8630. req, _ := http.NewRequest("GET", urls, body)
  8631. req.Header = reqHeaders
  8632. googleapi.Expand(req.URL, map[string]string{
  8633. "spreadsheetId": c.spreadsheetId,
  8634. })
  8635. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8636. }
  8637. // Do executes the "sheets.spreadsheets.get" call.
  8638. // Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx
  8639. // status code is an error. Response headers are in either
  8640. // *Spreadsheet.ServerResponse.Header or (if a response was returned at
  8641. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8642. // to check whether the returned error was because
  8643. // http.StatusNotModified was returned.
  8644. func (c *SpreadsheetsGetCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) {
  8645. gensupport.SetOptions(c.urlParams_, opts...)
  8646. res, err := c.doRequest("json")
  8647. if res != nil && res.StatusCode == http.StatusNotModified {
  8648. if res.Body != nil {
  8649. res.Body.Close()
  8650. }
  8651. return nil, &googleapi.Error{
  8652. Code: res.StatusCode,
  8653. Header: res.Header,
  8654. }
  8655. }
  8656. if err != nil {
  8657. return nil, err
  8658. }
  8659. defer googleapi.CloseBody(res)
  8660. if err := googleapi.CheckResponse(res); err != nil {
  8661. return nil, err
  8662. }
  8663. ret := &Spreadsheet{
  8664. ServerResponse: googleapi.ServerResponse{
  8665. Header: res.Header,
  8666. HTTPStatusCode: res.StatusCode,
  8667. },
  8668. }
  8669. target := &ret
  8670. if err := gensupport.DecodeResponse(target, res); err != nil {
  8671. return nil, err
  8672. }
  8673. return ret, nil
  8674. // {
  8675. // "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.",
  8676. // "flatPath": "v4/spreadsheets/{spreadsheetId}",
  8677. // "httpMethod": "GET",
  8678. // "id": "sheets.spreadsheets.get",
  8679. // "parameterOrder": [
  8680. // "spreadsheetId"
  8681. // ],
  8682. // "parameters": {
  8683. // "includeGridData": {
  8684. // "description": "True if grid data should be returned.\nThis parameter is ignored if a field mask was set in the request.",
  8685. // "location": "query",
  8686. // "type": "boolean"
  8687. // },
  8688. // "ranges": {
  8689. // "description": "The ranges to retrieve from the spreadsheet.",
  8690. // "location": "query",
  8691. // "repeated": true,
  8692. // "type": "string"
  8693. // },
  8694. // "spreadsheetId": {
  8695. // "description": "The spreadsheet to request.",
  8696. // "location": "path",
  8697. // "required": true,
  8698. // "type": "string"
  8699. // }
  8700. // },
  8701. // "path": "v4/spreadsheets/{spreadsheetId}",
  8702. // "response": {
  8703. // "$ref": "Spreadsheet"
  8704. // },
  8705. // "scopes": [
  8706. // "https://www.googleapis.com/auth/drive",
  8707. // "https://www.googleapis.com/auth/drive.file",
  8708. // "https://www.googleapis.com/auth/drive.readonly",
  8709. // "https://www.googleapis.com/auth/spreadsheets",
  8710. // "https://www.googleapis.com/auth/spreadsheets.readonly"
  8711. // ]
  8712. // }
  8713. }
  8714. // method id "sheets.spreadsheets.getByDataFilter":
  8715. type SpreadsheetsGetByDataFilterCall struct {
  8716. s *Service
  8717. spreadsheetId string
  8718. getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest
  8719. urlParams_ gensupport.URLParams
  8720. ctx_ context.Context
  8721. header_ http.Header
  8722. }
  8723. // GetByDataFilter: Returns the spreadsheet at the given ID.
  8724. // The caller must specify the spreadsheet ID.
  8725. //
  8726. // This method differs from GetSpreadsheet in that it allows
  8727. // selecting
  8728. // which subsets of spreadsheet data to return by specifying
  8729. // a
  8730. // dataFilters parameter.
  8731. // Multiple DataFilters can be specified. Specifying one or
  8732. // more data filters will return the portions of the spreadsheet
  8733. // that
  8734. // intersect ranges matched by any of the filters.
  8735. //
  8736. // By default, data within grids will not be returned.
  8737. // You can include grid data one of two ways:
  8738. //
  8739. // * Specify a field mask listing your desired fields using the `fields`
  8740. // URL
  8741. // parameter in HTTP
  8742. //
  8743. // * Set the includeGridData
  8744. // parameter to true. If a field mask is set, the
  8745. // `includeGridData`
  8746. // parameter is ignored
  8747. //
  8748. // For large spreadsheets, it is recommended to retrieve only the
  8749. // specific
  8750. // fields of the spreadsheet that you want.
  8751. func (r *SpreadsheetsService) GetByDataFilter(spreadsheetId string, getspreadsheetbydatafilterrequest *GetSpreadsheetByDataFilterRequest) *SpreadsheetsGetByDataFilterCall {
  8752. c := &SpreadsheetsGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8753. c.spreadsheetId = spreadsheetId
  8754. c.getspreadsheetbydatafilterrequest = getspreadsheetbydatafilterrequest
  8755. return c
  8756. }
  8757. // Fields allows partial responses to be retrieved. See
  8758. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8759. // for more information.
  8760. func (c *SpreadsheetsGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsGetByDataFilterCall {
  8761. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8762. return c
  8763. }
  8764. // Context sets the context to be used in this call's Do method. Any
  8765. // pending HTTP request will be aborted if the provided context is
  8766. // canceled.
  8767. func (c *SpreadsheetsGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsGetByDataFilterCall {
  8768. c.ctx_ = ctx
  8769. return c
  8770. }
  8771. // Header returns an http.Header that can be modified by the caller to
  8772. // add HTTP headers to the request.
  8773. func (c *SpreadsheetsGetByDataFilterCall) Header() http.Header {
  8774. if c.header_ == nil {
  8775. c.header_ = make(http.Header)
  8776. }
  8777. return c.header_
  8778. }
  8779. func (c *SpreadsheetsGetByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  8780. reqHeaders := make(http.Header)
  8781. for k, v := range c.header_ {
  8782. reqHeaders[k] = v
  8783. }
  8784. reqHeaders.Set("User-Agent", c.s.userAgent())
  8785. var body io.Reader = nil
  8786. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getspreadsheetbydatafilterrequest)
  8787. if err != nil {
  8788. return nil, err
  8789. }
  8790. reqHeaders.Set("Content-Type", "application/json")
  8791. c.urlParams_.Set("alt", alt)
  8792. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}:getByDataFilter")
  8793. urls += "?" + c.urlParams_.Encode()
  8794. req, _ := http.NewRequest("POST", urls, body)
  8795. req.Header = reqHeaders
  8796. googleapi.Expand(req.URL, map[string]string{
  8797. "spreadsheetId": c.spreadsheetId,
  8798. })
  8799. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8800. }
  8801. // Do executes the "sheets.spreadsheets.getByDataFilter" call.
  8802. // Exactly one of *Spreadsheet or error will be non-nil. Any non-2xx
  8803. // status code is an error. Response headers are in either
  8804. // *Spreadsheet.ServerResponse.Header or (if a response was returned at
  8805. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8806. // to check whether the returned error was because
  8807. // http.StatusNotModified was returned.
  8808. func (c *SpreadsheetsGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*Spreadsheet, error) {
  8809. gensupport.SetOptions(c.urlParams_, opts...)
  8810. res, err := c.doRequest("json")
  8811. if res != nil && res.StatusCode == http.StatusNotModified {
  8812. if res.Body != nil {
  8813. res.Body.Close()
  8814. }
  8815. return nil, &googleapi.Error{
  8816. Code: res.StatusCode,
  8817. Header: res.Header,
  8818. }
  8819. }
  8820. if err != nil {
  8821. return nil, err
  8822. }
  8823. defer googleapi.CloseBody(res)
  8824. if err := googleapi.CheckResponse(res); err != nil {
  8825. return nil, err
  8826. }
  8827. ret := &Spreadsheet{
  8828. ServerResponse: googleapi.ServerResponse{
  8829. Header: res.Header,
  8830. HTTPStatusCode: res.StatusCode,
  8831. },
  8832. }
  8833. target := &ret
  8834. if err := gensupport.DecodeResponse(target, res); err != nil {
  8835. return nil, err
  8836. }
  8837. return ret, nil
  8838. // {
  8839. // "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.",
  8840. // "flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter",
  8841. // "httpMethod": "POST",
  8842. // "id": "sheets.spreadsheets.getByDataFilter",
  8843. // "parameterOrder": [
  8844. // "spreadsheetId"
  8845. // ],
  8846. // "parameters": {
  8847. // "spreadsheetId": {
  8848. // "description": "The spreadsheet to request.",
  8849. // "location": "path",
  8850. // "required": true,
  8851. // "type": "string"
  8852. // }
  8853. // },
  8854. // "path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter",
  8855. // "request": {
  8856. // "$ref": "GetSpreadsheetByDataFilterRequest"
  8857. // },
  8858. // "response": {
  8859. // "$ref": "Spreadsheet"
  8860. // },
  8861. // "scopes": [
  8862. // "https://www.googleapis.com/auth/drive",
  8863. // "https://www.googleapis.com/auth/drive.file",
  8864. // "https://www.googleapis.com/auth/spreadsheets"
  8865. // ]
  8866. // }
  8867. }
  8868. // method id "sheets.spreadsheets.developerMetadata.get":
  8869. type SpreadsheetsDeveloperMetadataGetCall struct {
  8870. s *Service
  8871. spreadsheetId string
  8872. metadataId int64
  8873. urlParams_ gensupport.URLParams
  8874. ifNoneMatch_ string
  8875. ctx_ context.Context
  8876. header_ http.Header
  8877. }
  8878. // Get: Returns the developer metadata with the specified ID.
  8879. // The caller must specify the spreadsheet ID and the developer
  8880. // metadata's
  8881. // unique metadataId.
  8882. func (r *SpreadsheetsDeveloperMetadataService) Get(spreadsheetId string, metadataId int64) *SpreadsheetsDeveloperMetadataGetCall {
  8883. c := &SpreadsheetsDeveloperMetadataGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8884. c.spreadsheetId = spreadsheetId
  8885. c.metadataId = metadataId
  8886. return c
  8887. }
  8888. // Fields allows partial responses to be retrieved. See
  8889. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8890. // for more information.
  8891. func (c *SpreadsheetsDeveloperMetadataGetCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataGetCall {
  8892. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8893. return c
  8894. }
  8895. // IfNoneMatch sets the optional parameter which makes the operation
  8896. // fail if the object's ETag matches the given value. This is useful for
  8897. // getting updates only after the object has changed since the last
  8898. // request. Use googleapi.IsNotModified to check whether the response
  8899. // error from Do is the result of In-None-Match.
  8900. func (c *SpreadsheetsDeveloperMetadataGetCall) IfNoneMatch(entityTag string) *SpreadsheetsDeveloperMetadataGetCall {
  8901. c.ifNoneMatch_ = entityTag
  8902. return c
  8903. }
  8904. // Context sets the context to be used in this call's Do method. Any
  8905. // pending HTTP request will be aborted if the provided context is
  8906. // canceled.
  8907. func (c *SpreadsheetsDeveloperMetadataGetCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataGetCall {
  8908. c.ctx_ = ctx
  8909. return c
  8910. }
  8911. // Header returns an http.Header that can be modified by the caller to
  8912. // add HTTP headers to the request.
  8913. func (c *SpreadsheetsDeveloperMetadataGetCall) Header() http.Header {
  8914. if c.header_ == nil {
  8915. c.header_ = make(http.Header)
  8916. }
  8917. return c.header_
  8918. }
  8919. func (c *SpreadsheetsDeveloperMetadataGetCall) doRequest(alt string) (*http.Response, error) {
  8920. reqHeaders := make(http.Header)
  8921. for k, v := range c.header_ {
  8922. reqHeaders[k] = v
  8923. }
  8924. reqHeaders.Set("User-Agent", c.s.userAgent())
  8925. if c.ifNoneMatch_ != "" {
  8926. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8927. }
  8928. var body io.Reader = nil
  8929. c.urlParams_.Set("alt", alt)
  8930. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}")
  8931. urls += "?" + c.urlParams_.Encode()
  8932. req, _ := http.NewRequest("GET", urls, body)
  8933. req.Header = reqHeaders
  8934. googleapi.Expand(req.URL, map[string]string{
  8935. "spreadsheetId": c.spreadsheetId,
  8936. "metadataId": strconv.FormatInt(c.metadataId, 10),
  8937. })
  8938. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8939. }
  8940. // Do executes the "sheets.spreadsheets.developerMetadata.get" call.
  8941. // Exactly one of *DeveloperMetadata or error will be non-nil. Any
  8942. // non-2xx status code is an error. Response headers are in either
  8943. // *DeveloperMetadata.ServerResponse.Header or (if a response was
  8944. // returned at all) in error.(*googleapi.Error).Header. Use
  8945. // googleapi.IsNotModified to check whether the returned error was
  8946. // because http.StatusNotModified was returned.
  8947. func (c *SpreadsheetsDeveloperMetadataGetCall) Do(opts ...googleapi.CallOption) (*DeveloperMetadata, error) {
  8948. gensupport.SetOptions(c.urlParams_, opts...)
  8949. res, err := c.doRequest("json")
  8950. if res != nil && res.StatusCode == http.StatusNotModified {
  8951. if res.Body != nil {
  8952. res.Body.Close()
  8953. }
  8954. return nil, &googleapi.Error{
  8955. Code: res.StatusCode,
  8956. Header: res.Header,
  8957. }
  8958. }
  8959. if err != nil {
  8960. return nil, err
  8961. }
  8962. defer googleapi.CloseBody(res)
  8963. if err := googleapi.CheckResponse(res); err != nil {
  8964. return nil, err
  8965. }
  8966. ret := &DeveloperMetadata{
  8967. ServerResponse: googleapi.ServerResponse{
  8968. Header: res.Header,
  8969. HTTPStatusCode: res.StatusCode,
  8970. },
  8971. }
  8972. target := &ret
  8973. if err := gensupport.DecodeResponse(target, res); err != nil {
  8974. return nil, err
  8975. }
  8976. return ret, nil
  8977. // {
  8978. // "description": "Returns the developer metadata with the specified ID.\nThe caller must specify the spreadsheet ID and the developer metadata's\nunique metadataId.",
  8979. // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}",
  8980. // "httpMethod": "GET",
  8981. // "id": "sheets.spreadsheets.developerMetadata.get",
  8982. // "parameterOrder": [
  8983. // "spreadsheetId",
  8984. // "metadataId"
  8985. // ],
  8986. // "parameters": {
  8987. // "metadataId": {
  8988. // "description": "The ID of the developer metadata to retrieve.",
  8989. // "format": "int32",
  8990. // "location": "path",
  8991. // "required": true,
  8992. // "type": "integer"
  8993. // },
  8994. // "spreadsheetId": {
  8995. // "description": "The ID of the spreadsheet to retrieve metadata from.",
  8996. // "location": "path",
  8997. // "required": true,
  8998. // "type": "string"
  8999. // }
  9000. // },
  9001. // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}",
  9002. // "response": {
  9003. // "$ref": "DeveloperMetadata"
  9004. // },
  9005. // "scopes": [
  9006. // "https://www.googleapis.com/auth/drive",
  9007. // "https://www.googleapis.com/auth/drive.file",
  9008. // "https://www.googleapis.com/auth/spreadsheets"
  9009. // ]
  9010. // }
  9011. }
  9012. // method id "sheets.spreadsheets.developerMetadata.search":
  9013. type SpreadsheetsDeveloperMetadataSearchCall struct {
  9014. s *Service
  9015. spreadsheetId string
  9016. searchdevelopermetadatarequest *SearchDeveloperMetadataRequest
  9017. urlParams_ gensupport.URLParams
  9018. ctx_ context.Context
  9019. header_ http.Header
  9020. }
  9021. // Search: Returns all developer metadata matching the specified
  9022. // DataFilter.
  9023. // If the provided DataFilter represents a DeveloperMetadataLookup
  9024. // object,
  9025. // this will return all DeveloperMetadata entries selected by it. If
  9026. // the
  9027. // DataFilter represents a location in a spreadsheet, this will return
  9028. // all
  9029. // developer metadata associated with locations intersecting that
  9030. // region.
  9031. func (r *SpreadsheetsDeveloperMetadataService) Search(spreadsheetId string, searchdevelopermetadatarequest *SearchDeveloperMetadataRequest) *SpreadsheetsDeveloperMetadataSearchCall {
  9032. c := &SpreadsheetsDeveloperMetadataSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9033. c.spreadsheetId = spreadsheetId
  9034. c.searchdevelopermetadatarequest = searchdevelopermetadatarequest
  9035. return c
  9036. }
  9037. // Fields allows partial responses to be retrieved. See
  9038. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9039. // for more information.
  9040. func (c *SpreadsheetsDeveloperMetadataSearchCall) Fields(s ...googleapi.Field) *SpreadsheetsDeveloperMetadataSearchCall {
  9041. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9042. return c
  9043. }
  9044. // Context sets the context to be used in this call's Do method. Any
  9045. // pending HTTP request will be aborted if the provided context is
  9046. // canceled.
  9047. func (c *SpreadsheetsDeveloperMetadataSearchCall) Context(ctx context.Context) *SpreadsheetsDeveloperMetadataSearchCall {
  9048. c.ctx_ = ctx
  9049. return c
  9050. }
  9051. // Header returns an http.Header that can be modified by the caller to
  9052. // add HTTP headers to the request.
  9053. func (c *SpreadsheetsDeveloperMetadataSearchCall) Header() http.Header {
  9054. if c.header_ == nil {
  9055. c.header_ = make(http.Header)
  9056. }
  9057. return c.header_
  9058. }
  9059. func (c *SpreadsheetsDeveloperMetadataSearchCall) doRequest(alt string) (*http.Response, error) {
  9060. reqHeaders := make(http.Header)
  9061. for k, v := range c.header_ {
  9062. reqHeaders[k] = v
  9063. }
  9064. reqHeaders.Set("User-Agent", c.s.userAgent())
  9065. var body io.Reader = nil
  9066. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchdevelopermetadatarequest)
  9067. if err != nil {
  9068. return nil, err
  9069. }
  9070. reqHeaders.Set("Content-Type", "application/json")
  9071. c.urlParams_.Set("alt", alt)
  9072. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/developerMetadata:search")
  9073. urls += "?" + c.urlParams_.Encode()
  9074. req, _ := http.NewRequest("POST", urls, body)
  9075. req.Header = reqHeaders
  9076. googleapi.Expand(req.URL, map[string]string{
  9077. "spreadsheetId": c.spreadsheetId,
  9078. })
  9079. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9080. }
  9081. // Do executes the "sheets.spreadsheets.developerMetadata.search" call.
  9082. // Exactly one of *SearchDeveloperMetadataResponse or error will be
  9083. // non-nil. Any non-2xx status code is an error. Response headers are in
  9084. // either *SearchDeveloperMetadataResponse.ServerResponse.Header or (if
  9085. // a response was returned at all) in error.(*googleapi.Error).Header.
  9086. // Use googleapi.IsNotModified to check whether the returned error was
  9087. // because http.StatusNotModified was returned.
  9088. func (c *SpreadsheetsDeveloperMetadataSearchCall) Do(opts ...googleapi.CallOption) (*SearchDeveloperMetadataResponse, error) {
  9089. gensupport.SetOptions(c.urlParams_, opts...)
  9090. res, err := c.doRequest("json")
  9091. if res != nil && res.StatusCode == http.StatusNotModified {
  9092. if res.Body != nil {
  9093. res.Body.Close()
  9094. }
  9095. return nil, &googleapi.Error{
  9096. Code: res.StatusCode,
  9097. Header: res.Header,
  9098. }
  9099. }
  9100. if err != nil {
  9101. return nil, err
  9102. }
  9103. defer googleapi.CloseBody(res)
  9104. if err := googleapi.CheckResponse(res); err != nil {
  9105. return nil, err
  9106. }
  9107. ret := &SearchDeveloperMetadataResponse{
  9108. ServerResponse: googleapi.ServerResponse{
  9109. Header: res.Header,
  9110. HTTPStatusCode: res.StatusCode,
  9111. },
  9112. }
  9113. target := &ret
  9114. if err := gensupport.DecodeResponse(target, res); err != nil {
  9115. return nil, err
  9116. }
  9117. return ret, nil
  9118. // {
  9119. // "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.",
  9120. // "flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search",
  9121. // "httpMethod": "POST",
  9122. // "id": "sheets.spreadsheets.developerMetadata.search",
  9123. // "parameterOrder": [
  9124. // "spreadsheetId"
  9125. // ],
  9126. // "parameters": {
  9127. // "spreadsheetId": {
  9128. // "description": "The ID of the spreadsheet to retrieve metadata from.",
  9129. // "location": "path",
  9130. // "required": true,
  9131. // "type": "string"
  9132. // }
  9133. // },
  9134. // "path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search",
  9135. // "request": {
  9136. // "$ref": "SearchDeveloperMetadataRequest"
  9137. // },
  9138. // "response": {
  9139. // "$ref": "SearchDeveloperMetadataResponse"
  9140. // },
  9141. // "scopes": [
  9142. // "https://www.googleapis.com/auth/drive",
  9143. // "https://www.googleapis.com/auth/drive.file",
  9144. // "https://www.googleapis.com/auth/spreadsheets"
  9145. // ]
  9146. // }
  9147. }
  9148. // method id "sheets.spreadsheets.sheets.copyTo":
  9149. type SpreadsheetsSheetsCopyToCall struct {
  9150. s *Service
  9151. spreadsheetId string
  9152. sheetId int64
  9153. copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest
  9154. urlParams_ gensupport.URLParams
  9155. ctx_ context.Context
  9156. header_ http.Header
  9157. }
  9158. // CopyTo: Copies a single sheet from a spreadsheet to another
  9159. // spreadsheet.
  9160. // Returns the properties of the newly created sheet.
  9161. func (r *SpreadsheetsSheetsService) CopyTo(spreadsheetId string, sheetId int64, copysheettoanotherspreadsheetrequest *CopySheetToAnotherSpreadsheetRequest) *SpreadsheetsSheetsCopyToCall {
  9162. c := &SpreadsheetsSheetsCopyToCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9163. c.spreadsheetId = spreadsheetId
  9164. c.sheetId = sheetId
  9165. c.copysheettoanotherspreadsheetrequest = copysheettoanotherspreadsheetrequest
  9166. return c
  9167. }
  9168. // Fields allows partial responses to be retrieved. See
  9169. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9170. // for more information.
  9171. func (c *SpreadsheetsSheetsCopyToCall) Fields(s ...googleapi.Field) *SpreadsheetsSheetsCopyToCall {
  9172. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9173. return c
  9174. }
  9175. // Context sets the context to be used in this call's Do method. Any
  9176. // pending HTTP request will be aborted if the provided context is
  9177. // canceled.
  9178. func (c *SpreadsheetsSheetsCopyToCall) Context(ctx context.Context) *SpreadsheetsSheetsCopyToCall {
  9179. c.ctx_ = ctx
  9180. return c
  9181. }
  9182. // Header returns an http.Header that can be modified by the caller to
  9183. // add HTTP headers to the request.
  9184. func (c *SpreadsheetsSheetsCopyToCall) Header() http.Header {
  9185. if c.header_ == nil {
  9186. c.header_ = make(http.Header)
  9187. }
  9188. return c.header_
  9189. }
  9190. func (c *SpreadsheetsSheetsCopyToCall) doRequest(alt string) (*http.Response, error) {
  9191. reqHeaders := make(http.Header)
  9192. for k, v := range c.header_ {
  9193. reqHeaders[k] = v
  9194. }
  9195. reqHeaders.Set("User-Agent", c.s.userAgent())
  9196. var body io.Reader = nil
  9197. body, err := googleapi.WithoutDataWrapper.JSONReader(c.copysheettoanotherspreadsheetrequest)
  9198. if err != nil {
  9199. return nil, err
  9200. }
  9201. reqHeaders.Set("Content-Type", "application/json")
  9202. c.urlParams_.Set("alt", alt)
  9203. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo")
  9204. urls += "?" + c.urlParams_.Encode()
  9205. req, _ := http.NewRequest("POST", urls, body)
  9206. req.Header = reqHeaders
  9207. googleapi.Expand(req.URL, map[string]string{
  9208. "spreadsheetId": c.spreadsheetId,
  9209. "sheetId": strconv.FormatInt(c.sheetId, 10),
  9210. })
  9211. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9212. }
  9213. // Do executes the "sheets.spreadsheets.sheets.copyTo" call.
  9214. // Exactly one of *SheetProperties or error will be non-nil. Any non-2xx
  9215. // status code is an error. Response headers are in either
  9216. // *SheetProperties.ServerResponse.Header or (if a response was returned
  9217. // at all) in error.(*googleapi.Error).Header. Use
  9218. // googleapi.IsNotModified to check whether the returned error was
  9219. // because http.StatusNotModified was returned.
  9220. func (c *SpreadsheetsSheetsCopyToCall) Do(opts ...googleapi.CallOption) (*SheetProperties, error) {
  9221. gensupport.SetOptions(c.urlParams_, opts...)
  9222. res, err := c.doRequest("json")
  9223. if res != nil && res.StatusCode == http.StatusNotModified {
  9224. if res.Body != nil {
  9225. res.Body.Close()
  9226. }
  9227. return nil, &googleapi.Error{
  9228. Code: res.StatusCode,
  9229. Header: res.Header,
  9230. }
  9231. }
  9232. if err != nil {
  9233. return nil, err
  9234. }
  9235. defer googleapi.CloseBody(res)
  9236. if err := googleapi.CheckResponse(res); err != nil {
  9237. return nil, err
  9238. }
  9239. ret := &SheetProperties{
  9240. ServerResponse: googleapi.ServerResponse{
  9241. Header: res.Header,
  9242. HTTPStatusCode: res.StatusCode,
  9243. },
  9244. }
  9245. target := &ret
  9246. if err := gensupport.DecodeResponse(target, res); err != nil {
  9247. return nil, err
  9248. }
  9249. return ret, nil
  9250. // {
  9251. // "description": "Copies a single sheet from a spreadsheet to another spreadsheet.\nReturns the properties of the newly created sheet.",
  9252. // "flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo",
  9253. // "httpMethod": "POST",
  9254. // "id": "sheets.spreadsheets.sheets.copyTo",
  9255. // "parameterOrder": [
  9256. // "spreadsheetId",
  9257. // "sheetId"
  9258. // ],
  9259. // "parameters": {
  9260. // "sheetId": {
  9261. // "description": "The ID of the sheet to copy.",
  9262. // "format": "int32",
  9263. // "location": "path",
  9264. // "required": true,
  9265. // "type": "integer"
  9266. // },
  9267. // "spreadsheetId": {
  9268. // "description": "The ID of the spreadsheet containing the sheet to copy.",
  9269. // "location": "path",
  9270. // "required": true,
  9271. // "type": "string"
  9272. // }
  9273. // },
  9274. // "path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo",
  9275. // "request": {
  9276. // "$ref": "CopySheetToAnotherSpreadsheetRequest"
  9277. // },
  9278. // "response": {
  9279. // "$ref": "SheetProperties"
  9280. // },
  9281. // "scopes": [
  9282. // "https://www.googleapis.com/auth/drive",
  9283. // "https://www.googleapis.com/auth/drive.file",
  9284. // "https://www.googleapis.com/auth/spreadsheets"
  9285. // ]
  9286. // }
  9287. }
  9288. // method id "sheets.spreadsheets.values.append":
  9289. type SpreadsheetsValuesAppendCall struct {
  9290. s *Service
  9291. spreadsheetId string
  9292. range_ string
  9293. valuerange *ValueRange
  9294. urlParams_ gensupport.URLParams
  9295. ctx_ context.Context
  9296. header_ http.Header
  9297. }
  9298. // Append: Appends values to a spreadsheet. The input range is used to
  9299. // search for
  9300. // existing data and find a "table" within that range. Values will
  9301. // be
  9302. // appended to the next row of the table, starting with the first column
  9303. // of
  9304. // the table. See
  9305. // the
  9306. // [guide](/sheets/api/guides/values#appending_values)
  9307. // and
  9308. // [sample code](/sheets/api/samples/writing#append_values)
  9309. // for specific details of how tables are detected and data is
  9310. // appended.
  9311. //
  9312. // The caller must specify the spreadsheet ID, range, and
  9313. // a valueInputOption. The `valueInputOption` only
  9314. // controls how the input data will be added to the sheet (column-wise
  9315. // or
  9316. // row-wise), it does not influence what cell the data starts being
  9317. // written
  9318. // to.
  9319. func (r *SpreadsheetsValuesService) Append(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesAppendCall {
  9320. c := &SpreadsheetsValuesAppendCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9321. c.spreadsheetId = spreadsheetId
  9322. c.range_ = range_
  9323. c.valuerange = valuerange
  9324. return c
  9325. }
  9326. // IncludeValuesInResponse sets the optional parameter
  9327. // "includeValuesInResponse": Determines if the update response should
  9328. // include the values
  9329. // of the cells that were appended. By default, responses
  9330. // do not include the updated values.
  9331. func (c *SpreadsheetsValuesAppendCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesAppendCall {
  9332. c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse))
  9333. return c
  9334. }
  9335. // InsertDataOption sets the optional parameter "insertDataOption": How
  9336. // the input data should be inserted.
  9337. //
  9338. // Possible values:
  9339. // "OVERWRITE"
  9340. // "INSERT_ROWS"
  9341. func (c *SpreadsheetsValuesAppendCall) InsertDataOption(insertDataOption string) *SpreadsheetsValuesAppendCall {
  9342. c.urlParams_.Set("insertDataOption", insertDataOption)
  9343. return c
  9344. }
  9345. // ResponseDateTimeRenderOption sets the optional parameter
  9346. // "responseDateTimeRenderOption": Determines how dates, times, and
  9347. // durations in the response should be
  9348. // rendered. This is ignored if response_value_render_option
  9349. // is
  9350. // FORMATTED_VALUE.
  9351. // The default dateTime render option is
  9352. // [DateTimeRenderOption.SERIAL_NUMBER].
  9353. //
  9354. // Possible values:
  9355. // "SERIAL_NUMBER"
  9356. // "FORMATTED_STRING"
  9357. func (c *SpreadsheetsValuesAppendCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesAppendCall {
  9358. c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption)
  9359. return c
  9360. }
  9361. // ResponseValueRenderOption sets the optional parameter
  9362. // "responseValueRenderOption": Determines how values in the response
  9363. // should be rendered.
  9364. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  9365. //
  9366. // Possible values:
  9367. // "FORMATTED_VALUE"
  9368. // "UNFORMATTED_VALUE"
  9369. // "FORMULA"
  9370. func (c *SpreadsheetsValuesAppendCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesAppendCall {
  9371. c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption)
  9372. return c
  9373. }
  9374. // ValueInputOption sets the optional parameter "valueInputOption": How
  9375. // the input data should be interpreted.
  9376. //
  9377. // Possible values:
  9378. // "INPUT_VALUE_OPTION_UNSPECIFIED"
  9379. // "RAW"
  9380. // "USER_ENTERED"
  9381. func (c *SpreadsheetsValuesAppendCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesAppendCall {
  9382. c.urlParams_.Set("valueInputOption", valueInputOption)
  9383. return c
  9384. }
  9385. // Fields allows partial responses to be retrieved. See
  9386. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9387. // for more information.
  9388. func (c *SpreadsheetsValuesAppendCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesAppendCall {
  9389. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9390. return c
  9391. }
  9392. // Context sets the context to be used in this call's Do method. Any
  9393. // pending HTTP request will be aborted if the provided context is
  9394. // canceled.
  9395. func (c *SpreadsheetsValuesAppendCall) Context(ctx context.Context) *SpreadsheetsValuesAppendCall {
  9396. c.ctx_ = ctx
  9397. return c
  9398. }
  9399. // Header returns an http.Header that can be modified by the caller to
  9400. // add HTTP headers to the request.
  9401. func (c *SpreadsheetsValuesAppendCall) Header() http.Header {
  9402. if c.header_ == nil {
  9403. c.header_ = make(http.Header)
  9404. }
  9405. return c.header_
  9406. }
  9407. func (c *SpreadsheetsValuesAppendCall) doRequest(alt string) (*http.Response, error) {
  9408. reqHeaders := make(http.Header)
  9409. for k, v := range c.header_ {
  9410. reqHeaders[k] = v
  9411. }
  9412. reqHeaders.Set("User-Agent", c.s.userAgent())
  9413. var body io.Reader = nil
  9414. body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange)
  9415. if err != nil {
  9416. return nil, err
  9417. }
  9418. reqHeaders.Set("Content-Type", "application/json")
  9419. c.urlParams_.Set("alt", alt)
  9420. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:append")
  9421. urls += "?" + c.urlParams_.Encode()
  9422. req, _ := http.NewRequest("POST", urls, body)
  9423. req.Header = reqHeaders
  9424. googleapi.Expand(req.URL, map[string]string{
  9425. "spreadsheetId": c.spreadsheetId,
  9426. "range": c.range_,
  9427. })
  9428. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9429. }
  9430. // Do executes the "sheets.spreadsheets.values.append" call.
  9431. // Exactly one of *AppendValuesResponse or error will be non-nil. Any
  9432. // non-2xx status code is an error. Response headers are in either
  9433. // *AppendValuesResponse.ServerResponse.Header or (if a response was
  9434. // returned at all) in error.(*googleapi.Error).Header. Use
  9435. // googleapi.IsNotModified to check whether the returned error was
  9436. // because http.StatusNotModified was returned.
  9437. func (c *SpreadsheetsValuesAppendCall) Do(opts ...googleapi.CallOption) (*AppendValuesResponse, error) {
  9438. gensupport.SetOptions(c.urlParams_, opts...)
  9439. res, err := c.doRequest("json")
  9440. if res != nil && res.StatusCode == http.StatusNotModified {
  9441. if res.Body != nil {
  9442. res.Body.Close()
  9443. }
  9444. return nil, &googleapi.Error{
  9445. Code: res.StatusCode,
  9446. Header: res.Header,
  9447. }
  9448. }
  9449. if err != nil {
  9450. return nil, err
  9451. }
  9452. defer googleapi.CloseBody(res)
  9453. if err := googleapi.CheckResponse(res); err != nil {
  9454. return nil, err
  9455. }
  9456. ret := &AppendValuesResponse{
  9457. ServerResponse: googleapi.ServerResponse{
  9458. Header: res.Header,
  9459. HTTPStatusCode: res.StatusCode,
  9460. },
  9461. }
  9462. target := &ret
  9463. if err := gensupport.DecodeResponse(target, res); err != nil {
  9464. return nil, err
  9465. }
  9466. return ret, nil
  9467. // {
  9468. // "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.",
  9469. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
  9470. // "httpMethod": "POST",
  9471. // "id": "sheets.spreadsheets.values.append",
  9472. // "parameterOrder": [
  9473. // "spreadsheetId",
  9474. // "range"
  9475. // ],
  9476. // "parameters": {
  9477. // "includeValuesInResponse": {
  9478. // "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.",
  9479. // "location": "query",
  9480. // "type": "boolean"
  9481. // },
  9482. // "insertDataOption": {
  9483. // "description": "How the input data should be inserted.",
  9484. // "enum": [
  9485. // "OVERWRITE",
  9486. // "INSERT_ROWS"
  9487. // ],
  9488. // "location": "query",
  9489. // "type": "string"
  9490. // },
  9491. // "range": {
  9492. // "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.",
  9493. // "location": "path",
  9494. // "required": true,
  9495. // "type": "string"
  9496. // },
  9497. // "responseDateTimeRenderOption": {
  9498. // "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].",
  9499. // "enum": [
  9500. // "SERIAL_NUMBER",
  9501. // "FORMATTED_STRING"
  9502. // ],
  9503. // "location": "query",
  9504. // "type": "string"
  9505. // },
  9506. // "responseValueRenderOption": {
  9507. // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  9508. // "enum": [
  9509. // "FORMATTED_VALUE",
  9510. // "UNFORMATTED_VALUE",
  9511. // "FORMULA"
  9512. // ],
  9513. // "location": "query",
  9514. // "type": "string"
  9515. // },
  9516. // "spreadsheetId": {
  9517. // "description": "The ID of the spreadsheet to update.",
  9518. // "location": "path",
  9519. // "required": true,
  9520. // "type": "string"
  9521. // },
  9522. // "valueInputOption": {
  9523. // "description": "How the input data should be interpreted.",
  9524. // "enum": [
  9525. // "INPUT_VALUE_OPTION_UNSPECIFIED",
  9526. // "RAW",
  9527. // "USER_ENTERED"
  9528. // ],
  9529. // "location": "query",
  9530. // "type": "string"
  9531. // }
  9532. // },
  9533. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
  9534. // "request": {
  9535. // "$ref": "ValueRange"
  9536. // },
  9537. // "response": {
  9538. // "$ref": "AppendValuesResponse"
  9539. // },
  9540. // "scopes": [
  9541. // "https://www.googleapis.com/auth/drive",
  9542. // "https://www.googleapis.com/auth/drive.file",
  9543. // "https://www.googleapis.com/auth/spreadsheets"
  9544. // ]
  9545. // }
  9546. }
  9547. // method id "sheets.spreadsheets.values.batchClear":
  9548. type SpreadsheetsValuesBatchClearCall struct {
  9549. s *Service
  9550. spreadsheetId string
  9551. batchclearvaluesrequest *BatchClearValuesRequest
  9552. urlParams_ gensupport.URLParams
  9553. ctx_ context.Context
  9554. header_ http.Header
  9555. }
  9556. // BatchClear: Clears one or more ranges of values from a
  9557. // spreadsheet.
  9558. // The caller must specify the spreadsheet ID and one or more
  9559. // ranges.
  9560. // Only values are cleared -- all other properties of the cell (such
  9561. // as
  9562. // formatting, data validation, etc..) are kept.
  9563. func (r *SpreadsheetsValuesService) BatchClear(spreadsheetId string, batchclearvaluesrequest *BatchClearValuesRequest) *SpreadsheetsValuesBatchClearCall {
  9564. c := &SpreadsheetsValuesBatchClearCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9565. c.spreadsheetId = spreadsheetId
  9566. c.batchclearvaluesrequest = batchclearvaluesrequest
  9567. return c
  9568. }
  9569. // Fields allows partial responses to be retrieved. See
  9570. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9571. // for more information.
  9572. func (c *SpreadsheetsValuesBatchClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearCall {
  9573. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9574. return c
  9575. }
  9576. // Context sets the context to be used in this call's Do method. Any
  9577. // pending HTTP request will be aborted if the provided context is
  9578. // canceled.
  9579. func (c *SpreadsheetsValuesBatchClearCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearCall {
  9580. c.ctx_ = ctx
  9581. return c
  9582. }
  9583. // Header returns an http.Header that can be modified by the caller to
  9584. // add HTTP headers to the request.
  9585. func (c *SpreadsheetsValuesBatchClearCall) Header() http.Header {
  9586. if c.header_ == nil {
  9587. c.header_ = make(http.Header)
  9588. }
  9589. return c.header_
  9590. }
  9591. func (c *SpreadsheetsValuesBatchClearCall) doRequest(alt string) (*http.Response, error) {
  9592. reqHeaders := make(http.Header)
  9593. for k, v := range c.header_ {
  9594. reqHeaders[k] = v
  9595. }
  9596. reqHeaders.Set("User-Agent", c.s.userAgent())
  9597. var body io.Reader = nil
  9598. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesrequest)
  9599. if err != nil {
  9600. return nil, err
  9601. }
  9602. reqHeaders.Set("Content-Type", "application/json")
  9603. c.urlParams_.Set("alt", alt)
  9604. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClear")
  9605. urls += "?" + c.urlParams_.Encode()
  9606. req, _ := http.NewRequest("POST", urls, body)
  9607. req.Header = reqHeaders
  9608. googleapi.Expand(req.URL, map[string]string{
  9609. "spreadsheetId": c.spreadsheetId,
  9610. })
  9611. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9612. }
  9613. // Do executes the "sheets.spreadsheets.values.batchClear" call.
  9614. // Exactly one of *BatchClearValuesResponse or error will be non-nil.
  9615. // Any non-2xx status code is an error. Response headers are in either
  9616. // *BatchClearValuesResponse.ServerResponse.Header or (if a response was
  9617. // returned at all) in error.(*googleapi.Error).Header. Use
  9618. // googleapi.IsNotModified to check whether the returned error was
  9619. // because http.StatusNotModified was returned.
  9620. func (c *SpreadsheetsValuesBatchClearCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesResponse, error) {
  9621. gensupport.SetOptions(c.urlParams_, opts...)
  9622. res, err := c.doRequest("json")
  9623. if res != nil && res.StatusCode == http.StatusNotModified {
  9624. if res.Body != nil {
  9625. res.Body.Close()
  9626. }
  9627. return nil, &googleapi.Error{
  9628. Code: res.StatusCode,
  9629. Header: res.Header,
  9630. }
  9631. }
  9632. if err != nil {
  9633. return nil, err
  9634. }
  9635. defer googleapi.CloseBody(res)
  9636. if err := googleapi.CheckResponse(res); err != nil {
  9637. return nil, err
  9638. }
  9639. ret := &BatchClearValuesResponse{
  9640. ServerResponse: googleapi.ServerResponse{
  9641. Header: res.Header,
  9642. HTTPStatusCode: res.StatusCode,
  9643. },
  9644. }
  9645. target := &ret
  9646. if err := gensupport.DecodeResponse(target, res); err != nil {
  9647. return nil, err
  9648. }
  9649. return ret, nil
  9650. // {
  9651. // "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.",
  9652. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
  9653. // "httpMethod": "POST",
  9654. // "id": "sheets.spreadsheets.values.batchClear",
  9655. // "parameterOrder": [
  9656. // "spreadsheetId"
  9657. // ],
  9658. // "parameters": {
  9659. // "spreadsheetId": {
  9660. // "description": "The ID of the spreadsheet to update.",
  9661. // "location": "path",
  9662. // "required": true,
  9663. // "type": "string"
  9664. // }
  9665. // },
  9666. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
  9667. // "request": {
  9668. // "$ref": "BatchClearValuesRequest"
  9669. // },
  9670. // "response": {
  9671. // "$ref": "BatchClearValuesResponse"
  9672. // },
  9673. // "scopes": [
  9674. // "https://www.googleapis.com/auth/drive",
  9675. // "https://www.googleapis.com/auth/drive.file",
  9676. // "https://www.googleapis.com/auth/spreadsheets"
  9677. // ]
  9678. // }
  9679. }
  9680. // method id "sheets.spreadsheets.values.batchClearByDataFilter":
  9681. type SpreadsheetsValuesBatchClearByDataFilterCall struct {
  9682. s *Service
  9683. spreadsheetId string
  9684. batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest
  9685. urlParams_ gensupport.URLParams
  9686. ctx_ context.Context
  9687. header_ http.Header
  9688. }
  9689. // BatchClearByDataFilter: Clears one or more ranges of values from a
  9690. // spreadsheet.
  9691. // The caller must specify the spreadsheet ID and one or
  9692. // more
  9693. // DataFilters. Ranges matching any of the specified data
  9694. // filters will be cleared. Only values are cleared -- all other
  9695. // properties
  9696. // of the cell (such as formatting, data validation, etc..) are kept.
  9697. func (r *SpreadsheetsValuesService) BatchClearByDataFilter(spreadsheetId string, batchclearvaluesbydatafilterrequest *BatchClearValuesByDataFilterRequest) *SpreadsheetsValuesBatchClearByDataFilterCall {
  9698. c := &SpreadsheetsValuesBatchClearByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9699. c.spreadsheetId = spreadsheetId
  9700. c.batchclearvaluesbydatafilterrequest = batchclearvaluesbydatafilterrequest
  9701. return c
  9702. }
  9703. // Fields allows partial responses to be retrieved. See
  9704. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9705. // for more information.
  9706. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchClearByDataFilterCall {
  9707. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9708. return c
  9709. }
  9710. // Context sets the context to be used in this call's Do method. Any
  9711. // pending HTTP request will be aborted if the provided context is
  9712. // canceled.
  9713. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchClearByDataFilterCall {
  9714. c.ctx_ = ctx
  9715. return c
  9716. }
  9717. // Header returns an http.Header that can be modified by the caller to
  9718. // add HTTP headers to the request.
  9719. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Header() http.Header {
  9720. if c.header_ == nil {
  9721. c.header_ = make(http.Header)
  9722. }
  9723. return c.header_
  9724. }
  9725. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  9726. reqHeaders := make(http.Header)
  9727. for k, v := range c.header_ {
  9728. reqHeaders[k] = v
  9729. }
  9730. reqHeaders.Set("User-Agent", c.s.userAgent())
  9731. var body io.Reader = nil
  9732. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchclearvaluesbydatafilterrequest)
  9733. if err != nil {
  9734. return nil, err
  9735. }
  9736. reqHeaders.Set("Content-Type", "application/json")
  9737. c.urlParams_.Set("alt", alt)
  9738. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter")
  9739. urls += "?" + c.urlParams_.Encode()
  9740. req, _ := http.NewRequest("POST", urls, body)
  9741. req.Header = reqHeaders
  9742. googleapi.Expand(req.URL, map[string]string{
  9743. "spreadsheetId": c.spreadsheetId,
  9744. })
  9745. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9746. }
  9747. // Do executes the "sheets.spreadsheets.values.batchClearByDataFilter" call.
  9748. // Exactly one of *BatchClearValuesByDataFilterResponse or error will be
  9749. // non-nil. Any non-2xx status code is an error. Response headers are in
  9750. // either *BatchClearValuesByDataFilterResponse.ServerResponse.Header or
  9751. // (if a response was returned at all) in
  9752. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9753. // whether the returned error was because http.StatusNotModified was
  9754. // returned.
  9755. func (c *SpreadsheetsValuesBatchClearByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchClearValuesByDataFilterResponse, error) {
  9756. gensupport.SetOptions(c.urlParams_, opts...)
  9757. res, err := c.doRequest("json")
  9758. if res != nil && res.StatusCode == http.StatusNotModified {
  9759. if res.Body != nil {
  9760. res.Body.Close()
  9761. }
  9762. return nil, &googleapi.Error{
  9763. Code: res.StatusCode,
  9764. Header: res.Header,
  9765. }
  9766. }
  9767. if err != nil {
  9768. return nil, err
  9769. }
  9770. defer googleapi.CloseBody(res)
  9771. if err := googleapi.CheckResponse(res); err != nil {
  9772. return nil, err
  9773. }
  9774. ret := &BatchClearValuesByDataFilterResponse{
  9775. ServerResponse: googleapi.ServerResponse{
  9776. Header: res.Header,
  9777. HTTPStatusCode: res.StatusCode,
  9778. },
  9779. }
  9780. target := &ret
  9781. if err := gensupport.DecodeResponse(target, res); err != nil {
  9782. return nil, err
  9783. }
  9784. return ret, nil
  9785. // {
  9786. // "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.",
  9787. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter",
  9788. // "httpMethod": "POST",
  9789. // "id": "sheets.spreadsheets.values.batchClearByDataFilter",
  9790. // "parameterOrder": [
  9791. // "spreadsheetId"
  9792. // ],
  9793. // "parameters": {
  9794. // "spreadsheetId": {
  9795. // "description": "The ID of the spreadsheet to update.",
  9796. // "location": "path",
  9797. // "required": true,
  9798. // "type": "string"
  9799. // }
  9800. // },
  9801. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter",
  9802. // "request": {
  9803. // "$ref": "BatchClearValuesByDataFilterRequest"
  9804. // },
  9805. // "response": {
  9806. // "$ref": "BatchClearValuesByDataFilterResponse"
  9807. // },
  9808. // "scopes": [
  9809. // "https://www.googleapis.com/auth/drive",
  9810. // "https://www.googleapis.com/auth/drive.file",
  9811. // "https://www.googleapis.com/auth/spreadsheets"
  9812. // ]
  9813. // }
  9814. }
  9815. // method id "sheets.spreadsheets.values.batchGet":
  9816. type SpreadsheetsValuesBatchGetCall struct {
  9817. s *Service
  9818. spreadsheetId string
  9819. urlParams_ gensupport.URLParams
  9820. ifNoneMatch_ string
  9821. ctx_ context.Context
  9822. header_ http.Header
  9823. }
  9824. // BatchGet: Returns one or more ranges of values from a
  9825. // spreadsheet.
  9826. // The caller must specify the spreadsheet ID and one or more ranges.
  9827. func (r *SpreadsheetsValuesService) BatchGet(spreadsheetId string) *SpreadsheetsValuesBatchGetCall {
  9828. c := &SpreadsheetsValuesBatchGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9829. c.spreadsheetId = spreadsheetId
  9830. return c
  9831. }
  9832. // DateTimeRenderOption sets the optional parameter
  9833. // "dateTimeRenderOption": How dates, times, and durations should be
  9834. // represented in the output.
  9835. // This is ignored if value_render_option is
  9836. // FORMATTED_VALUE.
  9837. // The default dateTime render option is
  9838. // [DateTimeRenderOption.SERIAL_NUMBER].
  9839. //
  9840. // Possible values:
  9841. // "SERIAL_NUMBER"
  9842. // "FORMATTED_STRING"
  9843. func (c *SpreadsheetsValuesBatchGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesBatchGetCall {
  9844. c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption)
  9845. return c
  9846. }
  9847. // MajorDimension sets the optional parameter "majorDimension": The
  9848. // major dimension that results should use.
  9849. //
  9850. // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  9851. // then requesting `range=A1:B2,majorDimension=ROWS` will
  9852. // return
  9853. // `[[1,2],[3,4]]`,
  9854. // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will
  9855. // return
  9856. // `[[1,3],[2,4]]`.
  9857. //
  9858. // Possible values:
  9859. // "DIMENSION_UNSPECIFIED"
  9860. // "ROWS"
  9861. // "COLUMNS"
  9862. func (c *SpreadsheetsValuesBatchGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesBatchGetCall {
  9863. c.urlParams_.Set("majorDimension", majorDimension)
  9864. return c
  9865. }
  9866. // Ranges sets the optional parameter "ranges": The A1 notation of the
  9867. // values to retrieve.
  9868. func (c *SpreadsheetsValuesBatchGetCall) Ranges(ranges ...string) *SpreadsheetsValuesBatchGetCall {
  9869. c.urlParams_.SetMulti("ranges", append([]string{}, ranges...))
  9870. return c
  9871. }
  9872. // ValueRenderOption sets the optional parameter "valueRenderOption":
  9873. // How values should be represented in the output.
  9874. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  9875. //
  9876. // Possible values:
  9877. // "FORMATTED_VALUE"
  9878. // "UNFORMATTED_VALUE"
  9879. // "FORMULA"
  9880. func (c *SpreadsheetsValuesBatchGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesBatchGetCall {
  9881. c.urlParams_.Set("valueRenderOption", valueRenderOption)
  9882. return c
  9883. }
  9884. // Fields allows partial responses to be retrieved. See
  9885. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9886. // for more information.
  9887. func (c *SpreadsheetsValuesBatchGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetCall {
  9888. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9889. return c
  9890. }
  9891. // IfNoneMatch sets the optional parameter which makes the operation
  9892. // fail if the object's ETag matches the given value. This is useful for
  9893. // getting updates only after the object has changed since the last
  9894. // request. Use googleapi.IsNotModified to check whether the response
  9895. // error from Do is the result of In-None-Match.
  9896. func (c *SpreadsheetsValuesBatchGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesBatchGetCall {
  9897. c.ifNoneMatch_ = entityTag
  9898. return c
  9899. }
  9900. // Context sets the context to be used in this call's Do method. Any
  9901. // pending HTTP request will be aborted if the provided context is
  9902. // canceled.
  9903. func (c *SpreadsheetsValuesBatchGetCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetCall {
  9904. c.ctx_ = ctx
  9905. return c
  9906. }
  9907. // Header returns an http.Header that can be modified by the caller to
  9908. // add HTTP headers to the request.
  9909. func (c *SpreadsheetsValuesBatchGetCall) Header() http.Header {
  9910. if c.header_ == nil {
  9911. c.header_ = make(http.Header)
  9912. }
  9913. return c.header_
  9914. }
  9915. func (c *SpreadsheetsValuesBatchGetCall) doRequest(alt string) (*http.Response, error) {
  9916. reqHeaders := make(http.Header)
  9917. for k, v := range c.header_ {
  9918. reqHeaders[k] = v
  9919. }
  9920. reqHeaders.Set("User-Agent", c.s.userAgent())
  9921. if c.ifNoneMatch_ != "" {
  9922. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9923. }
  9924. var body io.Reader = nil
  9925. c.urlParams_.Set("alt", alt)
  9926. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGet")
  9927. urls += "?" + c.urlParams_.Encode()
  9928. req, _ := http.NewRequest("GET", urls, body)
  9929. req.Header = reqHeaders
  9930. googleapi.Expand(req.URL, map[string]string{
  9931. "spreadsheetId": c.spreadsheetId,
  9932. })
  9933. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9934. }
  9935. // Do executes the "sheets.spreadsheets.values.batchGet" call.
  9936. // Exactly one of *BatchGetValuesResponse or error will be non-nil. Any
  9937. // non-2xx status code is an error. Response headers are in either
  9938. // *BatchGetValuesResponse.ServerResponse.Header or (if a response was
  9939. // returned at all) in error.(*googleapi.Error).Header. Use
  9940. // googleapi.IsNotModified to check whether the returned error was
  9941. // because http.StatusNotModified was returned.
  9942. func (c *SpreadsheetsValuesBatchGetCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesResponse, error) {
  9943. gensupport.SetOptions(c.urlParams_, opts...)
  9944. res, err := c.doRequest("json")
  9945. if res != nil && res.StatusCode == http.StatusNotModified {
  9946. if res.Body != nil {
  9947. res.Body.Close()
  9948. }
  9949. return nil, &googleapi.Error{
  9950. Code: res.StatusCode,
  9951. Header: res.Header,
  9952. }
  9953. }
  9954. if err != nil {
  9955. return nil, err
  9956. }
  9957. defer googleapi.CloseBody(res)
  9958. if err := googleapi.CheckResponse(res); err != nil {
  9959. return nil, err
  9960. }
  9961. ret := &BatchGetValuesResponse{
  9962. ServerResponse: googleapi.ServerResponse{
  9963. Header: res.Header,
  9964. HTTPStatusCode: res.StatusCode,
  9965. },
  9966. }
  9967. target := &ret
  9968. if err := gensupport.DecodeResponse(target, res); err != nil {
  9969. return nil, err
  9970. }
  9971. return ret, nil
  9972. // {
  9973. // "description": "Returns one or more ranges of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and one or more ranges.",
  9974. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
  9975. // "httpMethod": "GET",
  9976. // "id": "sheets.spreadsheets.values.batchGet",
  9977. // "parameterOrder": [
  9978. // "spreadsheetId"
  9979. // ],
  9980. // "parameters": {
  9981. // "dateTimeRenderOption": {
  9982. // "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].",
  9983. // "enum": [
  9984. // "SERIAL_NUMBER",
  9985. // "FORMATTED_STRING"
  9986. // ],
  9987. // "location": "query",
  9988. // "type": "string"
  9989. // },
  9990. // "majorDimension": {
  9991. // "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]]`.",
  9992. // "enum": [
  9993. // "DIMENSION_UNSPECIFIED",
  9994. // "ROWS",
  9995. // "COLUMNS"
  9996. // ],
  9997. // "location": "query",
  9998. // "type": "string"
  9999. // },
  10000. // "ranges": {
  10001. // "description": "The A1 notation of the values to retrieve.",
  10002. // "location": "query",
  10003. // "repeated": true,
  10004. // "type": "string"
  10005. // },
  10006. // "spreadsheetId": {
  10007. // "description": "The ID of the spreadsheet to retrieve data from.",
  10008. // "location": "path",
  10009. // "required": true,
  10010. // "type": "string"
  10011. // },
  10012. // "valueRenderOption": {
  10013. // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  10014. // "enum": [
  10015. // "FORMATTED_VALUE",
  10016. // "UNFORMATTED_VALUE",
  10017. // "FORMULA"
  10018. // ],
  10019. // "location": "query",
  10020. // "type": "string"
  10021. // }
  10022. // },
  10023. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
  10024. // "response": {
  10025. // "$ref": "BatchGetValuesResponse"
  10026. // },
  10027. // "scopes": [
  10028. // "https://www.googleapis.com/auth/drive",
  10029. // "https://www.googleapis.com/auth/drive.file",
  10030. // "https://www.googleapis.com/auth/drive.readonly",
  10031. // "https://www.googleapis.com/auth/spreadsheets",
  10032. // "https://www.googleapis.com/auth/spreadsheets.readonly"
  10033. // ]
  10034. // }
  10035. }
  10036. // method id "sheets.spreadsheets.values.batchGetByDataFilter":
  10037. type SpreadsheetsValuesBatchGetByDataFilterCall struct {
  10038. s *Service
  10039. spreadsheetId string
  10040. batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest
  10041. urlParams_ gensupport.URLParams
  10042. ctx_ context.Context
  10043. header_ http.Header
  10044. }
  10045. // BatchGetByDataFilter: Returns one or more ranges of values that match
  10046. // the specified data filters.
  10047. // The caller must specify the spreadsheet ID and one or
  10048. // more
  10049. // DataFilters. Ranges that match any of the data filters in
  10050. // the request will be returned.
  10051. func (r *SpreadsheetsValuesService) BatchGetByDataFilter(spreadsheetId string, batchgetvaluesbydatafilterrequest *BatchGetValuesByDataFilterRequest) *SpreadsheetsValuesBatchGetByDataFilterCall {
  10052. c := &SpreadsheetsValuesBatchGetByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10053. c.spreadsheetId = spreadsheetId
  10054. c.batchgetvaluesbydatafilterrequest = batchgetvaluesbydatafilterrequest
  10055. return c
  10056. }
  10057. // Fields allows partial responses to be retrieved. See
  10058. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10059. // for more information.
  10060. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchGetByDataFilterCall {
  10061. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10062. return c
  10063. }
  10064. // Context sets the context to be used in this call's Do method. Any
  10065. // pending HTTP request will be aborted if the provided context is
  10066. // canceled.
  10067. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchGetByDataFilterCall {
  10068. c.ctx_ = ctx
  10069. return c
  10070. }
  10071. // Header returns an http.Header that can be modified by the caller to
  10072. // add HTTP headers to the request.
  10073. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Header() http.Header {
  10074. if c.header_ == nil {
  10075. c.header_ = make(http.Header)
  10076. }
  10077. return c.header_
  10078. }
  10079. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  10080. reqHeaders := make(http.Header)
  10081. for k, v := range c.header_ {
  10082. reqHeaders[k] = v
  10083. }
  10084. reqHeaders.Set("User-Agent", c.s.userAgent())
  10085. var body io.Reader = nil
  10086. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchgetvaluesbydatafilterrequest)
  10087. if err != nil {
  10088. return nil, err
  10089. }
  10090. reqHeaders.Set("Content-Type", "application/json")
  10091. c.urlParams_.Set("alt", alt)
  10092. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter")
  10093. urls += "?" + c.urlParams_.Encode()
  10094. req, _ := http.NewRequest("POST", urls, body)
  10095. req.Header = reqHeaders
  10096. googleapi.Expand(req.URL, map[string]string{
  10097. "spreadsheetId": c.spreadsheetId,
  10098. })
  10099. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10100. }
  10101. // Do executes the "sheets.spreadsheets.values.batchGetByDataFilter" call.
  10102. // Exactly one of *BatchGetValuesByDataFilterResponse or error will be
  10103. // non-nil. Any non-2xx status code is an error. Response headers are in
  10104. // either *BatchGetValuesByDataFilterResponse.ServerResponse.Header or
  10105. // (if a response was returned at all) in
  10106. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  10107. // whether the returned error was because http.StatusNotModified was
  10108. // returned.
  10109. func (c *SpreadsheetsValuesBatchGetByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchGetValuesByDataFilterResponse, error) {
  10110. gensupport.SetOptions(c.urlParams_, opts...)
  10111. res, err := c.doRequest("json")
  10112. if res != nil && res.StatusCode == http.StatusNotModified {
  10113. if res.Body != nil {
  10114. res.Body.Close()
  10115. }
  10116. return nil, &googleapi.Error{
  10117. Code: res.StatusCode,
  10118. Header: res.Header,
  10119. }
  10120. }
  10121. if err != nil {
  10122. return nil, err
  10123. }
  10124. defer googleapi.CloseBody(res)
  10125. if err := googleapi.CheckResponse(res); err != nil {
  10126. return nil, err
  10127. }
  10128. ret := &BatchGetValuesByDataFilterResponse{
  10129. ServerResponse: googleapi.ServerResponse{
  10130. Header: res.Header,
  10131. HTTPStatusCode: res.StatusCode,
  10132. },
  10133. }
  10134. target := &ret
  10135. if err := gensupport.DecodeResponse(target, res); err != nil {
  10136. return nil, err
  10137. }
  10138. return ret, nil
  10139. // {
  10140. // "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.",
  10141. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter",
  10142. // "httpMethod": "POST",
  10143. // "id": "sheets.spreadsheets.values.batchGetByDataFilter",
  10144. // "parameterOrder": [
  10145. // "spreadsheetId"
  10146. // ],
  10147. // "parameters": {
  10148. // "spreadsheetId": {
  10149. // "description": "The ID of the spreadsheet to retrieve data from.",
  10150. // "location": "path",
  10151. // "required": true,
  10152. // "type": "string"
  10153. // }
  10154. // },
  10155. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter",
  10156. // "request": {
  10157. // "$ref": "BatchGetValuesByDataFilterRequest"
  10158. // },
  10159. // "response": {
  10160. // "$ref": "BatchGetValuesByDataFilterResponse"
  10161. // },
  10162. // "scopes": [
  10163. // "https://www.googleapis.com/auth/drive",
  10164. // "https://www.googleapis.com/auth/drive.file",
  10165. // "https://www.googleapis.com/auth/spreadsheets"
  10166. // ]
  10167. // }
  10168. }
  10169. // method id "sheets.spreadsheets.values.batchUpdate":
  10170. type SpreadsheetsValuesBatchUpdateCall struct {
  10171. s *Service
  10172. spreadsheetId string
  10173. batchupdatevaluesrequest *BatchUpdateValuesRequest
  10174. urlParams_ gensupport.URLParams
  10175. ctx_ context.Context
  10176. header_ http.Header
  10177. }
  10178. // BatchUpdate: Sets values in one or more ranges of a spreadsheet.
  10179. // The caller must specify the spreadsheet ID,
  10180. // a valueInputOption, and one or more
  10181. // ValueRanges.
  10182. func (r *SpreadsheetsValuesService) BatchUpdate(spreadsheetId string, batchupdatevaluesrequest *BatchUpdateValuesRequest) *SpreadsheetsValuesBatchUpdateCall {
  10183. c := &SpreadsheetsValuesBatchUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10184. c.spreadsheetId = spreadsheetId
  10185. c.batchupdatevaluesrequest = batchupdatevaluesrequest
  10186. return c
  10187. }
  10188. // Fields allows partial responses to be retrieved. See
  10189. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10190. // for more information.
  10191. func (c *SpreadsheetsValuesBatchUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateCall {
  10192. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10193. return c
  10194. }
  10195. // Context sets the context to be used in this call's Do method. Any
  10196. // pending HTTP request will be aborted if the provided context is
  10197. // canceled.
  10198. func (c *SpreadsheetsValuesBatchUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateCall {
  10199. c.ctx_ = ctx
  10200. return c
  10201. }
  10202. // Header returns an http.Header that can be modified by the caller to
  10203. // add HTTP headers to the request.
  10204. func (c *SpreadsheetsValuesBatchUpdateCall) Header() http.Header {
  10205. if c.header_ == nil {
  10206. c.header_ = make(http.Header)
  10207. }
  10208. return c.header_
  10209. }
  10210. func (c *SpreadsheetsValuesBatchUpdateCall) doRequest(alt string) (*http.Response, error) {
  10211. reqHeaders := make(http.Header)
  10212. for k, v := range c.header_ {
  10213. reqHeaders[k] = v
  10214. }
  10215. reqHeaders.Set("User-Agent", c.s.userAgent())
  10216. var body io.Reader = nil
  10217. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesrequest)
  10218. if err != nil {
  10219. return nil, err
  10220. }
  10221. reqHeaders.Set("Content-Type", "application/json")
  10222. c.urlParams_.Set("alt", alt)
  10223. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdate")
  10224. urls += "?" + c.urlParams_.Encode()
  10225. req, _ := http.NewRequest("POST", urls, body)
  10226. req.Header = reqHeaders
  10227. googleapi.Expand(req.URL, map[string]string{
  10228. "spreadsheetId": c.spreadsheetId,
  10229. })
  10230. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10231. }
  10232. // Do executes the "sheets.spreadsheets.values.batchUpdate" call.
  10233. // Exactly one of *BatchUpdateValuesResponse or error will be non-nil.
  10234. // Any non-2xx status code is an error. Response headers are in either
  10235. // *BatchUpdateValuesResponse.ServerResponse.Header or (if a response
  10236. // was returned at all) in error.(*googleapi.Error).Header. Use
  10237. // googleapi.IsNotModified to check whether the returned error was
  10238. // because http.StatusNotModified was returned.
  10239. func (c *SpreadsheetsValuesBatchUpdateCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesResponse, error) {
  10240. gensupport.SetOptions(c.urlParams_, opts...)
  10241. res, err := c.doRequest("json")
  10242. if res != nil && res.StatusCode == http.StatusNotModified {
  10243. if res.Body != nil {
  10244. res.Body.Close()
  10245. }
  10246. return nil, &googleapi.Error{
  10247. Code: res.StatusCode,
  10248. Header: res.Header,
  10249. }
  10250. }
  10251. if err != nil {
  10252. return nil, err
  10253. }
  10254. defer googleapi.CloseBody(res)
  10255. if err := googleapi.CheckResponse(res); err != nil {
  10256. return nil, err
  10257. }
  10258. ret := &BatchUpdateValuesResponse{
  10259. ServerResponse: googleapi.ServerResponse{
  10260. Header: res.Header,
  10261. HTTPStatusCode: res.StatusCode,
  10262. },
  10263. }
  10264. target := &ret
  10265. if err := gensupport.DecodeResponse(target, res); err != nil {
  10266. return nil, err
  10267. }
  10268. return ret, nil
  10269. // {
  10270. // "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.",
  10271. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
  10272. // "httpMethod": "POST",
  10273. // "id": "sheets.spreadsheets.values.batchUpdate",
  10274. // "parameterOrder": [
  10275. // "spreadsheetId"
  10276. // ],
  10277. // "parameters": {
  10278. // "spreadsheetId": {
  10279. // "description": "The ID of the spreadsheet to update.",
  10280. // "location": "path",
  10281. // "required": true,
  10282. // "type": "string"
  10283. // }
  10284. // },
  10285. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
  10286. // "request": {
  10287. // "$ref": "BatchUpdateValuesRequest"
  10288. // },
  10289. // "response": {
  10290. // "$ref": "BatchUpdateValuesResponse"
  10291. // },
  10292. // "scopes": [
  10293. // "https://www.googleapis.com/auth/drive",
  10294. // "https://www.googleapis.com/auth/drive.file",
  10295. // "https://www.googleapis.com/auth/spreadsheets"
  10296. // ]
  10297. // }
  10298. }
  10299. // method id "sheets.spreadsheets.values.batchUpdateByDataFilter":
  10300. type SpreadsheetsValuesBatchUpdateByDataFilterCall struct {
  10301. s *Service
  10302. spreadsheetId string
  10303. batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest
  10304. urlParams_ gensupport.URLParams
  10305. ctx_ context.Context
  10306. header_ http.Header
  10307. }
  10308. // BatchUpdateByDataFilter: Sets values in one or more ranges of a
  10309. // spreadsheet.
  10310. // The caller must specify the spreadsheet ID,
  10311. // a valueInputOption, and one or more
  10312. // DataFilterValueRanges.
  10313. func (r *SpreadsheetsValuesService) BatchUpdateByDataFilter(spreadsheetId string, batchupdatevaluesbydatafilterrequest *BatchUpdateValuesByDataFilterRequest) *SpreadsheetsValuesBatchUpdateByDataFilterCall {
  10314. c := &SpreadsheetsValuesBatchUpdateByDataFilterCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10315. c.spreadsheetId = spreadsheetId
  10316. c.batchupdatevaluesbydatafilterrequest = batchupdatevaluesbydatafilterrequest
  10317. return c
  10318. }
  10319. // Fields allows partial responses to be retrieved. See
  10320. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10321. // for more information.
  10322. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesBatchUpdateByDataFilterCall {
  10323. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10324. return c
  10325. }
  10326. // Context sets the context to be used in this call's Do method. Any
  10327. // pending HTTP request will be aborted if the provided context is
  10328. // canceled.
  10329. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Context(ctx context.Context) *SpreadsheetsValuesBatchUpdateByDataFilterCall {
  10330. c.ctx_ = ctx
  10331. return c
  10332. }
  10333. // Header returns an http.Header that can be modified by the caller to
  10334. // add HTTP headers to the request.
  10335. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Header() http.Header {
  10336. if c.header_ == nil {
  10337. c.header_ = make(http.Header)
  10338. }
  10339. return c.header_
  10340. }
  10341. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) doRequest(alt string) (*http.Response, error) {
  10342. reqHeaders := make(http.Header)
  10343. for k, v := range c.header_ {
  10344. reqHeaders[k] = v
  10345. }
  10346. reqHeaders.Set("User-Agent", c.s.userAgent())
  10347. var body io.Reader = nil
  10348. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchupdatevaluesbydatafilterrequest)
  10349. if err != nil {
  10350. return nil, err
  10351. }
  10352. reqHeaders.Set("Content-Type", "application/json")
  10353. c.urlParams_.Set("alt", alt)
  10354. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter")
  10355. urls += "?" + c.urlParams_.Encode()
  10356. req, _ := http.NewRequest("POST", urls, body)
  10357. req.Header = reqHeaders
  10358. googleapi.Expand(req.URL, map[string]string{
  10359. "spreadsheetId": c.spreadsheetId,
  10360. })
  10361. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10362. }
  10363. // Do executes the "sheets.spreadsheets.values.batchUpdateByDataFilter" call.
  10364. // Exactly one of *BatchUpdateValuesByDataFilterResponse or error will
  10365. // be non-nil. Any non-2xx status code is an error. Response headers are
  10366. // in either
  10367. // *BatchUpdateValuesByDataFilterResponse.ServerResponse.Header or (if a
  10368. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10369. // googleapi.IsNotModified to check whether the returned error was
  10370. // because http.StatusNotModified was returned.
  10371. func (c *SpreadsheetsValuesBatchUpdateByDataFilterCall) Do(opts ...googleapi.CallOption) (*BatchUpdateValuesByDataFilterResponse, error) {
  10372. gensupport.SetOptions(c.urlParams_, opts...)
  10373. res, err := c.doRequest("json")
  10374. if res != nil && res.StatusCode == http.StatusNotModified {
  10375. if res.Body != nil {
  10376. res.Body.Close()
  10377. }
  10378. return nil, &googleapi.Error{
  10379. Code: res.StatusCode,
  10380. Header: res.Header,
  10381. }
  10382. }
  10383. if err != nil {
  10384. return nil, err
  10385. }
  10386. defer googleapi.CloseBody(res)
  10387. if err := googleapi.CheckResponse(res); err != nil {
  10388. return nil, err
  10389. }
  10390. ret := &BatchUpdateValuesByDataFilterResponse{
  10391. ServerResponse: googleapi.ServerResponse{
  10392. Header: res.Header,
  10393. HTTPStatusCode: res.StatusCode,
  10394. },
  10395. }
  10396. target := &ret
  10397. if err := gensupport.DecodeResponse(target, res); err != nil {
  10398. return nil, err
  10399. }
  10400. return ret, nil
  10401. // {
  10402. // "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.",
  10403. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter",
  10404. // "httpMethod": "POST",
  10405. // "id": "sheets.spreadsheets.values.batchUpdateByDataFilter",
  10406. // "parameterOrder": [
  10407. // "spreadsheetId"
  10408. // ],
  10409. // "parameters": {
  10410. // "spreadsheetId": {
  10411. // "description": "The ID of the spreadsheet to update.",
  10412. // "location": "path",
  10413. // "required": true,
  10414. // "type": "string"
  10415. // }
  10416. // },
  10417. // "path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter",
  10418. // "request": {
  10419. // "$ref": "BatchUpdateValuesByDataFilterRequest"
  10420. // },
  10421. // "response": {
  10422. // "$ref": "BatchUpdateValuesByDataFilterResponse"
  10423. // },
  10424. // "scopes": [
  10425. // "https://www.googleapis.com/auth/drive",
  10426. // "https://www.googleapis.com/auth/drive.file",
  10427. // "https://www.googleapis.com/auth/spreadsheets"
  10428. // ]
  10429. // }
  10430. }
  10431. // method id "sheets.spreadsheets.values.clear":
  10432. type SpreadsheetsValuesClearCall struct {
  10433. s *Service
  10434. spreadsheetId string
  10435. range_ string
  10436. clearvaluesrequest *ClearValuesRequest
  10437. urlParams_ gensupport.URLParams
  10438. ctx_ context.Context
  10439. header_ http.Header
  10440. }
  10441. // Clear: Clears values from a spreadsheet.
  10442. // The caller must specify the spreadsheet ID and range.
  10443. // Only values are cleared -- all other properties of the cell (such
  10444. // as
  10445. // formatting, data validation, etc..) are kept.
  10446. func (r *SpreadsheetsValuesService) Clear(spreadsheetId string, range_ string, clearvaluesrequest *ClearValuesRequest) *SpreadsheetsValuesClearCall {
  10447. c := &SpreadsheetsValuesClearCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10448. c.spreadsheetId = spreadsheetId
  10449. c.range_ = range_
  10450. c.clearvaluesrequest = clearvaluesrequest
  10451. return c
  10452. }
  10453. // Fields allows partial responses to be retrieved. See
  10454. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10455. // for more information.
  10456. func (c *SpreadsheetsValuesClearCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesClearCall {
  10457. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10458. return c
  10459. }
  10460. // Context sets the context to be used in this call's Do method. Any
  10461. // pending HTTP request will be aborted if the provided context is
  10462. // canceled.
  10463. func (c *SpreadsheetsValuesClearCall) Context(ctx context.Context) *SpreadsheetsValuesClearCall {
  10464. c.ctx_ = ctx
  10465. return c
  10466. }
  10467. // Header returns an http.Header that can be modified by the caller to
  10468. // add HTTP headers to the request.
  10469. func (c *SpreadsheetsValuesClearCall) Header() http.Header {
  10470. if c.header_ == nil {
  10471. c.header_ = make(http.Header)
  10472. }
  10473. return c.header_
  10474. }
  10475. func (c *SpreadsheetsValuesClearCall) doRequest(alt string) (*http.Response, error) {
  10476. reqHeaders := make(http.Header)
  10477. for k, v := range c.header_ {
  10478. reqHeaders[k] = v
  10479. }
  10480. reqHeaders.Set("User-Agent", c.s.userAgent())
  10481. var body io.Reader = nil
  10482. body, err := googleapi.WithoutDataWrapper.JSONReader(c.clearvaluesrequest)
  10483. if err != nil {
  10484. return nil, err
  10485. }
  10486. reqHeaders.Set("Content-Type", "application/json")
  10487. c.urlParams_.Set("alt", alt)
  10488. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}:clear")
  10489. urls += "?" + c.urlParams_.Encode()
  10490. req, _ := http.NewRequest("POST", urls, body)
  10491. req.Header = reqHeaders
  10492. googleapi.Expand(req.URL, map[string]string{
  10493. "spreadsheetId": c.spreadsheetId,
  10494. "range": c.range_,
  10495. })
  10496. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10497. }
  10498. // Do executes the "sheets.spreadsheets.values.clear" call.
  10499. // Exactly one of *ClearValuesResponse or error will be non-nil. Any
  10500. // non-2xx status code is an error. Response headers are in either
  10501. // *ClearValuesResponse.ServerResponse.Header or (if a response was
  10502. // returned at all) in error.(*googleapi.Error).Header. Use
  10503. // googleapi.IsNotModified to check whether the returned error was
  10504. // because http.StatusNotModified was returned.
  10505. func (c *SpreadsheetsValuesClearCall) Do(opts ...googleapi.CallOption) (*ClearValuesResponse, error) {
  10506. gensupport.SetOptions(c.urlParams_, opts...)
  10507. res, err := c.doRequest("json")
  10508. if res != nil && res.StatusCode == http.StatusNotModified {
  10509. if res.Body != nil {
  10510. res.Body.Close()
  10511. }
  10512. return nil, &googleapi.Error{
  10513. Code: res.StatusCode,
  10514. Header: res.Header,
  10515. }
  10516. }
  10517. if err != nil {
  10518. return nil, err
  10519. }
  10520. defer googleapi.CloseBody(res)
  10521. if err := googleapi.CheckResponse(res); err != nil {
  10522. return nil, err
  10523. }
  10524. ret := &ClearValuesResponse{
  10525. ServerResponse: googleapi.ServerResponse{
  10526. Header: res.Header,
  10527. HTTPStatusCode: res.StatusCode,
  10528. },
  10529. }
  10530. target := &ret
  10531. if err := gensupport.DecodeResponse(target, res); err != nil {
  10532. return nil, err
  10533. }
  10534. return ret, nil
  10535. // {
  10536. // "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.",
  10537. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
  10538. // "httpMethod": "POST",
  10539. // "id": "sheets.spreadsheets.values.clear",
  10540. // "parameterOrder": [
  10541. // "spreadsheetId",
  10542. // "range"
  10543. // ],
  10544. // "parameters": {
  10545. // "range": {
  10546. // "description": "The A1 notation of the values to clear.",
  10547. // "location": "path",
  10548. // "required": true,
  10549. // "type": "string"
  10550. // },
  10551. // "spreadsheetId": {
  10552. // "description": "The ID of the spreadsheet to update.",
  10553. // "location": "path",
  10554. // "required": true,
  10555. // "type": "string"
  10556. // }
  10557. // },
  10558. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
  10559. // "request": {
  10560. // "$ref": "ClearValuesRequest"
  10561. // },
  10562. // "response": {
  10563. // "$ref": "ClearValuesResponse"
  10564. // },
  10565. // "scopes": [
  10566. // "https://www.googleapis.com/auth/drive",
  10567. // "https://www.googleapis.com/auth/drive.file",
  10568. // "https://www.googleapis.com/auth/spreadsheets"
  10569. // ]
  10570. // }
  10571. }
  10572. // method id "sheets.spreadsheets.values.get":
  10573. type SpreadsheetsValuesGetCall struct {
  10574. s *Service
  10575. spreadsheetId string
  10576. range_ string
  10577. urlParams_ gensupport.URLParams
  10578. ifNoneMatch_ string
  10579. ctx_ context.Context
  10580. header_ http.Header
  10581. }
  10582. // Get: Returns a range of values from a spreadsheet.
  10583. // The caller must specify the spreadsheet ID and a range.
  10584. func (r *SpreadsheetsValuesService) Get(spreadsheetId string, range_ string) *SpreadsheetsValuesGetCall {
  10585. c := &SpreadsheetsValuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10586. c.spreadsheetId = spreadsheetId
  10587. c.range_ = range_
  10588. return c
  10589. }
  10590. // DateTimeRenderOption sets the optional parameter
  10591. // "dateTimeRenderOption": How dates, times, and durations should be
  10592. // represented in the output.
  10593. // This is ignored if value_render_option is
  10594. // FORMATTED_VALUE.
  10595. // The default dateTime render option is
  10596. // [DateTimeRenderOption.SERIAL_NUMBER].
  10597. //
  10598. // Possible values:
  10599. // "SERIAL_NUMBER"
  10600. // "FORMATTED_STRING"
  10601. func (c *SpreadsheetsValuesGetCall) DateTimeRenderOption(dateTimeRenderOption string) *SpreadsheetsValuesGetCall {
  10602. c.urlParams_.Set("dateTimeRenderOption", dateTimeRenderOption)
  10603. return c
  10604. }
  10605. // MajorDimension sets the optional parameter "majorDimension": The
  10606. // major dimension that results should use.
  10607. //
  10608. // For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`,
  10609. // then requesting `range=A1:B2,majorDimension=ROWS` will
  10610. // return
  10611. // `[[1,2],[3,4]]`,
  10612. // whereas requesting `range=A1:B2,majorDimension=COLUMNS` will
  10613. // return
  10614. // `[[1,3],[2,4]]`.
  10615. //
  10616. // Possible values:
  10617. // "DIMENSION_UNSPECIFIED"
  10618. // "ROWS"
  10619. // "COLUMNS"
  10620. func (c *SpreadsheetsValuesGetCall) MajorDimension(majorDimension string) *SpreadsheetsValuesGetCall {
  10621. c.urlParams_.Set("majorDimension", majorDimension)
  10622. return c
  10623. }
  10624. // ValueRenderOption sets the optional parameter "valueRenderOption":
  10625. // How values should be represented in the output.
  10626. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  10627. //
  10628. // Possible values:
  10629. // "FORMATTED_VALUE"
  10630. // "UNFORMATTED_VALUE"
  10631. // "FORMULA"
  10632. func (c *SpreadsheetsValuesGetCall) ValueRenderOption(valueRenderOption string) *SpreadsheetsValuesGetCall {
  10633. c.urlParams_.Set("valueRenderOption", valueRenderOption)
  10634. return c
  10635. }
  10636. // Fields allows partial responses to be retrieved. See
  10637. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10638. // for more information.
  10639. func (c *SpreadsheetsValuesGetCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesGetCall {
  10640. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10641. return c
  10642. }
  10643. // IfNoneMatch sets the optional parameter which makes the operation
  10644. // fail if the object's ETag matches the given value. This is useful for
  10645. // getting updates only after the object has changed since the last
  10646. // request. Use googleapi.IsNotModified to check whether the response
  10647. // error from Do is the result of In-None-Match.
  10648. func (c *SpreadsheetsValuesGetCall) IfNoneMatch(entityTag string) *SpreadsheetsValuesGetCall {
  10649. c.ifNoneMatch_ = entityTag
  10650. return c
  10651. }
  10652. // Context sets the context to be used in this call's Do method. Any
  10653. // pending HTTP request will be aborted if the provided context is
  10654. // canceled.
  10655. func (c *SpreadsheetsValuesGetCall) Context(ctx context.Context) *SpreadsheetsValuesGetCall {
  10656. c.ctx_ = ctx
  10657. return c
  10658. }
  10659. // Header returns an http.Header that can be modified by the caller to
  10660. // add HTTP headers to the request.
  10661. func (c *SpreadsheetsValuesGetCall) Header() http.Header {
  10662. if c.header_ == nil {
  10663. c.header_ = make(http.Header)
  10664. }
  10665. return c.header_
  10666. }
  10667. func (c *SpreadsheetsValuesGetCall) doRequest(alt string) (*http.Response, error) {
  10668. reqHeaders := make(http.Header)
  10669. for k, v := range c.header_ {
  10670. reqHeaders[k] = v
  10671. }
  10672. reqHeaders.Set("User-Agent", c.s.userAgent())
  10673. if c.ifNoneMatch_ != "" {
  10674. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10675. }
  10676. var body io.Reader = nil
  10677. c.urlParams_.Set("alt", alt)
  10678. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}")
  10679. urls += "?" + c.urlParams_.Encode()
  10680. req, _ := http.NewRequest("GET", urls, body)
  10681. req.Header = reqHeaders
  10682. googleapi.Expand(req.URL, map[string]string{
  10683. "spreadsheetId": c.spreadsheetId,
  10684. "range": c.range_,
  10685. })
  10686. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10687. }
  10688. // Do executes the "sheets.spreadsheets.values.get" call.
  10689. // Exactly one of *ValueRange or error will be non-nil. Any non-2xx
  10690. // status code is an error. Response headers are in either
  10691. // *ValueRange.ServerResponse.Header or (if a response was returned at
  10692. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10693. // to check whether the returned error was because
  10694. // http.StatusNotModified was returned.
  10695. func (c *SpreadsheetsValuesGetCall) Do(opts ...googleapi.CallOption) (*ValueRange, error) {
  10696. gensupport.SetOptions(c.urlParams_, opts...)
  10697. res, err := c.doRequest("json")
  10698. if res != nil && res.StatusCode == http.StatusNotModified {
  10699. if res.Body != nil {
  10700. res.Body.Close()
  10701. }
  10702. return nil, &googleapi.Error{
  10703. Code: res.StatusCode,
  10704. Header: res.Header,
  10705. }
  10706. }
  10707. if err != nil {
  10708. return nil, err
  10709. }
  10710. defer googleapi.CloseBody(res)
  10711. if err := googleapi.CheckResponse(res); err != nil {
  10712. return nil, err
  10713. }
  10714. ret := &ValueRange{
  10715. ServerResponse: googleapi.ServerResponse{
  10716. Header: res.Header,
  10717. HTTPStatusCode: res.StatusCode,
  10718. },
  10719. }
  10720. target := &ret
  10721. if err := gensupport.DecodeResponse(target, res); err != nil {
  10722. return nil, err
  10723. }
  10724. return ret, nil
  10725. // {
  10726. // "description": "Returns a range of values from a spreadsheet.\nThe caller must specify the spreadsheet ID and a range.",
  10727. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  10728. // "httpMethod": "GET",
  10729. // "id": "sheets.spreadsheets.values.get",
  10730. // "parameterOrder": [
  10731. // "spreadsheetId",
  10732. // "range"
  10733. // ],
  10734. // "parameters": {
  10735. // "dateTimeRenderOption": {
  10736. // "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].",
  10737. // "enum": [
  10738. // "SERIAL_NUMBER",
  10739. // "FORMATTED_STRING"
  10740. // ],
  10741. // "location": "query",
  10742. // "type": "string"
  10743. // },
  10744. // "majorDimension": {
  10745. // "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]]`.",
  10746. // "enum": [
  10747. // "DIMENSION_UNSPECIFIED",
  10748. // "ROWS",
  10749. // "COLUMNS"
  10750. // ],
  10751. // "location": "query",
  10752. // "type": "string"
  10753. // },
  10754. // "range": {
  10755. // "description": "The A1 notation of the values to retrieve.",
  10756. // "location": "path",
  10757. // "required": true,
  10758. // "type": "string"
  10759. // },
  10760. // "spreadsheetId": {
  10761. // "description": "The ID of the spreadsheet to retrieve data from.",
  10762. // "location": "path",
  10763. // "required": true,
  10764. // "type": "string"
  10765. // },
  10766. // "valueRenderOption": {
  10767. // "description": "How values should be represented in the output.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  10768. // "enum": [
  10769. // "FORMATTED_VALUE",
  10770. // "UNFORMATTED_VALUE",
  10771. // "FORMULA"
  10772. // ],
  10773. // "location": "query",
  10774. // "type": "string"
  10775. // }
  10776. // },
  10777. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  10778. // "response": {
  10779. // "$ref": "ValueRange"
  10780. // },
  10781. // "scopes": [
  10782. // "https://www.googleapis.com/auth/drive",
  10783. // "https://www.googleapis.com/auth/drive.file",
  10784. // "https://www.googleapis.com/auth/drive.readonly",
  10785. // "https://www.googleapis.com/auth/spreadsheets",
  10786. // "https://www.googleapis.com/auth/spreadsheets.readonly"
  10787. // ]
  10788. // }
  10789. }
  10790. // method id "sheets.spreadsheets.values.update":
  10791. type SpreadsheetsValuesUpdateCall struct {
  10792. s *Service
  10793. spreadsheetId string
  10794. range_ string
  10795. valuerange *ValueRange
  10796. urlParams_ gensupport.URLParams
  10797. ctx_ context.Context
  10798. header_ http.Header
  10799. }
  10800. // Update: Sets values in a range of a spreadsheet.
  10801. // The caller must specify the spreadsheet ID, range, and
  10802. // a valueInputOption.
  10803. func (r *SpreadsheetsValuesService) Update(spreadsheetId string, range_ string, valuerange *ValueRange) *SpreadsheetsValuesUpdateCall {
  10804. c := &SpreadsheetsValuesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10805. c.spreadsheetId = spreadsheetId
  10806. c.range_ = range_
  10807. c.valuerange = valuerange
  10808. return c
  10809. }
  10810. // IncludeValuesInResponse sets the optional parameter
  10811. // "includeValuesInResponse": Determines if the update response should
  10812. // include the values
  10813. // of the cells that were updated. By default, responses
  10814. // do not include the updated values.
  10815. // If the range to write was larger than than the range actually
  10816. // written,
  10817. // the response will include all values in the requested range
  10818. // (excluding
  10819. // trailing empty rows and columns).
  10820. func (c *SpreadsheetsValuesUpdateCall) IncludeValuesInResponse(includeValuesInResponse bool) *SpreadsheetsValuesUpdateCall {
  10821. c.urlParams_.Set("includeValuesInResponse", fmt.Sprint(includeValuesInResponse))
  10822. return c
  10823. }
  10824. // ResponseDateTimeRenderOption sets the optional parameter
  10825. // "responseDateTimeRenderOption": Determines how dates, times, and
  10826. // durations in the response should be
  10827. // rendered. This is ignored if response_value_render_option
  10828. // is
  10829. // FORMATTED_VALUE.
  10830. // The default dateTime render option
  10831. // is
  10832. // DateTimeRenderOption.SERIAL_NUMBER.
  10833. //
  10834. // Possible values:
  10835. // "SERIAL_NUMBER"
  10836. // "FORMATTED_STRING"
  10837. func (c *SpreadsheetsValuesUpdateCall) ResponseDateTimeRenderOption(responseDateTimeRenderOption string) *SpreadsheetsValuesUpdateCall {
  10838. c.urlParams_.Set("responseDateTimeRenderOption", responseDateTimeRenderOption)
  10839. return c
  10840. }
  10841. // ResponseValueRenderOption sets the optional parameter
  10842. // "responseValueRenderOption": Determines how values in the response
  10843. // should be rendered.
  10844. // The default render option is ValueRenderOption.FORMATTED_VALUE.
  10845. //
  10846. // Possible values:
  10847. // "FORMATTED_VALUE"
  10848. // "UNFORMATTED_VALUE"
  10849. // "FORMULA"
  10850. func (c *SpreadsheetsValuesUpdateCall) ResponseValueRenderOption(responseValueRenderOption string) *SpreadsheetsValuesUpdateCall {
  10851. c.urlParams_.Set("responseValueRenderOption", responseValueRenderOption)
  10852. return c
  10853. }
  10854. // ValueInputOption sets the optional parameter "valueInputOption": How
  10855. // the input data should be interpreted.
  10856. //
  10857. // Possible values:
  10858. // "INPUT_VALUE_OPTION_UNSPECIFIED"
  10859. // "RAW"
  10860. // "USER_ENTERED"
  10861. func (c *SpreadsheetsValuesUpdateCall) ValueInputOption(valueInputOption string) *SpreadsheetsValuesUpdateCall {
  10862. c.urlParams_.Set("valueInputOption", valueInputOption)
  10863. return c
  10864. }
  10865. // Fields allows partial responses to be retrieved. See
  10866. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10867. // for more information.
  10868. func (c *SpreadsheetsValuesUpdateCall) Fields(s ...googleapi.Field) *SpreadsheetsValuesUpdateCall {
  10869. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10870. return c
  10871. }
  10872. // Context sets the context to be used in this call's Do method. Any
  10873. // pending HTTP request will be aborted if the provided context is
  10874. // canceled.
  10875. func (c *SpreadsheetsValuesUpdateCall) Context(ctx context.Context) *SpreadsheetsValuesUpdateCall {
  10876. c.ctx_ = ctx
  10877. return c
  10878. }
  10879. // Header returns an http.Header that can be modified by the caller to
  10880. // add HTTP headers to the request.
  10881. func (c *SpreadsheetsValuesUpdateCall) Header() http.Header {
  10882. if c.header_ == nil {
  10883. c.header_ = make(http.Header)
  10884. }
  10885. return c.header_
  10886. }
  10887. func (c *SpreadsheetsValuesUpdateCall) doRequest(alt string) (*http.Response, error) {
  10888. reqHeaders := make(http.Header)
  10889. for k, v := range c.header_ {
  10890. reqHeaders[k] = v
  10891. }
  10892. reqHeaders.Set("User-Agent", c.s.userAgent())
  10893. var body io.Reader = nil
  10894. body, err := googleapi.WithoutDataWrapper.JSONReader(c.valuerange)
  10895. if err != nil {
  10896. return nil, err
  10897. }
  10898. reqHeaders.Set("Content-Type", "application/json")
  10899. c.urlParams_.Set("alt", alt)
  10900. urls := googleapi.ResolveRelative(c.s.BasePath, "v4/spreadsheets/{spreadsheetId}/values/{range}")
  10901. urls += "?" + c.urlParams_.Encode()
  10902. req, _ := http.NewRequest("PUT", urls, body)
  10903. req.Header = reqHeaders
  10904. googleapi.Expand(req.URL, map[string]string{
  10905. "spreadsheetId": c.spreadsheetId,
  10906. "range": c.range_,
  10907. })
  10908. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10909. }
  10910. // Do executes the "sheets.spreadsheets.values.update" call.
  10911. // Exactly one of *UpdateValuesResponse or error will be non-nil. Any
  10912. // non-2xx status code is an error. Response headers are in either
  10913. // *UpdateValuesResponse.ServerResponse.Header or (if a response was
  10914. // returned at all) in error.(*googleapi.Error).Header. Use
  10915. // googleapi.IsNotModified to check whether the returned error was
  10916. // because http.StatusNotModified was returned.
  10917. func (c *SpreadsheetsValuesUpdateCall) Do(opts ...googleapi.CallOption) (*UpdateValuesResponse, error) {
  10918. gensupport.SetOptions(c.urlParams_, opts...)
  10919. res, err := c.doRequest("json")
  10920. if res != nil && res.StatusCode == http.StatusNotModified {
  10921. if res.Body != nil {
  10922. res.Body.Close()
  10923. }
  10924. return nil, &googleapi.Error{
  10925. Code: res.StatusCode,
  10926. Header: res.Header,
  10927. }
  10928. }
  10929. if err != nil {
  10930. return nil, err
  10931. }
  10932. defer googleapi.CloseBody(res)
  10933. if err := googleapi.CheckResponse(res); err != nil {
  10934. return nil, err
  10935. }
  10936. ret := &UpdateValuesResponse{
  10937. ServerResponse: googleapi.ServerResponse{
  10938. Header: res.Header,
  10939. HTTPStatusCode: res.StatusCode,
  10940. },
  10941. }
  10942. target := &ret
  10943. if err := gensupport.DecodeResponse(target, res); err != nil {
  10944. return nil, err
  10945. }
  10946. return ret, nil
  10947. // {
  10948. // "description": "Sets values in a range of a spreadsheet.\nThe caller must specify the spreadsheet ID, range, and\na valueInputOption.",
  10949. // "flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  10950. // "httpMethod": "PUT",
  10951. // "id": "sheets.spreadsheets.values.update",
  10952. // "parameterOrder": [
  10953. // "spreadsheetId",
  10954. // "range"
  10955. // ],
  10956. // "parameters": {
  10957. // "includeValuesInResponse": {
  10958. // "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).",
  10959. // "location": "query",
  10960. // "type": "boolean"
  10961. // },
  10962. // "range": {
  10963. // "description": "The A1 notation of the values to update.",
  10964. // "location": "path",
  10965. // "required": true,
  10966. // "type": "string"
  10967. // },
  10968. // "responseDateTimeRenderOption": {
  10969. // "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.",
  10970. // "enum": [
  10971. // "SERIAL_NUMBER",
  10972. // "FORMATTED_STRING"
  10973. // ],
  10974. // "location": "query",
  10975. // "type": "string"
  10976. // },
  10977. // "responseValueRenderOption": {
  10978. // "description": "Determines how values in the response should be rendered.\nThe default render option is ValueRenderOption.FORMATTED_VALUE.",
  10979. // "enum": [
  10980. // "FORMATTED_VALUE",
  10981. // "UNFORMATTED_VALUE",
  10982. // "FORMULA"
  10983. // ],
  10984. // "location": "query",
  10985. // "type": "string"
  10986. // },
  10987. // "spreadsheetId": {
  10988. // "description": "The ID of the spreadsheet to update.",
  10989. // "location": "path",
  10990. // "required": true,
  10991. // "type": "string"
  10992. // },
  10993. // "valueInputOption": {
  10994. // "description": "How the input data should be interpreted.",
  10995. // "enum": [
  10996. // "INPUT_VALUE_OPTION_UNSPECIFIED",
  10997. // "RAW",
  10998. // "USER_ENTERED"
  10999. // ],
  11000. // "location": "query",
  11001. // "type": "string"
  11002. // }
  11003. // },
  11004. // "path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
  11005. // "request": {
  11006. // "$ref": "ValueRange"
  11007. // },
  11008. // "response": {
  11009. // "$ref": "UpdateValuesResponse"
  11010. // },
  11011. // "scopes": [
  11012. // "https://www.googleapis.com/auth/drive",
  11013. // "https://www.googleapis.com/auth/drive.file",
  11014. // "https://www.googleapis.com/auth/spreadsheets"
  11015. // ]
  11016. // }
  11017. }