-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
e188592
commit 18375e5
Showing
29 changed files
with
1,328 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
internal/generated/snippets/pubsublite/apiv1/AdminClient/CreateReservation/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
43 changes: 43 additions & 0 deletions
43
internal/generated/snippets/pubsublite/apiv1/AdminClient/DeleteReservation/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
45 changes: 45 additions & 0 deletions
45
internal/generated/snippets/pubsublite/apiv1/AdminClient/GetReservation/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
52 changes: 52 additions & 0 deletions
52
internal/generated/snippets/pubsublite/apiv1/AdminClient/ListReservationTopics/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
52 changes: 52 additions & 0 deletions
52
internal/generated/snippets/pubsublite/apiv1/AdminClient/ListReservations/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
45 changes: 45 additions & 0 deletions
45
internal/generated/snippets/pubsublite/apiv1/AdminClient/UpdateReservation/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
50
internal/generated/snippets/tpu/apiv1/Client/CreateNode/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |
Oops, something went wrong.