chore(all): auto-regenerate gapics (#5067)
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/713
Changes:
feat(recaptchaenterprise): add reCAPTCHA Enterprise account defender API methods
This cl adds the following API methods to support the Preview release of reCAPTCHA Enterprise account defender: ListRelatedAccountGroups, ListRelatedAccountGroupMemberships, and SearchRelatedAccountGroupMemberships. Additionally it modifies the existing createAssessment API method to add a new hashed_account_id parameter along with AccountDefenderAssessment return value.
PiperOrigin-RevId: 407130991
Source-Link: https://github.com/googleapis/googleapis/commit/d58e602ed8a92b8d21da92543528fa5980be6811
docs(recommender): fix docstring formatting
Committer: @parthea
PiperOrigin-RevId: 406921699
Source-Link: https://github.com/googleapis/googleapis/commit/6d008d29d1d2fcb8e6fa5823ef8a970bf5f2f3bd
feat(aiplatform): Adds support for `google.protobuf.Value` pipeline parameters in the `parameter_values` field
PiperOrigin-RevId: 406492721
Source-Link: https://github.com/googleapis/googleapis/commit/7a3953f4b1b25367675cf9fb1f8f75b1969a98c0
diff --git a/aiplatform/apiv1/doc.go b/aiplatform/apiv1/doc.go
index 8d0a2fb..a06237d 100644
--- a/aiplatform/apiv1/doc.go
+++ b/aiplatform/apiv1/doc.go
@@ -90,7 +90,7 @@
type clientHookParams struct{}
type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error)
-const versionClient = "20211030"
+const versionClient = "20211102"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/aiplatform/go.mod b/aiplatform/go.mod
index af30f90..df047f9 100644
--- a/aiplatform/go.mod
+++ b/aiplatform/go.mod
@@ -6,7 +6,7 @@
cloud.google.com/go v0.97.0
github.com/googleapis/gax-go/v2 v2.1.1
google.golang.org/api v0.60.0
- google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
+ google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
)
diff --git a/aiplatform/go.sum b/aiplatform/go.sum
index 4a0ee7c..42511d2 100644
--- a/aiplatform/go.sum
+++ b/aiplatform/go.sum
@@ -503,8 +503,8 @@
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c h1:UQDUEuW1R2dcciOjiFmuzE4skW4n/zGGNMU0RhU3hQI=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
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/go.mod b/go.mod
index 6daba37..ace2734 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,7 @@
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/api v0.60.0
- google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
+ google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
)
diff --git a/go.sum b/go.sum
index eda1254..b8d4894 100644
--- a/go.sum
+++ b/go.sum
@@ -511,8 +511,8 @@
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c h1:UQDUEuW1R2dcciOjiFmuzE4skW4n/zGGNMU0RhU3hQI=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
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 495b1d3..cea269a 100644
--- a/internal/generated/snippets/go.mod
+++ b/internal/generated/snippets/go.mod
@@ -125,7 +125,7 @@
cloud.google.com/go/websecurityscanner v0.1.0
cloud.google.com/go/workflows v0.1.0
google.golang.org/api v0.60.0
- google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
+ google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c
)
replace cloud.google.com/go/storagetransfer => ../../../storagetransfer
diff --git a/internal/generated/snippets/go.sum b/internal/generated/snippets/go.sum
index 7902c37..fa518be 100644
--- a/internal/generated/snippets/go.sum
+++ b/internal/generated/snippets/go.sum
@@ -164,8 +164,9 @@
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c h1:UQDUEuW1R2dcciOjiFmuzE4skW4n/zGGNMU0RhU3hQI=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
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/recaptchaenterprise/apiv1/Client/ListRelatedAccountGroupMemberships/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListRelatedAccountGroupMemberships/main.go
new file mode 100644
index 0000000..149241b
--- /dev/null
+++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListRelatedAccountGroupMemberships/main.go
@@ -0,0 +1,55 @@
+// 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.
+
+// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT.
+
+// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync]
+
+package main
+
+import (
+ "context"
+
+ recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/apiv1"
+ "google.golang.org/api/iterator"
+ recaptchaenterprisepb "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1"
+)
+
+func main() {
+ ctx := context.Background()
+ c, err := recaptchaenterprise.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ defer c.Close()
+
+ req := &recaptchaenterprisepb.ListRelatedAccountGroupMembershipsRequest{
+ // TODO: Fill request struct fields.
+ // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1#ListRelatedAccountGroupMembershipsRequest.
+ }
+ it := c.ListRelatedAccountGroupMemberships(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroupMemberships_sync]
diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListRelatedAccountGroups/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListRelatedAccountGroups/main.go
new file mode 100644
index 0000000..1415f67
--- /dev/null
+++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/ListRelatedAccountGroups/main.go
@@ -0,0 +1,55 @@
+// 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.
+
+// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT.
+
+// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync]
+
+package main
+
+import (
+ "context"
+
+ recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/apiv1"
+ "google.golang.org/api/iterator"
+ recaptchaenterprisepb "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1"
+)
+
+func main() {
+ ctx := context.Background()
+ c, err := recaptchaenterprise.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ defer c.Close()
+
+ req := &recaptchaenterprisepb.ListRelatedAccountGroupsRequest{
+ // TODO: Fill request struct fields.
+ // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1#ListRelatedAccountGroupsRequest.
+ }
+ it := c.ListRelatedAccountGroups(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_ListRelatedAccountGroups_sync]
diff --git a/internal/generated/snippets/recaptchaenterprise/apiv1/Client/SearchRelatedAccountGroupMemberships/main.go b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/SearchRelatedAccountGroupMemberships/main.go
new file mode 100644
index 0000000..5a721c9
--- /dev/null
+++ b/internal/generated/snippets/recaptchaenterprise/apiv1/Client/SearchRelatedAccountGroupMemberships/main.go
@@ -0,0 +1,55 @@
+// 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.
+
+// Code generated by cloud.google.com/go/internal/gapicgen/gensnippets. DO NOT EDIT.
+
+// [START recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync]
+
+package main
+
+import (
+ "context"
+
+ recaptchaenterprise "cloud.google.com/go/recaptchaenterprise/apiv1"
+ "google.golang.org/api/iterator"
+ recaptchaenterprisepb "google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1"
+)
+
+func main() {
+ ctx := context.Background()
+ c, err := recaptchaenterprise.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ defer c.Close()
+
+ req := &recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsRequest{
+ // TODO: Fill request struct fields.
+ // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1#SearchRelatedAccountGroupMembershipsRequest.
+ }
+ it := c.SearchRelatedAccountGroupMemberships(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+// [END recaptchaenterprise_v1_generated_RecaptchaEnterpriseService_SearchRelatedAccountGroupMemberships_sync]
diff --git a/internal/godocfx/go.sum b/internal/godocfx/go.sum
index 738bf1e..5cff44f 100644
--- a/internal/godocfx/go.sum
+++ b/internal/godocfx/go.sum
@@ -326,8 +326,8 @@
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c h1:UQDUEuW1R2dcciOjiFmuzE4skW4n/zGGNMU0RhU3hQI=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
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/recaptchaenterprise/apiv1/doc.go b/recaptchaenterprise/apiv1/doc.go
index 76df11e..bb23dc1 100644
--- a/recaptchaenterprise/apiv1/doc.go
+++ b/recaptchaenterprise/apiv1/doc.go
@@ -82,7 +82,7 @@
type clientHookParams struct{}
type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error)
-const versionClient = "20211030"
+const versionClient = "20211102"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/recaptchaenterprise/apiv1/gapic_metadata.json b/recaptchaenterprise/apiv1/gapic_metadata.json
index 73a5335..897366f 100644
--- a/recaptchaenterprise/apiv1/gapic_metadata.json
+++ b/recaptchaenterprise/apiv1/gapic_metadata.json
@@ -45,11 +45,26 @@
"ListKeys"
]
},
+ "ListRelatedAccountGroupMemberships": {
+ "methods": [
+ "ListRelatedAccountGroupMemberships"
+ ]
+ },
+ "ListRelatedAccountGroups": {
+ "methods": [
+ "ListRelatedAccountGroups"
+ ]
+ },
"MigrateKey": {
"methods": [
"MigrateKey"
]
},
+ "SearchRelatedAccountGroupMemberships": {
+ "methods": [
+ "SearchRelatedAccountGroupMemberships"
+ ]
+ },
"UpdateKey": {
"methods": [
"UpdateKey"
diff --git a/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go b/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go
index 903b2fd..870b9f7 100644
--- a/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go
+++ b/recaptchaenterprise/apiv1/recaptcha_enterprise_client.go
@@ -38,15 +38,18 @@
// CallOptions contains the retry settings for each method of Client.
type CallOptions struct {
- CreateAssessment []gax.CallOption
- AnnotateAssessment []gax.CallOption
- CreateKey []gax.CallOption
- ListKeys []gax.CallOption
- GetKey []gax.CallOption
- UpdateKey []gax.CallOption
- DeleteKey []gax.CallOption
- MigrateKey []gax.CallOption
- GetMetrics []gax.CallOption
+ CreateAssessment []gax.CallOption
+ AnnotateAssessment []gax.CallOption
+ CreateKey []gax.CallOption
+ ListKeys []gax.CallOption
+ GetKey []gax.CallOption
+ UpdateKey []gax.CallOption
+ DeleteKey []gax.CallOption
+ MigrateKey []gax.CallOption
+ GetMetrics []gax.CallOption
+ ListRelatedAccountGroups []gax.CallOption
+ ListRelatedAccountGroupMemberships []gax.CallOption
+ SearchRelatedAccountGroupMemberships []gax.CallOption
}
func defaultGRPCClientOptions() []option.ClientOption {
@@ -64,15 +67,18 @@
func defaultCallOptions() *CallOptions {
return &CallOptions{
- CreateAssessment: []gax.CallOption{},
- AnnotateAssessment: []gax.CallOption{},
- CreateKey: []gax.CallOption{},
- ListKeys: []gax.CallOption{},
- GetKey: []gax.CallOption{},
- UpdateKey: []gax.CallOption{},
- DeleteKey: []gax.CallOption{},
- MigrateKey: []gax.CallOption{},
- GetMetrics: []gax.CallOption{},
+ CreateAssessment: []gax.CallOption{},
+ AnnotateAssessment: []gax.CallOption{},
+ CreateKey: []gax.CallOption{},
+ ListKeys: []gax.CallOption{},
+ GetKey: []gax.CallOption{},
+ UpdateKey: []gax.CallOption{},
+ DeleteKey: []gax.CallOption{},
+ MigrateKey: []gax.CallOption{},
+ GetMetrics: []gax.CallOption{},
+ ListRelatedAccountGroups: []gax.CallOption{},
+ ListRelatedAccountGroupMemberships: []gax.CallOption{},
+ SearchRelatedAccountGroupMemberships: []gax.CallOption{},
}
}
@@ -90,6 +96,9 @@
DeleteKey(context.Context, *recaptchaenterprisepb.DeleteKeyRequest, ...gax.CallOption) error
MigrateKey(context.Context, *recaptchaenterprisepb.MigrateKeyRequest, ...gax.CallOption) (*recaptchaenterprisepb.Key, error)
GetMetrics(context.Context, *recaptchaenterprisepb.GetMetricsRequest, ...gax.CallOption) (*recaptchaenterprisepb.Metrics, error)
+ ListRelatedAccountGroups(context.Context, *recaptchaenterprisepb.ListRelatedAccountGroupsRequest, ...gax.CallOption) *RelatedAccountGroupIterator
+ ListRelatedAccountGroupMemberships(context.Context, *recaptchaenterprisepb.ListRelatedAccountGroupMembershipsRequest, ...gax.CallOption) *RelatedAccountGroupMembershipIterator
+ SearchRelatedAccountGroupMemberships(context.Context, *recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsRequest, ...gax.CallOption) *RelatedAccountGroupMembershipIterator
}
// Client is a client for interacting with reCAPTCHA Enterprise API.
@@ -178,6 +187,21 @@
return c.internalClient.GetMetrics(ctx, req, opts...)
}
+// ListRelatedAccountGroups list groups of related accounts.
+func (c *Client) ListRelatedAccountGroups(ctx context.Context, req *recaptchaenterprisepb.ListRelatedAccountGroupsRequest, opts ...gax.CallOption) *RelatedAccountGroupIterator {
+ return c.internalClient.ListRelatedAccountGroups(ctx, req, opts...)
+}
+
+// ListRelatedAccountGroupMemberships get the memberships in a group of related accounts.
+func (c *Client) ListRelatedAccountGroupMemberships(ctx context.Context, req *recaptchaenterprisepb.ListRelatedAccountGroupMembershipsRequest, opts ...gax.CallOption) *RelatedAccountGroupMembershipIterator {
+ return c.internalClient.ListRelatedAccountGroupMemberships(ctx, req, opts...)
+}
+
+// SearchRelatedAccountGroupMemberships search group memberships related to a given account.
+func (c *Client) SearchRelatedAccountGroupMemberships(ctx context.Context, req *recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsRequest, opts ...gax.CallOption) *RelatedAccountGroupMembershipIterator {
+ return c.internalClient.SearchRelatedAccountGroupMemberships(ctx, req, opts...)
+}
+
// gRPCClient is a client for interacting with reCAPTCHA Enterprise API over gRPC transport.
//
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
@@ -456,6 +480,138 @@
return resp, nil
}
+func (c *gRPCClient) ListRelatedAccountGroups(ctx context.Context, req *recaptchaenterprisepb.ListRelatedAccountGroupsRequest, opts ...gax.CallOption) *RelatedAccountGroupIterator {
+ 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).ListRelatedAccountGroups[0:len((*c.CallOptions).ListRelatedAccountGroups):len((*c.CallOptions).ListRelatedAccountGroups)], opts...)
+ it := &RelatedAccountGroupIterator{}
+ req = proto.Clone(req).(*recaptchaenterprisepb.ListRelatedAccountGroupsRequest)
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*recaptchaenterprisepb.RelatedAccountGroup, string, error) {
+ resp := &recaptchaenterprisepb.ListRelatedAccountGroupsResponse{}
+ if pageToken != "" {
+ req.PageToken = pageToken
+ }
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else if pageSize != 0 {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.ListRelatedAccountGroups(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+
+ it.Response = resp
+ return resp.GetRelatedAccountGroups(), resp.GetNextPageToken(), 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.GetPageSize())
+ it.pageInfo.Token = req.GetPageToken()
+
+ return it
+}
+
+func (c *gRPCClient) ListRelatedAccountGroupMemberships(ctx context.Context, req *recaptchaenterprisepb.ListRelatedAccountGroupMembershipsRequest, opts ...gax.CallOption) *RelatedAccountGroupMembershipIterator {
+ 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).ListRelatedAccountGroupMemberships[0:len((*c.CallOptions).ListRelatedAccountGroupMemberships):len((*c.CallOptions).ListRelatedAccountGroupMemberships)], opts...)
+ it := &RelatedAccountGroupMembershipIterator{}
+ req = proto.Clone(req).(*recaptchaenterprisepb.ListRelatedAccountGroupMembershipsRequest)
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*recaptchaenterprisepb.RelatedAccountGroupMembership, string, error) {
+ resp := &recaptchaenterprisepb.ListRelatedAccountGroupMembershipsResponse{}
+ if pageToken != "" {
+ req.PageToken = pageToken
+ }
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else if pageSize != 0 {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.ListRelatedAccountGroupMemberships(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+
+ it.Response = resp
+ return resp.GetRelatedAccountGroupMemberships(), resp.GetNextPageToken(), 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.GetPageSize())
+ it.pageInfo.Token = req.GetPageToken()
+
+ return it
+}
+
+func (c *gRPCClient) SearchRelatedAccountGroupMemberships(ctx context.Context, req *recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsRequest, opts ...gax.CallOption) *RelatedAccountGroupMembershipIterator {
+ 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).SearchRelatedAccountGroupMemberships[0:len((*c.CallOptions).SearchRelatedAccountGroupMemberships):len((*c.CallOptions).SearchRelatedAccountGroupMemberships)], opts...)
+ it := &RelatedAccountGroupMembershipIterator{}
+ req = proto.Clone(req).(*recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsRequest)
+ it.InternalFetch = func(pageSize int, pageToken string) ([]*recaptchaenterprisepb.RelatedAccountGroupMembership, string, error) {
+ resp := &recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsResponse{}
+ if pageToken != "" {
+ req.PageToken = pageToken
+ }
+ if pageSize > math.MaxInt32 {
+ req.PageSize = math.MaxInt32
+ } else if pageSize != 0 {
+ req.PageSize = int32(pageSize)
+ }
+ err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
+ var err error
+ resp, err = c.client.SearchRelatedAccountGroupMemberships(ctx, req, settings.GRPC...)
+ return err
+ }, opts...)
+ if err != nil {
+ return nil, "", err
+ }
+
+ it.Response = resp
+ return resp.GetRelatedAccountGroupMemberships(), resp.GetNextPageToken(), 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.GetPageSize())
+ it.pageInfo.Token = req.GetPageToken()
+
+ return it
+}
+
// KeyIterator manages a stream of *recaptchaenterprisepb.Key.
type KeyIterator struct {
items []*recaptchaenterprisepb.Key
@@ -502,3 +658,97 @@
it.items = nil
return b
}
+
+// RelatedAccountGroupIterator manages a stream of *recaptchaenterprisepb.RelatedAccountGroup.
+type RelatedAccountGroupIterator struct {
+ items []*recaptchaenterprisepb.RelatedAccountGroup
+ 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 []*recaptchaenterprisepb.RelatedAccountGroup, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *RelatedAccountGroupIterator) 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 *RelatedAccountGroupIterator) Next() (*recaptchaenterprisepb.RelatedAccountGroup, error) {
+ var item *recaptchaenterprisepb.RelatedAccountGroup
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *RelatedAccountGroupIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *RelatedAccountGroupIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
+
+// RelatedAccountGroupMembershipIterator manages a stream of *recaptchaenterprisepb.RelatedAccountGroupMembership.
+type RelatedAccountGroupMembershipIterator struct {
+ items []*recaptchaenterprisepb.RelatedAccountGroupMembership
+ 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 []*recaptchaenterprisepb.RelatedAccountGroupMembership, nextPageToken string, err error)
+}
+
+// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
+func (it *RelatedAccountGroupMembershipIterator) 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 *RelatedAccountGroupMembershipIterator) Next() (*recaptchaenterprisepb.RelatedAccountGroupMembership, error) {
+ var item *recaptchaenterprisepb.RelatedAccountGroupMembership
+ if err := it.nextFunc(); err != nil {
+ return item, err
+ }
+ item = it.items[0]
+ it.items = it.items[1:]
+ return item, nil
+}
+
+func (it *RelatedAccountGroupMembershipIterator) bufLen() int {
+ return len(it.items)
+}
+
+func (it *RelatedAccountGroupMembershipIterator) takeBuf() interface{} {
+ b := it.items
+ it.items = nil
+ return b
+}
diff --git a/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_test.go b/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_test.go
index 4ebbf8f..ff7c94f 100644
--- a/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_test.go
+++ b/recaptchaenterprise/apiv1/recaptcha_enterprise_client_example_test.go
@@ -219,3 +219,81 @@
// TODO: Use resp.
_ = resp
}
+
+func ExampleClient_ListRelatedAccountGroups() {
+ ctx := context.Background()
+ c, err := recaptchaenterprise.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ defer c.Close()
+
+ req := &recaptchaenterprisepb.ListRelatedAccountGroupsRequest{
+ // TODO: Fill request struct fields.
+ // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1#ListRelatedAccountGroupsRequest.
+ }
+ it := c.ListRelatedAccountGroups(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleClient_ListRelatedAccountGroupMemberships() {
+ ctx := context.Background()
+ c, err := recaptchaenterprise.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ defer c.Close()
+
+ req := &recaptchaenterprisepb.ListRelatedAccountGroupMembershipsRequest{
+ // TODO: Fill request struct fields.
+ // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1#ListRelatedAccountGroupMembershipsRequest.
+ }
+ it := c.ListRelatedAccountGroupMemberships(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
+
+func ExampleClient_SearchRelatedAccountGroupMemberships() {
+ ctx := context.Background()
+ c, err := recaptchaenterprise.NewClient(ctx)
+ if err != nil {
+ // TODO: Handle error.
+ }
+ defer c.Close()
+
+ req := &recaptchaenterprisepb.SearchRelatedAccountGroupMembershipsRequest{
+ // TODO: Fill request struct fields.
+ // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/recaptchaenterprise/v1#SearchRelatedAccountGroupMembershipsRequest.
+ }
+ it := c.SearchRelatedAccountGroupMemberships(ctx, req)
+ for {
+ resp, err := it.Next()
+ if err == iterator.Done {
+ break
+ }
+ if err != nil {
+ // TODO: Handle error.
+ }
+ // TODO: Use resp.
+ _ = resp
+ }
+}
diff --git a/recaptchaenterprise/go.mod b/recaptchaenterprise/go.mod
index b991492..eb583bd 100644
--- a/recaptchaenterprise/go.mod
+++ b/recaptchaenterprise/go.mod
@@ -6,7 +6,7 @@
github.com/golang/protobuf v1.5.2
github.com/googleapis/gax-go/v2 v2.1.1
google.golang.org/api v0.60.0
- google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
+ google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
)
diff --git a/recaptchaenterprise/go.sum b/recaptchaenterprise/go.sum
index 4a0ee7c..42511d2 100644
--- a/recaptchaenterprise/go.sum
+++ b/recaptchaenterprise/go.sum
@@ -503,8 +503,8 @@
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c h1:UQDUEuW1R2dcciOjiFmuzE4skW4n/zGGNMU0RhU3hQI=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
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/recommender/apiv1/doc.go b/recommender/apiv1/doc.go
index 4aa8bd3..a1a75be 100644
--- a/recommender/apiv1/doc.go
+++ b/recommender/apiv1/doc.go
@@ -88,7 +88,7 @@
type clientHookParams struct{}
type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error)
-const versionClient = "20211030"
+const versionClient = "20211102"
func insertMetadata(ctx context.Context, mds ...metadata.MD) context.Context {
out, _ := metadata.FromOutgoingContext(ctx)
diff --git a/recommender/go.mod b/recommender/go.mod
index cb112ff..0e8ff22 100644
--- a/recommender/go.mod
+++ b/recommender/go.mod
@@ -6,7 +6,7 @@
github.com/golang/protobuf v1.5.2
github.com/googleapis/gax-go/v2 v2.1.1
google.golang.org/api v0.60.0
- google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145
+ google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
)
diff --git a/recommender/go.sum b/recommender/go.sum
index 4a0ee7c..42511d2 100644
--- a/recommender/go.sum
+++ b/recommender/go.sum
@@ -503,8 +503,8 @@
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145 h1:vum3nDKdleYb+aePXKFEDT2+ghuH00EgYp9B7Q7EZZE=
-google.golang.org/genproto v0.0.0-20211101144312-62acf1d99145/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c h1:UQDUEuW1R2dcciOjiFmuzE4skW4n/zGGNMU0RhU3hQI=
+google.golang.org/genproto v0.0.0-20211102202547-e9cf271f7f2c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
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=