From c7a33b40dd44c78a9fbcc5003b98406b0a7742a3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 1 Apr 2022 16:13:25 +0000 Subject: [PATCH 1/2] chore(all): auto-regenerate gapics 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: https://github.com/googleapis/go-genproto/pull/788 Changes: chore(run): configure Ruby builds for datastream v1, run v2, and the run wrapper PiperOrigin-RevId: 438645968 Source-Link: https://github.com/googleapis/googleapis/commit/9da5e7f3789f2e88b16290c1139222bc98d8e24d docs(servicemanagement): Remove redundant "API" in the service name PiperOrigin-RevId: 438645460 Source-Link: https://github.com/googleapis/googleapis/commit/59b819d91938f455b678ea2e27ad8c1789552843 feat(dlp): add DataProfilePubSubMessage supporting pub/sub integration PiperOrigin-RevId: 438616324 Source-Link: https://github.com/googleapis/googleapis/commit/52df4b4b80054775ca40c71f74af765db65fdbdf chore(bigquery/datatransfer): remove unused imports PiperOrigin-RevId: 438616112 Source-Link: https://github.com/googleapis/googleapis/commit/33dd46bddd2c97275cf8fbcf4ee1dc4e68b211da feat(bigquery/storage): Deprecate format specific `row_count` field in Read API PiperOrigin-RevId: 438434001 Source-Link: https://github.com/googleapis/googleapis/commit/727f08ba466745c17f71cd2084540878392de31d --- internal/generated/snippets/go.mod | 7 ++- internal/generated/snippets/go.sum | 13 +++-- .../RevisionsClient/DeleteRevision/main.go | 53 ++++++++++++++++++ .../apiv2/RevisionsClient/GetRevision/main.go | 48 ++++++++++++++++ .../RevisionsClient/ListRevisions/main.go | 55 +++++++++++++++++++ .../ServicesClient/CreateService/main.go | 53 ++++++++++++++++++ .../ServicesClient/DeleteService/main.go | 53 ++++++++++++++++++ .../apiv2/ServicesClient/GetIamPolicy/main.go | 48 ++++++++++++++++ .../apiv2/ServicesClient/GetService/main.go | 48 ++++++++++++++++ .../apiv2/ServicesClient/ListServices/main.go | 55 +++++++++++++++++++ .../apiv2/ServicesClient/SetIamPolicy/main.go | 48 ++++++++++++++++ .../ServicesClient/TestIamPermissions/main.go | 48 ++++++++++++++++ .../ServicesClient/UpdateService/main.go | 53 ++++++++++++++++++ 13 files changed, 576 insertions(+), 6 deletions(-) create mode 100644 internal/generated/snippets/run/apiv2/RevisionsClient/DeleteRevision/main.go create mode 100644 internal/generated/snippets/run/apiv2/RevisionsClient/GetRevision/main.go create mode 100644 internal/generated/snippets/run/apiv2/RevisionsClient/ListRevisions/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/CreateService/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/DeleteService/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/GetIamPolicy/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/GetService/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/ListServices/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/SetIamPolicy/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/TestIamPermissions/main.go create mode 100644 internal/generated/snippets/run/apiv2/ServicesClient/UpdateService/main.go diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index d055e9ac080..19d530e55fe 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -86,6 +86,7 @@ require ( cloud.google.com/go/resourcemanager v1.0.0 cloud.google.com/go/resourcesettings v1.0.0 cloud.google.com/go/retail v1.0.0 + cloud.google.com/go/run v0.0.0-00010101000000-000000000000 cloud.google.com/go/scheduler v1.0.0 cloud.google.com/go/secretmanager v1.0.0 cloud.google.com/go/security v1.1.1 @@ -112,8 +113,8 @@ require ( cloud.google.com/go/websecurityscanner v1.0.0 cloud.google.com/go/workflows v1.1.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - google.golang.org/api v0.73.0 - google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62 + google.golang.org/api v0.74.0 + google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 ) replace cloud.google.com/go/storagetransfer => ../../../storagetransfer @@ -339,3 +340,5 @@ replace cloud.google.com/go/dataplex => ../../../dataplex replace cloud.google.com/go/certificatemanager => ../../../certificatemanager replace cloud.google.com/go/optimization => ../../../optimization + +replace cloud.google.com/go/run => ../../../run diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index c9a3e4221cc..8d454bd234e 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -106,8 +106,9 @@ golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLd golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de h1:pZB1TWnKi+o4bENlbzAgLrEbY4RMYmUIRobMcSmfeYc= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -138,8 +139,9 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 h1:eJv7u3ksNXoLbGSKuv2s/SIO4tJVxc/A+MTpzxDgz/Q= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -167,8 +169,9 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.73.0 h1:O9bThUh35K1rvUrQwTUQ1eqLC/IYyzUpWavYIO2EXvo= google.golang.org/api v0.73.0/go.mod h1:lbd/q6BRFJbdpV6OUCXstVeiI5mL/d3/WifG7iNKnjI= +google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= @@ -189,9 +192,11 @@ google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2I google.golang.org/genproto v0.0.0-20220317150908-0efb43f6373e/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220322021311-435b647f9ef2/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220323144105-ec3c684e5b14/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220328180837-c47567c462d1/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62 h1:IPy3YJ7uYPB1sDNJRs/b7Dgs6KxwMyGYgtIgDnKgEyw= google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 h1:HOL66YCI20JvN2hVk6o2YIp9i/3RvzVUz82PqNr7fXw= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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= diff --git a/internal/generated/snippets/run/apiv2/RevisionsClient/DeleteRevision/main.go b/internal/generated/snippets/run/apiv2/RevisionsClient/DeleteRevision/main.go new file mode 100644 index 00000000000..2da5a07a9f5 --- /dev/null +++ b/internal/generated/snippets/run/apiv2/RevisionsClient/DeleteRevision/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Revisions_DeleteRevision_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewRevisionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.DeleteRevisionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#DeleteRevisionRequest. + } + op, err := c.DeleteRevision(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Revisions_DeleteRevision_sync] diff --git a/internal/generated/snippets/run/apiv2/RevisionsClient/GetRevision/main.go b/internal/generated/snippets/run/apiv2/RevisionsClient/GetRevision/main.go new file mode 100644 index 00000000000..e9cf893dffd --- /dev/null +++ b/internal/generated/snippets/run/apiv2/RevisionsClient/GetRevision/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Revisions_GetRevision_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewRevisionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.GetRevisionRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#GetRevisionRequest. + } + resp, err := c.GetRevision(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Revisions_GetRevision_sync] diff --git a/internal/generated/snippets/run/apiv2/RevisionsClient/ListRevisions/main.go b/internal/generated/snippets/run/apiv2/RevisionsClient/ListRevisions/main.go new file mode 100644 index 00000000000..5e40fcb7c38 --- /dev/null +++ b/internal/generated/snippets/run/apiv2/RevisionsClient/ListRevisions/main.go @@ -0,0 +1,55 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Revisions_ListRevisions_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + "google.golang.org/api/iterator" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewRevisionsClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.ListRevisionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#ListRevisionsRequest. + } + it := c.ListRevisions(ctx, req) + for { + resp, err := it.Next() + if err == iterator.Done { + break + } + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp + } +} + +// [END run_v2_generated_Revisions_ListRevisions_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/CreateService/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/CreateService/main.go new file mode 100644 index 00000000000..449cc0062ab --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/CreateService/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_CreateService_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.CreateServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#CreateServiceRequest. + } + op, err := c.CreateService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_CreateService_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/DeleteService/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/DeleteService/main.go new file mode 100644 index 00000000000..38bd3091335 --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/DeleteService/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_DeleteService_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.DeleteServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#DeleteServiceRequest. + } + op, err := c.DeleteService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_DeleteService_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/GetIamPolicy/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/GetIamPolicy/main.go new file mode 100644 index 00000000000..aa10578601f --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/GetIamPolicy/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_GetIamPolicy_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.GetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#GetIamPolicyRequest. + } + resp, err := c.GetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_GetIamPolicy_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/GetService/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/GetService/main.go new file mode 100644 index 00000000000..cbcb8119262 --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/GetService/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_GetService_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.GetServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#GetServiceRequest. + } + resp, err := c.GetService(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_GetService_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/ListServices/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/ListServices/main.go new file mode 100644 index 00000000000..b09468dad48 --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/ListServices/main.go @@ -0,0 +1,55 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_ListServices_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + "google.golang.org/api/iterator" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.ListServicesRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#ListServicesRequest. + } + 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 + } +} + +// [END run_v2_generated_Services_ListServices_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/SetIamPolicy/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/SetIamPolicy/main.go new file mode 100644 index 00000000000..d363fa8b804 --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/SetIamPolicy/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_SetIamPolicy_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.SetIamPolicyRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#SetIamPolicyRequest. + } + resp, err := c.SetIamPolicy(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_SetIamPolicy_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/TestIamPermissions/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/TestIamPermissions/main.go new file mode 100644 index 00000000000..50d02754bcb --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/TestIamPermissions/main.go @@ -0,0 +1,48 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_TestIamPermissions_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + iampb "google.golang.org/genproto/googleapis/iam/v1" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &iampb.TestIamPermissionsRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/iam/v1#TestIamPermissionsRequest. + } + resp, err := c.TestIamPermissions(ctx, req) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_TestIamPermissions_sync] diff --git a/internal/generated/snippets/run/apiv2/ServicesClient/UpdateService/main.go b/internal/generated/snippets/run/apiv2/ServicesClient/UpdateService/main.go new file mode 100644 index 00000000000..60d4d60529a --- /dev/null +++ b/internal/generated/snippets/run/apiv2/ServicesClient/UpdateService/main.go @@ -0,0 +1,53 @@ +// Copyright 2022 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. + +// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT. + +// [START run_v2_generated_Services_UpdateService_sync] + +package main + +import ( + "context" + + run "cloud.google.com/go/run/apiv2" + runpb "google.golang.org/genproto/googleapis/cloud/run/v2" +) + +func main() { + ctx := context.Background() + c, err := run.NewServicesClient(ctx) + if err != nil { + // TODO: Handle error. + } + defer c.Close() + + req := &runpb.UpdateServiceRequest{ + // TODO: Fill request struct fields. + // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/run/v2#UpdateServiceRequest. + } + op, err := c.UpdateService(ctx, req) + if err != nil { + // TODO: Handle error. + } + + resp, err := op.Wait(ctx) + if err != nil { + // TODO: Handle error. + } + // TODO: Use resp. + _ = resp +} + +// [END run_v2_generated_Services_UpdateService_sync] From 46f7d8e46da11d177702c1a72e512420cfd2ef27 Mon Sep 17 00:00:00 2001 From: Cody Oss Date: Tue, 5 Apr 2022 08:42:00 -0600 Subject: [PATCH 2/2] go mod tidy --- bigquery/go.mod | 2 +- bigquery/go.sum | 3 ++- dlp/go.mod | 2 +- dlp/go.sum | 4 ++-- internal/generated/snippets/go.mod | 2 +- internal/generated/snippets/go.sum | 4 ++-- run/go.mod | 2 +- run/go.sum | 4 ++-- servicemanagement/go.mod | 2 +- servicemanagement/go.sum | 3 ++- 10 files changed, 15 insertions(+), 13 deletions(-) diff --git a/bigquery/go.mod b/bigquery/go.mod index 97d20c92dd2..54129bfeef4 100644 --- a/bigquery/go.mod +++ b/bigquery/go.mod @@ -14,7 +14,7 @@ require ( golang.org/x/sync v0.0.0-20210220032951-036812b2e83c golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 google.golang.org/api v0.73.0 - google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 + google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 ) diff --git a/bigquery/go.sum b/bigquery/go.sum index 064c278749b..b0d8fa7747f 100644 --- a/bigquery/go.sum +++ b/bigquery/go.sum @@ -558,8 +558,9 @@ google.golang.org/genproto v0.0.0-20220216160803-4663080d8bc8/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 h1:FglFEfyj61zP3c6LgjmVHxYxZWXYul9oiS1EZqD5gLc= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de h1:9Ti5SG2U4cAcluryUo/sFay3TQKoxiFMfaT0pbizU7k= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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= diff --git a/dlp/go.mod b/dlp/go.mod index a5de159d514..1e4deea39ed 100644 --- a/dlp/go.mod +++ b/dlp/go.mod @@ -6,7 +6,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/googleapis/gax-go/v2 v2.2.0 google.golang.org/api v0.73.0 - google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62 + google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 ) diff --git a/dlp/go.sum b/dlp/go.sum index 8edb52ee2ae..c1f0cce4ba5 100644 --- a/dlp/go.sum +++ b/dlp/go.sum @@ -536,8 +536,8 @@ google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62 h1:IPy3YJ7uYPB1sDNJRs/b7Dgs6KxwMyGYgtIgDnKgEyw= -google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de h1:9Ti5SG2U4cAcluryUo/sFay3TQKoxiFMfaT0pbizU7k= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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= diff --git a/internal/generated/snippets/go.mod b/internal/generated/snippets/go.mod index 19d530e55fe..a2f8820e281 100644 --- a/internal/generated/snippets/go.mod +++ b/internal/generated/snippets/go.mod @@ -114,7 +114,7 @@ require ( cloud.google.com/go/workflows v1.1.0 github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect google.golang.org/api v0.74.0 - google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 + google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de ) replace cloud.google.com/go/storagetransfer => ../../../storagetransfer diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum index 8d454bd234e..4d7100302b9 100644 --- a/internal/generated/snippets/go.sum +++ b/internal/generated/snippets/go.sum @@ -195,8 +195,8 @@ google.golang.org/genproto v0.0.0-20220323144105-ec3c684e5b14/go.mod h1:hAL49I2I google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220328180837-c47567c462d1/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220329135034-5a5e19f58d62/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 h1:HOL66YCI20JvN2hVk6o2YIp9i/3RvzVUz82PqNr7fXw= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de h1:9Ti5SG2U4cAcluryUo/sFay3TQKoxiFMfaT0pbizU7k= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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= diff --git a/run/go.mod b/run/go.mod index b2af68aa067..3f375dfd66b 100644 --- a/run/go.mod +++ b/run/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.2.0 google.golang.org/api v0.74.0 - google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 + google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 ) diff --git a/run/go.sum b/run/go.sum index 0beadc78bc2..2c6aaa62c36 100644 --- a/run/go.sum +++ b/run/go.sum @@ -538,8 +538,8 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2 google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7 h1:HOL66YCI20JvN2hVk6o2YIp9i/3RvzVUz82PqNr7fXw= -google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de h1:9Ti5SG2U4cAcluryUo/sFay3TQKoxiFMfaT0pbizU7k= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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= diff --git a/servicemanagement/go.mod b/servicemanagement/go.mod index f19ef6d9f22..e67bd532b7e 100644 --- a/servicemanagement/go.mod +++ b/servicemanagement/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go v0.100.2 github.com/googleapis/gax-go/v2 v2.2.0 google.golang.org/api v0.73.0 - google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 + google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 ) diff --git a/servicemanagement/go.sum b/servicemanagement/go.sum index c42e86ef06b..c1f0cce4ba5 100644 --- a/servicemanagement/go.sum +++ b/servicemanagement/go.sum @@ -535,8 +535,9 @@ google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ6 google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6 h1:FglFEfyj61zP3c6LgjmVHxYxZWXYul9oiS1EZqD5gLc= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de h1:9Ti5SG2U4cAcluryUo/sFay3TQKoxiFMfaT0pbizU7k= +google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= 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=