Skip to content
Permalink
Browse files
chore(all): auto-regenerate gapics (#4210)
This is an auto-generated regeneration of the gapic clients by
cloud.google.com/go/internal/gapicgen. Once the corresponding genproto PR is
submitted, genbot will update this PR with a newer dependency to the newer
version of genproto and assign reviewers to this PR.

If you have been assigned to review this PR, please:

- Ensure that the version of genproto in go.mod has been updated.
- Ensure that CI is passing. If it's failing, it requires your manual attention.
- Approve and submit this PR if you believe it's ready to ship.

Corresponding genproto PR: googleapis/go-genproto#611

Changes:

chore(clouddms): migrate clouddms to the PHP microgenerator
  Committer: @miraleung
  PiperOrigin-RevId: 377311345
  Source-Link: googleapis/googleapis@b52a804

feat(documentai): Move CommonOperationMetadata into a separate proto file for potential reuse.
  PiperOrigin-RevId: 377114643
  Source-Link: googleapis/googleapis@204809d

feat(pubsublite): Add Pub/Sub Lite Reservation APIs
  PiperOrigin-RevId: 377060979
  Source-Link: googleapis/googleapis@51d99df
  • Loading branch information
yoshi-automation committed Jun 3, 2021
1 parent e188592 commit 18375e50e8f16e63506129b8927a7b62f85e407b
Showing with 1,328 additions and 11 deletions.
  1. +1 −1 clouddms/apiv1/doc.go
  2. +1 −1 documentai/apiv1beta3/doc.go
  3. +1 −1 go.mod
  4. +2 −2 go.sum
  5. +1 −1 internal/generated/snippets/go.mod
  6. +2 −1 internal/generated/snippets/go.sum
  7. +45 −0 internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateReservation/main.go
  8. +43 −0 internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteReservation/main.go
  9. +45 −0 internal/generated/snippets/pubsublite/apiv1/AdminClient/GetReservation/main.go
  10. +52 −0 internal/generated/snippets/pubsublite/apiv1/AdminClient/ListReservationTopics/main.go
  11. +52 −0 internal/generated/snippets/pubsublite/apiv1/AdminClient/ListReservations/main.go
  12. +45 −0 internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateReservation/main.go
  13. +50 −0 internal/generated/snippets/tpu/apiv1/Client/CreateNode/main.go
  14. +50 −0 internal/generated/snippets/tpu/apiv1/Client/DeleteNode/main.go
  15. +45 −0 internal/generated/snippets/tpu/apiv1/Client/GetAcceleratorType/main.go
  16. +45 −0 internal/generated/snippets/tpu/apiv1/Client/GetNode/main.go
  17. +45 −0 internal/generated/snippets/tpu/apiv1/Client/GetTensorFlowVersion/main.go
  18. +52 −0 internal/generated/snippets/tpu/apiv1/Client/ListAcceleratorTypes/main.go
  19. +52 −0 internal/generated/snippets/tpu/apiv1/Client/ListNodes/main.go
  20. +52 −0 internal/generated/snippets/tpu/apiv1/Client/ListTensorFlowVersions/main.go
  21. +50 −0 internal/generated/snippets/tpu/apiv1/Client/ReimageNode/main.go
  22. +50 −0 internal/generated/snippets/tpu/apiv1/Client/StartNode/main.go
  23. +50 −0 internal/generated/snippets/tpu/apiv1/Client/StopNode/main.go
  24. +339 −0 pubsublite/apiv1/admin_client.go
  25. +124 −0 pubsublite/apiv1/admin_client_example_test.go
  26. +1 −1 pubsublite/apiv1/doc.go
  27. +30 −0 pubsublite/apiv1/gapic_metadata.json
  28. +1 −1 pubsublite/go.mod
  29. +2 −2 pubsublite/go.sum

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

2 go.mod
@@ -17,7 +17,7 @@ require (
golang.org/x/text v0.3.6
golang.org/x/tools v0.1.2
google.golang.org/api v0.47.0
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c
google.golang.org/genproto v0.0.0-20210603172842-58e84a565dcf
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
)
4 go.sum
@@ -443,8 +443,8 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/genproto v0.0.0-20210603172842-58e84a565dcf h1:3oVOonZQld/0ddUsMXCnkhem95RnnQEUMZQLJP1s3jQ=
google.golang.org/genproto v0.0.0-20210603172842-58e84a565dcf/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
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/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -32,5 +32,5 @@ require (
cloud.google.com/go/pubsublite v0.82.0
cloud.google.com/go/spanner v0.82.0
google.golang.org/api v0.47.0
google.golang.org/genproto v0.0.0-20210601144548-a796c710e9b6
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c
)
@@ -143,8 +143,9 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210601144548-a796c710e9b6 h1:zWmI+1Z2ZiKs1ceiAn4gjBd1v/d/AuWf/b+bLPe9aNw=
google.golang.org/genproto v0.0.0-20210601144548-a796c710e9b6/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
@@ -0,0 +1,45 @@
// Copyright 2021 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
//
// http://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.

// [START pubsublite_v1_generated_AdminService_CreateReservation_sync]

package main

import (
"context"

pubsublite "cloud.google.com/go/pubsublite/apiv1"
pubsublitepb "google.golang.org/genproto/googleapis/cloud/pubsublite/v1"
)

func main() {
ctx := context.Background()
c, err := pubsublite.NewAdminClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &pubsublitepb.CreateReservationRequest{
// TODO: Fill request struct fields.
}
resp, err := c.CreateReservation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}

// [END pubsublite_v1_generated_AdminService_CreateReservation_sync]
@@ -0,0 +1,43 @@
// Copyright 2021 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
//
// http://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.

// [START pubsublite_v1_generated_AdminService_DeleteReservation_sync]

package main

import (
"context"

pubsublite "cloud.google.com/go/pubsublite/apiv1"
pubsublitepb "google.golang.org/genproto/googleapis/cloud/pubsublite/v1"
)

func main() {
ctx := context.Background()
c, err := pubsublite.NewAdminClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &pubsublitepb.DeleteReservationRequest{
// TODO: Fill request struct fields.
}
err = c.DeleteReservation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}

// [END pubsublite_v1_generated_AdminService_DeleteReservation_sync]
@@ -0,0 +1,45 @@
// Copyright 2021 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
//
// http://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.

// [START pubsublite_v1_generated_AdminService_GetReservation_sync]

package main

import (
"context"

pubsublite "cloud.google.com/go/pubsublite/apiv1"
pubsublitepb "google.golang.org/genproto/googleapis/cloud/pubsublite/v1"
)

func main() {
ctx := context.Background()
c, err := pubsublite.NewAdminClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &pubsublitepb.GetReservationRequest{
// TODO: Fill request struct fields.
}
resp, err := c.GetReservation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}

// [END pubsublite_v1_generated_AdminService_GetReservation_sync]
@@ -0,0 +1,52 @@
// Copyright 2021 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
//
// http://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.

// [START pubsublite_v1_generated_AdminService_ListReservationTopics_sync]

package main

import (
"context"

pubsublite "cloud.google.com/go/pubsublite/apiv1"
"google.golang.org/api/iterator"
pubsublitepb "google.golang.org/genproto/googleapis/cloud/pubsublite/v1"
)

func main() {
ctx := context.Background()
c, err := pubsublite.NewAdminClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &pubsublitepb.ListReservationTopicsRequest{
// TODO: Fill request struct fields.
}
it := c.ListReservationTopics(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}

// [END pubsublite_v1_generated_AdminService_ListReservationTopics_sync]
@@ -0,0 +1,52 @@
// Copyright 2021 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
//
// http://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.

// [START pubsublite_v1_generated_AdminService_ListReservations_sync]

package main

import (
"context"

pubsublite "cloud.google.com/go/pubsublite/apiv1"
"google.golang.org/api/iterator"
pubsublitepb "google.golang.org/genproto/googleapis/cloud/pubsublite/v1"
)

func main() {
ctx := context.Background()
c, err := pubsublite.NewAdminClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &pubsublitepb.ListReservationsRequest{
// TODO: Fill request struct fields.
}
it := c.ListReservations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
}

// [END pubsublite_v1_generated_AdminService_ListReservations_sync]
@@ -0,0 +1,45 @@
// Copyright 2021 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
//
// http://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.

// [START pubsublite_v1_generated_AdminService_UpdateReservation_sync]

package main

import (
"context"

pubsublite "cloud.google.com/go/pubsublite/apiv1"
pubsublitepb "google.golang.org/genproto/googleapis/cloud/pubsublite/v1"
)

func main() {
ctx := context.Background()
c, err := pubsublite.NewAdminClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &pubsublitepb.UpdateReservationRequest{
// TODO: Fill request struct fields.
}
resp, err := c.UpdateReservation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}

// [END pubsublite_v1_generated_AdminService_UpdateReservation_sync]
@@ -0,0 +1,50 @@
// Copyright 2021 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
//
// http://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.

// [START tpu_v1_generated_Tpu_CreateNode_sync]

package main

import (
"context"

tpu "cloud.google.com/go/tpu/apiv1"
tpupb "google.golang.org/genproto/googleapis/cloud/tpu/v1"
)

func main() {
ctx := context.Background()
c, err := tpu.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()

req := &tpupb.CreateNodeRequest{
// TODO: Fill request struct fields.
}
op, err := c.CreateNode(ctx, req)
if err != nil {
// TODO: Handle error.
}

resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}

// [END tpu_v1_generated_Tpu_CreateNode_sync]
Loading

0 comments on commit 18375e5

Please sign in to comment.