Skip to content

Commit

Permalink
chore(all): auto-regenerate gapics (#4210)
Browse files Browse the repository at this point in the history
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 authored Jun 3, 2021
1 parent e188592 commit 18375e5
Show file tree
Hide file tree
Showing 29 changed files with 1,328 additions and 11 deletions.
2 changes: 1 addition & 1 deletion clouddms/apiv1/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion documentai/apiv1beta3/doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion internal/generated/snippets/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
3 changes: 2 additions & 1 deletion internal/generated/snippets/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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]
50 changes: 50 additions & 0 deletions internal/generated/snippets/tpu/apiv1/Client/CreateNode/main.go
Original file line number Diff line number Diff line change
@@ -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.