all: regen
Change-Id: Ic1ad130b42818baa4b3ad477d9193345b769c378
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/48070
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Cody Oss <codyoss@google.com>
diff --git a/asset/apiv1/doc.go b/asset/apiv1/doc.go
index 948251e..8af4186 100644
--- a/asset/apiv1/doc.go
+++ b/asset/apiv1/doc.go
@@ -43,7 +43,7 @@
"google.golang.org/grpc/metadata"
)
-const versionClient = "20191028"
+const versionClient = "20191108"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/automl/apiv1/auto_ml_client.go b/automl/apiv1/auto_ml_client.go
index 06d31e6..edde45b 100644
--- a/automl/apiv1/auto_ml_client.go
+++ b/automl/apiv1/auto_ml_client.go
@@ -484,7 +484,7 @@
// same parameters has no effect. Deploying with different parametrs
// (as e.g. changing
//
-// [node_number][google.cloud.automl.v1p1beta.ImageObjectDetectionModelDeploymentMetadata.node_number])
+// [node_number][google.cloud.automl.v1.ImageObjectDetectionModelDeploymentMetadata.node_number])
// will reset the deployment state without pausing the model's availability.
//
// Only applicable for Text Classification, Image Object Detection; all other
diff --git a/automl/apiv1/doc.go b/automl/apiv1/doc.go
index d038006..4f9017a 100644
--- a/automl/apiv1/doc.go
+++ b/automl/apiv1/doc.go
@@ -97,4 +97,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/bigquery/go.mod b/bigquery/go.mod
index b324f08..d25234f 100644
--- a/bigquery/go.mod
+++ b/bigquery/go.mod
@@ -10,7 +10,7 @@
github.com/googleapis/gax-go/v2 v2.0.5
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/bigquery/go.sum b/bigquery/go.sum
index afe2407..aae3b9a 100644
--- a/bigquery/go.sum
+++ b/bigquery/go.sum
@@ -134,8 +134,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/bigtable/go.mod b/bigtable/go.mod
index 5c400e6..e85953f 100644
--- a/bigtable/go.mod
+++ b/bigtable/go.mod
@@ -14,7 +14,7 @@
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sys v0.0.0-20191029155521-f43be2a4598c // indirect
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
diff --git a/bigtable/go.sum b/bigtable/go.sum
index 1339e8f..017c768 100644
--- a/bigtable/go.sum
+++ b/bigtable/go.sum
@@ -155,8 +155,8 @@
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5 h1:hKsoRgsbwY1NafxrwTs+k64bikrLBkAgPir1TNCj3Zs=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/cloudbuild/apiv1/doc.go b/cloudbuild/apiv1/doc.go
index 1a234dd..6bcbe68 100644
--- a/cloudbuild/apiv1/doc.go
+++ b/cloudbuild/apiv1/doc.go
@@ -97,4 +97,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/datastore/go.mod b/datastore/go.mod
index 7285cbb..cb27b63 100644
--- a/datastore/go.mod
+++ b/datastore/go.mod
@@ -10,7 +10,7 @@
github.com/googleapis/gax-go/v2 v2.0.5
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/datastore/go.sum b/datastore/go.sum
index 55ee9f9..de10067 100644
--- a/datastore/go.sum
+++ b/datastore/go.sum
@@ -134,8 +134,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/debugger/apiv2/doc.go b/debugger/apiv2/doc.go
index 6bdb1d9..56b2c06 100644
--- a/debugger/apiv2/doc.go
+++ b/debugger/apiv2/doc.go
@@ -101,4 +101,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/firestore/apiv1/admin/doc.go b/firestore/apiv1/admin/doc.go
index b63d5b4..5d90b74 100644
--- a/firestore/apiv1/admin/doc.go
+++ b/firestore/apiv1/admin/doc.go
@@ -99,4 +99,4 @@
return "UNKNOWN"
}
-const versionClient = "UNKNOWN"
+const versionClient = "20191108"
diff --git a/firestore/go.mod b/firestore/go.mod
index b714320..b2ca304 100644
--- a/firestore/go.mod
+++ b/firestore/go.mod
@@ -10,7 +10,7 @@
github.com/googleapis/gax-go/v2 v2.0.5
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/firestore/go.sum b/firestore/go.sum
index 8912bf0..f967b28 100644
--- a/firestore/go.sum
+++ b/firestore/go.sum
@@ -134,8 +134,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/go.mod b/go.mod
index 4d6a1b9..28c3c2c 100644
--- a/go.mod
+++ b/go.mod
@@ -20,7 +20,7 @@
golang.org/x/net v0.0.0-20190620200207-3b0461eec859
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/text v0.3.2
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/go.sum b/go.sum
index 46c2cf5..b98f5b3 100644
--- a/go.sum
+++ b/go.sum
@@ -157,8 +157,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/iot/apiv1/doc.go b/iot/apiv1/doc.go
index 4b27f87..a920c98 100644
--- a/iot/apiv1/doc.go
+++ b/iot/apiv1/doc.go
@@ -99,4 +99,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/language/apiv1/doc.go b/language/apiv1/doc.go
index 48378fa..422fa5c 100644
--- a/language/apiv1/doc.go
+++ b/language/apiv1/doc.go
@@ -45,7 +45,7 @@
"google.golang.org/grpc/metadata"
)
-const versionClient = "20191028"
+const versionClient = "20191108"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/logging/go.mod b/logging/go.mod
index f8cb4aa..be7309a 100644
--- a/logging/go.mod
+++ b/logging/go.mod
@@ -12,7 +12,7 @@
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/logging/go.sum b/logging/go.sum
index 29b15a5..a491a48 100644
--- a/logging/go.sum
+++ b/logging/go.sum
@@ -135,8 +135,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0 h1:9sdfJOzWlkqPltHAuzT2Cp+yrBeY1KRVYgms8soxMwM=
diff --git a/monitoring/apiv3/doc.go b/monitoring/apiv3/doc.go
index 1ddac19..87a3dfa 100644
--- a/monitoring/apiv3/doc.go
+++ b/monitoring/apiv3/doc.go
@@ -102,4 +102,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/oslogin/apiv1/doc.go b/oslogin/apiv1/doc.go
index ad7e942..6288855 100644
--- a/oslogin/apiv1/doc.go
+++ b/oslogin/apiv1/doc.go
@@ -100,4 +100,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/oslogin/apiv1beta/doc.go b/oslogin/apiv1beta/doc.go
index cef3fbd..b097dd7 100644
--- a/oslogin/apiv1beta/doc.go
+++ b/oslogin/apiv1beta/doc.go
@@ -100,4 +100,4 @@
return "UNKNOWN"
}
-const versionClient = "20191028"
+const versionClient = "20191108"
diff --git a/phishingprotection/apiv1beta1/doc.go b/phishingprotection/apiv1beta1/doc.go
index 700a095..2f9dca0 100644
--- a/phishingprotection/apiv1beta1/doc.go
+++ b/phishingprotection/apiv1beta1/doc.go
@@ -41,7 +41,7 @@
"google.golang.org/grpc/metadata"
)
-const versionClient = "20191028"
+const versionClient = "20191108"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/pubsub/go.mod b/pubsub/go.mod
index 175244e..7bffee0 100644
--- a/pubsub/go.mod
+++ b/pubsub/go.mod
@@ -14,7 +14,7 @@
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/pubsub/go.sum b/pubsub/go.sum
index ba7428d..6c44215 100644
--- a/pubsub/go.sum
+++ b/pubsub/go.sum
@@ -135,8 +135,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/scheduler/apiv1/cloud_scheduler_client.go b/scheduler/apiv1/cloud_scheduler_client.go
index 7ee27d2..c9b7ae1 100644
--- a/scheduler/apiv1/cloud_scheduler_client.go
+++ b/scheduler/apiv1/cloud_scheduler_client.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package scheduler
@@ -49,6 +49,7 @@
func defaultCloudSchedulerClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("cloudscheduler.googleapis.com:443"),
+ option.WithGRPCDialOption(grpc.WithDisableServiceConfig()),
option.WithScopes(DefaultAuthScopes()...),
option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32))),
@@ -56,8 +57,8 @@
}
func defaultCloudSchedulerCallOptions() *CloudSchedulerCallOptions {
- retry := map[[2]string][]gax.CallOption{
- {"default", "idempotent"}: {
+ return &CloudSchedulerCallOptions{
+ ListJobs: []gax.CallOption{
gax.WithRetry(func() gax.Retryer {
return gax.OnCodes([]codes.Code{
codes.DeadlineExceeded,
@@ -65,20 +66,39 @@
}, gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
- Multiplier: 1.3,
+ Multiplier: 1.30,
})
}),
},
- }
- return &CloudSchedulerCallOptions{
- ListJobs: retry[[2]string{"default", "idempotent"}],
- GetJob: retry[[2]string{"default", "idempotent"}],
- CreateJob: retry[[2]string{"default", "non_idempotent"}],
- UpdateJob: retry[[2]string{"default", "non_idempotent"}],
- DeleteJob: retry[[2]string{"default", "non_idempotent"}],
- PauseJob: retry[[2]string{"default", "non_idempotent"}],
- ResumeJob: retry[[2]string{"default", "non_idempotent"}],
- RunJob: retry[[2]string{"default", "non_idempotent"}],
+ GetJob: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ CreateJob: []gax.CallOption{},
+ UpdateJob: []gax.CallOption{},
+ DeleteJob: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ PauseJob: []gax.CallOption{},
+ ResumeJob: []gax.CallOption{},
+ RunJob: []gax.CallOption{},
}
}
@@ -115,6 +135,7 @@
cloudSchedulerClient: schedulerpb.NewCloudSchedulerClient(conn),
}
c.setGoogleClientInfo()
+
return c, nil
}
@@ -161,6 +182,8 @@
if err != nil {
return nil, "", err
}
+
+ it.Response = resp
return resp.Jobs, resp.NextPageToken, nil
}
fetch := func(pageSize int, pageToken string) (string, error) {
@@ -221,8 +244,7 @@
// not be executed. If this happens, retry the UpdateJob request
// until a successful response is received.
func (c *CloudSchedulerClient) UpdateJob(ctx context.Context, req *schedulerpb.UpdateJobRequest, opts ...gax.CallOption) (*schedulerpb.Job, error) {
- md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "job.name", url.QueryEscape(req.GetJob().GetName())))
- ctx = insertMetadata(ctx, c.xGoogMetadata, md)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.UpdateJob[0:len(c.CallOptions.UpdateJob):len(c.CallOptions.UpdateJob)], opts...)
var resp *schedulerpb.Job
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -320,6 +342,11 @@
pageInfo *iterator.PageInfo
nextFunc func() error
+ // Response is the raw response for the current page.
+ // It must be cast to the RPC response type.
+ // Calling Next() or InternalFetch() updates this value.
+ Response interface{}
+
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
diff --git a/scheduler/apiv1/cloud_scheduler_client_example_test.go b/scheduler/apiv1/cloud_scheduler_client_example_test.go
index 8bbfc84..dbbc99e 100644
--- a/scheduler/apiv1/cloud_scheduler_client_example_test.go
+++ b/scheduler/apiv1/cloud_scheduler_client_example_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package scheduler_test
@@ -35,6 +35,9 @@
}
func ExampleCloudSchedulerClient_ListJobs() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+ // import "google.golang.org/api/iterator"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -59,6 +62,8 @@
}
func ExampleCloudSchedulerClient_GetJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -77,6 +82,8 @@
}
func ExampleCloudSchedulerClient_CreateJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -95,6 +102,8 @@
}
func ExampleCloudSchedulerClient_UpdateJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -129,6 +138,8 @@
}
func ExampleCloudSchedulerClient_PauseJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -147,6 +158,8 @@
}
func ExampleCloudSchedulerClient_ResumeJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -165,6 +178,8 @@
}
func ExampleCloudSchedulerClient_RunJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
diff --git a/scheduler/apiv1/doc.go b/scheduler/apiv1/doc.go
index 1b6b8be..e8b70aa 100644
--- a/scheduler/apiv1/doc.go
+++ b/scheduler/apiv1/doc.go
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
// Package scheduler is an auto-generated package for the
// Cloud Scheduler API.
-
//
// Creates and manages jobs run on a regular recurring schedule.
//
@@ -30,6 +29,7 @@
//
// For information about setting deadlines, reusing contexts, and more
// please visit godoc.org/cloud.google.com/go.
+
package scheduler // import "cloud.google.com/go/scheduler/apiv1"
import (
@@ -41,6 +41,8 @@
"google.golang.org/grpc/metadata"
)
+const versionClient = "20191108"
+
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
out = out.Copy()
@@ -74,7 +76,7 @@
}
notSemverRune := func(r rune) bool {
- return strings.IndexRune("0123456789.", r) < 0
+ return !strings.ContainsRune("0123456789.", r)
}
if strings.HasPrefix(s, "go1") {
@@ -95,5 +97,3 @@
}
return "UNKNOWN"
}
-
-const versionClient = "20191028"
diff --git a/scheduler/apiv1beta1/cloud_scheduler_client.go b/scheduler/apiv1beta1/cloud_scheduler_client.go
index 694a44e..4caab1c 100644
--- a/scheduler/apiv1beta1/cloud_scheduler_client.go
+++ b/scheduler/apiv1beta1/cloud_scheduler_client.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package scheduler
@@ -49,6 +49,7 @@
func defaultCloudSchedulerClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("cloudscheduler.googleapis.com:443"),
+ option.WithGRPCDialOption(grpc.WithDisableServiceConfig()),
option.WithScopes(DefaultAuthScopes()...),
option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32))),
@@ -56,8 +57,8 @@
}
func defaultCloudSchedulerCallOptions() *CloudSchedulerCallOptions {
- retry := map[[2]string][]gax.CallOption{
- {"default", "idempotent"}: {
+ return &CloudSchedulerCallOptions{
+ ListJobs: []gax.CallOption{
gax.WithRetry(func() gax.Retryer {
return gax.OnCodes([]codes.Code{
codes.DeadlineExceeded,
@@ -65,20 +66,61 @@
}, gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
- Multiplier: 1.3,
+ Multiplier: 1.30,
})
}),
},
- }
- return &CloudSchedulerCallOptions{
- ListJobs: retry[[2]string{"default", "idempotent"}],
- GetJob: retry[[2]string{"default", "idempotent"}],
- CreateJob: retry[[2]string{"default", "non_idempotent"}],
- UpdateJob: retry[[2]string{"default", "non_idempotent"}],
- DeleteJob: retry[[2]string{"default", "non_idempotent"}],
- PauseJob: retry[[2]string{"default", "non_idempotent"}],
- ResumeJob: retry[[2]string{"default", "non_idempotent"}],
- RunJob: retry[[2]string{"default", "non_idempotent"}],
+ GetJob: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ CreateJob: []gax.CallOption{},
+ UpdateJob: []gax.CallOption{},
+ DeleteJob: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ PauseJob: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ ResumeJob: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ RunJob: []gax.CallOption{},
}
}
@@ -115,6 +157,7 @@
cloudSchedulerClient: schedulerpb.NewCloudSchedulerClient(conn),
}
c.setGoogleClientInfo()
+
return c, nil
}
@@ -161,6 +204,8 @@
if err != nil {
return nil, "", err
}
+
+ it.Response = resp
return resp.Jobs, resp.NextPageToken, nil
}
fetch := func(pageSize int, pageToken string) (string, error) {
@@ -221,8 +266,7 @@
// not be executed. If this happens, retry the UpdateJob request
// until a successful response is received.
func (c *CloudSchedulerClient) UpdateJob(ctx context.Context, req *schedulerpb.UpdateJobRequest, opts ...gax.CallOption) (*schedulerpb.Job, error) {
- md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "job.name", url.QueryEscape(req.GetJob().GetName())))
- ctx = insertMetadata(ctx, c.xGoogMetadata, md)
+ ctx = insertMetadata(ctx, c.xGoogMetadata)
opts = append(c.CallOptions.UpdateJob[0:len(c.CallOptions.UpdateJob):len(c.CallOptions.UpdateJob)], opts...)
var resp *schedulerpb.Job
err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
@@ -320,6 +364,11 @@
pageInfo *iterator.PageInfo
nextFunc func() error
+ // Response is the raw response for the current page.
+ // It must be cast to the RPC response type.
+ // Calling Next() or InternalFetch() updates this value.
+ Response interface{}
+
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
diff --git a/scheduler/apiv1beta1/cloud_scheduler_client_example_test.go b/scheduler/apiv1beta1/cloud_scheduler_client_example_test.go
index a541d4c..e50cf72 100644
--- a/scheduler/apiv1beta1/cloud_scheduler_client_example_test.go
+++ b/scheduler/apiv1beta1/cloud_scheduler_client_example_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package scheduler_test
@@ -35,6 +35,9 @@
}
func ExampleCloudSchedulerClient_ListJobs() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+ // import "google.golang.org/api/iterator"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -59,6 +62,8 @@
}
func ExampleCloudSchedulerClient_GetJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -77,6 +82,8 @@
}
func ExampleCloudSchedulerClient_CreateJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -95,6 +102,8 @@
}
func ExampleCloudSchedulerClient_UpdateJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -129,6 +138,8 @@
}
func ExampleCloudSchedulerClient_PauseJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -147,6 +158,8 @@
}
func ExampleCloudSchedulerClient_ResumeJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
@@ -165,6 +178,8 @@
}
func ExampleCloudSchedulerClient_RunJob() {
+ // import schedulerpb "google.golang.org/genproto/googleapis/cloud/scheduler/v1beta1"
+
ctx := context.Background()
c, err := scheduler.NewCloudSchedulerClient(ctx)
if err != nil {
diff --git a/scheduler/apiv1beta1/doc.go b/scheduler/apiv1beta1/doc.go
index 8f084d6..e25657b 100644
--- a/scheduler/apiv1beta1/doc.go
+++ b/scheduler/apiv1beta1/doc.go
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
// Package scheduler is an auto-generated package for the
// Cloud Scheduler API.
//
-// NOTE: This package is in beta. It is not stable, and may be subject to changes.
-//
// Creates and manages jobs run on a regular recurring schedule.
//
+// NOTE: This package is in beta. It is not stable, and may be subject to changes.
+//
// Use of Context
//
// The ctx passed to NewClient is used for authentication requests and
@@ -31,6 +31,7 @@
//
// For information about setting deadlines, reusing contexts, and more
// please visit godoc.org/cloud.google.com/go.
+
package scheduler // import "cloud.google.com/go/scheduler/apiv1beta1"
import (
@@ -42,6 +43,8 @@
"google.golang.org/grpc/metadata"
)
+const versionClient = "20191108"
+
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
out = out.Copy()
@@ -75,7 +78,7 @@
}
notSemverRune := func(r rune) bool {
- return strings.IndexRune("0123456789.", r) < 0
+ return !strings.ContainsRune("0123456789.", r)
}
if strings.HasPrefix(s, "go1") {
@@ -96,5 +99,3 @@
}
return "UNKNOWN"
}
-
-const versionClient = "20191028"
diff --git a/spanner/admin/database/apiv1/database_admin_client.go b/spanner/admin/database/apiv1/database_admin_client.go
index 77b5740..6f76cef 100644
--- a/spanner/admin/database/apiv1/database_admin_client.go
+++ b/spanner/admin/database/apiv1/database_admin_client.go
@@ -40,7 +40,6 @@
// DatabaseAdminCallOptions contains the retry settings for each method of DatabaseAdminClient.
type DatabaseAdminCallOptions struct {
- ListDatabases []gax.CallOption
CreateDatabase []gax.CallOption
GetDatabase []gax.CallOption
UpdateDatabaseDdl []gax.CallOption
@@ -49,6 +48,7 @@
SetIamPolicy []gax.CallOption
GetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
+ ListDatabases []gax.CallOption
}
func defaultDatabaseAdminClientOptions() []option.ClientOption {
@@ -76,7 +76,6 @@
},
}
return &DatabaseAdminCallOptions{
- ListDatabases: retry[[2]string{"default", "idempotent"}],
CreateDatabase: retry[[2]string{"default", "non_idempotent"}],
GetDatabase: retry[[2]string{"default", "idempotent"}],
UpdateDatabaseDdl: retry[[2]string{"default", "idempotent"}],
@@ -85,6 +84,7 @@
SetIamPolicy: retry[[2]string{"default", "non_idempotent"}],
GetIamPolicy: retry[[2]string{"default", "idempotent"}],
TestIamPermissions: retry[[2]string{"default", "non_idempotent"}],
+ ListDatabases: retry[[2]string{"default", "idempotent"}],
}
}
@@ -163,45 +163,6 @@
c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...))
}
-// ListDatabases lists Cloud Spanner databases.
-func (c *DatabaseAdminClient) ListDatabases(ctx context.Context, req *databasepb.ListDatabasesRequest, opts ...gax.CallOption) *DatabaseIterator {
- md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))
- ctx = insertMetadata(ctx, c.xGoogMetadata, md)
- opts = append(c.CallOptions.ListDatabases[0:len(c.CallOptions.ListDatabases):len(c.CallOptions.ListDatabases)], opts...)
- it := &DatabaseIterator{}
- req = proto.Clone(req).(*databasepb.ListDatabasesRequest)
- it.InternalFetch = func(pageSize int, pageToken string) ([]*databasepb.Database, string, error) {
- var resp *databasepb.ListDatabasesResponse
- req.PageToken = pageToken
- if pageSize > math.MaxInt32 {
- req.PageSize = math.MaxInt32
- } else {
- req.PageSize = int32(pageSize)
- }
- err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
- var err error
- resp, err = c.databaseAdminClient.ListDatabases(ctx, req, settings.GRPC...)
- return err
- }, opts...)
- if err != nil {
- return nil, "", err
- }
- return resp.Databases, resp.NextPageToken, nil
- }
- fetch := func(pageSize int, pageToken string) (string, error) {
- items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
- if err != nil {
- return "", err
- }
- it.items = append(it.items, items...)
- return nextPageToken, nil
- }
- it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
- it.pageInfo.MaxSize = int(req.PageSize)
- it.pageInfo.Token = req.PageToken
- return it
-}
-
// CreateDatabase creates a new Cloud Spanner database and starts to prepare it for serving.
// The returned [long-running operation][google.longrunning.Operation] will
// have a name of the format <database_name>/operations/<operation_id> and
@@ -303,11 +264,11 @@
return resp, nil
}
-// SetIamPolicy sets the access control policy on a database resource. Replaces any
-// existing policy.
+// SetIamPolicy sets the access control policy on a database resource.
+// Replaces any existing policy.
//
-// Authorization requires spanner.databases.setIamPolicy permission on
-// [resource][google.iam.v1.SetIamPolicyRequest.resource].
+// Authorization requires spanner.databases.setIamPolicy
+// permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
func (c *DatabaseAdminClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource())))
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
@@ -324,8 +285,9 @@
return resp, nil
}
-// GetIamPolicy gets the access control policy for a database resource. Returns an empty
-// policy if a database exists but does not have a policy set.
+// GetIamPolicy gets the access control policy for a database resource.
+// Returns an empty policy if a database exists but does
+// not have a policy set.
//
// Authorization requires spanner.databases.getIamPolicy permission on
// [resource][google.iam.v1.GetIamPolicyRequest.resource].
@@ -347,10 +309,10 @@
// TestIamPermissions returns permissions that the caller has on the specified database resource.
//
-// Attempting this RPC on a non-existent Cloud Spanner database will result in
-// a NOT_FOUND error if the user has spanner.databases.list permission on
-// the containing Cloud Spanner instance. Otherwise returns an empty set of
-// permissions.
+// Attempting this RPC on a non-existent Cloud Spanner database will
+// result in a NOT_FOUND error if the user has
+// spanner.databases.list permission on the containing Cloud
+// Spanner instance. Otherwise returns an empty set of permissions.
func (c *DatabaseAdminClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(req.GetResource())))
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
@@ -367,6 +329,45 @@
return resp, nil
}
+// ListDatabases lists Cloud Spanner databases.
+func (c *DatabaseAdminClient) ListDatabases(ctx context.Context, req *databasepb.ListDatabasesRequest, opts ...gax.CallOption) *DatabaseIterator {
+ md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))
+ ctx = insertMetadata(ctx, c.xGoogMetadata, md)
+ opts = append(c.CallOptions.ListDatabases[0:len(c.CallOptions.ListDatabases):len(c.CallOptions.ListDatabases)], opts...)
+ it := &DatabaseIterator{}
+ req = proto.Clone(req).(*databasepb.ListDatabasesRequest)
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*databasepb.Database, string, error) {
+ var resp *databasepb.ListDatabasesResponse
+ req.PageToken = pageToken
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.databaseAdminClient.ListDatabases(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+ return resp.Databases, resp.NextPageToken, nil
+ }
+ fetch := func(pageSize int, pageToken string) (string, error) {
+ items, nextPageToken, err := it.InternalFetch(pageSize, pageToken)
+ if err != nil {
+ return "", err
+ }
+ it.items = append(it.items, items...)
+ return nextPageToken, nil
+ }
+ it.pageInfo, it.nextFunc = iterator.NewPageInfo(fetch, it.bufLen, it.takeBuf)
+ it.pageInfo.MaxSize = int(req.PageSize)
+ it.pageInfo.Token = req.PageToken
+ return it
+}
+
// DatabaseIterator manages a stream of *databasepb.Database.
type DatabaseIterator struct {
items []*databasepb.Database
diff --git a/spanner/admin/database/apiv1/database_admin_client_example_test.go b/spanner/admin/database/apiv1/database_admin_client_example_test.go
index 7f109fe..9612123 100644
--- a/spanner/admin/database/apiv1/database_admin_client_example_test.go
+++ b/spanner/admin/database/apiv1/database_admin_client_example_test.go
@@ -35,30 +35,6 @@
_ = c
}
-func ExampleDatabaseAdminClient_ListDatabases() {
- ctx := context.Background()
- c, err := database.NewDatabaseAdminClient(ctx)
- if err != nil {
- // TODO: Handle error.
- }
-
- req := &databasepb.ListDatabasesRequest{
- // TODO: Fill request struct fields.
- }
- it := c.ListDatabases(ctx, req)
- for {
- resp, err := it.Next()
- if err == iterator.Done {
- break
- }
- if err != nil {
- // TODO: Handle error.
- }
- // TODO: Use resp.
- _ = resp
- }
-}
-
func ExampleDatabaseAdminClient_CreateDatabase() {
ctx := context.Background()
c, err := database.NewDatabaseAdminClient(ctx)
@@ -206,3 +182,27 @@
// TODO: Use resp.
_ = resp
}
+
+func ExampleDatabaseAdminClient_ListDatabases() {
+ ctx := context.Background()
+ c, err := database.NewDatabaseAdminClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+
+ req := &databasepb.ListDatabasesRequest{
+ // TODO: Fill request struct fields.
+ }
+ it := c.ListDatabases(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
diff --git a/spanner/admin/database/apiv1/doc.go b/spanner/admin/database/apiv1/doc.go
index b57fdf0..5ffd004 100644
--- a/spanner/admin/database/apiv1/doc.go
+++ b/spanner/admin/database/apiv1/doc.go
@@ -97,4 +97,4 @@
return "UNKNOWN"
}
-const versionClient = "UNKNOWN"
+const versionClient = "20191108"
diff --git a/spanner/admin/database/apiv1/mock_test.go b/spanner/admin/database/apiv1/mock_test.go
index 226fb67..c534516 100644
--- a/spanner/admin/database/apiv1/mock_test.go
+++ b/spanner/admin/database/apiv1/mock_test.go
@@ -199,78 +199,6 @@
os.Exit(m.Run())
}
-func TestDatabaseAdminListDatabases(t *testing.T) {
- var nextPageToken string = ""
- var databasesElement *databasepb.Database = &databasepb.Database{}
- var databases = []*databasepb.Database{databasesElement}
- var expectedResponse = &databasepb.ListDatabasesResponse{
- NextPageToken: nextPageToken,
- Databases: databases,
- }
-
- mockDatabaseAdmin.err = nil
- mockDatabaseAdmin.reqs = nil
-
- mockDatabaseAdmin.resps = append(mockDatabaseAdmin.resps[:0], expectedResponse)
-
- var formattedParent string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
- var request = &databasepb.ListDatabasesRequest{
- Parent: formattedParent,
- }
-
- c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListDatabases(context.Background(), request).Next()
-
- if err != nil {
- t.Fatal(err)
- }
-
- if want, got := request, mockDatabaseAdmin.reqs[0]; !proto.Equal(want, got) {
- t.Errorf("wrong request %q, want %q", got, want)
- }
-
- want := (interface{})(expectedResponse.Databases[0])
- got := (interface{})(resp)
- var ok bool
-
- switch want := (want).(type) {
- case proto.Message:
- ok = proto.Equal(want, got.(proto.Message))
- default:
- ok = want == got
- }
- if !ok {
- t.Errorf("wrong response %q, want %q)", got, want)
- }
-}
-
-func TestDatabaseAdminListDatabasesError(t *testing.T) {
- errCode := codes.PermissionDenied
- mockDatabaseAdmin.err = gstatus.Error(errCode, "test error")
-
- var formattedParent string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
- var request = &databasepb.ListDatabasesRequest{
- Parent: formattedParent,
- }
-
- c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
- if err != nil {
- t.Fatal(err)
- }
-
- resp, err := c.ListDatabases(context.Background(), request).Next()
-
- if st, ok := gstatus.FromError(err); !ok {
- t.Errorf("got error %v, expected grpc error", err)
- } else if c := st.Code(); c != errCode {
- t.Errorf("got error code %q, want %q", c, errCode)
- }
- _ = resp
-}
func TestDatabaseAdminCreateDatabase(t *testing.T) {
var name string = "name3373707"
var expectedResponse = &databasepb.Database{
@@ -622,10 +550,10 @@
mockDatabaseAdmin.resps = append(mockDatabaseAdmin.resps[:0], expectedResponse)
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s/databases/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]")
+ var resource string = "resource-341064690"
var policy *iampb.Policy = &iampb.Policy{}
var request = &iampb.SetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
Policy: policy,
}
@@ -653,10 +581,10 @@
errCode := codes.PermissionDenied
mockDatabaseAdmin.err = gstatus.Error(errCode, "test error")
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s/databases/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]")
+ var resource string = "resource-341064690"
var policy *iampb.Policy = &iampb.Policy{}
var request = &iampb.SetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
Policy: policy,
}
@@ -687,9 +615,9 @@
mockDatabaseAdmin.resps = append(mockDatabaseAdmin.resps[:0], expectedResponse)
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s/databases/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]")
+ var resource string = "resource-341064690"
var request = &iampb.GetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
}
c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
@@ -716,9 +644,9 @@
errCode := codes.PermissionDenied
mockDatabaseAdmin.err = gstatus.Error(errCode, "test error")
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s/databases/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]")
+ var resource string = "resource-341064690"
var request = &iampb.GetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
}
c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
@@ -743,11 +671,9 @@
mockDatabaseAdmin.resps = append(mockDatabaseAdmin.resps[:0], expectedResponse)
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s/databases/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]")
- var permissions []string = nil
+ var resource string = "resource-341064690"
var request = &iampb.TestIamPermissionsRequest{
- Resource: formattedResource,
- Permissions: permissions,
+ Resource: resource,
}
c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
@@ -774,11 +700,9 @@
errCode := codes.PermissionDenied
mockDatabaseAdmin.err = gstatus.Error(errCode, "test error")
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s/databases/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]")
- var permissions []string = nil
+ var resource string = "resource-341064690"
var request = &iampb.TestIamPermissionsRequest{
- Resource: formattedResource,
- Permissions: permissions,
+ Resource: resource,
}
c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
@@ -795,3 +719,75 @@
}
_ = resp
}
+func TestDatabaseAdminListDatabases(t *testing.T) {
+ var nextPageToken string = ""
+ var databasesElement *databasepb.Database = &databasepb.Database{}
+ var databases = []*databasepb.Database{databasesElement}
+ var expectedResponse = &databasepb.ListDatabasesResponse{
+ NextPageToken: nextPageToken,
+ Databases: databases,
+ }
+
+ mockDatabaseAdmin.err = nil
+ mockDatabaseAdmin.reqs = nil
+
+ mockDatabaseAdmin.resps = append(mockDatabaseAdmin.resps[:0], expectedResponse)
+
+ var formattedParent string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
+ var request = &databasepb.ListDatabasesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListDatabases(context.Background(), request).Next()
+
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if want, got := request, mockDatabaseAdmin.reqs[0]; !proto.Equal(want, got) {
+ t.Errorf("wrong request %q, want %q", got, want)
+ }
+
+ want := (interface{})(expectedResponse.Databases[0])
+ got := (interface{})(resp)
+ var ok bool
+
+ switch want := (want).(type) {
+ case proto.Message:
+ ok = proto.Equal(want, got.(proto.Message))
+ default:
+ ok = want == got
+ }
+ if !ok {
+ t.Errorf("wrong response %q, want %q)", got, want)
+ }
+}
+
+func TestDatabaseAdminListDatabasesError(t *testing.T) {
+ errCode := codes.PermissionDenied
+ mockDatabaseAdmin.err = gstatus.Error(errCode, "test error")
+
+ var formattedParent string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
+ var request = &databasepb.ListDatabasesRequest{
+ Parent: formattedParent,
+ }
+
+ c, err := NewDatabaseAdminClient(context.Background(), clientOpt)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ resp, err := c.ListDatabases(context.Background(), request).Next()
+
+ if st, ok := gstatus.FromError(err); !ok {
+ t.Errorf("got error %v, expected grpc error", err)
+ } else if c := st.Code(); c != errCode {
+ t.Errorf("got error code %q, want %q", c, errCode)
+ }
+ _ = resp
+}
diff --git a/spanner/admin/instance/apiv1/doc.go b/spanner/admin/instance/apiv1/doc.go
index 527a8be..d12d6d1 100644
--- a/spanner/admin/instance/apiv1/doc.go
+++ b/spanner/admin/instance/apiv1/doc.go
@@ -97,4 +97,4 @@
return "UNKNOWN"
}
-const versionClient = "UNKNOWN"
+const versionClient = "20191108"
diff --git a/spanner/admin/instance/apiv1/instance_admin_client.go b/spanner/admin/instance/apiv1/instance_admin_client.go
index 74f712a..c09a141 100644
--- a/spanner/admin/instance/apiv1/instance_admin_client.go
+++ b/spanner/admin/instance/apiv1/instance_admin_client.go
@@ -364,9 +364,9 @@
// Until completion of the returned operation:
//
// Cancelling the operation sets its metadata's
-// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time],
-// and begins restoring resources to their pre-request values. The
-// operation is guaranteed to succeed at undoing all resource changes,
+// [cancel_time][google.spanner.admin.instance.v1.UpdateInstanceMetadata.cancel_time], and begins
+// restoring resources to their pre-request values. The operation
+// is guaranteed to succeed at undoing all resource changes,
// after which point it terminates with a CANCELLED status.
//
// All other attempts to modify the instance are rejected.
diff --git a/spanner/admin/instance/apiv1/mock_test.go b/spanner/admin/instance/apiv1/mock_test.go
index c0d2654..232351c 100644
--- a/spanner/admin/instance/apiv1/mock_test.go
+++ b/spanner/admin/instance/apiv1/mock_test.go
@@ -741,10 +741,10 @@
mockInstanceAdmin.resps = append(mockInstanceAdmin.resps[:0], expectedResponse)
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
+ var resource string = "resource-341064690"
var policy *iampb.Policy = &iampb.Policy{}
var request = &iampb.SetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
Policy: policy,
}
@@ -772,10 +772,10 @@
errCode := codes.PermissionDenied
mockInstanceAdmin.err = gstatus.Error(errCode, "test error")
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
+ var resource string = "resource-341064690"
var policy *iampb.Policy = &iampb.Policy{}
var request = &iampb.SetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
Policy: policy,
}
@@ -806,9 +806,9 @@
mockInstanceAdmin.resps = append(mockInstanceAdmin.resps[:0], expectedResponse)
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
+ var resource string = "resource-341064690"
var request = &iampb.GetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
}
c, err := NewInstanceAdminClient(context.Background(), clientOpt)
@@ -835,9 +835,9 @@
errCode := codes.PermissionDenied
mockInstanceAdmin.err = gstatus.Error(errCode, "test error")
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
+ var resource string = "resource-341064690"
var request = &iampb.GetIamPolicyRequest{
- Resource: formattedResource,
+ Resource: resource,
}
c, err := NewInstanceAdminClient(context.Background(), clientOpt)
@@ -862,11 +862,9 @@
mockInstanceAdmin.resps = append(mockInstanceAdmin.resps[:0], expectedResponse)
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
- var permissions []string = nil
+ var resource string = "resource-341064690"
var request = &iampb.TestIamPermissionsRequest{
- Resource: formattedResource,
- Permissions: permissions,
+ Resource: resource,
}
c, err := NewInstanceAdminClient(context.Background(), clientOpt)
@@ -893,11 +891,9 @@
errCode := codes.PermissionDenied
mockInstanceAdmin.err = gstatus.Error(errCode, "test error")
- var formattedResource string = fmt.Sprintf("projects/%s/instances/%s", "[PROJECT]", "[INSTANCE]")
- var permissions []string = nil
+ var resource string = "resource-341064690"
var request = &iampb.TestIamPermissionsRequest{
- Resource: formattedResource,
- Permissions: permissions,
+ Resource: resource,
}
c, err := NewInstanceAdminClient(context.Background(), clientOpt)
diff --git a/spanner/apiv1/doc.go b/spanner/apiv1/doc.go
index 8c9a099..191c360 100644
--- a/spanner/apiv1/doc.go
+++ b/spanner/apiv1/doc.go
@@ -100,4 +100,4 @@
return "UNKNOWN"
}
-const versionClient = "UNKNOWN"
+const versionClient = "20191108"
diff --git a/spanner/apiv1/mock_test.go b/spanner/apiv1/mock_test.go
index a933876..e66b111 100644
--- a/spanner/apiv1/mock_test.go
+++ b/spanner/apiv1/mock_test.go
@@ -1003,10 +1003,8 @@
mockSpanner.resps = append(mockSpanner.resps[:0], expectedResponse)
var formattedSession string = fmt.Sprintf("projects/%s/instances/%s/databases/%s/sessions/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]")
- var mutations []*spannerpb.Mutation = nil
var request = &spannerpb.CommitRequest{
- Session: formattedSession,
- Mutations: mutations,
+ Session: formattedSession,
}
c, err := NewClient(context.Background(), clientOpt)
@@ -1034,10 +1032,8 @@
mockSpanner.err = gstatus.Error(errCode, "test error")
var formattedSession string = fmt.Sprintf("projects/%s/instances/%s/databases/%s/sessions/%s", "[PROJECT]", "[INSTANCE]", "[DATABASE]", "[SESSION]")
- var mutations []*spannerpb.Mutation = nil
var request = &spannerpb.CommitRequest{
- Session: formattedSession,
- Mutations: mutations,
+ Session: formattedSession,
}
c, err := NewClient(context.Background(), clientOpt)
diff --git a/spanner/apiv1/spanner_client.go b/spanner/apiv1/spanner_client.go
index 34541ce..dc8128f 100644
--- a/spanner/apiv1/spanner_client.go
+++ b/spanner/apiv1/spanner_client.go
@@ -175,8 +175,8 @@
// transaction internally, and count toward the one transaction
// limit.
//
-// Cloud Spanner limits the number of sessions that can exist at any given
-// time; thus, it is a good idea to delete idle and/or unneeded sessions.
+// Active sessions use additional server resources, so it is a good idea to
+// delete idle and unneeded sessions.
// Aside from explicit deletes, Cloud Spanner can delete sessions for which no
// operations are sent for more than an hour. If a session is deleted,
// requests to it return NOT_FOUND.
@@ -346,22 +346,14 @@
// to be run with lower latency than submitting them sequentially with
// [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
//
-// Statements are executed in order, sequentially.
-// [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse] will contain a
-// [ResultSet][google.spanner.v1.ResultSet] for each DML statement that has
-// successfully executed. If a statement fails, its error status will be
-// returned as part of the
-// [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse]. Execution will
-// stop at the first failed statement; the remaining statements will not run.
+// Statements are executed in sequential order. A request can succeed even if
+// a statement fails. The
+// [ExecuteBatchDmlResponse.status][google.spanner.v1.ExecuteBatchDmlResponse.status]
+// field in the response provides information about the statement that failed.
+// Clients must inspect this field to determine whether an error occurred.
//
-// ExecuteBatchDml is expected to return an OK status with a response even if
-// there was an error while processing one of the DML statements. Clients must
-// inspect response.status to determine if there were any errors while
-// processing the request.
-//
-// See more details in
-// [ExecuteBatchDmlRequest][Spanner.ExecuteBatchDmlRequest] and
-// [ExecuteBatchDmlResponse][Spanner.ExecuteBatchDmlResponse].
+// Execution stops after the first failed statement; the remaining statements
+// are not executed.
func (c *Client) ExecuteBatchDml(ctx context.Context, req *spannerpb.ExecuteBatchDmlRequest, opts ...gax.CallOption) (*spannerpb.ExecuteBatchDmlResponse, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "session", url.QueryEscape(req.GetSession())))
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
diff --git a/spanner/go.mod b/spanner/go.mod
index fca9eb1..7fe4610 100644
--- a/spanner/go.mod
+++ b/spanner/go.mod
@@ -11,7 +11,7 @@
go.opencensus.io v0.22.0
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/spanner/go.sum b/spanner/go.sum
index 6999389..b9eafe0 100644
--- a/spanner/go.sum
+++ b/spanner/go.sum
@@ -131,8 +131,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/speech/apiv1/doc.go b/speech/apiv1/doc.go
index f9a4a79..6b653b1 100644
--- a/speech/apiv1/doc.go
+++ b/speech/apiv1/doc.go
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
// Package speech is an auto-generated package for the
// Cloud Speech-to-Text API.
-
//
// Converts audio to text by applying powerful neural network models.
//
@@ -30,6 +29,7 @@
//
// For information about setting deadlines, reusing contexts, and more
// please visit godoc.org/cloud.google.com/go.
+
package speech // import "cloud.google.com/go/speech/apiv1"
import (
@@ -41,6 +41,8 @@
"google.golang.org/grpc/metadata"
)
+const versionClient = "20191108"
+
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
out = out.Copy()
@@ -74,7 +76,7 @@
}
notSemverRune := func(r rune) bool {
- return strings.IndexRune("0123456789.", r) < 0
+ return !strings.ContainsRune("0123456789.", r)
}
if strings.HasPrefix(s, "go1") {
@@ -95,5 +97,3 @@
}
return "UNKNOWN"
}
-
-const versionClient = "UNKNOWN"
diff --git a/speech/apiv1/speech_client.go b/speech/apiv1/speech_client.go
index 38efc45..cb68777 100644
--- a/speech/apiv1/speech_client.go
+++ b/speech/apiv1/speech_client.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package speech
@@ -29,6 +29,7 @@
speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1"
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
@@ -42,6 +43,7 @@
func defaultClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("speech.googleapis.com:443"),
+ option.WithGRPCDialOption(grpc.WithDisableServiceConfig()),
option.WithScopes(DefaultAuthScopes()...),
option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32))),
@@ -49,11 +51,32 @@
}
func defaultCallOptions() *CallOptions {
- retry := map[[2]string][]gax.CallOption{}
return &CallOptions{
- Recognize: retry[[2]string{"default", "non_idempotent"}],
- LongRunningRecognize: retry[[2]string{"default", "non_idempotent"}],
- StreamingRecognize: retry[[2]string{"default", "non_idempotent"}],
+ Recognize: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.Unavailable,
+ codes.DeadlineExceeded,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ LongRunningRecognize: []gax.CallOption{},
+ StreamingRecognize: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.Unavailable,
+ codes.DeadlineExceeded,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
}
}
@@ -203,7 +226,7 @@
// See documentation of Poll for error-handling information.
func (op *LongRunningRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.LongRunningRecognizeResponse, error) {
var resp speechpb.LongRunningRecognizeResponse
- if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
return nil, err
}
return &resp, nil
diff --git a/speech/apiv1/speech_client_example_test.go b/speech/apiv1/speech_client_example_test.go
index 8d8608b..91cf681 100644
--- a/speech/apiv1/speech_client_example_test.go
+++ b/speech/apiv1/speech_client_example_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package speech_test
@@ -35,6 +35,8 @@
}
func ExampleClient_Recognize() {
+ // import speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1"
+
ctx := context.Background()
c, err := speech.NewClient(ctx)
if err != nil {
@@ -53,6 +55,8 @@
}
func ExampleClient_LongRunningRecognize() {
+ // import speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1"
+
ctx := context.Background()
c, err := speech.NewClient(ctx)
if err != nil {
@@ -76,6 +80,8 @@
}
func ExampleClient_StreamingRecognize() {
+ // import speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1"
+
ctx := context.Background()
c, err := speech.NewClient(ctx)
if err != nil {
diff --git a/speech/apiv1p1beta1/doc.go b/speech/apiv1p1beta1/doc.go
index 6eb5abe..efb7dc7 100644
--- a/speech/apiv1p1beta1/doc.go
+++ b/speech/apiv1p1beta1/doc.go
@@ -12,15 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
// Package speech is an auto-generated package for the
// Cloud Speech-to-Text API.
//
-// NOTE: This package is in beta. It is not stable, and may be subject to changes.
-//
// Converts audio to text by applying powerful neural network models.
//
+// NOTE: This package is in beta. It is not stable, and may be subject to changes.
+//
// Use of Context
//
// The ctx passed to NewClient is used for authentication requests and
@@ -31,6 +31,7 @@
//
// For information about setting deadlines, reusing contexts, and more
// please visit godoc.org/cloud.google.com/go.
+
package speech // import "cloud.google.com/go/speech/apiv1p1beta1"
import (
@@ -42,6 +43,8 @@
"google.golang.org/grpc/metadata"
)
+const versionClient = "20191108"
+
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
out = out.Copy()
@@ -75,7 +78,7 @@
}
notSemverRune := func(r rune) bool {
- return strings.IndexRune("0123456789.", r) < 0
+ return !strings.ContainsRune("0123456789.", r)
}
if strings.HasPrefix(s, "go1") {
@@ -96,5 +99,3 @@
}
return "UNKNOWN"
}
-
-const versionClient = "UNKNOWN"
diff --git a/speech/apiv1p1beta1/speech_client.go b/speech/apiv1p1beta1/speech_client.go
index 65dbbce..d3b6119 100644
--- a/speech/apiv1p1beta1/speech_client.go
+++ b/speech/apiv1p1beta1/speech_client.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package speech
@@ -29,6 +29,7 @@
speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
longrunningpb "google.golang.org/genproto/googleapis/longrunning"
"google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
)
@@ -42,6 +43,7 @@
func defaultClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("speech.googleapis.com:443"),
+ option.WithGRPCDialOption(grpc.WithDisableServiceConfig()),
option.WithScopes(DefaultAuthScopes()...),
option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32))),
@@ -49,11 +51,32 @@
}
func defaultCallOptions() *CallOptions {
- retry := map[[2]string][]gax.CallOption{}
return &CallOptions{
- Recognize: retry[[2]string{"default", "non_idempotent"}],
- LongRunningRecognize: retry[[2]string{"default", "non_idempotent"}],
- StreamingRecognize: retry[[2]string{"default", "non_idempotent"}],
+ Recognize: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ LongRunningRecognize: []gax.CallOption{},
+ StreamingRecognize: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
}
}
@@ -203,7 +226,7 @@
// See documentation of Poll for error-handling information.
func (op *LongRunningRecognizeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*speechpb.LongRunningRecognizeResponse, error) {
var resp speechpb.LongRunningRecognizeResponse
- if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
return nil, err
}
return &resp, nil
diff --git a/speech/apiv1p1beta1/speech_client_example_test.go b/speech/apiv1p1beta1/speech_client_example_test.go
index f5d0ad9..b25f769 100644
--- a/speech/apiv1p1beta1/speech_client_example_test.go
+++ b/speech/apiv1p1beta1/speech_client_example_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package speech_test
@@ -35,6 +35,8 @@
}
func ExampleClient_Recognize() {
+ // import speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
+
ctx := context.Background()
c, err := speech.NewClient(ctx)
if err != nil {
@@ -53,6 +55,8 @@
}
func ExampleClient_LongRunningRecognize() {
+ // import speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
+
ctx := context.Background()
c, err := speech.NewClient(ctx)
if err != nil {
@@ -76,6 +80,8 @@
}
func ExampleClient_StreamingRecognize() {
+ // import speechpb "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1"
+
ctx := context.Background()
c, err := speech.NewClient(ctx)
if err != nil {
diff --git a/storage/go.mod b/storage/go.mod
index 8afa876..308bc17 100644
--- a/storage/go.mod
+++ b/storage/go.mod
@@ -10,7 +10,7 @@
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136 // indirect
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
- golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a // indirect
+ golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 // indirect
google.golang.org/api v0.13.0
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6
google.golang.org/grpc v1.21.1
diff --git a/storage/go.sum b/storage/go.sum
index a9917b8..cf49f2f 100644
--- a/storage/go.sum
+++ b/storage/go.sum
@@ -129,8 +129,8 @@
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff h1:On1qIo75ByTwFJ4/W2bIqHcwJ9XAqtSWUs8GwRrIhtc=
golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a h1:RzzIfXstYPS78k0QViPGpDcTlV+QuYrbxVmsxDHdxTs=
-golang.org/x/tools v0.0.0-20191105231337-689d0f08e67a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E=
+golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
diff --git a/texttospeech/apiv1/doc.go b/texttospeech/apiv1/doc.go
index b52fdef..7f7279c 100644
--- a/texttospeech/apiv1/doc.go
+++ b/texttospeech/apiv1/doc.go
@@ -44,7 +44,7 @@
"google.golang.org/grpc/metadata"
)
-const versionClient = "20191028"
+const versionClient = "20191108"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/translate/apiv3/doc.go b/translate/apiv3/doc.go
index fd8ff2f..c6af54e 100644
--- a/translate/apiv3/doc.go
+++ b/translate/apiv3/doc.go
@@ -12,11 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
// Package translate is an auto-generated package for the
// Cloud Translation API.
-
//
// Integrates text translation into your website or application.
//
@@ -30,6 +29,7 @@
//
// For information about setting deadlines, reusing contexts, and more
// please visit godoc.org/cloud.google.com/go.
+
package translate // import "cloud.google.com/go/translate/apiv3"
import (
@@ -41,6 +41,8 @@
"google.golang.org/grpc/metadata"
)
+const versionClient = "20191108"
+
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
out = out.Copy()
@@ -75,7 +77,7 @@
}
notSemverRune := func(r rune) bool {
- return strings.IndexRune("0123456789.", r) < 0
+ return !strings.ContainsRune("0123456789.", r)
}
if strings.HasPrefix(s, "go1") {
@@ -96,5 +98,3 @@
}
return "UNKNOWN"
}
-
-const versionClient = "UNKNOWN"
diff --git a/translate/apiv3/translation_client.go b/translate/apiv3/translation_client.go
index 2e4934c..8faf78d 100644
--- a/translate/apiv3/translation_client.go
+++ b/translate/apiv3/translation_client.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package translate
@@ -52,6 +52,7 @@
func defaultTranslationClientOptions() []option.ClientOption {
return []option.ClientOption{
option.WithEndpoint("translate.googleapis.com:443"),
+ option.WithGRPCDialOption(grpc.WithDisableServiceConfig()),
option.WithScopes(DefaultAuthScopes()...),
option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(math.MaxInt32))),
@@ -59,8 +60,10 @@
}
func defaultTranslationCallOptions() *TranslationCallOptions {
- retry := map[[2]string][]gax.CallOption{
- {"default", "idempotent"}: {
+ return &TranslationCallOptions{
+ TranslateText: []gax.CallOption{},
+ DetectLanguage: []gax.CallOption{},
+ GetSupportedLanguages: []gax.CallOption{
gax.WithRetry(func() gax.Retryer {
return gax.OnCodes([]codes.Code{
codes.DeadlineExceeded,
@@ -68,20 +71,48 @@
}, gax.Backoff{
Initial: 100 * time.Millisecond,
Max: 60000 * time.Millisecond,
- Multiplier: 1.3,
+ Multiplier: 1.30,
})
}),
},
- }
- return &TranslationCallOptions{
- TranslateText: retry[[2]string{"default", "non_idempotent"}],
- DetectLanguage: retry[[2]string{"default", "non_idempotent"}],
- GetSupportedLanguages: retry[[2]string{"default", "idempotent"}],
- BatchTranslateText: retry[[2]string{"default", "non_idempotent"}],
- CreateGlossary: retry[[2]string{"default", "non_idempotent"}],
- ListGlossaries: retry[[2]string{"default", "idempotent"}],
- GetGlossary: retry[[2]string{"default", "idempotent"}],
- DeleteGlossary: retry[[2]string{"default", "non_idempotent"}],
+ BatchTranslateText: []gax.CallOption{},
+ CreateGlossary: []gax.CallOption{},
+ ListGlossaries: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ GetGlossary: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
+ DeleteGlossary: []gax.CallOption{
+ gax.WithRetry(func() gax.Retryer {
+ return gax.OnCodes([]codes.Code{
+ codes.DeadlineExceeded,
+ codes.Unavailable,
+ }, gax.Backoff{
+ Initial: 100 * time.Millisecond,
+ Max: 60000 * time.Millisecond,
+ Multiplier: 1.30,
+ })
+ }),
+ },
}
}
@@ -209,11 +240,11 @@
// BatchTranslateText translates a large volume of text in asynchronous batch mode.
// This function provides real-time output as the inputs are being processed.
-// If caller cancels a request, the partial results (for an input file, it's
+// If caller cancels a request, the partial results (for an input file, it’s
// all or nothing) may still be available on the specified output location.
//
// This call returns immediately and you can
-// use google.longrunning.Operation.name to poll the status of the call.
+// use google.longrunning.Operation.name (at http://google.longrunning.Operation.name) to poll the status of the call.
func (c *TranslationClient) BatchTranslateText(ctx context.Context, req *translatepb.BatchTranslateTextRequest, opts ...gax.CallOption) (*BatchTranslateTextOperation, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
@@ -233,7 +264,7 @@
}
// CreateGlossary creates a glossary and returns the long-running operation. Returns
-// NOT_FOUND, if the project doesn't exist.
+// NOT_FOUND, if the project doesn’t exist.
func (c *TranslationClient) CreateGlossary(ctx context.Context, req *translatepb.CreateGlossaryRequest, opts ...gax.CallOption) (*CreateGlossaryOperation, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
@@ -252,7 +283,7 @@
}, nil
}
-// ListGlossaries lists glossaries in a project. Returns NOT_FOUND, if the project doesn't
+// ListGlossaries lists glossaries in a project. Returns NOT_FOUND, if the project doesn’t
// exist.
func (c *TranslationClient) ListGlossaries(ctx context.Context, req *translatepb.ListGlossariesRequest, opts ...gax.CallOption) *GlossaryIterator {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(req.GetParent())))
@@ -276,6 +307,8 @@
if err != nil {
return nil, "", err
}
+
+ it.Response = resp
return resp.Glossaries, resp.NextPageToken, nil
}
fetch := func(pageSize int, pageToken string) (string, error) {
@@ -292,7 +325,7 @@
return it
}
-// GetGlossary gets a glossary. Returns NOT_FOUND, if the glossary doesn't
+// GetGlossary gets a glossary. Returns NOT_FOUND, if the glossary doesn’t
// exist.
func (c *TranslationClient) GetGlossary(ctx context.Context, req *translatepb.GetGlossaryRequest, opts ...gax.CallOption) (*translatepb.Glossary, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))
@@ -311,8 +344,8 @@
}
// DeleteGlossary deletes a glossary, or cancels glossary construction
-// if the glossary isn't created yet.
-// Returns NOT_FOUND, if the glossary doesn't exist.
+// if the glossary isn’t created yet.
+// Returns NOT_FOUND, if the glossary doesn’t exist.
func (c *TranslationClient) DeleteGlossary(ctx context.Context, req *translatepb.DeleteGlossaryRequest, opts ...gax.CallOption) (*DeleteGlossaryOperation, error) {
md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName())))
ctx = insertMetadata(ctx, c.xGoogMetadata, md)
@@ -331,48 +364,6 @@
}, nil
}
-// GlossaryIterator manages a stream of *translatepb.Glossary.
-type GlossaryIterator struct {
- items []*translatepb.Glossary
- pageInfo *iterator.PageInfo
- nextFunc func() error
-
- // InternalFetch is for use by the Google Cloud Libraries only.
- // It is not part of the stable interface of this package.
- //
- // InternalFetch returns results from a single call to the underlying RPC.
- // The number of results is no greater than pageSize.
- // If there are no more results, nextPageToken is empty and err is nil.
- InternalFetch func(pageSize int, pageToken string) (results []*translatepb.Glossary, nextPageToken string, err error)
-}
-
-// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
-func (it *GlossaryIterator) PageInfo() *iterator.PageInfo {
- return it.pageInfo
-}
-
-// Next returns the next result. Its second return value is iterator.Done if there are no more
-// results. Once Next returns Done, all subsequent calls will return Done.
-func (it *GlossaryIterator) Next() (*translatepb.Glossary, error) {
- var item *translatepb.Glossary
- if err := it.nextFunc(); err != nil {
- return item, err
- }
- item = it.items[0]
- it.items = it.items[1:]
- return item, nil
-}
-
-func (it *GlossaryIterator) bufLen() int {
- return len(it.items)
-}
-
-func (it *GlossaryIterator) takeBuf() interface{} {
- b := it.items
- it.items = nil
- return b
-}
-
// BatchTranslateTextOperation manages a long-running operation from BatchTranslateText.
type BatchTranslateTextOperation struct {
lro *longrunning.Operation
@@ -391,7 +382,7 @@
// See documentation of Poll for error-handling information.
func (op *BatchTranslateTextOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*translatepb.BatchTranslateResponse, error) {
var resp translatepb.BatchTranslateResponse
- if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
return nil, err
}
return &resp, nil
@@ -460,7 +451,7 @@
// See documentation of Poll for error-handling information.
func (op *CreateGlossaryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*translatepb.Glossary, error) {
var resp translatepb.Glossary
- if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
return nil, err
}
return &resp, nil
@@ -529,7 +520,7 @@
// See documentation of Poll for error-handling information.
func (op *DeleteGlossaryOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*translatepb.DeleteGlossaryResponse, error) {
var resp translatepb.DeleteGlossaryResponse
- if err := op.lro.WaitWithInterval(ctx, &resp, 5000*time.Millisecond, opts...); err != nil {
+ if err := op.lro.WaitWithInterval(ctx, &resp, time.Minute, opts...); err != nil {
return nil, err
}
return &resp, nil
@@ -579,3 +570,50 @@
func (op *DeleteGlossaryOperation) Name() string {
return op.lro.Name()
}
+
+// GlossaryIterator manages a stream of *translatepb.Glossary.
+type GlossaryIterator struct {
+ items []*translatepb.Glossary
+ pageInfo *iterator.PageInfo
+ nextFunc func() error
+
+ // Response is the raw response for the current page.
+ // It must be cast to the RPC response type.
+ // Calling Next() or InternalFetch() updates this value.
+ Response interface{}
+
+ // InternalFetch is for use by the Google Cloud Libraries only.
+ // It is not part of the stable interface of this package.
+ //
+ // InternalFetch returns results from a single call to the underlying RPC.
+ // The number of results is no greater than pageSize.
+ // If there are no more results, nextPageToken is empty and err is nil.
+ InternalFetch func(pageSize int, pageToken string) (results []*translatepb.Glossary, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *GlossaryIterator) PageInfo() *iterator.PageInfo {
+ return it.pageInfo
+}
+
+// Next returns the next result. Its second return value is iterator.Done if there are no more
+// results. Once Next returns Done, all subsequent calls will return Done.
+func (it *GlossaryIterator) Next() (*translatepb.Glossary, error) {
+ var item *translatepb.Glossary
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *GlossaryIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *GlossaryIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
diff --git a/translate/apiv3/translation_client_example_test.go b/translate/apiv3/translation_client_example_test.go
index 9f9e880b..001b7f2 100644
--- a/translate/apiv3/translation_client_example_test.go
+++ b/translate/apiv3/translation_client_example_test.go
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Code generated by gapic-generator. DO NOT EDIT.
+// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package translate_test
@@ -35,6 +35,8 @@
}
func ExampleTranslationClient_TranslateText() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -53,6 +55,8 @@
}
func ExampleTranslationClient_DetectLanguage() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -71,6 +75,8 @@
}
func ExampleTranslationClient_GetSupportedLanguages() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -89,6 +95,8 @@
}
func ExampleTranslationClient_BatchTranslateText() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -112,6 +120,8 @@
}
func ExampleTranslationClient_CreateGlossary() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -135,6 +145,9 @@
}
func ExampleTranslationClient_ListGlossaries() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+ // import "google.golang.org/api/iterator"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -159,6 +172,8 @@
}
func ExampleTranslationClient_GetGlossary() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
@@ -177,6 +192,8 @@
}
func ExampleTranslationClient_DeleteGlossary() {
+ // import translatepb "google.golang.org/genproto/googleapis/cloud/translate/v3"
+
ctx := context.Background()
c, err := translate.NewTranslationClient(ctx)
if err != nil {
diff --git a/vision/apiv1/BatchAnnotateImages_smoke_test.go b/vision/apiv1/BatchAnnotateImages_smoke_test.go
index 1d13b70..c7ad6818 100644
--- a/vision/apiv1/BatchAnnotateImages_smoke_test.go
+++ b/vision/apiv1/BatchAnnotateImages_smoke_test.go
@@ -52,7 +52,7 @@
t.Fatal(err)
}
- var gcsImageUri string = "gs://gapic-toolkit/President_Barack_Obama.jpg"
+ var gcsImageUri string = "gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg"
var source = &visionpb.ImageSource{
GcsImageUri: gcsImageUri,
}
diff --git a/vision/apiv1/doc.go b/vision/apiv1/doc.go
index dd8e516..fe6d7bb 100644
--- a/vision/apiv1/doc.go
+++ b/vision/apiv1/doc.go
@@ -99,4 +99,4 @@
return "UNKNOWN"
}
-const versionClient = "UNKNOWN"
+const versionClient = "20191108"
diff --git a/vision/apiv1p1beta1/BatchAnnotateImages_smoke_test.go b/vision/apiv1p1beta1/BatchAnnotateImages_smoke_test.go
index 955f56c..c086db4 100644
--- a/vision/apiv1p1beta1/BatchAnnotateImages_smoke_test.go
+++ b/vision/apiv1p1beta1/BatchAnnotateImages_smoke_test.go
@@ -52,7 +52,7 @@
t.Fatal(err)
}
- var gcsImageUri string = "gs://gapic-toolkit/President_Barack_Obama.jpg"
+ var gcsImageUri string = "gs://cloud-samples-data/vision/face_detection/celebrity_recognition/sergey.jpg"
var source = &visionpb.ImageSource{
GcsImageUri: gcsImageUri,
}
diff --git a/vision/apiv1p1beta1/doc.go b/vision/apiv1p1beta1/doc.go
index df14659..c57b434 100644
--- a/vision/apiv1p1beta1/doc.go
+++ b/vision/apiv1p1beta1/doc.go
@@ -101,4 +101,4 @@
return "UNKNOWN"
}
-const versionClient = "UNKNOWN"
+const versionClient = "20191108"