1# Changes
2
3## v0.52.0
4
5- internal/gapicgen: multiple improvements related to library generation.
6- compute/metadata: unset ResponseHeaderTimeout in defaultClient
7- docs: fix link to KMS in README.md
8- Various updates to autogenerated clients.
9
10## v0.51.0
11
12- secretmanager:
13  - add IAM helper for generic resource IAM handle
14- cloudbuild:
15  - migrate to microgen in a major version
16- Various updates to autogenerated clients.
17
18## v0.50.0
19
20- profiler:
21  - Support disabling CPU profile collection.
22  - Log when a profile creation attempt begins.
23- compute/metadata:
24  - Fix panic on malformed URLs.
25  - InstanceName returns actual instance name.
26- Various updates to autogenerated clients.
27
28## v0.49.0
29
30- functions/metadata:
31  - Handle string resources in JSON unmarshaller.
32- Various updates to autogenerated clients.
33
34## v0.48.0
35
36- Various updates to autogenerated clients
37
38## v0.47.0
39
40This release drops support for Go 1.9 and Go 1.10: we continue to officially
41support Go 1.11, Go 1.12, and Go 1.13.
42
43- Various updates to autogenerated clients.
44- Add cloudbuild/apiv1 client.
45
46## v0.46.3
47
48This is an empty release that was created solely to aid in storage's module
49carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
50
51## v0.46.2
52
53This is an empty release that was created solely to aid in spanner's module
54carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
55
56## v0.46.1
57
58This is an empty release that was created solely to aid in firestore's module
59carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
60
61## v0.46.0
62
63- spanner:
64  - Retry "Session not found" for read-only transactions.
65  - Retry aborted PDMLs.
66- spanner/spannertest:
67  - Fix a bug that was causing 0X-prefixed number to be parsed incorrectly.
68- storage:
69  - Add HMACKeyOptions.
70  - Remove *REGIONAL from StorageClass documentation. Using MULTI_REGIONAL,
71    DURABLE_REDUCED_AVAILABILITY, and REGIONAL are no longer best practice
72    StorageClasses but they are still acceptable values.
73- trace:
74  - Remove cloud.google.com/go/trace. Package cloud.google.com/go/trace has been
75    marked OBSOLETE for several years: it is now no longer provided. If you
76    relied on this package, please vendor it or switch to using
77    https://cloud.google.com/trace/docs/setup/go (which obsoleted it).
78
79## v0.45.1
80
81This is an empty release that was created solely to aid in pubsub's module
82carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
83
84## v0.45.0
85
86- compute/metadata:
87  - Add Email method.
88- storage:
89  - Fix duplicated retry logic.
90  - Add ReaderObjectAttrs.StartOffset.
91  - Support reading last N bytes of a file when a negative range is given, such
92    as `obj.NewRangeReader(ctx, -10, -1)`.
93  - Add HMACKey listing functionality.
94- spanner/spannertest:
95  - Support primary keys with no columns.
96  - Fix MinInt64 parsing.
97  - Implement deletion of key ranges.
98  - Handle reads during a read-write transaction.
99  - Handle returning DATE values.
100- pubsub:
101  - Fix Ack/Modack request size calculation.
102- logging:
103  - Add auto-detection of monitored resources on GAE Standard.
104
105## v0.44.3
106
107This is an empty release that was created solely to aid in bigtable's module
108carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
109
110## v0.44.2
111
112This is an empty release that was created solely to aid in bigquery's module
113carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
114
115## v0.44.1
116
117This is an empty release that was created solely to aid in datastore's module
118carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
119
120## v0.44.0
121
122- datastore:
123  - Interface elements whose underlying types are supported, are now supported.
124  - Reduce time to initial retry from 1s to 100ms.
125- firestore:
126  - Add Increment transformation.
127- storage:
128  - Allow emulator with STORAGE_EMULATOR_HOST.
129  - Add methods for HMAC key management.
130- pubsub:
131  - Add PublishCount and PublishLatency measurements.
132  - Add DefaultPublishViews and DefaultSubscribeViews for convenience of
133  importing all views.
134  - Add add Subscription.PushConfig.AuthenticationMethod.
135- spanner:
136  - Allow emulator usage with SPANNER_EMULATOR_HOST.
137  - Add cloud.google.com/go/spanner/spannertest, a spanner emulator.
138  - Add cloud.google.com/go/spanner/spansql which contains types and a parser
139  for the Cloud Spanner SQL dialect.
140- asset:
141  - Add apiv1p2beta1 client.
142
143## v0.43.0
144
145This is an empty release that was created solely to aid in logging's module
146carve-out. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository.
147
148## v0.42.0
149
150- bigtable:
151  - Add an admin method to update an instance and clusters.
152  - Fix bttest regex matching behavior for alternations (things like `|a`).
153  - Expose BlockAllFilter filter.
154- bigquery:
155  - Add Routines API support.
156- storage:
157  - Add read-only Bucket.LocationType.
158- logging:
159  - Add TraceSampled to Entry.
160  - Fix to properly extract {Trace, Span}Id from X-Cloud-Trace-Context.
161- pubsub:
162  - Add Cloud Key Management to TopicConfig.
163  - Change ExpirationPolicy to optional.Duration.
164- automl:
165  - Add apiv1beta1 client.
166- iam:
167  - Fix compilation problem with iam/credentials/apiv1.
168
169## v0.41.0
170
171- bigtable:
172  - Check results from PredicateFilter in bttest, which fixes certain false matches.
173- profiler:
174  - debugLog checks user defined logging options before logging.
175- spanner:
176  - PartitionedUpdates respect query parameters.
177  - StartInstance allows specifying cloud API access scopes.
178- bigquery:
179  - Use empty slice instead of nil for ValueSaver, fixing an issue with zero-length, repeated, nested fields causing panics.
180- firestore:
181  - Return same number of snapshots as doc refs (in the form of duplicate records) during GetAll.
182- replay:
183  - Change references to IPv4 addresses to localhost, making replay compatible with IPv6.
184
185## v0.40.0
186
187- all:
188  - Update to protobuf-golang v1.3.1.
189- datastore:
190  - Attempt to decode GAE-encoded keys if initial decoding attempt fails.
191  - Support integer time conversion.
192- pubsub:
193  - Add PublishSettings.BundlerByteLimit. If users receive pubsub.ErrOverflow,
194  this value should be adjusted higher.
195  - Use IPv6 compatible target in testutil.
196- bigtable:
197  - Fix Latin-1 regexp filters in bttest, allowing \C.
198  - Expose PassAllFilter.
199- profiler:
200  - Add log messages for slow path in start.
201  - Fix start to allow retry until success.
202- firestore:
203  - Add admin client.
204- containeranalysis:
205  - Add apiv1 client.
206- grafeas:
207  - Add apiv1 client.
208
209## 0.39.0
210
211- bigtable:
212  - Implement DeleteInstance in bttest.
213  - Return an error on invalid ReadRowsRequest.RowRange key ranges in bttest.
214- bigquery:
215  - Move RequirePartitionFilter outside of TimePartioning.
216  - Expose models API.
217- firestore:
218  - Allow array values in create and update calls.
219  - Add CollectionGroup method.
220- pubsub:
221  - Add ExpirationPolicy to Subscription.
222- storage:
223  - Add V4 signing.
224- rpcreplay:
225  - Match streams by first sent request. This further improves rpcreplay's
226  ability to distinguish streams.
227- httpreplay:
228  - Set up Man-In-The-Middle config only once. This should improve proxy
229  creation when multiple proxies are used in a single process.
230  - Remove error on empty Content-Type, allowing requests with no Content-Type
231  header but a non-empty body.
232- all:
233  - Fix an edge case bug in auto-generated library pagination by properly
234  propagating pagetoken.
235
236## 0.38.0
237
238This update includes a substantial reduction in our transitive dependency list
239by way of updating to opencensus@v0.21.0.
240
241- spanner:
242  - Error implements GRPCStatus, allowing status.Convert.
243- bigtable:
244  - Fix a bug in bttest that prevents single column queries returning results
245  that match other filters.
246  - Remove verbose retry logging.
247- logging:
248  - Ensure RequestUrl has proper UTF-8, removing the need for users to wrap and
249  rune replace manually.
250- recaptchaenterprise:
251  - Add v1beta1 client.
252- phishingprotection:
253  - Add v1beta1 client.
254
255## 0.37.4
256
257This patch releases re-builds the go.sum. This was not possible in the
258previous release.
259
260- firestore:
261  - Add sentinel value DetectProjectID for auto-detecting project ID.
262  - Add OpenCensus tracing for public methods.
263  - Marked stable. All future changes come with a backwards compatibility
264  guarantee.
265  - Removed firestore/apiv1beta1. All users relying on this low-level library
266  should migrate to firestore/apiv1. Note that most users should use the
267  high-level firestore package instead.
268- pubsub:
269  - Allow large messages in synchronous pull case.
270  - Cap bundler byte limit. This should prevent OOM conditions when there are
271  a very large number of message publishes occurring.
272- storage:
273  - Add ETag to BucketAttrs and ObjectAttrs.
274- datastore:
275  - Removed some non-sensical OpenCensus traces.
276- webrisk:
277  - Add v1 client.
278- asset:
279  - Add v1 client.
280- cloudtasks:
281  - Add v2 client.
282
283## 0.37.3
284
285This patch release removes github.com/golang/lint from the transitive
286dependency list, resolving `go get -u` problems.
287
288Note: this release intentionally has a broken go.sum. Please use v0.37.4.
289
290## 0.37.2
291
292This patch release is mostly intended to bring in v0.3.0 of
293google.golang.org/api, which fixes a GCF deployment issue.
294
295Note: we had to-date accidentally marked Redis as stable. In this release, we've
296fixed it by downgrading its documentation to alpha, as it is in other languages
297and docs.
298
299- all:
300  - Document context in generated libraries.
301
302## 0.37.1
303
304Small go.mod version bumps to bring in v0.2.0 of google.golang.org/api, which
305introduces a new oauth2 url.
306
307## 0.37.0
308
309- spanner:
310  - Add BatchDML method.
311  - Reduced initial time between retries.
312- bigquery:
313  - Produce better error messages for InferSchema.
314  - Add logical type control for avro loads.
315  - Add support for the GEOGRAPHY type.
316- datastore:
317  - Add sentinel value DetectProjectID for auto-detecting project ID.
318  - Allow flatten tag on struct pointers.
319  - Fixed a bug that caused queries to panic with invalid queries. Instead they
320    will now return an error.
321- profiler:
322  - Add ability to override GCE zone and instance.
323- pubsub:
324  - BEHAVIOR CHANGE: Refactor error code retry logic. RPCs should now more
325    consistently retry specific error codes based on whether they're idempotent
326    or non-idempotent.
327- httpreplay: Fixed a bug when a non-GET request had a zero-length body causing
328  the Content-Length header to be dropped.
329- iot:
330  - Add new apiv1 client.
331- securitycenter:
332  - Add new apiv1 client.
333- cloudscheduler:
334  - Add new apiv1 client.
335
336## 0.36.0
337
338- spanner:
339  - Reduce minimum retry backoff from 1s to 100ms. This makes time between
340    retries much faster and should improve latency.
341- storage:
342  - Add support for Bucket Policy Only.
343- kms:
344  - Add ResourceIAM helper method.
345  - Deprecate KeyRingIAM and CryptoKeyIAM. Please use ResourceIAM.
346- firestore:
347  - Switch from v1beta1 API to v1 API.
348  - Allow emulator with FIRESTORE_EMULATOR_HOST.
349- bigquery:
350  - Add NumLongTermBytes to Table.
351  - Add TotalBytesProcessedAccuracy to QueryStatistics.
352- irm:
353  - Add new v1alpha2 client.
354- talent:
355  - Add new v4beta1 client.
356- rpcreplay:
357  - Fix connection to work with grpc >= 1.17.
358  - It is now required for an actual gRPC server to be running for Dial to
359    succeed.
360
361## 0.35.1
362
363- spanner:
364  - Adds OpenCensus views back to public API.
365
366## v0.35.0
367
368- all:
369  - Add go.mod and go.sum.
370  - Switch usage of gax-go to gax-go/v2.
371- bigquery:
372  - Fix bug where time partitioning could not be removed from a table.
373  - Fix panic that occurred with empty query parameters.
374- bttest:
375  - Fix bug where deleted rows were returned by ReadRows.
376- bigtable/emulator:
377  - Configure max message size to 256 MiB.
378- firestore:
379  - Allow non-transactional queries in transactions.
380  - Allow StartAt/EndBefore on direct children at any depth.
381  - QuerySnapshotIterator.Stop may be called in an error state.
382  - Fix bug the prevented reset of transaction write state in between retries.
383- functions/metadata:
384  - Make Metadata.Resource a pointer.
385- logging:
386  - Make SpanID available in logging.Entry.
387- metadata:
388  - Wrap !200 error code in a typed err.
389- profiler:
390  - Add function to check if function name is within a particular file in the
391    profile.
392  - Set parent field in create profile request.
393  - Return kubernetes client to start cluster, so client can be used to poll
394    cluster.
395  - Add function for checking if filename is in profile.
396- pubsub:
397  - Fix bug where messages expired without an initial modack in
398    synchronous=true mode.
399  - Receive does not retry ResourceExhausted errors.
400- spanner:
401  - client.Close now cancels existing requests and should be much faster for
402    large amounts of sessions.
403  - Correctly allow MinOpened sessions to be spun up.
404
405## v0.34.0
406
407- functions/metadata:
408  - Switch to using JSON in context.
409  - Make Resource a value.
410- vision: Fix ProductSearch return type.
411- datastore: Add an example for how to handle MultiError.
412
413## v0.33.1
414
415- compute: Removes an erroneously added go.mod.
416- logging: Populate source location in fromLogEntry.
417
418## v0.33.0
419
420- bttest:
421  - Add support for apply_label_transformer.
422- expr:
423  - Add expr library.
424- firestore:
425  - Support retrieval of missing documents.
426- kms:
427  - Add IAM methods.
428- pubsub:
429  - Clarify extension documentation.
430- scheduler:
431  - Add v1beta1 client.
432- vision:
433  - Add product search helper.
434  - Add new product search client.
435
436## v0.32.0
437
438Note: This release is the last to support Go 1.6 and 1.8.
439
440- bigquery:
441    - Add support for removing an expiration.
442    - Ignore NeverExpire in Table.Create.
443    - Validate table expiration time.
444- cbt:
445    - Add note about not supporting arbitrary bytes.
446- datastore:
447    - Align key checks.
448- firestore:
449    - Return an error when using Start/End without providing values.
450- pubsub:
451    - Add pstest Close method.
452    - Clarify MaxExtension documentation.
453- securitycenter:
454    - Add v1beta1 client.
455- spanner:
456    - Allow nil in mutations.
457    - Improve doc of SessionPoolConfig.MaxOpened.
458    - Increase session deletion timeout from 5s to 15s.
459
460## v0.31.0
461
462- bigtable:
463    - Group mutations across multiple requests.
464- bigquery:
465    - Link to bigquery troubleshooting errors page in bigquery.Error comment.
466- cbt:
467    - Fix go generate command.
468    - Document usage of both maxage + maxversions.
469- datastore:
470    - Passing nil keys results in ErrInvalidKey.
471- firestore:
472    - Clarify what Document.DataTo does with untouched struct fields.
473- profile:
474    - Validate service name in agent.
475- pubsub:
476    - Fix deadlock with pstest and ctx.Cancel.
477    - Fix a possible deadlock in pstest.
478- trace:
479    - Update doc URL with new fragment.
480
481Special thanks to @fastest963 for going above and beyond helping us to debug
482hard-to-reproduce Pub/Sub issues.
483
484## v0.30.0
485
486- spanner: DML support added. See https://godoc.org/cloud.google.com/go/spanner#hdr-DML_and_Partitioned_DML for more information.
487- bigtable: bttest supports row sample filter.
488- functions: metadata package added for accessing Cloud Functions resource metadata.
489
490## v0.29.0
491
492- bigtable:
493  - Add retry to all idempotent RPCs.
494  - cbt supports complex GC policies.
495  - Emulator supports arbitrary bytes in regex filters.
496- firestore: Add ArrayUnion and ArrayRemove.
497- logging: Add the ContextFunc option to supply the context used for
498  asynchronous RPCs.
499- profiler: Ignore NotDefinedError when fetching the instance name
500- pubsub:
501  - BEHAVIOR CHANGE: Receive doesn't retry if an RPC returns codes.Cancelled.
502  - BEHAVIOR CHANGE: Receive retries on Unavailable intead of returning.
503  - Fix deadlock.
504  - Restore Ack/Nack/Modacks metrics.
505  - Improve context handling in iterator.
506  - Implement synchronous mode for Receive.
507  - pstest: add Pull.
508- spanner: Add a metric for the number of sessions currently opened.
509- storage:
510  - Canceling the context releases all resources.
511  - Add additional RetentionPolicy attributes.
512- vision/apiv1: Add LocalizeObjects method.
513
514## v0.28.0
515
516- bigtable:
517  - Emulator returns Unimplemented for snapshot RPCs.
518- bigquery:
519  - Support zero-length repeated, nested fields.
520- cloud assets:
521  - Add v1beta client.
522- datastore:
523  - Don't nil out transaction ID on retry.
524- firestore:
525  - BREAKING CHANGE: When watching a query with Query.Snapshots, QuerySnapshotIterator.Next
526  returns a QuerySnapshot which contains read time, result size, change list and the DocumentIterator
527  (previously, QuerySnapshotIterator.Next returned just the DocumentIterator). See: https://godoc.org/cloud.google.com/go/firestore#Query.Snapshots.
528  - Add array-contains operator.
529- IAM:
530  - Add iam/credentials/apiv1 client.
531- pubsub:
532  - Canceling the context passed to Subscription.Receive causes Receive to return when
533  processing finishes on all messages currently in progress, even if new messages are arriving.
534- redis:
535  - Add redis/apiv1 client.
536- storage:
537  - Add Reader.Attrs.
538  - Deprecate several Reader getter methods: please use Reader.Attrs for these instead.
539  - Add ObjectHandle.Bucket and ObjectHandle.Object methods.
540
541## v0.27.0
542
543- bigquery:
544  - Allow modification of encryption configuration and partitioning options to a table via the Update call.
545  - Add a SchemaFromJSON function that converts a JSON table schema.
546- bigtable:
547  - Restore cbt count functionality.
548- containeranalysis:
549  - Add v1beta client.
550- spanner:
551  - Fix a case where an iterator might not be closed correctly.
552- storage:
553  - Add ServiceAccount method https://godoc.org/cloud.google.com/go/storage#Client.ServiceAccount.
554  - Add a method to Reader that returns the parsed value of the Last-Modified header.
555
556## v0.26.0
557
558- bigquery:
559  - Support filtering listed jobs  by min/max creation time.
560  - Support data clustering (https://godoc.org/cloud.google.com/go/bigquery#Clustering).
561  - Include job creator email in Job struct.
562- bigtable:
563  - Add `RowSampleFilter`.
564  - emulator: BREAKING BEHAVIOR CHANGE: Regexps in row, family, column and value filters
565    must match the entire target string to succeed. Previously, the emulator was
566    succeeding on  partial matches.
567    NOTE: As of this release, this change only affects the emulator when run
568    from this repo (bigtable/cmd/emulator/cbtemulator.go). The version launched
569    from `gcloud` will be updated in a subsequent `gcloud` release.
570- dataproc: Add apiv1beta2 client.
571- datastore: Save non-nil pointer fields on omitempty.
572- logging: populate Entry.Trace from the HTTP X-Cloud-Trace-Context header.
573- logging/logadmin:  Support writer_identity and include_children.
574- pubsub:
575  - Support labels on topics and subscriptions.
576  - Support message storage policy for topics.
577  - Use the distribution of ack times to determine when to extend ack deadlines.
578    The only user-visible effect of this change should be that programs that
579    call only `Subscription.Receive` need no IAM permissions other than `Pub/Sub
580    Subscriber`.
581- storage:
582  - Support predefined ACLs.
583  - Support additional ACL fields other than Entity and Role.
584  - Support bucket websites.
585  - Support bucket logging.
586
587
588## v0.25.0
589
590- Added [Code of Conduct](https://github.com/googleapis/google-cloud-go/blob/master/CODE_OF_CONDUCT.md)
591- bigtable:
592  - cbt: Support a GC policy of "never".
593- errorreporting:
594  - Support User.
595  - Close now calls Flush.
596  - Use OnError (previously ignored).
597  - Pass through the RPC error as-is to OnError.
598- httpreplay: A tool for recording and replaying HTTP requests
599  (for the bigquery and storage clients in this repo).
600- kms: v1 client added
601- logging: add SourceLocation to Entry.
602- storage: improve CRC checking on read.
603
604## v0.24.0
605
606- bigquery: Support for the NUMERIC type.
607- bigtable:
608  - cbt: Optionally specify columns for read/lookup
609  - Support instance-level administration.
610- oslogin: New client for the OS Login API.
611- pubsub:
612  - The package is now stable. There will be no further breaking changes.
613  - Internal changes to improve Subscription.Receive behavior.
614- storage: Support updating bucket lifecycle config.
615- spanner: Support struct-typed parameter bindings.
616- texttospeech: New client for the Text-to-Speech API.
617
618## v0.23.0
619
620- bigquery: Add DDL stats to query statistics.
621- bigtable:
622  - cbt: Add cells-per-column limit for row lookup.
623  - cbt: Make it possible to combine read filters.
624- dlp: v2beta2 client removed. Use the v2 client instead.
625- firestore, spanner: Fix compilation errors due to protobuf changes.
626
627## v0.22.0
628
629- bigtable:
630  - cbt: Support cells per column limit for row read.
631  - bttest: Correctly handle empty RowSet.
632  - Fix ReadModifyWrite operation in emulator.
633  - Fix API path in GetCluster.
634
635- bigquery:
636  - BEHAVIOR CHANGE: Retry on 503 status code.
637  - Add dataset.DeleteWithContents.
638  - Add SchemaUpdateOptions for query jobs.
639  - Add Timeline to QueryStatistics.
640  - Add more stats to ExplainQueryStage.
641  - Support Parquet data format.
642
643- datastore:
644  - Support omitempty for times.
645
646- dlp:
647  - **BREAKING CHANGE:** Remove v1beta1 client. Please migrate to the v2 client,
648  which is now out of beta.
649  - Add v2 client.
650
651- firestore:
652  - BEHAVIOR CHANGE: Treat set({}, MergeAll) as valid.
653
654- iam:
655  - Support JWT signing via SignJwt callopt.
656
657- profiler:
658  - BEHAVIOR CHANGE: PollForSerialOutput returns an error when context.Done.
659  - BEHAVIOR CHANGE: Increase the initial backoff to 1 minute.
660  - Avoid returning empty serial port output.
661
662- pubsub:
663  - BEHAVIOR CHANGE: Don't backoff during next retryable error once stream is healthy.
664  - BEHAVIOR CHANGE: Don't backoff on EOF.
665  - pstest: Support Acknowledge and ModifyAckDeadline RPCs.
666
667- redis:
668  - Add v1 beta Redis client.
669
670- spanner:
671  - Support SessionLabels.
672
673- speech:
674  - Add api v1 beta1 client.
675
676- storage:
677  - BEHAVIOR CHANGE: Retry reads when retryable error occurs.
678  - Fix delete of object in requester-pays bucket.
679  - Support KMS integration.
680
681## v0.21.0
682
683- bigquery:
684  - Add OpenCensus tracing.
685
686- firestore:
687  - **BREAKING CHANGE:** If a document does not exist, return a DocumentSnapshot
688    whose Exists method returns false. DocumentRef.Get and Transaction.Get
689    return the non-nil DocumentSnapshot in addition to a NotFound error.
690    **DocumentRef.GetAll and Transaction.GetAll return a non-nil
691    DocumentSnapshot instead of nil.**
692  - Add DocumentIterator.Stop. **Call Stop whenever you are done with a
693    DocumentIterator.**
694  - Added Query.Snapshots and DocumentRef.Snapshots, which provide realtime
695    notification of updates. See https://cloud.google.com/firestore/docs/query-data/listen.
696  - Canceling an RPC now always returns a grpc.Status with codes.Canceled.
697
698- spanner:
699  - Add `CommitTimestamp`, which supports inserting the commit timestamp of a
700    transaction into a column.
701
702## v0.20.0
703
704- bigquery: Support SchemaUpdateOptions for load jobs.
705
706- bigtable:
707  - Add SampleRowKeys.
708  - cbt: Support union, intersection GCPolicy.
709  - Retry admin RPCS.
710  - Add trace spans to retries.
711
712- datastore: Add OpenCensus tracing.
713
714- firestore:
715  - Fix queries involving Null and NaN.
716  - Allow Timestamp protobuffers for time values.
717
718- logging: Add a WriteTimeout option.
719
720- spanner: Support Batch API.
721
722- storage: Add OpenCensus tracing.
723
724## v0.19.0
725
726- bigquery:
727  - Support customer-managed encryption keys.
728
729- bigtable:
730  - Improved emulator support.
731  - Support GetCluster.
732
733- datastore:
734  - Add general mutations.
735  - Support pointer struct fields.
736  - Support transaction options.
737
738- firestore:
739  - Add Transaction.GetAll.
740  - Support document cursors.
741
742- logging:
743  - Support concurrent RPCs to the service.
744  - Support per-entry resources.
745
746- profiler:
747  - Add config options to disable heap and thread profiling.
748  - Read the project ID from $GOOGLE_CLOUD_PROJECT when it's set.
749
750- pubsub:
751  - BEHAVIOR CHANGE: Release flow control after ack/nack (instead of after the
752    callback returns).
753  - Add SubscriptionInProject.
754  - Add OpenCensus instrumentation for streaming pull.
755
756- storage:
757  - Support CORS.
758
759## v0.18.0
760
761- bigquery:
762  - Marked stable.
763  - Schema inference of nullable fields supported.
764  - Added TimePartitioning to QueryConfig.
765
766- firestore: Data provided to DocumentRef.Set with a Merge option can contain
767  Delete sentinels.
768
769- logging: Clients can accept parent resources other than projects.
770
771- pubsub:
772  - pubsub/pstest: A lighweight fake for pubsub. Experimental; feedback welcome.
773  - Support updating more subscription metadata: AckDeadline,
774    RetainAckedMessages and RetentionDuration.
775
776- oslogin/apiv1beta: New client for the Cloud OS Login API.
777
778- rpcreplay: A package for recording and replaying gRPC traffic.
779
780- spanner:
781  - Add a ReadWithOptions that supports a row limit, as well as an index.
782  - Support query plan and execution statistics.
783  - Added [OpenCensus](http://opencensus.io) support.
784
785- storage: Clarify checksum validation for gzipped files (it is not validated
786  when the file is served uncompressed).
787
788
789## v0.17.0
790
791- firestore BREAKING CHANGES:
792  - Remove UpdateMap and UpdateStruct; rename UpdatePaths to Update.
793    Change
794        `docref.UpdateMap(ctx, map[string]interface{}{"a.b", 1})`
795    to
796        `docref.Update(ctx, []firestore.Update{{Path: "a.b", Value: 1}})`
797
798    Change
799        `docref.UpdateStruct(ctx, []string{"Field"}, aStruct)`
800    to
801        `docref.Update(ctx, []firestore.Update{{Path: "Field", Value: aStruct.Field}})`
802  - Rename MergePaths to Merge; require args to be FieldPaths
803  - A value stored as an integer can be read into a floating-point field, and vice versa.
804- bigtable/cmd/cbt:
805  - Support deleting a column.
806  - Add regex option for row read.
807- spanner: Mark stable.
808- storage:
809  - Add Reader.ContentEncoding method.
810  - Fix handling of SignedURL headers.
811- bigquery:
812  - If Uploader.Put is called with no rows, it returns nil without making a
813    call.
814  - Schema inference supports the "nullable" option in struct tags for
815    non-required fields.
816  - TimePartitioning supports "Field".
817
818
819## v0.16.0
820
821- Other bigquery changes:
822  - `JobIterator.Next` returns `*Job`; removed `JobInfo` (BREAKING CHANGE).
823  - UseStandardSQL is deprecated; set UseLegacySQL to true if you need
824    Legacy SQL.
825  - Uploader.Put will generate a random insert ID if you do not provide one.
826  - Support time partitioning for load jobs.
827  - Support dry-run queries.
828  - A `Job` remembers its last retrieved status.
829  - Support retrieving job configuration.
830  - Support labels for jobs and tables.
831  - Support dataset access lists.
832  - Improve support for external data sources, including data from Bigtable and
833    Google Sheets, and tables with external data.
834  - Support updating a table's view configuration.
835  - Fix uploading civil times with nanoseconds.
836
837- storage:
838  - Support PubSub notifications.
839  - Support Requester Pays buckets.
840
841- profiler: Support goroutine and mutex profile types.
842
843## v0.15.0
844
845- firestore: beta release. See the
846  [announcement](https://firebase.googleblog.com/2017/10/introducing-cloud-firestore.html).
847
848- errorreporting: The existing package has been redesigned.
849
850- errors: This package has been removed. Use errorreporting.
851
852
853## v0.14.0
854
855- bigquery BREAKING CHANGES:
856  - Standard SQL is the default for queries and views.
857  - `Table.Create` takes `TableMetadata` as a second argument, instead of
858    options.
859  - `Dataset.Create` takes `DatasetMetadata` as a second argument.
860  - `DatasetMetadata` field `ID` renamed to `FullID`
861  - `TableMetadata` field `ID` renamed to `FullID`
862
863- Other bigquery changes:
864  - The client will append a random suffix to a provided job ID if you set
865    `AddJobIDSuffix` to true in a job config.
866  - Listing jobs is supported.
867  - Better retry logic.
868
869- vision, language, speech: clients are now stable
870
871- monitoring: client is now beta
872
873- profiler:
874  - Rename InstanceName to Instance, ZoneName to Zone
875  - Auto-detect service name and version on AppEngine.
876
877## v0.13.0
878
879- bigquery: UseLegacySQL options for CreateTable and QueryConfig. Use these
880  options to continue using Legacy SQL after the client switches its default
881  to Standard SQL.
882
883- bigquery: Support for updating dataset labels.
884
885- bigquery: Set DatasetIterator.ProjectID to list datasets in a project other
886  than the client's. DatasetsInProject is no longer needed and is deprecated.
887
888- bigtable: Fail ListInstances when any zones fail.
889
890- spanner: support decoding of slices of basic types (e.g. []string, []int64,
891  etc.)
892
893- logging/logadmin: UpdateSink no longer creates a sink if it is missing
894  (actually a change to the underlying service, not the client)
895
896- profiler: Service and ServiceVersion replace Target in Config.
897
898## v0.12.0
899
900- pubsub: Subscription.Receive now uses streaming pull.
901
902- pubsub: add Client.TopicInProject to access topics in a different project
903  than the client.
904
905- errors: renamed errorreporting. The errors package will be removed shortly.
906
907- datastore: improved retry behavior.
908
909- bigquery: support updates to dataset metadata, with etags.
910
911- bigquery: add etag support to Table.Update (BREAKING: etag argument added).
912
913- bigquery: generate all job IDs on the client.
914
915- storage: support bucket lifecycle configurations.
916
917
918## v0.11.0
919
920- Clients for spanner, pubsub and video are now in beta.
921
922- New client for DLP.
923
924- spanner: performance and testing improvements.
925
926- storage: requester-pays buckets are supported.
927
928- storage, profiler, bigtable, bigquery: bug fixes and other minor improvements.
929
930- pubsub: bug fixes and other minor improvements
931
932## v0.10.0
933
934- pubsub: Subscription.ModifyPushConfig replaced with Subscription.Update.
935
936- pubsub: Subscription.Receive now runs concurrently for higher throughput.
937
938- vision: cloud.google.com/go/vision is deprecated. Use
939cloud.google.com/go/vision/apiv1 instead.
940
941- translation: now stable.
942
943- trace: several changes to the surface. See the link below.
944
945### Code changes required from v0.9.0
946
947- pubsub: Replace
948
949    ```
950    sub.ModifyPushConfig(ctx, pubsub.PushConfig{Endpoint: "https://example.com/push"})
951    ```
952
953  with
954
955    ```
956    sub.Update(ctx, pubsub.SubscriptionConfigToUpdate{
957        PushConfig: &pubsub.PushConfig{Endpoint: "https://example.com/push"},
958    })
959    ```
960
961- trace: traceGRPCServerInterceptor will be provided from *trace.Client.
962Given an initialized `*trace.Client` named `tc`, instead of
963
964    ```
965    s := grpc.NewServer(grpc.UnaryInterceptor(trace.GRPCServerInterceptor(tc)))
966    ```
967
968  write
969
970    ```
971    s := grpc.NewServer(grpc.UnaryInterceptor(tc.GRPCServerInterceptor()))
972    ```
973
974- trace trace.GRPCClientInterceptor will also provided from *trace.Client.
975Instead of
976
977    ```
978    conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(trace.GRPCClientInterceptor()))
979    ```
980
981  write
982
983    ```
984    conn, err := grpc.Dial(srv.Addr, grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor()))
985    ```
986
987- trace: We removed the deprecated `trace.EnableGRPCTracing`. Use the gRPC
988interceptor as a dial option as shown below when initializing Cloud package
989clients:
990
991    ```
992    c, err := pubsub.NewClient(ctx, "project-id", option.WithGRPCDialOption(grpc.WithUnaryInterceptor(tc.GRPCClientInterceptor())))
993    if err != nil {
994        ...
995    }
996    ```
997
998
999## v0.9.0
1000
1001- Breaking changes to some autogenerated clients.
1002- rpcreplay package added.
1003
1004## v0.8.0
1005
1006- profiler package added.
1007- storage:
1008  - Retry Objects.Insert call.
1009  - Add ProgressFunc to WRiter.
1010- pubsub: breaking changes:
1011  - Publish is now asynchronous ([announcement](https://groups.google.com/d/topic/google-api-go-announce/aaqRDIQ3rvU/discussion)).
1012  - Subscription.Pull replaced by Subscription.Receive, which takes a callback ([announcement](https://groups.google.com/d/topic/google-api-go-announce/8pt6oetAdKc/discussion)).
1013  - Message.Done replaced with Message.Ack and Message.Nack.
1014
1015## v0.7.0
1016
1017- Release of a client library for Spanner. See
1018the
1019[blog
1020post](https://cloudplatform.googleblog.com/2017/02/introducing-Cloud-Spanner-a-global-database-service-for-mission-critical-applications.html).
1021Note that although the Spanner service is beta, the Go client library is alpha.
1022
1023## v0.6.0
1024
1025- Beta release of BigQuery, DataStore, Logging and Storage. See the
1026[blog post](https://cloudplatform.googleblog.com/2016/12/announcing-new-google-cloud-client.html).
1027
1028- bigquery:
1029  - struct support. Read a row directly into a struct with
1030`RowIterator.Next`, and upload a row directly from a struct with `Uploader.Put`.
1031You can also use field tags. See the [package documentation][cloud-bigquery-ref]
1032for details.
1033
1034  - The `ValueList` type was removed. It is no longer necessary. Instead of
1035   ```go
1036   var v ValueList
1037   ... it.Next(&v) ..
1038   ```
1039   use
1040
1041   ```go
1042   var v []Value
1043   ... it.Next(&v) ...
1044   ```
1045
1046  - Previously, repeatedly calling `RowIterator.Next` on the same `[]Value` or
1047  `ValueList` would append to the slice. Now each call resets the size to zero first.
1048
1049  - Schema inference will infer the SQL type BYTES for a struct field of
1050  type []byte. Previously it inferred STRING.
1051
1052  - The types `uint`, `uint64` and `uintptr` are no longer supported in schema
1053  inference. BigQuery's integer type is INT64, and those types may hold values
1054  that are not correctly represented in a 64-bit signed integer.
1055
1056## v0.5.0
1057
1058- bigquery:
1059  - The SQL types DATE, TIME and DATETIME are now supported. They correspond to
1060    the `Date`, `Time` and `DateTime` types in the new `cloud.google.com/go/civil`
1061    package.
1062  - Support for query parameters.
1063  - Support deleting a dataset.
1064  - Values from INTEGER columns will now be returned as int64, not int. This
1065    will avoid errors arising from large values on 32-bit systems.
1066- datastore:
1067  - Nested Go structs encoded as Entity values, instead of a
1068flattened list of the embedded struct's fields. This means that you may now have twice-nested slices, eg.
1069    ```go
1070    type State struct {
1071      Cities  []struct{
1072        Populations []int
1073      }
1074    }
1075    ```
1076    See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/79jtrdeuJAg) for
1077more details.
1078  - Contexts no longer hold namespaces; instead you must set a key's namespace
1079    explicitly. Also, key functions have been changed and renamed.
1080  - The WithNamespace function has been removed. To specify a namespace in a Query, use the Query.Namespace method:
1081     ```go
1082     q := datastore.NewQuery("Kind").Namespace("ns")
1083     ```
1084  - All the fields of Key are exported. That means you can construct any Key with a struct literal:
1085     ```go
1086     k := &Key{Kind: "Kind",  ID: 37, Namespace: "ns"}
1087     ```
1088  - As a result of the above, the Key methods Kind, ID, d.Name, Parent, SetParent and Namespace have been removed.
1089  - `NewIncompleteKey` has been removed, replaced by `IncompleteKey`. Replace
1090      ```go
1091      NewIncompleteKey(ctx, kind, parent)
1092      ```
1093      with
1094      ```go
1095      IncompleteKey(kind, parent)
1096      ```
1097      and if you do use namespaces, make sure you set the namespace on the returned key.
1098  - `NewKey` has been removed, replaced by `NameKey` and `IDKey`. Replace
1099      ```go
1100      NewKey(ctx, kind, name, 0, parent)
1101      NewKey(ctx, kind, "", id, parent)
1102      ```
1103      with
1104      ```go
1105      NameKey(kind, name, parent)
1106      IDKey(kind, id, parent)
1107      ```
1108      and if you do use namespaces, make sure you set the namespace on the returned key.
1109  - The `Done` variable has been removed. Replace `datastore.Done` with `iterator.Done`, from the package `google.golang.org/api/iterator`.
1110  - The `Client.Close` method will have a return type of error. It will return the result of closing the underlying gRPC connection.
1111  - See [the announcement](https://groups.google.com/forum/#!topic/google-api-go-announce/hqXtM_4Ix-0) for
1112more details.
1113
1114## v0.4.0
1115
1116- bigquery:
1117  -`NewGCSReference` is now a function, not a method on `Client`.
1118  - `Table.LoaderFrom` now accepts a `ReaderSource`, enabling
1119     loading data into a table from a file or any `io.Reader`.
1120  * Client.Table and Client.OpenTable have been removed.
1121      Replace
1122      ```go
1123      client.OpenTable("project", "dataset", "table")
1124      ```
1125      with
1126      ```go
1127      client.DatasetInProject("project", "dataset").Table("table")
1128      ```
1129
1130  * Client.CreateTable has been removed.
1131      Replace
1132      ```go
1133      client.CreateTable(ctx, "project", "dataset", "table")
1134      ```
1135      with
1136      ```go
1137      client.DatasetInProject("project", "dataset").Table("table").Create(ctx)
1138      ```
1139
1140  * Dataset.ListTables have been replaced with Dataset.Tables.
1141      Replace
1142      ```go
1143      tables, err := ds.ListTables(ctx)
1144      ```
1145      with
1146      ```go
1147      it := ds.Tables(ctx)
1148      for {
1149          table, err := it.Next()
1150          if err == iterator.Done {
1151              break
1152          }
1153          if err != nil {
1154              // TODO: Handle error.
1155          }
1156          // TODO: use table.
1157      }
1158      ```
1159
1160  * Client.Read has been replaced with Job.Read, Table.Read and Query.Read.
1161      Replace
1162      ```go
1163      it, err := client.Read(ctx, job)
1164      ```
1165      with
1166      ```go
1167      it, err := job.Read(ctx)
1168      ```
1169    and similarly for reading from tables or queries.
1170
1171  * The iterator returned from the Read methods is now named RowIterator. Its
1172    behavior is closer to the other iterators in these libraries. It no longer
1173    supports the Schema method; see the next item.
1174      Replace
1175      ```go
1176      for it.Next(ctx) {
1177          var vals ValueList
1178          if err := it.Get(&vals); err != nil {
1179              // TODO: Handle error.
1180          }
1181          // TODO: use vals.
1182      }
1183      if err := it.Err(); err != nil {
1184          // TODO: Handle error.
1185      }
1186      ```
1187      with
1188      ```
1189      for {
1190          var vals ValueList
1191          err := it.Next(&vals)
1192          if err == iterator.Done {
1193              break
1194          }
1195          if err != nil {
1196              // TODO: Handle error.
1197          }
1198          // TODO: use vals.
1199      }
1200      ```
1201      Instead of the `RecordsPerRequest(n)` option, write
1202      ```go
1203      it.PageInfo().MaxSize = n
1204      ```
1205      Instead of the `StartIndex(i)` option, write
1206      ```go
1207      it.StartIndex = i
1208      ```
1209
1210  * ValueLoader.Load now takes a Schema in addition to a slice of Values.
1211      Replace
1212      ```go
1213      func (vl *myValueLoader) Load(v []bigquery.Value)
1214      ```
1215      with
1216      ```go
1217      func (vl *myValueLoader) Load(v []bigquery.Value, s bigquery.Schema)
1218      ```
1219
1220
1221  * Table.Patch is replace by Table.Update.
1222      Replace
1223      ```go
1224      p := table.Patch()
1225      p.Description("new description")
1226      metadata, err := p.Apply(ctx)
1227      ```
1228      with
1229      ```go
1230      metadata, err := table.Update(ctx, bigquery.TableMetadataToUpdate{
1231          Description: "new description",
1232      })
1233      ```
1234
1235  * Client.Copy is replaced by separate methods for each of its four functions.
1236    All options have been replaced by struct fields.
1237
1238    * To load data from Google Cloud Storage into a table, use Table.LoaderFrom.
1239
1240      Replace
1241      ```go
1242      client.Copy(ctx, table, gcsRef)
1243      ```
1244      with
1245      ```go
1246      table.LoaderFrom(gcsRef).Run(ctx)
1247      ```
1248      Instead of passing options to Copy, set fields on the Loader:
1249      ```go
1250      loader := table.LoaderFrom(gcsRef)
1251      loader.WriteDisposition = bigquery.WriteTruncate
1252      ```
1253
1254    * To extract data from a table into Google Cloud Storage, use
1255      Table.ExtractorTo. Set fields on the returned Extractor instead of
1256      passing options.
1257
1258      Replace
1259      ```go
1260      client.Copy(ctx, gcsRef, table)
1261      ```
1262      with
1263      ```go
1264      table.ExtractorTo(gcsRef).Run(ctx)
1265      ```
1266
1267    * To copy data into a table from one or more other tables, use
1268      Table.CopierFrom. Set fields on the returned Copier instead of passing options.
1269
1270      Replace
1271      ```go
1272      client.Copy(ctx, dstTable, srcTable)
1273      ```
1274      with
1275      ```go
1276      dst.Table.CopierFrom(srcTable).Run(ctx)
1277      ```
1278
1279    * To start a query job, create a Query and call its Run method. Set fields
1280    on the query instead of passing options.
1281
1282      Replace
1283      ```go
1284      client.Copy(ctx, table, query)
1285      ```
1286      with
1287      ```go
1288      query.Run(ctx)
1289      ```
1290
1291  * Table.NewUploader has been renamed to Table.Uploader. Instead of options,
1292    configure an Uploader by setting its fields.
1293      Replace
1294      ```go
1295      u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
1296      ```
1297      with
1298      ```go
1299      u := table.NewUploader(bigquery.UploadIgnoreUnknownValues())
1300      u.IgnoreUnknownValues = true
1301      ```
1302
1303- pubsub: remove `pubsub.Done`. Use `iterator.Done` instead, where `iterator` is the package
1304`google.golang.org/api/iterator`.
1305
1306## v0.3.0
1307
1308- storage:
1309  * AdminClient replaced by methods on Client.
1310      Replace
1311      ```go
1312      adminClient.CreateBucket(ctx, bucketName, attrs)
1313      ```
1314      with
1315      ```go
1316      client.Bucket(bucketName).Create(ctx, projectID, attrs)
1317      ```
1318
1319  * BucketHandle.List replaced by BucketHandle.Objects.
1320      Replace
1321      ```go
1322      for query != nil {
1323          objs, err := bucket.List(d.ctx, query)
1324          if err != nil { ... }
1325          query = objs.Next
1326          for _, obj := range objs.Results {
1327              fmt.Println(obj)
1328          }
1329      }
1330      ```
1331      with
1332      ```go
1333      iter := bucket.Objects(d.ctx, query)
1334      for {
1335          obj, err := iter.Next()
1336          if err == iterator.Done {
1337              break
1338          }
1339          if err != nil { ... }
1340          fmt.Println(obj)
1341      }
1342      ```
1343      (The `iterator` package is at `google.golang.org/api/iterator`.)
1344
1345      Replace `Query.Cursor` with `ObjectIterator.PageInfo().Token`.
1346
1347      Replace `Query.MaxResults` with `ObjectIterator.PageInfo().MaxSize`.
1348
1349
1350  * ObjectHandle.CopyTo replaced by ObjectHandle.CopierFrom.
1351      Replace
1352      ```go
1353      attrs, err := src.CopyTo(ctx, dst, nil)
1354      ```
1355      with
1356      ```go
1357      attrs, err := dst.CopierFrom(src).Run(ctx)
1358      ```
1359
1360      Replace
1361      ```go
1362      attrs, err := src.CopyTo(ctx, dst, &storage.ObjectAttrs{ContextType: "text/html"})
1363      ```
1364      with
1365      ```go
1366      c := dst.CopierFrom(src)
1367      c.ContextType = "text/html"
1368      attrs, err := c.Run(ctx)
1369      ```
1370
1371  * ObjectHandle.ComposeFrom replaced by ObjectHandle.ComposerFrom.
1372      Replace
1373      ```go
1374      attrs, err := dst.ComposeFrom(ctx, []*storage.ObjectHandle{src1, src2}, nil)
1375      ```
1376      with
1377      ```go
1378      attrs, err := dst.ComposerFrom(src1, src2).Run(ctx)
1379      ```
1380
1381  * ObjectHandle.Update's ObjectAttrs argument replaced by ObjectAttrsToUpdate.
1382      Replace
1383      ```go
1384      attrs, err := obj.Update(ctx, &storage.ObjectAttrs{ContextType: "text/html"})
1385      ```
1386      with
1387      ```go
1388      attrs, err := obj.Update(ctx, storage.ObjectAttrsToUpdate{ContextType: "text/html"})
1389      ```
1390
1391  * ObjectHandle.WithConditions replaced by ObjectHandle.If.
1392      Replace
1393      ```go
1394      obj.WithConditions(storage.Generation(gen), storage.IfMetaGenerationMatch(mgen))
1395      ```
1396      with
1397      ```go
1398      obj.Generation(gen).If(storage.Conditions{MetagenerationMatch: mgen})
1399      ```
1400
1401      Replace
1402      ```go
1403      obj.WithConditions(storage.IfGenerationMatch(0))
1404      ```
1405      with
1406      ```go
1407      obj.If(storage.Conditions{DoesNotExist: true})
1408      ```
1409
1410  * `storage.Done` replaced by `iterator.Done` (from package `google.golang.org/api/iterator`).
1411
1412- Package preview/logging deleted. Use logging instead.
1413
1414## v0.2.0
1415
1416- Logging client replaced with preview version (see below).
1417
1418- New clients for some of Google's Machine Learning APIs: Vision, Speech, and
1419Natural Language.
1420
1421- Preview version of a new [Stackdriver Logging][cloud-logging] client in
1422[`cloud.google.com/go/preview/logging`](https://godoc.org/cloud.google.com/go/preview/logging).
1423This client uses gRPC as its transport layer, and supports log reading, sinks
1424and metrics. It will replace the current client at `cloud.google.com/go/logging` shortly.
1425
1426
1427