diff --git a/asset/apiv1/doc.go b/asset/apiv1/doc.go index 9d140340620e..e5ede84e67c1 100644 --- a/asset/apiv1/doc.go +++ b/asset/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/asset/apiv1beta1/doc.go b/asset/apiv1beta1/doc.go index 4f483c8e7eed..fe44237720a0 100644 --- a/asset/apiv1beta1/doc.go +++ b/asset/apiv1beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/asset/apiv1p2beta1/doc.go b/asset/apiv1p2beta1/doc.go index b9f412ae69b2..50ac4094e9c9 100644 --- a/asset/apiv1p2beta1/doc.go +++ b/asset/apiv1p2beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/automl/apiv1/doc.go b/automl/apiv1/doc.go index d05ad12acb67..720052800c1d 100644 --- a/automl/apiv1/doc.go +++ b/automl/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/automl/apiv1beta1/doc.go b/automl/apiv1beta1/doc.go index b63daf7b1cd8..511479b42fc8 100644 --- a/automl/apiv1beta1/doc.go +++ b/automl/apiv1beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/datatransfer/apiv1/doc.go b/bigquery/datatransfer/apiv1/doc.go index e1c61744c488..16d558ec15a3 100644 --- a/bigquery/datatransfer/apiv1/doc.go +++ b/bigquery/datatransfer/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/go.mod b/bigquery/go.mod index 985542efd57d..591ea69973ba 100644 --- a/bigquery/go.mod +++ b/bigquery/go.mod @@ -9,8 +9,8 @@ require ( github.com/golang/protobuf v1.3.4 github.com/google/go-cmp v0.4.0 github.com/googleapis/gax-go/v2 v2.0.5 - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/bigquery/go.sum b/bigquery/go.sum index e69804da0850..b784a29dce22 100644 --- a/bigquery/go.sum +++ b/bigquery/go.sum @@ -277,8 +277,8 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -333,8 +333,8 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/bigquery/reservation/apiv1beta1/doc.go b/bigquery/reservation/apiv1beta1/doc.go index da030f5e0baf..9e74f76b8751 100644 --- a/bigquery/reservation/apiv1beta1/doc.go +++ b/bigquery/reservation/apiv1beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1/doc.go b/bigquery/storage/apiv1/doc.go index 31c1dfc142df..f4d42bea3ba7 100644 --- a/bigquery/storage/apiv1/doc.go +++ b/bigquery/storage/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1alpha2/doc.go b/bigquery/storage/apiv1alpha2/doc.go index 4d4b7233a6ac..83a7da00260f 100644 --- a/bigquery/storage/apiv1alpha2/doc.go +++ b/bigquery/storage/apiv1alpha2/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1beta1/doc.go b/bigquery/storage/apiv1beta1/doc.go index 0aed369310a9..633b991b6ebb 100644 --- a/bigquery/storage/apiv1beta1/doc.go +++ b/bigquery/storage/apiv1beta1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigquery/storage/apiv1beta2/doc.go b/bigquery/storage/apiv1beta2/doc.go index 59315aa2b597..83c74803b2e1 100644 --- a/bigquery/storage/apiv1beta2/doc.go +++ b/bigquery/storage/apiv1beta2/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/bigtable/go.mod b/bigtable/go.mod index 613fc04658d6..1583e0420064 100644 --- a/bigtable/go.mod +++ b/bigtable/go.mod @@ -10,9 +10,9 @@ require ( github.com/google/go-cmp v0.4.0 github.com/googleapis/gax-go/v2 v2.0.5 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 rsc.io/binaryregexp v0.2.0 ) diff --git a/bigtable/go.sum b/bigtable/go.sum index 0dabc0a911a2..3b88adecb7dc 100644 --- a/bigtable/go.sum +++ b/bigtable/go.sum @@ -287,8 +287,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -347,8 +347,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/billing/apiv1/doc.go b/billing/apiv1/doc.go index e227372c85fd..4fb36a545766 100644 --- a/billing/apiv1/doc.go +++ b/billing/apiv1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudbuild/apiv1/v2/doc.go b/cloudbuild/apiv1/v2/doc.go index 6542f2c4feb5..bd16848ad777 100644 --- a/cloudbuild/apiv1/v2/doc.go +++ b/cloudbuild/apiv1/v2/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/apiv2/doc.go b/cloudtasks/apiv2/doc.go index 06b969380817..db53da5b0d55 100644 --- a/cloudtasks/apiv2/doc.go +++ b/cloudtasks/apiv2/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/apiv2beta2/doc.go b/cloudtasks/apiv2beta2/doc.go index 6c4e568a7aa5..5f378a23fcb0 100644 --- a/cloudtasks/apiv2beta2/doc.go +++ b/cloudtasks/apiv2beta2/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/cloudtasks/apiv2beta3/doc.go b/cloudtasks/apiv2beta3/doc.go index fa99798876f8..8275e41d929c 100644 --- a/cloudtasks/apiv2beta3/doc.go +++ b/cloudtasks/apiv2beta3/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/container/apiv1/doc.go b/container/apiv1/doc.go index 8700fe945a98..b098e6fd120e 100644 --- a/container/apiv1/doc.go +++ b/container/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/containeranalysis/apiv1beta1/doc.go b/containeranalysis/apiv1beta1/doc.go index 58d6e2d18348..266acc83d100 100644 --- a/containeranalysis/apiv1beta1/doc.go +++ b/containeranalysis/apiv1beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/datacatalog/apiv1beta1/doc.go b/datacatalog/apiv1beta1/doc.go index 28db148963d4..d45e3619f9d2 100644 --- a/datacatalog/apiv1beta1/doc.go +++ b/datacatalog/apiv1beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dataproc/apiv1/doc.go b/dataproc/apiv1/doc.go index 9fa1f54622a1..c23eb97280c5 100644 --- a/dataproc/apiv1/doc.go +++ b/dataproc/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dataproc/apiv1beta2/doc.go b/dataproc/apiv1beta2/doc.go index cb02adf26e5b..2ea14f33c6d3 100644 --- a/dataproc/apiv1beta2/doc.go +++ b/dataproc/apiv1beta2/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/datastore/go.mod b/datastore/go.mod index 018596d960ff..c6419d457b2e 100644 --- a/datastore/go.mod +++ b/datastore/go.mod @@ -8,8 +8,8 @@ require ( github.com/golang/protobuf v1.3.4 github.com/google/go-cmp v0.4.0 github.com/googleapis/gax-go/v2 v2.0.5 - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/datastore/go.sum b/datastore/go.sum index 50820cc33c10..082b4c495393 100644 --- a/datastore/go.sum +++ b/datastore/go.sum @@ -282,8 +282,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -341,8 +341,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/debugger/apiv2/doc.go b/debugger/apiv2/doc.go index 4eef780776bd..50755cee8303 100644 --- a/debugger/apiv2/doc.go +++ b/debugger/apiv2/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dialogflow/apiv2/doc.go b/dialogflow/apiv2/doc.go index 51db06fea783..a8aeb4d9bd11 100644 --- a/dialogflow/apiv2/doc.go +++ b/dialogflow/apiv2/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/dlp/apiv2/doc.go b/dlp/apiv2/doc.go index 735482cc3efc..ad06a9be0d4c 100644 --- a/dlp/apiv2/doc.go +++ b/dlp/apiv2/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/errorreporting/apiv1beta1/doc.go b/errorreporting/apiv1beta1/doc.go index 0ee24a7df2c8..23a798f72e04 100644 --- a/errorreporting/apiv1beta1/doc.go +++ b/errorreporting/apiv1beta1/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/expr/apiv1alpha1/doc.go b/expr/apiv1alpha1/doc.go index 3748441f3daa..02b7d332b6cd 100644 --- a/expr/apiv1alpha1/doc.go +++ b/expr/apiv1alpha1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/firestore/apiv1/admin/doc.go b/firestore/apiv1/admin/doc.go index 892c660cfa04..c9b5c03bac8b 100644 --- a/firestore/apiv1/admin/doc.go +++ b/firestore/apiv1/admin/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/firestore/apiv1/doc.go b/firestore/apiv1/doc.go index ddb187ed4d12..95e7f505e388 100644 --- a/firestore/apiv1/doc.go +++ b/firestore/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/firestore/apiv1beta1/doc.go b/firestore/apiv1beta1/doc.go index 7c79d3621da1..f05d628e9389 100644 --- a/firestore/apiv1beta1/doc.go +++ b/firestore/apiv1beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/firestore/go.mod b/firestore/go.mod index c4e190d3d816..03b422b03e5d 100644 --- a/firestore/go.mod +++ b/firestore/go.mod @@ -8,8 +8,8 @@ require ( github.com/golang/protobuf v1.3.4 github.com/google/go-cmp v0.4.0 github.com/googleapis/gax-go/v2 v2.0.5 - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/firestore/go.sum b/firestore/go.sum index fc90f8be2953..6792c1779a2f 100644 --- a/firestore/go.sum +++ b/firestore/go.sum @@ -284,8 +284,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -343,8 +343,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/go.mod b/go.mod index 47d1d1164ddf..abdf56558ba0 100644 --- a/go.mod +++ b/go.mod @@ -20,9 +20,9 @@ require ( golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect golang.org/x/text v0.3.2 - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 honnef.co/go/tools v0.0.1-2020.1.3 ) diff --git a/go.sum b/go.sum index 46dbd9dc92e7..b65515373869 100644 --- a/go.sum +++ b/go.sum @@ -276,8 +276,8 @@ golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -328,8 +328,8 @@ google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= diff --git a/iam/credentials/apiv1/doc.go b/iam/credentials/apiv1/doc.go index 37caaf9aef2e..9ee9c0fa5cd9 100644 --- a/iam/credentials/apiv1/doc.go +++ b/iam/credentials/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/internal/gapicgen/go.mod b/internal/gapicgen/go.mod index 775093923156..039e824fd044 100644 --- a/internal/gapicgen/go.mod +++ b/internal/gapicgen/go.mod @@ -11,13 +11,13 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/stretchr/testify v1.5.1 // indirect - golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 // indirect + golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 // indirect golang.org/x/net v0.0.0-20200301022130-244492dfa37a // indirect golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect google.golang.org/appengine v1.6.5 // indirect - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b // indirect + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 // indirect google.golang.org/grpc v1.28.0 // indirect gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/src-d/go-git.v4 v4.13.1 diff --git a/internal/gapicgen/go.sum b/internal/gapicgen/go.sum index 6d6070bb468b..0a2f46d47a8c 100644 --- a/internal/gapicgen/go.sum +++ b/internal/gapicgen/go.sum @@ -108,8 +108,8 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 h1:HuIa8hRrWRSrqYzx1qI49NNxhdi2PrY7gxVSq1JjLDc= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073 h1:xMPOj6Pz6UipU1wXLkrtqpHbR0AVFnyPEQq/wRWz9lM= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4 h1:QmwruyY+bKbDDL0BaglrbZABEali68eoMFhTZpCjYVA= +golang.org/x/crypto v0.0.0-20200311171314-f7b00557c8c4/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4 h1:c2HOrn5iMezYjSlGPncknSEr/8x5LELb/ilJbXi9DEA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -168,8 +168,8 @@ google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0 h1:cfg4PD8YEdSFnm7qLV4++93WcmhH2nIUhMjhdCvl3j8= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/iot/apiv1/doc.go b/iot/apiv1/doc.go index 694ceca8ad13..6a2b858e88e6 100644 --- a/iot/apiv1/doc.go +++ b/iot/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/irm/apiv1alpha2/doc.go b/irm/apiv1alpha2/doc.go index f5b1115f889b..c8a729c1c8f1 100644 --- a/irm/apiv1alpha2/doc.go +++ b/irm/apiv1alpha2/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/kms/apiv1/doc.go b/kms/apiv1/doc.go index b8e7bbccb8a3..4cba97e73203 100644 --- a/kms/apiv1/doc.go +++ b/kms/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/language/apiv1/doc.go b/language/apiv1/doc.go index b3fb0f90221a..1cb77594a622 100644 --- a/language/apiv1/doc.go +++ b/language/apiv1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/language/apiv1beta2/doc.go b/language/apiv1beta2/doc.go index a17bf0b943d7..88ce8de91284 100644 --- a/language/apiv1beta2/doc.go +++ b/language/apiv1beta2/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/logging/apiv2/doc.go b/logging/apiv2/doc.go index b1f013d7be2d..e29d23f41119 100644 --- a/logging/apiv2/doc.go +++ b/logging/apiv2/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" 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 7cb6ef99fe4b..47e8d8a30d88 100644 --- a/logging/go.mod +++ b/logging/go.mod @@ -11,8 +11,8 @@ require ( github.com/googleapis/gax-go/v2 v2.0.5 go.opencensus.io v0.22.3 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/logging/go.sum b/logging/go.sum index b7ec58757002..052c68fe16f3 100644 --- a/logging/go.sum +++ b/logging/go.sum @@ -285,8 +285,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -344,8 +344,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/longrunning/autogen/doc.go b/longrunning/autogen/doc.go index a52169b9b246..ceb12865e494 100644 --- a/longrunning/autogen/doc.go +++ b/longrunning/autogen/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/memcache/apiv1beta2/doc.go b/memcache/apiv1beta2/doc.go index c760f550211b..3d8771d823b9 100644 --- a/memcache/apiv1beta2/doc.go +++ b/memcache/apiv1beta2/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/monitoring/apiv3/doc.go b/monitoring/apiv3/doc.go index 44b627c1d3eb..bd9d038ef1f2 100644 --- a/monitoring/apiv3/doc.go +++ b/monitoring/apiv3/doc.go @@ -45,7 +45,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/osconfig/agentendpoint/apiv1beta/doc.go b/osconfig/agentendpoint/apiv1beta/doc.go index 9a0ac7355aea..bfa17b1a9fe1 100644 --- a/osconfig/agentendpoint/apiv1beta/doc.go +++ b/osconfig/agentendpoint/apiv1beta/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/osconfig/apiv1beta/doc.go b/osconfig/apiv1beta/doc.go index be85c855261f..b19848c82a1d 100644 --- a/osconfig/apiv1beta/doc.go +++ b/osconfig/apiv1beta/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/oslogin/apiv1/doc.go b/oslogin/apiv1/doc.go index 224c22d22517..4de2d22703a2 100644 --- a/oslogin/apiv1/doc.go +++ b/oslogin/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/oslogin/apiv1beta/doc.go b/oslogin/apiv1beta/doc.go index ccca7d043f57..c7e639313c57 100644 --- a/oslogin/apiv1beta/doc.go +++ b/oslogin/apiv1beta/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/phishingprotection/apiv1beta1/doc.go b/phishingprotection/apiv1beta1/doc.go index 01afcfcd1270..a139d70bf3b9 100644 --- a/phishingprotection/apiv1beta1/doc.go +++ b/phishingprotection/apiv1beta1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/pubsub/apiv1/doc.go b/pubsub/apiv1/doc.go index 677745a4c44b..378e9b72cc81 100644 --- a/pubsub/apiv1/doc.go +++ b/pubsub/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" 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 57ce2ad01aef..3417dd91383a 100644 --- a/pubsub/go.mod +++ b/pubsub/go.mod @@ -12,8 +12,8 @@ require ( golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e golang.org/x/time v0.0.0-20191024005414-555d28b269f0 - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/pubsub/go.sum b/pubsub/go.sum index 817aa56278a6..5befa3395a00 100644 --- a/pubsub/go.sum +++ b/pubsub/go.sum @@ -281,8 +281,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -339,8 +339,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/recaptchaenterprise/apiv1beta1/doc.go b/recaptchaenterprise/apiv1beta1/doc.go index 1d381edeae1d..d3f390c155be 100644 --- a/recaptchaenterprise/apiv1beta1/doc.go +++ b/recaptchaenterprise/apiv1beta1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1/doc.go b/recommender/apiv1/doc.go index 8617767e0f24..048ea4285f1e 100644 --- a/recommender/apiv1/doc.go +++ b/recommender/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/recommender/apiv1beta1/doc.go b/recommender/apiv1beta1/doc.go index f7d54f056d70..42dbb50209b2 100644 --- a/recommender/apiv1beta1/doc.go +++ b/recommender/apiv1beta1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/redis/apiv1/doc.go b/redis/apiv1/doc.go index bed3d8803a2f..6c29e3486e5e 100644 --- a/redis/apiv1/doc.go +++ b/redis/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/redis/apiv1beta1/doc.go b/redis/apiv1beta1/doc.go index 9f8ec71fb5ce..d6d06205e9fc 100644 --- a/redis/apiv1beta1/doc.go +++ b/redis/apiv1beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/scheduler/apiv1/doc.go b/scheduler/apiv1/doc.go index ca651f98883a..28eaab064c8c 100644 --- a/scheduler/apiv1/doc.go +++ b/scheduler/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/scheduler/apiv1beta1/doc.go b/scheduler/apiv1beta1/doc.go index f6bbd09c577f..5d49005d2627 100644 --- a/scheduler/apiv1beta1/doc.go +++ b/scheduler/apiv1beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/secretmanager/apiv1/doc.go b/secretmanager/apiv1/doc.go index 80fed8991ec7..7bbc2974a6ee 100644 --- a/secretmanager/apiv1/doc.go +++ b/secretmanager/apiv1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/secretmanager/apiv1beta1/doc.go b/secretmanager/apiv1beta1/doc.go index 601d39ce2570..bfd56d9e2307 100644 --- a/secretmanager/apiv1beta1/doc.go +++ b/secretmanager/apiv1beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/apiv1/doc.go b/securitycenter/apiv1/doc.go index 85e540eedd24..681ef0ca3a4d 100644 --- a/securitycenter/apiv1/doc.go +++ b/securitycenter/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/apiv1beta1/doc.go b/securitycenter/apiv1beta1/doc.go index 0f50c88ca034..616a2429cfa6 100644 --- a/securitycenter/apiv1beta1/doc.go +++ b/securitycenter/apiv1beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/securitycenter/apiv1p1beta1/doc.go b/securitycenter/apiv1p1beta1/doc.go index 91f0eb6aaecd..9f99b89f5eee 100644 --- a/securitycenter/apiv1p1beta1/doc.go +++ b/securitycenter/apiv1p1beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/servicedirectory/apiv1beta1/doc.go b/servicedirectory/apiv1beta1/doc.go new file mode 100644 index 000000000000..f0f536897123 --- /dev/null +++ b/servicedirectory/apiv1beta1/doc.go @@ -0,0 +1,100 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +// Package servicedirectory is an auto-generated package for the +// Service Directory API. +// +// Allows the registration and lookup of services. +// +// 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 +// for creating the underlying connection, but is not used for subsequent calls. +// Individual methods on the client use the ctx given to them. +// +// To close the open connection, use the Close() method. +// +// For information about setting deadlines, reusing contexts, and more +// please visit godoc.org/cloud.google.com/go. +package servicedirectory // import "cloud.google.com/go/servicedirectory/apiv1beta1" + +import ( + "context" + "runtime" + "strings" + "unicode" + + "google.golang.org/grpc/metadata" +) + +const versionClient = "20200312" + +func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { + out, _ := metadata.FromOutgoingContext(ctx) + out = out.Copy() + for _, md := range mds { + for k, v := range md { + out[k] = append(out[k], v...) + } + } + return metadata.NewOutgoingContext(ctx, out) +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{ + "https://www.googleapis.com/auth/cloud-platform", + } +} + +// versionGo returns the Go runtime version. The returned string +// has no whitespace, suitable for reporting in header. +func versionGo() string { + const develPrefix = "devel +" + + s := runtime.Version() + if strings.HasPrefix(s, develPrefix) { + s = s[len(develPrefix):] + if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { + s = s[:p] + } + return s + } + + notSemverRune := func(r rune) bool { + return !strings.ContainsRune("0123456789.", r) + } + + if strings.HasPrefix(s, "go1") { + s = s[2:] + var prerelease string + if p := strings.IndexFunc(s, notSemverRune); p >= 0 { + s, prerelease = s[:p], s[p:] + } + if strings.HasSuffix(s, ".") { + s += "0" + } else if strings.Count(s, ".") < 2 { + s += ".0" + } + if prerelease != "" { + s += "-" + prerelease + } + return s + } + return "UNKNOWN" +} diff --git a/servicedirectory/apiv1beta1/lookup_client.go b/servicedirectory/apiv1beta1/lookup_client.go new file mode 100644 index 000000000000..7728c9e29cce --- /dev/null +++ b/servicedirectory/apiv1beta1/lookup_client.go @@ -0,0 +1,142 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package servicedirectory + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/option" + gtransport "google.golang.org/api/transport/grpc" + servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" +) + +// LookupCallOptions contains the retry settings for each method of LookupClient. +type LookupCallOptions struct { + ResolveService []gax.CallOption +} + +func defaultLookupClientOptions() []option.ClientOption { + return []option.ClientOption{ + option.WithEndpoint("servicedirectory.googleapis.com:443"), + option.WithGRPCDialOption(grpc.WithDisableServiceConfig()), + option.WithScopes(DefaultAuthScopes()...), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultLookupCallOptions() *LookupCallOptions { + return &LookupCallOptions{ + ResolveService: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + } +} + +// LookupClient is a client for interacting with Service Directory API. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type LookupClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // The gRPC API client. + lookupClient servicedirectorypb.LookupServiceClient + + // The call options for this service. + CallOptions *LookupCallOptions + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewLookupClient creates a new lookup service client. +// +// Service Directory API for looking up service data at runtime. +func NewLookupClient(ctx context.Context, opts ...option.ClientOption) (*LookupClient, error) { + connPool, err := gtransport.DialPool(ctx, append(defaultLookupClientOptions(), opts...)...) + if err != nil { + return nil, err + } + c := &LookupClient{ + connPool: connPool, + CallOptions: defaultLookupCallOptions(), + + lookupClient: servicedirectorypb.NewLookupServiceClient(connPool), + } + c.setGoogleClientInfo() + + return c, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated. +func (c *LookupClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *LookupClient) Close() error { + return c.connPool.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *LookupClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// ResolveService returns a [service][google.cloud.servicedirectory.v1beta1.Service] and its +// associated endpoints. +// Resolving a service is not considered an active developer method. +func (c *LookupClient) ResolveService(ctx context.Context, req *servicedirectorypb.ResolveServiceRequest, opts ...gax.CallOption) (*servicedirectorypb.ResolveServiceResponse, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.ResolveService[0:len(c.CallOptions.ResolveService):len(c.CallOptions.ResolveService)], opts...) + var resp *servicedirectorypb.ResolveServiceResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.lookupClient.ResolveService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/servicedirectory/apiv1beta1/lookup_client_example_test.go b/servicedirectory/apiv1beta1/lookup_client_example_test.go new file mode 100644 index 000000000000..29971331d073 --- /dev/null +++ b/servicedirectory/apiv1beta1/lookup_client_example_test.go @@ -0,0 +1,54 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package servicedirectory_test + +import ( + "context" + + servicedirectory "cloud.google.com/go/servicedirectory/apiv1beta1" + servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" +) + +func ExampleNewLookupClient() { + ctx := context.Background() + c, err := servicedirectory.NewLookupClient(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use client. + _ = c +} + +func ExampleLookupClient_ResolveService() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewLookupClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.ResolveServiceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.ResolveService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} diff --git a/servicedirectory/apiv1beta1/registration_client.go b/servicedirectory/apiv1beta1/registration_client.go new file mode 100644 index 000000000000..a92e6227360c --- /dev/null +++ b/servicedirectory/apiv1beta1/registration_client.go @@ -0,0 +1,870 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package servicedirectory + +import ( + "context" + "fmt" + "math" + "net/url" + "time" + + "github.com/golang/protobuf/proto" + gax "github.com/googleapis/gax-go/v2" + "google.golang.org/api/iterator" + "google.golang.org/api/option" + gtransport "google.golang.org/api/transport/grpc" + servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + iampb "google.golang.org/genproto/googleapis/iam/v1" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/metadata" +) + +// RegistrationCallOptions contains the retry settings for each method of RegistrationClient. +type RegistrationCallOptions struct { + CreateNamespace []gax.CallOption + ListNamespaces []gax.CallOption + GetNamespace []gax.CallOption + UpdateNamespace []gax.CallOption + DeleteNamespace []gax.CallOption + CreateService []gax.CallOption + ListServices []gax.CallOption + GetService []gax.CallOption + UpdateService []gax.CallOption + DeleteService []gax.CallOption + CreateEndpoint []gax.CallOption + ListEndpoints []gax.CallOption + GetEndpoint []gax.CallOption + UpdateEndpoint []gax.CallOption + DeleteEndpoint []gax.CallOption + GetIamPolicy []gax.CallOption + SetIamPolicy []gax.CallOption + TestIamPermissions []gax.CallOption +} + +func defaultRegistrationClientOptions() []option.ClientOption { + return []option.ClientOption{ + option.WithEndpoint("servicedirectory.googleapis.com:443"), + option.WithGRPCDialOption(grpc.WithDisableServiceConfig()), + option.WithScopes(DefaultAuthScopes()...), + option.WithGRPCDialOption(grpc.WithDefaultCallOptions( + grpc.MaxCallRecvMsgSize(math.MaxInt32))), + } +} + +func defaultRegistrationCallOptions() *RegistrationCallOptions { + return &RegistrationCallOptions{ + CreateNamespace: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListNamespaces: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetNamespace: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateNamespace: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteNamespace: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateService: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListServices: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetService: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateService: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteService: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + CreateEndpoint: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + ListEndpoints: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetEndpoint: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + UpdateEndpoint: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + DeleteEndpoint: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + GetIamPolicy: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + SetIamPolicy: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + TestIamPermissions: []gax.CallOption{ + gax.WithRetry(func() gax.Retryer { + return gax.OnCodes([]codes.Code{ + codes.Unavailable, + codes.Unknown, + }, gax.Backoff{ + Initial: 1000 * time.Millisecond, + Max: 60000 * time.Millisecond, + Multiplier: 1.30, + }) + }), + }, + } +} + +// RegistrationClient is a client for interacting with Service Directory API. +// +// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls. +type RegistrationClient struct { + // Connection pool of gRPC connections to the service. + connPool gtransport.ConnPool + + // The gRPC API client. + registrationClient servicedirectorypb.RegistrationServiceClient + + // The call options for this service. + CallOptions *RegistrationCallOptions + + // The x-goog-* metadata to be sent with each request. + xGoogMetadata metadata.MD +} + +// NewRegistrationClient creates a new registration service client. +// +// Service Directory API for registering services. It defines the following +// resource model: +// +// The API has a collection of +// [Namespace][google.cloud.servicedirectory.v1beta1.Namespace] +// resources, named projects/*/locations/*/namespaces/*. +// +// Each Namespace has a collection of +// [Service][google.cloud.servicedirectory.v1beta1.Service] resources, named +// projects/*/locations/*/namespaces/*/services/*. +// +// Each Service has a collection of +// [Endpoint][google.cloud.servicedirectory.v1beta1.Endpoint] +// resources, named +// projects/*/locations/*/namespaces/*/services/*/endpoints/*. +func NewRegistrationClient(ctx context.Context, opts ...option.ClientOption) (*RegistrationClient, error) { + connPool, err := gtransport.DialPool(ctx, append(defaultRegistrationClientOptions(), opts...)...) + if err != nil { + return nil, err + } + c := &RegistrationClient{ + connPool: connPool, + CallOptions: defaultRegistrationCallOptions(), + + registrationClient: servicedirectorypb.NewRegistrationServiceClient(connPool), + } + c.setGoogleClientInfo() + + return c, nil +} + +// Connection returns a connection to the API service. +// +// Deprecated. +func (c *RegistrationClient) Connection() *grpc.ClientConn { + return c.connPool.Conn() +} + +// Close closes the connection to the API service. The user should invoke this when +// the client is no longer required. +func (c *RegistrationClient) Close() error { + return c.connPool.Close() +} + +// setGoogleClientInfo sets the name and version of the application in +// the `x-goog-api-client` header passed on each request. Intended for +// use by Google-written clients. +func (c *RegistrationClient) setGoogleClientInfo(keyval ...string) { + kv := append([]string{"gl-go", versionGo()}, keyval...) + kv = append(kv, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version) + c.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(kv...)) +} + +// CreateNamespace creates a namespace, and returns the new Namespace. +func (c *RegistrationClient) CreateNamespace(ctx context.Context, req *servicedirectorypb.CreateNamespaceRequest, opts ...gax.CallOption) (*servicedirectorypb.Namespace, error) { + 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.CreateNamespace[0:len(c.CallOptions.CreateNamespace):len(c.CallOptions.CreateNamespace)], opts...) + var resp *servicedirectorypb.Namespace + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.CreateNamespace(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ListNamespaces lists all namespaces. +func (c *RegistrationClient) ListNamespaces(ctx context.Context, req *servicedirectorypb.ListNamespacesRequest, opts ...gax.CallOption) *NamespaceIterator { + 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.ListNamespaces[0:len(c.CallOptions.ListNamespaces):len(c.CallOptions.ListNamespaces)], opts...) + it := &NamespaceIterator{} + req = proto.Clone(req).(*servicedirectorypb.ListNamespacesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*servicedirectorypb.Namespace, string, error) { + var resp *servicedirectorypb.ListNamespacesResponse + 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.registrationClient.ListNamespaces(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.Namespaces, 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 +} + +// GetNamespace gets a namespace. +func (c *RegistrationClient) GetNamespace(ctx context.Context, req *servicedirectorypb.GetNamespaceRequest, opts ...gax.CallOption) (*servicedirectorypb.Namespace, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.GetNamespace[0:len(c.CallOptions.GetNamespace):len(c.CallOptions.GetNamespace)], opts...) + var resp *servicedirectorypb.Namespace + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.GetNamespace(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// UpdateNamespace updates a namespace. +func (c *RegistrationClient) UpdateNamespace(ctx context.Context, req *servicedirectorypb.UpdateNamespaceRequest, opts ...gax.CallOption) (*servicedirectorypb.Namespace, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "namespace.name", url.QueryEscape(req.GetNamespace().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.UpdateNamespace[0:len(c.CallOptions.UpdateNamespace):len(c.CallOptions.UpdateNamespace)], opts...) + var resp *servicedirectorypb.Namespace + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.UpdateNamespace(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// DeleteNamespace deletes a namespace. This also deletes all services and endpoints in +// the namespace. +func (c *RegistrationClient) DeleteNamespace(ctx context.Context, req *servicedirectorypb.DeleteNamespaceRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.DeleteNamespace[0:len(c.CallOptions.DeleteNamespace):len(c.CallOptions.DeleteNamespace)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registrationClient.DeleteNamespace(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +// CreateService creates a service, and returns the new Service. +func (c *RegistrationClient) CreateService(ctx context.Context, req *servicedirectorypb.CreateServiceRequest, opts ...gax.CallOption) (*servicedirectorypb.Service, error) { + 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.CreateService[0:len(c.CallOptions.CreateService):len(c.CallOptions.CreateService)], opts...) + var resp *servicedirectorypb.Service + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.CreateService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ListServices lists all services belonging to a namespace. +func (c *RegistrationClient) ListServices(ctx context.Context, req *servicedirectorypb.ListServicesRequest, opts ...gax.CallOption) *ServiceIterator { + 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.ListServices[0:len(c.CallOptions.ListServices):len(c.CallOptions.ListServices)], opts...) + it := &ServiceIterator{} + req = proto.Clone(req).(*servicedirectorypb.ListServicesRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*servicedirectorypb.Service, string, error) { + var resp *servicedirectorypb.ListServicesResponse + 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.registrationClient.ListServices(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.Services, 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 +} + +// GetService gets a service. +func (c *RegistrationClient) GetService(ctx context.Context, req *servicedirectorypb.GetServiceRequest, opts ...gax.CallOption) (*servicedirectorypb.Service, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.GetService[0:len(c.CallOptions.GetService):len(c.CallOptions.GetService)], opts...) + var resp *servicedirectorypb.Service + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.GetService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// UpdateService updates a service. +func (c *RegistrationClient) UpdateService(ctx context.Context, req *servicedirectorypb.UpdateServiceRequest, opts ...gax.CallOption) (*servicedirectorypb.Service, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "service.name", url.QueryEscape(req.GetService().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.UpdateService[0:len(c.CallOptions.UpdateService):len(c.CallOptions.UpdateService)], opts...) + var resp *servicedirectorypb.Service + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.UpdateService(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// DeleteService deletes a service. This also deletes all endpoints associated with +// the service. +func (c *RegistrationClient) DeleteService(ctx context.Context, req *servicedirectorypb.DeleteServiceRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.DeleteService[0:len(c.CallOptions.DeleteService):len(c.CallOptions.DeleteService)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registrationClient.DeleteService(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +// CreateEndpoint creates a endpoint, and returns the new Endpoint. +func (c *RegistrationClient) CreateEndpoint(ctx context.Context, req *servicedirectorypb.CreateEndpointRequest, opts ...gax.CallOption) (*servicedirectorypb.Endpoint, error) { + 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.CreateEndpoint[0:len(c.CallOptions.CreateEndpoint):len(c.CallOptions.CreateEndpoint)], opts...) + var resp *servicedirectorypb.Endpoint + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.CreateEndpoint(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// ListEndpoints lists all endpoints. +func (c *RegistrationClient) ListEndpoints(ctx context.Context, req *servicedirectorypb.ListEndpointsRequest, opts ...gax.CallOption) *EndpointIterator { + 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.ListEndpoints[0:len(c.CallOptions.ListEndpoints):len(c.CallOptions.ListEndpoints)], opts...) + it := &EndpointIterator{} + req = proto.Clone(req).(*servicedirectorypb.ListEndpointsRequest) + it.InternalFetch = func(pageSize int, pageToken string) ([]*servicedirectorypb.Endpoint, string, error) { + var resp *servicedirectorypb.ListEndpointsResponse + 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.registrationClient.ListEndpoints(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, "", err + } + + it.Response = resp + return resp.Endpoints, 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 +} + +// GetEndpoint gets a endpoint. +func (c *RegistrationClient) GetEndpoint(ctx context.Context, req *servicedirectorypb.GetEndpointRequest, opts ...gax.CallOption) (*servicedirectorypb.Endpoint, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.GetEndpoint[0:len(c.CallOptions.GetEndpoint):len(c.CallOptions.GetEndpoint)], opts...) + var resp *servicedirectorypb.Endpoint + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.GetEndpoint(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// UpdateEndpoint updates a endpoint. +func (c *RegistrationClient) UpdateEndpoint(ctx context.Context, req *servicedirectorypb.UpdateEndpointRequest, opts ...gax.CallOption) (*servicedirectorypb.Endpoint, error) { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "endpoint.name", url.QueryEscape(req.GetEndpoint().GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.UpdateEndpoint[0:len(c.CallOptions.UpdateEndpoint):len(c.CallOptions.UpdateEndpoint)], opts...) + var resp *servicedirectorypb.Endpoint + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.UpdateEndpoint(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// DeleteEndpoint deletes a endpoint. +func (c *RegistrationClient) DeleteEndpoint(ctx context.Context, req *servicedirectorypb.DeleteEndpointRequest, opts ...gax.CallOption) error { + md := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(req.GetName()))) + ctx = insertMetadata(ctx, c.xGoogMetadata, md) + opts = append(c.CallOptions.DeleteEndpoint[0:len(c.CallOptions.DeleteEndpoint):len(c.CallOptions.DeleteEndpoint)], opts...) + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + _, err = c.registrationClient.DeleteEndpoint(ctx, req, settings.GRPC...) + return err + }, opts...) + return err +} + +// GetIamPolicy gets the IAM Policy for a resource (namespace or service only). +func (c *RegistrationClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, 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) + opts = append(c.CallOptions.GetIamPolicy[0:len(c.CallOptions.GetIamPolicy):len(c.CallOptions.GetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.GetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// SetIamPolicy sets the IAM Policy for a resource (namespace or service only). +func (c *RegistrationClient) 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) + opts = append(c.CallOptions.SetIamPolicy[0:len(c.CallOptions.SetIamPolicy):len(c.CallOptions.SetIamPolicy)], opts...) + var resp *iampb.Policy + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.SetIamPolicy(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// TestIamPermissions tests IAM permissions for a resource (namespace or service only). +func (c *RegistrationClient) 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) + opts = append(c.CallOptions.TestIamPermissions[0:len(c.CallOptions.TestIamPermissions):len(c.CallOptions.TestIamPermissions)], opts...) + var resp *iampb.TestIamPermissionsResponse + err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { + var err error + resp, err = c.registrationClient.TestIamPermissions(ctx, req, settings.GRPC...) + return err + }, opts...) + if err != nil { + return nil, err + } + return resp, nil +} + +// EndpointIterator manages a stream of *servicedirectorypb.Endpoint. +type EndpointIterator struct { + items []*servicedirectorypb.Endpoint + 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 []*servicedirectorypb.Endpoint, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *EndpointIterator) 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 *EndpointIterator) Next() (*servicedirectorypb.Endpoint, error) { + var item *servicedirectorypb.Endpoint + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *EndpointIterator) bufLen() int { + return len(it.items) +} + +func (it *EndpointIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// NamespaceIterator manages a stream of *servicedirectorypb.Namespace. +type NamespaceIterator struct { + items []*servicedirectorypb.Namespace + 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 []*servicedirectorypb.Namespace, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *NamespaceIterator) 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 *NamespaceIterator) Next() (*servicedirectorypb.Namespace, error) { + var item *servicedirectorypb.Namespace + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *NamespaceIterator) bufLen() int { + return len(it.items) +} + +func (it *NamespaceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} + +// ServiceIterator manages a stream of *servicedirectorypb.Service. +type ServiceIterator struct { + items []*servicedirectorypb.Service + 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 []*servicedirectorypb.Service, nextPageToken string, err error) +} + +// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +func (it *ServiceIterator) 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 *ServiceIterator) Next() (*servicedirectorypb.Service, error) { + var item *servicedirectorypb.Service + if err := it.nextFunc(); err != nil { + return item, err + } + item = it.items[0] + it.items = it.items[1:] + return item, nil +} + +func (it *ServiceIterator) bufLen() int { + return len(it.items) +} + +func (it *ServiceIterator) takeBuf() interface{} { + b := it.items + it.items = nil + return b +} diff --git a/servicedirectory/apiv1beta1/registration_client_example_test.go b/servicedirectory/apiv1beta1/registration_client_example_test.go new file mode 100644 index 000000000000..9cd3d4cdb9a2 --- /dev/null +++ b/servicedirectory/apiv1beta1/registration_client_example_test.go @@ -0,0 +1,405 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go_gapic. DO NOT EDIT. + +package servicedirectory_test + +import ( + "context" + + servicedirectory "cloud.google.com/go/servicedirectory/apiv1beta1" + "google.golang.org/api/iterator" + servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func ExampleNewRegistrationClient() { + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use client. + _ = c +} + +func ExampleRegistrationClient_CreateNamespace() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.CreateNamespaceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.CreateNamespace(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_ListNamespaces() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + // import "google.golang.org/api/iterator" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.ListNamespacesRequest{ + // TODO: Fill request struct fields. + } + it := c.ListNamespaces(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistrationClient_GetNamespace() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.GetNamespaceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetNamespace(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_UpdateNamespace() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.UpdateNamespaceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.UpdateNamespace(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_DeleteNamespace() { + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.DeleteNamespaceRequest{ + // TODO: Fill request struct fields. + } + err = c.DeleteNamespace(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistrationClient_CreateService() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.CreateServiceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.CreateService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_ListServices() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + // import "google.golang.org/api/iterator" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.ListServicesRequest{ + // TODO: Fill request struct fields. + } + it := c.ListServices(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistrationClient_GetService() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.GetServiceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_UpdateService() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.UpdateServiceRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.UpdateService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_DeleteService() { + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.DeleteServiceRequest{ + // TODO: Fill request struct fields. + } + err = c.DeleteService(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistrationClient_CreateEndpoint() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.CreateEndpointRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.CreateEndpoint(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_ListEndpoints() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + // import "google.golang.org/api/iterator" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.ListEndpointsRequest{ + // TODO: Fill request struct fields. + } + it := c.ListEndpoints(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +func ExampleRegistrationClient_GetEndpoint() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.GetEndpointRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetEndpoint(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_UpdateEndpoint() { + // import servicedirectorypb "google.golang.org/genproto/googleapis/cloud/servicedirectory/v1beta1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.UpdateEndpointRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.UpdateEndpoint(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_DeleteEndpoint() { + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &servicedirectorypb.DeleteEndpointRequest{ + // TODO: Fill request struct fields. + } + err = c.DeleteEndpoint(ctx, req) + if err != nil { + // TODO: Handle error. + } +} + +func ExampleRegistrationClient_GetIamPolicy() { + // import iampb "google.golang.org/genproto/googleapis/iam/v1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_SetIamPolicy() { + // import iampb "google.golang.org/genproto/googleapis/iam/v1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +func ExampleRegistrationClient_TestIamPermissions() { + // import iampb "google.golang.org/genproto/googleapis/iam/v1" + + ctx := context.Background() + c, err := servicedirectory.NewRegistrationClient(ctx) + if err != nil { + // TODO: Handle error. + } + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + } + resp, err := c.TestIamPermissions(ctx, req) + 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 acd32bc0a013..3c39eeb71c73 100644 --- a/spanner/admin/database/apiv1/doc.go +++ b/spanner/admin/database/apiv1/doc.go @@ -38,7 +38,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/admin/instance/apiv1/doc.go b/spanner/admin/instance/apiv1/doc.go index 8eee2a8d32ba..40457820df26 100644 --- a/spanner/admin/instance/apiv1/doc.go +++ b/spanner/admin/instance/apiv1/doc.go @@ -38,7 +38,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/apiv1/doc.go b/spanner/apiv1/doc.go index 30429f511645..749b0b50d944 100644 --- a/spanner/apiv1/doc.go +++ b/spanner/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/spanner/go.mod b/spanner/go.mod index d5739b8120f1..baa5550a2c6d 100644 --- a/spanner/go.mod +++ b/spanner/go.mod @@ -9,9 +9,9 @@ require ( github.com/google/go-cmp v0.4.0 github.com/googleapis/gax-go/v2 v2.0.5 go.opencensus.io v0.22.3 - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/spanner/go.sum b/spanner/go.sum index fe73720dcc1c..2fd4c357f4a8 100644 --- a/spanner/go.sum +++ b/spanner/go.sum @@ -282,8 +282,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -340,8 +340,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/speech/apiv1/doc.go b/speech/apiv1/doc.go index 2dd83f5c54f1..4b84e6083be0 100644 --- a/speech/apiv1/doc.go +++ b/speech/apiv1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/speech/apiv1p1beta1/doc.go b/speech/apiv1p1beta1/doc.go index 02649b80eb15..33e029eae7ef 100644 --- a/speech/apiv1p1beta1/doc.go +++ b/speech/apiv1p1beta1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/storage/go.mod b/storage/go.mod index 7367049be814..12ef2df10000 100644 --- a/storage/go.mod +++ b/storage/go.mod @@ -9,8 +9,8 @@ require ( github.com/google/go-cmp v0.4.0 github.com/googleapis/gax-go/v2 v2.0.5 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d - golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c // indirect + golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d // indirect google.golang.org/api v0.20.0 - google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b + google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 google.golang.org/grpc v1.28.0 ) diff --git a/storage/go.sum b/storage/go.sum index 595af1ed68b5..c2310a238ed6 100644 --- a/storage/go.sum +++ b/storage/go.sum @@ -269,8 +269,8 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d h1:7M9AXzLrJWWGdDYtBblPHBT golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb h1:iKlO7ROJc6SttHKlxzwGytRtBUqX4VARrNTgP2YLX5M= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c h1:9WR4YuzLDuQMqEmLQrG0DiMmE2/HvX1dlrujzjmNVFg= -golang.org/x/tools v0.0.0-20200311090712-aafaee8bce8c/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d h1:3K34ovZAOnVaUPxanr0j4ghTZTPTA0CnXvjCl+5lZqk= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -324,8 +324,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383 h1:Vo0fD5w0fUKriWl google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b h1:IXPzGf8J51hBQirC+OIHbIlTuVYOMarft+Wvi+qDzmg= -google.golang.org/genproto v0.0.0-20200311144346-b662892dd51b/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672 h1:jiDSspVssiikoRPFHT6pYrL+CL6/yIc3b9AuHO/4xik= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= diff --git a/talent/apiv4beta1/doc.go b/talent/apiv4beta1/doc.go index bcae392026cc..eadc93db9a84 100644 --- a/talent/apiv4beta1/doc.go +++ b/talent/apiv4beta1/doc.go @@ -43,7 +43,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/texttospeech/apiv1/doc.go b/texttospeech/apiv1/doc.go index 3cd58cc1a586..c28dfea9ed0f 100644 --- a/texttospeech/apiv1/doc.go +++ b/texttospeech/apiv1/doc.go @@ -41,7 +41,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/trace/apiv1/doc.go b/trace/apiv1/doc.go index 64f2c7f09d5e..d2ceaadce824 100644 --- a/trace/apiv1/doc.go +++ b/trace/apiv1/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/trace/apiv2/doc.go b/trace/apiv2/doc.go index 8388688f782d..88c6fda45e61 100644 --- a/trace/apiv2/doc.go +++ b/trace/apiv2/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" 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 04b72e029589..d01d851eacc2 100644 --- a/translate/apiv3/doc.go +++ b/translate/apiv3/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/videointelligence/apiv1/doc.go b/videointelligence/apiv1/doc.go index 7a40acb1aa86..42bee1cb56f5 100644 --- a/videointelligence/apiv1/doc.go +++ b/videointelligence/apiv1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/videointelligence/apiv1beta2/doc.go b/videointelligence/apiv1beta2/doc.go index d57c827475ee..b869677c86c3 100644 --- a/videointelligence/apiv1beta2/doc.go +++ b/videointelligence/apiv1beta2/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/vision/apiv1/doc.go b/vision/apiv1/doc.go index f83816db6f94..f07c17e81001 100644 --- a/vision/apiv1/doc.go +++ b/vision/apiv1/doc.go @@ -42,7 +42,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/vision/apiv1p1beta1/doc.go b/vision/apiv1p1beta1/doc.go index 0579dd525163..e7deb85abbab 100644 --- a/vision/apiv1p1beta1/doc.go +++ b/vision/apiv1p1beta1/doc.go @@ -44,7 +44,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx) diff --git a/webrisk/apiv1beta1/doc.go b/webrisk/apiv1beta1/doc.go index e73b894e5f47..8042412e7f3d 100644 --- a/webrisk/apiv1beta1/doc.go +++ b/webrisk/apiv1beta1/doc.go @@ -40,7 +40,7 @@ import ( "google.golang.org/grpc/metadata" ) -const versionClient = "20200311" +const versionClient = "20200312" func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context { out, _ := metadata.FromOutgoingContext(ctx)