diff --git a/go.mod b/go.mod index 196f56d8288a2..c6983f8ba6148 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.0 toolchain go1.23.1 require ( - cloud.google.com/go/bigtable v1.34.0 + cloud.google.com/go/bigtable v1.35.0 cloud.google.com/go/pubsub v1.45.3 cloud.google.com/go/storage v1.50.0 dario.cat/mergo v1.0.1 @@ -203,10 +203,10 @@ require ( ) require ( - cloud.google.com/go v0.117.0 // indirect + cloud.google.com/go v0.118.0 // indirect cloud.google.com/go/compute/metadata v0.6.0 // indirect - cloud.google.com/go/iam v1.2.2 // indirect - cloud.google.com/go/longrunning v0.6.2 // indirect + cloud.google.com/go/iam v1.3.1 // indirect + cloud.google.com/go/longrunning v0.6.4 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.16.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect @@ -371,8 +371,8 @@ require ( golang.org/x/mod v0.22.0 // indirect golang.org/x/term v0.28.0 // indirect golang.org/x/tools v0.28.0 // indirect - google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d // indirect + google.golang.org/genproto v0.0.0-20241216192217-9240e9c98484 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index d52d76c74db90..bb6ba21689599 100644 --- a/go.sum +++ b/go.sum @@ -15,8 +15,8 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.117.0 h1:Z5TNFfQxj7WG2FgOGX1ekC5RiXrYgms6QscOm32M/4s= -cloud.google.com/go v0.117.0/go.mod h1:ZbwhVTb1DBGt2Iwb3tNO6SEK4q+cplHZmLWH+DelYYc= +cloud.google.com/go v0.118.0 h1:tvZe1mgqRxpiVa3XlIGMiPcEUbP1gNXELgD4y/IXmeQ= +cloud.google.com/go v0.118.0/go.mod h1:zIt2pkedt/mo+DQjcT4/L3NDxzHPR29j5HcclNH+9PM= cloud.google.com/go/auth v0.14.0 h1:A5C4dKV/Spdvxcl0ggWwWEzzP7AZMJSEIgrkngwhGYM= cloud.google.com/go/auth v0.14.0/go.mod h1:CYsoRL1PdiDuqeQpZE0bP2pnPrGqFcOkI0nldEQis+A= cloud.google.com/go/auth/oauth2adapt v0.2.7 h1:/Lc7xODdqcEw8IrZ9SvwnlLX6j9FHQM74z6cBk9Rw6M= @@ -27,20 +27,20 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/bigtable v1.34.0 h1:eIgi3QLcN4aq8p6n9U/zPgmHeBP34sm9FiKq4ik/ZoY= -cloud.google.com/go/bigtable v1.34.0/go.mod h1:p94uLf6cy6D73POkudMagaFF3x9c7ktZjRnOUVGjZAw= +cloud.google.com/go/bigtable v1.35.0 h1:UEacPwaejN2mNbz67i1Iy3G812rxtgcs6ePj1TAg7dw= +cloud.google.com/go/bigtable v1.35.0/go.mod h1:EabtwwmTcOJFXp+oMZAT/jZkyDIjNwrv53TrS4DGrrM= cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I= cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v1.2.2 h1:ozUSofHUGf/F4tCNy/mu9tHLTaxZFLOUiKzjcgWHGIA= -cloud.google.com/go/iam v1.2.2/go.mod h1:0Ys8ccaZHdI1dEUilwzqng/6ps2YB6vRsjIe00/+6JY= -cloud.google.com/go/kms v1.20.1 h1:og29Wv59uf2FVaZlesaiDAqHFzHaoUyHI3HYp9VUHVg= -cloud.google.com/go/kms v1.20.1/go.mod h1:LywpNiVCvzYNJWS9JUcGJSVTNSwPwi0vBAotzDqn2nc= +cloud.google.com/go/iam v1.3.1 h1:KFf8SaT71yYq+sQtRISn90Gyhyf4X8RGgeAVC8XGf3E= +cloud.google.com/go/iam v1.3.1/go.mod h1:3wMtuyT4NcbnYNPLMBzYRFiEfjKfJlLVLrisE7bwm34= +cloud.google.com/go/kms v1.20.2 h1:NGTHOxAyhDVUGVU5KngeyGScrg2D39X76Aphe6NC7S0= +cloud.google.com/go/kms v1.20.2/go.mod h1:LywpNiVCvzYNJWS9JUcGJSVTNSwPwi0vBAotzDqn2nc= cloud.google.com/go/logging v1.12.0 h1:ex1igYcGFd4S/RZWOCU51StlIEuey5bjqwH9ZYjHibk= cloud.google.com/go/logging v1.12.0/go.mod h1:wwYBt5HlYP1InnrtYI0wtwttpVU1rifnMT7RejksUAM= -cloud.google.com/go/longrunning v0.6.2 h1:xjDfh1pQcWPEvnfjZmwjKQEcHnpz6lHjfy7Fo0MK+hc= -cloud.google.com/go/longrunning v0.6.2/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= +cloud.google.com/go/longrunning v0.6.4 h1:3tyw9rO3E2XVXzSApn1gyEEnH2K9SynNQjMlBi3uHLg= +cloud.google.com/go/longrunning v0.6.4/go.mod h1:ttZpLCe6e7EXvn9OxpBRx7kZEB0efv8yBO6YnVMfhJs= cloud.google.com/go/monitoring v1.22.1 h1:KQbnAC4IAH+5x3iWuPZT5iN9VXqKMzzOgqcYB6fqPDE= cloud.google.com/go/monitoring v1.22.1/go.mod h1:AuZZXAoN0WWWfsSvET1Cpc4/1D8LXq8KRDU87fMS6XY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -1611,10 +1611,10 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= -google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d h1:H8tOf8XM88HvKqLTxe755haY6r1fqqzLbEnfrmLXlSA= -google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d/go.mod h1:2v7Z7gP2ZUOGsaFyxATQSRoBnKygqVq2Cwnvom7QiqY= +google.golang.org/genproto v0.0.0-20241216192217-9240e9c98484 h1:a/U5otbGrI6mYIO598WriFB1172i6Ktr6FGcatZD3Yw= +google.golang.org/genproto v0.0.0-20241216192217-9240e9c98484/go.mod h1:Gmd/M/W9fEyf6VSu/mWLnl+9Be51B9CLdxdsKokYq7Y= +google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1:gap6+3Gk41EItBuyi4XX/bp4oqJ3UwuIMl25yGinuAA= +google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= google.golang.org/grpc v1.12.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= diff --git a/vendor/cloud.google.com/go/.release-please-manifest-individual.json b/vendor/cloud.google.com/go/.release-please-manifest-individual.json index 0c4dc6cb5d918..f7c0ab189278d 100644 --- a/vendor/cloud.google.com/go/.release-please-manifest-individual.json +++ b/vendor/cloud.google.com/go/.release-please-manifest-individual.json @@ -6,11 +6,11 @@ "datastore": "1.20.0", "errorreporting": "0.3.2", "firestore": "1.17.0", - "logging": "1.12.0", + "logging": "1.13.0", "profiler": "0.4.2", "pubsub": "1.45.3", "pubsublite": "1.8.2", "spanner": "1.73.0", - "storage": "1.48.0", - "vertexai": "0.13.2" + "storage": "1.49.0", + "vertexai": "0.13.3" } diff --git a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json index b70366d86907e..0c8cc178b7419 100644 --- a/vendor/cloud.google.com/go/.release-please-manifest-submodules.json +++ b/vendor/cloud.google.com/go/.release-please-manifest-submodules.json @@ -39,10 +39,10 @@ "compute/metadata": "0.6.0", "confidentialcomputing": "1.8.0", "config": "1.2.0", - "contactcenterinsights": "1.16.0", + "contactcenterinsights": "1.17.0", "container": "1.42.0", "containeranalysis": "0.13.2", - "datacatalog": "1.24.0", + "datacatalog": "1.24.1", "dataflow": "0.10.2", "dataform": "0.10.2", "datafusion": "1.8.2", @@ -53,7 +53,7 @@ "datastream": "1.12.0", "deploy": "1.26.0", "developerconnect": "0.3.0", - "dialogflow": "1.63.0", + "dialogflow": "1.64.0", "discoveryengine": "1.16.0", "dlp": "1.20.0", "documentai": "1.35.0", @@ -75,7 +75,7 @@ "identitytoolkit": "0.2.2", "ids": "1.5.2", "iot": "1.8.2", - "kms": "1.20.2", + "kms": "1.20.3", "language": "1.14.2", "lifesciences": "0.10.2", "longrunning": "0.6.3", @@ -84,6 +84,7 @@ "maps": "1.17.0", "mediatranslation": "0.9.2", "memcache": "1.11.2", + "memorystore": "0.1.0", "metastore": "1.14.2", "migrationcenter": "1.1.2", "monitoring": "1.22.0", @@ -127,10 +128,10 @@ "servicemanagement": "1.10.2", "serviceusage": "1.9.2", "shell": "1.8.2", - "shopping": "0.13.0", + "shopping": "0.14.0", "speech": "1.25.2", "storageinsights": "1.1.2", - "storagetransfer": "1.11.2", + "storagetransfer": "1.12.0", "streetview": "0.2.2", "support": "1.1.2", "talent": "1.7.2", diff --git a/vendor/cloud.google.com/go/.release-please-manifest.json b/vendor/cloud.google.com/go/.release-please-manifest.json index 3200815ccadaf..87c6277740c6f 100644 --- a/vendor/cloud.google.com/go/.release-please-manifest.json +++ b/vendor/cloud.google.com/go/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.117.0" + ".": "0.118.0" } diff --git a/vendor/cloud.google.com/go/CHANGES.md b/vendor/cloud.google.com/go/CHANGES.md index c8d214a8e30b1..74c920023e3bd 100644 --- a/vendor/cloud.google.com/go/CHANGES.md +++ b/vendor/cloud.google.com/go/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [0.118.0](https://github.com/googleapis/google-cloud-go/compare/v0.117.0...v0.118.0) (2025-01-02) + + +### Features + +* **civil:** Add AddMonths, AddYears and Weekday methods to Date ([#11340](https://github.com/googleapis/google-cloud-go/issues/11340)) ([d45f1a0](https://github.com/googleapis/google-cloud-go/commit/d45f1a01ebff868418aa14fe762ef7d1334f797d)) + ## [0.117.0](https://github.com/googleapis/google-cloud-go/compare/v0.116.0...v0.117.0) (2024-12-16) diff --git a/vendor/cloud.google.com/go/bigtable/CHANGES.md b/vendor/cloud.google.com/go/bigtable/CHANGES.md index f66ddcd063614..3d7b9735fc87e 100644 --- a/vendor/cloud.google.com/go/bigtable/CHANGES.md +++ b/vendor/cloud.google.com/go/bigtable/CHANGES.md @@ -1,5 +1,21 @@ # Changes +## [1.35.0](https://github.com/googleapis/google-cloud-go/compare/bigtable/v1.34.0...bigtable/v1.35.0) (2025-01-22) + + +### Features + +* **bigtable:** Hot backups ([#11215](https://github.com/googleapis/google-cloud-go/issues/11215)) ([238ac1c](https://github.com/googleapis/google-cloud-go/commit/238ac1c37978b7ccdd72af453416308c511dd493)) + + +### Bug Fixes + +* **bigtable:** Allow nil condition in conditional mutation ([#11457](https://github.com/googleapis/google-cloud-go/issues/11457)) ([d83bc05](https://github.com/googleapis/google-cloud-go/commit/d83bc05219223027cfaa3fba127c2f03eb554c53)) +* **bigtable:** Do not retry conditional mutate ([#11437](https://github.com/googleapis/google-cloud-go/issues/11437)) ([ce8c9b1](https://github.com/googleapis/google-cloud-go/commit/ce8c9b1e5523646175b9650265928386143259fd)) +* **bigtable:** Mutate groups even after first error ([#11434](https://github.com/googleapis/google-cloud-go/issues/11434)) ([6ffe32b](https://github.com/googleapis/google-cloud-go/commit/6ffe32b76e7228d99e12eeba60a5e719f2d3e5e3)) +* **bigtable:** Retry correct mutations ([#11388](https://github.com/googleapis/google-cloud-go/issues/11388)) ([ca2c4e3](https://github.com/googleapis/google-cloud-go/commit/ca2c4e334f07e7f8f0e276db922122d47262dabf)) +* **bigtable:** Track number of readrows to set rowsLimit in subsequent requests ([#10213](https://github.com/googleapis/google-cloud-go/issues/10213)) ([abb615e](https://github.com/googleapis/google-cloud-go/commit/abb615e240e612540b24b03d95835058045275fc)) + ## [1.34.0](https://github.com/googleapis/google-cloud-go/compare/bigtable/v1.33.0...bigtable/v1.34.0) (2025-01-02) diff --git a/vendor/cloud.google.com/go/bigtable/admin.go b/vendor/cloud.google.com/go/bigtable/admin.go index 69f57f0efa7b8..a9737946eb1db 100644 --- a/vendor/cloud.google.com/go/bigtable/admin.go +++ b/vendor/cloud.google.com/go/bigtable/admin.go @@ -47,6 +47,8 @@ import ( const adminAddr = "bigtableadmin.googleapis.com:443" const mtlsAdminAddr = "bigtableadmin.mtls.googleapis.com:443" +var errExpiryMissing = errors.New("WithExpiry is a required option") + // ErrPartiallyUnavailable is returned when some locations (clusters) are // unavailable. Both partial results (retrieved from available locations) // and the error are returned when this exception occurred. @@ -2150,13 +2152,68 @@ func (ac *AdminClient) RestoreTableFrom(ctx context.Context, sourceInstance, tab return longrunning.InternalNewOperation(ac.lroClient, op).Wait(ctx, &resp) } +type backupOptions struct { + backupType *BackupType + hotToStandardTime *time.Time + expireTime *time.Time +} + +// BackupOption can be used to specify parameters for backup operations. +type BackupOption func(*backupOptions) + +// WithHotToStandardBackup option can be used to create backup with +// type [BackupTypeHot] and specify time at which the hot backup will be +// converted to a standard backup. Once the 'hotToStandardTime' has passed, +// Cloud Bigtable will convert the hot backup to a standard backup. +// This value must be greater than the backup creation time by at least 24 hours +func WithHotToStandardBackup(hotToStandardTime time.Time) BackupOption { + return func(bo *backupOptions) { + btHot := BackupTypeHot + bo.backupType = &btHot + bo.hotToStandardTime = &hotToStandardTime + } +} + +// WithExpiry option can be used to create backup +// that expires after time 'expireTime'. +// Once the 'expireTime' has passed, Cloud Bigtable will delete the backup. +func WithExpiry(expireTime time.Time) BackupOption { + return func(bo *backupOptions) { + bo.expireTime = &expireTime + } +} + +// WithHotBackup option can be used to create backup +// with type [BackupTypeHot] +func WithHotBackup() BackupOption { + return func(bo *backupOptions) { + btHot := BackupTypeHot + bo.backupType = &btHot + } +} + // CreateBackup creates a new backup in the specified cluster from the // specified source table with the user-provided expire time. func (ac *AdminClient) CreateBackup(ctx context.Context, table, cluster, backup string, expireTime time.Time) error { + return ac.CreateBackupWithOptions(ctx, table, cluster, backup, WithExpiry(expireTime)) +} + +// CreateBackupWithOptions is similar to CreateBackup but lets the user specify additional options. +func (ac *AdminClient) CreateBackupWithOptions(ctx context.Context, table, cluster, backup string, opts ...BackupOption) error { ctx = mergeOutgoingMetadata(ctx, ac.md) prefix := ac.instancePrefix() - parsedExpireTime := timestamppb.New(expireTime) + o := backupOptions{} + for _, opt := range opts { + if opt != nil { + opt(&o) + } + } + + if o.expireTime == nil { + return errExpiryMissing + } + parsedExpireTime := timestamppb.New(*o.expireTime) req := &btapb.CreateBackupRequest{ Parent: prefix + "/clusters/" + cluster, @@ -2167,6 +2224,12 @@ func (ac *AdminClient) CreateBackup(ctx context.Context, table, cluster, backup }, } + if o.backupType != nil { + req.Backup.BackupType = btapb.Backup_BackupType(*o.backupType) + } + if o.hotToStandardTime != nil { + req.Backup.HotToStandardTime = timestamppb.New(*o.hotToStandardTime) + } op, err := ac.tClient.CreateBackup(ctx, req) if err != nil { return err @@ -2263,17 +2326,29 @@ func newBackupInfo(backup *btapb.Backup) (*BackupInfo, error) { return nil, fmt.Errorf("invalid expireTime: %v", err) } expireTime := backup.GetExpireTime().AsTime() + + var htsTimePtr *time.Time + if backup.GetHotToStandardTime() != nil { + if err := backup.GetHotToStandardTime().CheckValid(); err != nil { + return nil, fmt.Errorf("invalid HotToStandardTime: %v", err) + } + htsTime := backup.GetHotToStandardTime().AsTime() + htsTimePtr = &htsTime + } + encryptionInfo := newEncryptionInfo(backup.EncryptionInfo) bi := BackupInfo{ - Name: name, - SourceTable: tableID, - SourceBackup: backup.SourceBackup, - SizeBytes: backup.SizeBytes, - StartTime: startTime, - EndTime: endTime, - ExpireTime: expireTime, - State: backup.State.String(), - EncryptionInfo: encryptionInfo, + Name: name, + SourceTable: tableID, + SourceBackup: backup.SourceBackup, + SizeBytes: backup.SizeBytes, + StartTime: startTime, + EndTime: endTime, + ExpireTime: expireTime, + State: backup.State.String(), + EncryptionInfo: encryptionInfo, + BackupType: BackupType(backup.GetBackupType()), + HotToStandardTime: htsTimePtr, } return &bi, nil @@ -2303,6 +2378,25 @@ func (it *BackupIterator) Next() (*BackupInfo, error) { return item, nil } +// BackupType denotes the type of the backup. +type BackupType int32 + +const ( + // BackupTypeUnspecified denotes that backup type has not been specified. + BackupTypeUnspecified BackupType = 0 + + // BackupTypeStandard is the default type for Cloud Bigtable managed backups. Supported for + // backups created in both HDD and SSD instances. Requires optimization when + // restored to a table in an SSD instance. + BackupTypeStandard BackupType = 1 + + // BackupTypeHot is a backup type with faster restore to SSD performance. Only supported for + // backups created in SSD instances. A new SSD table restored from a hot + // backup reaches production performance more quickly than a standard + // backup. + BackupTypeHot BackupType = 2 +) + // BackupInfo contains backup metadata. This struct is read-only. type BackupInfo struct { Name string @@ -2314,6 +2408,15 @@ type BackupInfo struct { ExpireTime time.Time State string EncryptionInfo *EncryptionInfo + BackupType BackupType + + // The time at which the hot backup will be converted to a standard backup. + // Once the `hot_to_standard_time` has passed, Cloud Bigtable will convert the + // hot backup to a standard backup. This value must be greater than the backup + // creation time by at least 24 hours + // + // This field only applies for hot backups. + HotToStandardTime *time.Time } // BackupInfo gets backup metadata. @@ -2371,6 +2474,38 @@ func (ac *AdminClient) UpdateBackup(ctx context.Context, cluster, backup string, return err } +// UpdateBackupHotToStandardTime updates the HotToStandardTime of a hot backup. +func (ac *AdminClient) UpdateBackupHotToStandardTime(ctx context.Context, cluster, backup string, hotToStandardTime time.Time) error { + return ac.updateBackupHotToStandardTime(ctx, cluster, backup, &hotToStandardTime) +} + +// UpdateBackupRemoveHotToStandardTime removes the HotToStandardTime of a hot backup. +func (ac *AdminClient) UpdateBackupRemoveHotToStandardTime(ctx context.Context, cluster, backup string) error { + return ac.updateBackupHotToStandardTime(ctx, cluster, backup, nil) +} + +func (ac *AdminClient) updateBackupHotToStandardTime(ctx context.Context, cluster, backup string, hotToStandardTime *time.Time) error { + ctx = mergeOutgoingMetadata(ctx, ac.md) + backupPath := ac.backupPath(cluster, ac.instance, backup) + + updateMask := &field_mask.FieldMask{} + updateMask.Paths = append(updateMask.Paths, "hot_to_standard_time") + + req := &btapb.UpdateBackupRequest{ + Backup: &btapb.Backup{ + Name: backupPath, + }, + UpdateMask: updateMask, + } + + if hotToStandardTime != nil { + req.Backup.HotToStandardTime = timestamppb.New(*hotToStandardTime) + } + + _, err := ac.tClient.UpdateBackup(ctx, req) + return err +} + // AuthorizedViewConf contains information about an authorized view. type AuthorizedViewConf struct { TableID string diff --git a/vendor/cloud.google.com/go/bigtable/bigtable.go b/vendor/cloud.google.com/go/bigtable/bigtable.go index 0748672a597e5..89685d6c43a4a 100644 --- a/vendor/cloud.google.com/go/bigtable/bigtable.go +++ b/vendor/cloud.google.com/go/bigtable/bigtable.go @@ -53,6 +53,8 @@ const prodAddr = "bigtable.googleapis.com:443" const mtlsProdAddr = "bigtable.mtls.googleapis.com:443" const featureFlagsHeaderKey = "bigtable-features" +var errNegativeRowLimit = errors.New("bigtable: row limit cannot be negative") + // Client is a client for reading and writing data to tables in an instance. // // A Client is safe to use concurrently, except for its Close method. @@ -391,7 +393,25 @@ func (t *Table) ReadRows(ctx context.Context, arg RowSet, f func(Row) bool, opts func (t *Table) readRows(ctx context.Context, arg RowSet, f func(Row) bool, mt *builtinMetricsTracer, opts ...ReadOption) (err error) { var prevRowKey string attrMap := make(map[string]interface{}) + + numRowsRead := int64(0) + rowLimitSet := false + intialRowLimit := int64(0) + for _, opt := range opts { + if l, ok := opt.(limitRows); ok { + rowLimitSet = true + intialRowLimit = l.limit + } + } + if intialRowLimit < 0 { + return errNegativeRowLimit + } + err = gaxInvokeWithRecorder(ctx, mt, "ReadRows", func(ctx context.Context, headerMD, trailerMD *metadata.MD, _ gax.CallSettings) error { + if rowLimitSet && numRowsRead >= intialRowLimit { + return nil + } + req := &btpb.ReadRowsRequest{ AppProfileId: t.c.appProfile, } @@ -410,7 +430,7 @@ func (t *Table) readRows(ctx context.Context, arg RowSet, f func(Row) bool, mt * } req.Rows = arg.proto() } - settings := makeReadSettings(req) + settings := makeReadSettings(req, numRowsRead) for _, opt := range opts { opt.set(&settings) } @@ -473,7 +493,9 @@ func (t *Table) readRows(ctx context.Context, arg RowSet, f func(Row) bool, mt * continue } prevRowKey = row.Key() - if !f(row) { + continueReading := f(row) + numRowsRead++ + if !continueReading { // Cancel and drain stream. cancel() for { @@ -939,14 +961,16 @@ type FullReadStatsFunc func(*FullReadStats) type readSettings struct { req *btpb.ReadRowsRequest fullReadStatsFunc FullReadStatsFunc + numRowsRead int64 } -func makeReadSettings(req *btpb.ReadRowsRequest) readSettings { - return readSettings{req, nil} +func makeReadSettings(req *btpb.ReadRowsRequest, numRowsRead int64) readSettings { + return readSettings{req, nil, numRowsRead} } // A ReadOption is an optional argument to ReadRows. type ReadOption interface { + // set modifies the request stored in the settings set(settings *readSettings) } @@ -965,7 +989,11 @@ func LimitRows(limit int64) ReadOption { return limitRows{limit} } type limitRows struct{ limit int64 } -func (lr limitRows) set(settings *readSettings) { settings.req.RowsLimit = lr.limit } +func (lr limitRows) set(settings *readSettings) { + // Since 'numRowsRead' out of 'limit' requested rows have already been read, + // the subsequest requests should fetch only the remaining rows. + settings.req.RowsLimit = lr.limit - settings.numRowsRead +} // WithFullReadStats returns a ReadOption that will request FullReadStats // and invoke the given callback on the resulting FullReadStats. @@ -1013,7 +1041,8 @@ func mutationsAreRetryable(muts []*btpb.Mutation) bool { return true } -const maxMutations = 100000 +// Overriden in tests +var maxMutations = 100000 // Apply mutates a row atomically. A mutation must contain at least one // operation and at most 100000 operations. @@ -1038,7 +1067,7 @@ func (t *Table) apply(ctx context.Context, mt *builtinMetricsTracer, row string, } var callOptions []gax.CallOption - if m.cond == nil { + if !m.isConditional { req := &btpb.MutateRowRequest{ AppProfileId: t.c.appProfile, RowKey: []byte(row), @@ -1065,9 +1094,11 @@ func (t *Table) apply(ctx context.Context, mt *builtinMetricsTracer, row string, } req := &btpb.CheckAndMutateRowRequest{ - AppProfileId: t.c.appProfile, - RowKey: []byte(row), - PredicateFilter: m.cond.proto(), + AppProfileId: t.c.appProfile, + RowKey: []byte(row), + } + if m.cond != nil { + req.PredicateFilter = m.cond.proto() } if t.authorizedView == "" { req.TableName = t.c.fullTableName(t.table) @@ -1086,15 +1117,12 @@ func (t *Table) apply(ctx context.Context, mt *builtinMetricsTracer, row string, } req.FalseMutations = m.mfalse.ops } - if mutationsAreRetryable(req.TrueMutations) && mutationsAreRetryable(req.FalseMutations) { - callOptions = retryOptions - } var cmRes *btpb.CheckAndMutateRowResponse err = gaxInvokeWithRecorder(ctx, mt, "CheckAndMutateRow", func(ctx context.Context, headerMD, trailerMD *metadata.MD, _ gax.CallSettings) error { var err error cmRes, err = t.c.client.CheckAndMutateRow(ctx, req, grpc.Header(headerMD), grpc.Trailer(trailerMD)) return err - }, callOptions...) + }) if err == nil { after(cmRes) } @@ -1122,10 +1150,10 @@ func GetCondMutationResult(matched *bool) ApplyOption { // Mutation represents a set of changes for a single row of a table. type Mutation struct { - ops []*btpb.Mutation - + ops []*btpb.Mutation + cond Filter // for conditional mutations - cond Filter + isConditional bool mtrue, mfalse *Mutation } @@ -1143,7 +1171,7 @@ func NewMutation() *Mutation { // The application of a ReadModifyWrite is atomic; concurrent ReadModifyWrites will // be executed serially by the server. func NewCondMutation(cond Filter, mtrue, mfalse *Mutation) *Mutation { - return &Mutation{cond: cond, mtrue: mtrue, mfalse: mfalse} + return &Mutation{cond: cond, mtrue: mtrue, mfalse: mfalse, isConditional: true} } // Set sets a value in a specified column, with the given timestamp. @@ -1227,9 +1255,14 @@ func (m *Mutation) mergeToCell(family, column string, ts Timestamp, value *btpb. type entryErr struct { Entry *btpb.MutateRowsRequest_Entry Err error + + // TopLevelErr is the error received either from + // 1. client.MutateRows + // 2. stream.Recv + TopLevelErr error } -// ApplyBulk applies multiple Mutations, up to a maximum of 100,000. +// ApplyBulk applies multiple Mutations. // Each mutation is individually applied atomically, // but the set of mutations may be applied in any order. // @@ -1251,23 +1284,37 @@ func (t *Table) ApplyBulk(ctx context.Context, rowKeys []string, muts []*Mutatio origEntries := make([]*entryErr, len(rowKeys)) for i, key := range rowKeys { mut := muts[i] - if mut.cond != nil { + if mut.isConditional { return nil, errors.New("conditional mutations cannot be applied in bulk") } origEntries[i] = &entryErr{Entry: &btpb.MutateRowsRequest_Entry{RowKey: []byte(key), Mutations: mut.ops}} } - for _, group := range groupEntries(origEntries, maxMutations) { + var firstGroupErr error + numFailed := 0 + groups := groupEntries(origEntries, maxMutations) + for _, group := range groups { err := t.applyGroup(ctx, group, opts...) if err != nil { - return nil, err + if firstGroupErr == nil { + firstGroupErr = err + } + numFailed++ } } + if numFailed == len(groups) { + return nil, firstGroupErr + } + // All the errors are accumulated into an array and returned, interspersed with nils for successful // entries. The absence of any errors means we should return nil. var foundErr bool for _, entry := range origEntries { + if entry.Err == nil && entry.TopLevelErr != nil { + // Populate per mutation error if top level error is not nil + entry.Err = entry.TopLevelErr + } if entry.Err != nil { foundErr = true } @@ -1292,6 +1339,7 @@ func (t *Table) applyGroup(ctx context.Context, group []*entryErr, opts ...Apply // We want to retry the entire request with the current group return err } + // Get the entries that need to be retried group = t.getApplyBulkRetries(group) if len(group) > 0 && len(idempotentRetryCodes) > 0 { // We have at least one mutation that needs to be retried. @@ -1327,6 +1375,11 @@ func (t *Table) doApplyBulk(ctx context.Context, entryErrs []*entryErr, headerMD } } + var topLevelErr error + defer func() { + populateTopLevelError(entryErrs, topLevelErr) + }() + entries := make([]*btpb.MutateRowsRequest_Entry, len(entryErrs)) for i, entryErr := range entryErrs { entries[i] = entryErr.Entry @@ -1343,6 +1396,7 @@ func (t *Table) doApplyBulk(ctx context.Context, entryErrs []*entryErr, headerMD stream, err := t.c.client.MutateRows(ctx, req) if err != nil { + _, topLevelErr = convertToGrpcStatusErr(err) return err } @@ -1357,15 +1411,16 @@ func (t *Table) doApplyBulk(ctx context.Context, entryErrs []*entryErr, headerMD } if err != nil { *trailerMD = stream.Trailer() + _, topLevelErr = convertToGrpcStatusErr(err) return err } - for i, entry := range res.Entries { + for _, entry := range res.Entries { s := entry.Status if s.Code == int32(codes.OK) { - entryErrs[i].Err = nil + entryErrs[entry.Index].Err = nil } else { - entryErrs[i].Err = status.Errorf(codes.Code(s.Code), s.Message) + entryErrs[entry.Index].Err = status.Errorf(codes.Code(s.Code), s.Message) } } after(res) @@ -1373,6 +1428,12 @@ func (t *Table) doApplyBulk(ctx context.Context, entryErrs []*entryErr, headerMD return nil } +func populateTopLevelError(entries []*entryErr, topLevelErr error) { + for _, entry := range entries { + entry.TopLevelErr = topLevelErr + } +} + // groupEntries groups entries into groups of a specified size without breaking up // individual entries. func groupEntries(entries []*entryErr, maxSize int) [][]*entryErr { diff --git a/vendor/cloud.google.com/go/bigtable/conformance_test.sh b/vendor/cloud.google.com/go/bigtable/conformance_test.sh index d380758315fc5..77c037741b41b 100644 --- a/vendor/cloud.google.com/go/bigtable/conformance_test.sh +++ b/vendor/cloud.google.com/go/bigtable/conformance_test.sh @@ -53,7 +53,8 @@ cd $conformanceTestsHome # Tests in https://github.com/googleapis/cloud-bigtable-clients-test/tree/main/tests can only be run on go1.22.7 go install golang.org/dl/go1.22.7@latest go1.22.7 download -go1.22.7 test -v -proxy_addr=:$testProxyPort | tee -a $sponge_log +# known_failures.txt contains tests for the unimplemented features +eval "go1.22.7 test -v -proxy_addr=:$testProxyPort -skip `tr -d '\n' < $testProxyHome/known_failures.txt` | tee -a $sponge_log" RETURN_CODE=$? echo "exiting with ${RETURN_CODE}" diff --git a/vendor/cloud.google.com/go/bigtable/internal/version.go b/vendor/cloud.google.com/go/bigtable/internal/version.go index a018e6275b148..b846f144d2533 100644 --- a/vendor/cloud.google.com/go/bigtable/internal/version.go +++ b/vendor/cloud.google.com/go/bigtable/internal/version.go @@ -15,4 +15,4 @@ package internal // Version is the current tagged release of the library. -const Version = "1.34.0" +const Version = "1.35.0" diff --git a/vendor/cloud.google.com/go/debug.md b/vendor/cloud.google.com/go/debug.md index 7979d14af3f44..052962e3433ce 100644 --- a/vendor/cloud.google.com/go/debug.md +++ b/vendor/cloud.google.com/go/debug.md @@ -24,6 +24,17 @@ impact and are therefore not recommended for sustained production use. Use these tips locally or in production for a *limited time* to help get a better understanding of what is going on. +### Request/Response Logging + +To enable logging for all outgoing requests from the Go Client Libraries, set +the environment variable `GOOGLE_SDK_GO_LOGGING_LEVEL` to `debug`. Currently all +logging is at the debug level, but this is likely to change in the future. + +*Caution*: Debug level logging should only be used in a limited manner. Debug +level logs contain sensitive information, including headers, request/response +payloads, and authentication tokens. Additionally, enabling logging at this +level will have a minor performance impact. + ### HTTP based clients All of our auto-generated clients have a constructor to create a client that @@ -40,74 +51,6 @@ GODEBUG=http2debug=1. To read more about this feature please see the godoc for *WARNING*: Enabling this debug variable will log headers and payloads which may contain private information. -#### Add in your own logging with an HTTP middleware - -You may want to add in your own logging around HTTP requests. One way to do this -is to register a custom HTTP client with a logging transport built in. Here is -an example of how you would do this with the storage client. - -*WARNING*: Adding this middleware will log headers and payloads which may -contain private information. - -```go -package main - -import ( - "context" - "fmt" - "log" - "net/http" - "net/http/httputil" - - "cloud.google.com/go/storage" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - htransport "google.golang.org/api/transport/http" -) - -type loggingRoundTripper struct { - rt http.RoundTripper -} - -func (d loggingRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) { - // Will create a dump of the request and body. - dump, err := httputil.DumpRequest(r, true) - if err != nil { - log.Println("error dumping request") - } - log.Printf("%s", dump) - return d.rt.RoundTrip(r) -} - -func main() { - ctx := context.Background() - - // Create a transport with authentication built-in detected with - // [ADC](https://google.aip.dev/auth/4110). Note you will have to pass any - // required scoped for the client you are using. - trans, err := htransport.NewTransport(ctx, - http.DefaultTransport, - option.WithScopes(storage.ScopeFullControl), - ) - if err != nil { - log.Fatal(err) - } - - // Embed customized transport into an HTTP client. - hc := &http.Client{ - Transport: loggingRoundTripper{rt: trans}, - } - - // Supply custom HTTP client for use by the library. - client, err := storage.NewClient(ctx, option.WithHTTPClient(hc)) - if err != nil { - log.Fatal(err) - } - defer client.Close() - // Use the client -} -``` - ### gRPC based clients #### Try setting grpc-go's debug variables @@ -117,66 +60,6 @@ Try setting the following environment variables for grpc-go: good for diagnosing connection level failures. For more information please see [grpc-go's debug documentation](https://pkg.go.dev/google.golang.org/grpc/examples/features/debugging#section-readme). -#### Add in your own logging with a gRPC interceptors - -You may want to add in your own logging around gRPC requests. One way to do this -is to register a custom interceptor that adds logging. Here is -an example of how you would do this with the secretmanager client. Note this -example registers a UnaryClientInterceptor but you may want/need to register -a StreamClientInterceptor instead-of/as-well depending on what kinds of -RPCs you are calling. - -*WARNING*: Adding this interceptor will log metadata and payloads which may -contain private information. - -```go -package main - -import ( - "context" - "log" - - secretmanager "cloud.google.com/go/secretmanager/apiv1" - "google.golang.org/api/option" - "google.golang.org/grpc" - "google.golang.org/grpc/metadata" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func loggingUnaryInterceptor() grpc.UnaryClientInterceptor { - return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error { - err := invoker(ctx, method, req, reply, cc, opts...) - log.Printf("Invoked method: %v", method) - md, ok := metadata.FromOutgoingContext(ctx) - if ok { - log.Println("Metadata:") - for k, v := range md { - log.Printf("Key: %v, Value: %v", k, v) - } - } - reqb, merr := protojson.Marshal(req.(protoreflect.ProtoMessage)) - if merr == nil { - log.Printf("Request: %s", reqb) - } - return err - } -} - -func main() { - ctx := context.Background() - // Supply custom gRPC interceptor for use by the client. - client, err := secretmanager.NewClient(ctx, - option.WithGRPCDialOption(grpc.WithUnaryInterceptor(loggingUnaryInterceptor())), - ) - if err != nil { - log.Fatal(err) - } - defer client.Close() - // Use the client -} -``` - ## Telemetry **Warning: The OpenCensus project is obsolete and was archived on July 31st, diff --git a/vendor/cloud.google.com/go/iam/CHANGES.md b/vendor/cloud.google.com/go/iam/CHANGES.md index 1b2dc2ca5f97e..6bfd910506ed2 100644 --- a/vendor/cloud.google.com/go/iam/CHANGES.md +++ b/vendor/cloud.google.com/go/iam/CHANGES.md @@ -1,6 +1,20 @@ # Changes +## [1.3.1](https://github.com/googleapis/google-cloud-go/compare/iam/v1.3.0...iam/v1.3.1) (2025-01-02) + + +### Bug Fixes + +* **iam:** Update golang.org/x/net to v0.33.0 ([e9b0b69](https://github.com/googleapis/google-cloud-go/commit/e9b0b69644ea5b276cacff0a707e8a5e87efafc9)) + +## [1.3.0](https://github.com/googleapis/google-cloud-go/compare/iam/v1.2.2...iam/v1.3.0) (2024-12-04) + + +### Features + +* **iam:** Add ResourcePolicyMember to google/iam/v1 ([8dedb87](https://github.com/googleapis/google-cloud-go/commit/8dedb878c070cc1e92d62bb9b32358425e3ceffb)) + ## [1.2.2](https://github.com/googleapis/google-cloud-go/compare/iam/v1.2.1...iam/v1.2.2) (2024-10-23) diff --git a/vendor/cloud.google.com/go/iam/apiv1/iampb/iam_policy.pb.go b/vendor/cloud.google.com/go/iam/apiv1/iampb/iam_policy.pb.go index 56de55be8424f..f975d76191bc8 100644 --- a/vendor/cloud.google.com/go/iam/apiv1/iampb/iam_policy.pb.go +++ b/vendor/cloud.google.com/go/iam/apiv1/iampb/iam_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/iam_policy.proto @@ -65,11 +65,9 @@ type SetIamPolicyRequest struct { func (x *SetIamPolicyRequest) Reset() { *x = SetIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *SetIamPolicyRequest) String() string { @@ -80,7 +78,7 @@ func (*SetIamPolicyRequest) ProtoMessage() {} func (x *SetIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -132,11 +130,9 @@ type GetIamPolicyRequest struct { func (x *GetIamPolicyRequest) Reset() { *x = GetIamPolicyRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetIamPolicyRequest) String() string { @@ -147,7 +143,7 @@ func (*GetIamPolicyRequest) ProtoMessage() {} func (x *GetIamPolicyRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -194,11 +190,9 @@ type TestIamPermissionsRequest struct { func (x *TestIamPermissionsRequest) Reset() { *x = TestIamPermissionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsRequest) String() string { @@ -209,7 +203,7 @@ func (*TestIamPermissionsRequest) ProtoMessage() {} func (x *TestIamPermissionsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -251,11 +245,9 @@ type TestIamPermissionsResponse struct { func (x *TestIamPermissionsResponse) Reset() { *x = TestIamPermissionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *TestIamPermissionsResponse) String() string { @@ -266,7 +258,7 @@ func (*TestIamPermissionsResponse) ProtoMessage() {} func (x *TestIamPermissionsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_iam_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -420,56 +412,6 @@ func file_google_iam_v1_iam_policy_proto_init() { } file_google_iam_v1_options_proto_init() file_google_iam_v1_policy_proto_init() - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_iam_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*SetIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_iam_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetIamPolicyRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_iam_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_iam_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*TestIamPermissionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/cloud.google.com/go/iam/apiv1/iampb/options.pb.go b/vendor/cloud.google.com/go/iam/apiv1/iampb/options.pb.go index f1c1c084e34d2..0c82db752bd3c 100644 --- a/vendor/cloud.google.com/go/iam/apiv1/iampb/options.pb.go +++ b/vendor/cloud.google.com/go/iam/apiv1/iampb/options.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/options.proto @@ -64,11 +64,9 @@ type GetPolicyOptions struct { func (x *GetPolicyOptions) Reset() { *x = GetPolicyOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_options_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_options_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetPolicyOptions) String() string { @@ -79,7 +77,7 @@ func (*GetPolicyOptions) ProtoMessage() {} func (x *GetPolicyOptions) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_options_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -152,20 +150,6 @@ func file_google_iam_v1_options_proto_init() { if File_google_iam_v1_options_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_options_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*GetPolicyOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/cloud.google.com/go/iam/apiv1/iampb/policy.pb.go b/vendor/cloud.google.com/go/iam/apiv1/iampb/policy.pb.go index 4dda5d6d056bf..a2e42f878699a 100644 --- a/vendor/cloud.google.com/go/iam/apiv1/iampb/policy.pb.go +++ b/vendor/cloud.google.com/go/iam/apiv1/iampb/policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/iam/v1/policy.proto @@ -337,11 +337,9 @@ type Policy struct { func (x *Policy) Reset() { *x = Policy{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Policy) String() string { @@ -352,7 +350,7 @@ func (*Policy) ProtoMessage() {} func (x *Policy) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -462,11 +460,9 @@ type Binding struct { func (x *Binding) Reset() { *x = Binding{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Binding) String() string { @@ -477,7 +473,7 @@ func (*Binding) ProtoMessage() {} func (x *Binding) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -579,11 +575,9 @@ type AuditConfig struct { func (x *AuditConfig) Reset() { *x = AuditConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditConfig) String() string { @@ -594,7 +588,7 @@ func (*AuditConfig) ProtoMessage() {} func (x *AuditConfig) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -658,11 +652,9 @@ type AuditLogConfig struct { func (x *AuditLogConfig) Reset() { *x = AuditLogConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditLogConfig) String() string { @@ -673,7 +665,7 @@ func (*AuditLogConfig) ProtoMessage() {} func (x *AuditLogConfig) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -716,11 +708,9 @@ type PolicyDelta struct { func (x *PolicyDelta) Reset() { *x = PolicyDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *PolicyDelta) String() string { @@ -731,7 +721,7 @@ func (*PolicyDelta) ProtoMessage() {} func (x *PolicyDelta) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -784,11 +774,9 @@ type BindingDelta struct { func (x *BindingDelta) Reset() { *x = BindingDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *BindingDelta) String() string { @@ -799,7 +787,7 @@ func (*BindingDelta) ProtoMessage() {} func (x *BindingDelta) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -869,11 +857,9 @@ type AuditConfigDelta struct { func (x *AuditConfigDelta) Reset() { *x = AuditConfigDelta{} - if protoimpl.UnsafeEnabled { - mi := &file_google_iam_v1_policy_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_iam_v1_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *AuditConfigDelta) String() string { @@ -884,7 +870,7 @@ func (*AuditConfigDelta) ProtoMessage() {} func (x *AuditConfigDelta) ProtoReflect() protoreflect.Message { mi := &file_google_iam_v1_policy_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -1072,92 +1058,6 @@ func file_google_iam_v1_policy_proto_init() { if File_google_iam_v1_policy_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_iam_v1_policy_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Policy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*Binding); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AuditConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AuditLogConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*PolicyDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*BindingDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_iam_v1_policy_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*AuditConfigDelta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/vendor/cloud.google.com/go/iam/apiv1/iampb/resource_policy_member.pb.go b/vendor/cloud.google.com/go/iam/apiv1/iampb/resource_policy_member.pb.go new file mode 100644 index 0000000000000..361d79752ad98 --- /dev/null +++ b/vendor/cloud.google.com/go/iam/apiv1/iampb/resource_policy_member.pb.go @@ -0,0 +1,185 @@ +// Copyright 2024 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 protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.35.2 +// protoc v4.25.3 +// source: google/iam/v1/resource_policy_member.proto + +package iampb + +import ( + reflect "reflect" + sync "sync" + + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Output-only policy member strings of a Google Cloud resource's built-in +// identity. +type ResourcePolicyMember struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // IAM policy binding member referring to a Google Cloud resource by + // user-assigned name (https://google.aip.dev/122). If a resource is deleted + // and recreated with the same name, the binding will be applicable to the new + // resource. + // + // Example: + // `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter` + IamPolicyNamePrincipal string `protobuf:"bytes,1,opt,name=iam_policy_name_principal,json=iamPolicyNamePrincipal,proto3" json:"iam_policy_name_principal,omitempty"` + // IAM policy binding member referring to a Google Cloud resource by + // system-assigned unique identifier (https://google.aip.dev/148#uid). If a + // resource is deleted and recreated with the same name, the binding will not + // be applicable to the new resource + // + // Example: + // `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5` + IamPolicyUidPrincipal string `protobuf:"bytes,2,opt,name=iam_policy_uid_principal,json=iamPolicyUidPrincipal,proto3" json:"iam_policy_uid_principal,omitempty"` +} + +func (x *ResourcePolicyMember) Reset() { + *x = ResourcePolicyMember{} + mi := &file_google_iam_v1_resource_policy_member_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ResourcePolicyMember) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResourcePolicyMember) ProtoMessage() {} + +func (x *ResourcePolicyMember) ProtoReflect() protoreflect.Message { + mi := &file_google_iam_v1_resource_policy_member_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResourcePolicyMember.ProtoReflect.Descriptor instead. +func (*ResourcePolicyMember) Descriptor() ([]byte, []int) { + return file_google_iam_v1_resource_policy_member_proto_rawDescGZIP(), []int{0} +} + +func (x *ResourcePolicyMember) GetIamPolicyNamePrincipal() string { + if x != nil { + return x.IamPolicyNamePrincipal + } + return "" +} + +func (x *ResourcePolicyMember) GetIamPolicyUidPrincipal() string { + if x != nil { + return x.IamPolicyUidPrincipal + } + return "" +} + +var File_google_iam_v1_resource_policy_member_proto protoreflect.FileDescriptor + +var file_google_iam_v1_resource_policy_member_proto_rawDesc = []byte{ + 0x0a, 0x2a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x69, 0x61, 0x6d, 0x2f, 0x76, 0x31, 0x2f, + 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, + 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, + 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3e, 0x0a, 0x19, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, + 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x16, 0x69, + 0x61, 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x69, 0x6e, + 0x63, 0x69, 0x70, 0x61, 0x6c, 0x12, 0x3c, 0x0a, 0x18, 0x69, 0x61, 0x6d, 0x5f, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x5f, 0x75, 0x69, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x03, 0x52, 0x15, 0x69, 0x61, + 0x6d, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x55, 0x69, 0x64, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x61, 0x6c, 0x42, 0x87, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x69, 0x61, 0x6d, 0x2e, 0x76, 0x31, 0x42, 0x19, 0x52, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x29, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x61, 0x6d, 0x2f, + 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x69, 0x61, 0x6d, 0x70, 0x62, 0x3b, 0x69, 0x61, 0x6d, 0x70, + 0x62, 0xaa, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x43, 0x6c, 0x6f, 0x75, 0x64, + 0x2e, 0x49, 0x61, 0x6d, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x5c, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x5c, 0x49, 0x61, 0x6d, 0x5c, 0x56, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_google_iam_v1_resource_policy_member_proto_rawDescOnce sync.Once + file_google_iam_v1_resource_policy_member_proto_rawDescData = file_google_iam_v1_resource_policy_member_proto_rawDesc +) + +func file_google_iam_v1_resource_policy_member_proto_rawDescGZIP() []byte { + file_google_iam_v1_resource_policy_member_proto_rawDescOnce.Do(func() { + file_google_iam_v1_resource_policy_member_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_iam_v1_resource_policy_member_proto_rawDescData) + }) + return file_google_iam_v1_resource_policy_member_proto_rawDescData +} + +var file_google_iam_v1_resource_policy_member_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_iam_v1_resource_policy_member_proto_goTypes = []any{ + (*ResourcePolicyMember)(nil), // 0: google.iam.v1.ResourcePolicyMember +} +var file_google_iam_v1_resource_policy_member_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_iam_v1_resource_policy_member_proto_init() } +func file_google_iam_v1_resource_policy_member_proto_init() { + if File_google_iam_v1_resource_policy_member_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_google_iam_v1_resource_policy_member_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_iam_v1_resource_policy_member_proto_goTypes, + DependencyIndexes: file_google_iam_v1_resource_policy_member_proto_depIdxs, + MessageInfos: file_google_iam_v1_resource_policy_member_proto_msgTypes, + }.Build() + File_google_iam_v1_resource_policy_member_proto = out.File + file_google_iam_v1_resource_policy_member_proto_rawDesc = nil + file_google_iam_v1_resource_policy_member_proto_goTypes = nil + file_google_iam_v1_resource_policy_member_proto_depIdxs = nil +} diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json index cea277a4d8459..0c23edb915fa5 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -1709,6 +1709,26 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/memorystore/apiv1": { + "api_shortname": "memorystore", + "distribution_name": "cloud.google.com/go/memorystore/apiv1", + "description": "Memorystore API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/memorystore/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/memorystore/apiv1beta": { + "api_shortname": "memorystore", + "distribution_name": "cloud.google.com/go/memorystore/apiv1beta", + "description": "Memorystore API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/memorystore/latest/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/metastore/apiv1": { "api_shortname": "metastore", "distribution_name": "cloud.google.com/go/metastore/apiv1", @@ -1756,7 +1776,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/monitoring/latest/apiv3/v2", - "release_level": "stable", + "release_level": "preview", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/monitoring/dashboard/apiv1": { @@ -2609,6 +2629,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/reviews/apiv1beta": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/reviews/apiv1beta", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/reviews/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/spanner": { "api_shortname": "spanner", "distribution_name": "cloud.google.com/go/spanner", diff --git a/vendor/cloud.google.com/go/longrunning/CHANGES.md b/vendor/cloud.google.com/go/longrunning/CHANGES.md index 0d665dde2e232..875fb4b399dca 100644 --- a/vendor/cloud.google.com/go/longrunning/CHANGES.md +++ b/vendor/cloud.google.com/go/longrunning/CHANGES.md @@ -1,5 +1,20 @@ # Changes +## [0.6.4](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.3...longrunning/v0.6.4) (2025-01-02) + + +### Bug Fixes + +* **longrunning:** Update golang.org/x/net to v0.33.0 ([e9b0b69](https://github.com/googleapis/google-cloud-go/commit/e9b0b69644ea5b276cacff0a707e8a5e87efafc9)) + +## [0.6.3](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.2...longrunning/v0.6.3) (2024-11-19) + + +### Documentation + +* **longrunning:** Clarity and typo fixes for documentation ([c1e936d](https://github.com/googleapis/google-cloud-go/commit/c1e936df6527933f5e7c31be0f95aa46ff2c0e61)) +* **longrunning:** Fix example rpc naming ([c1e936d](https://github.com/googleapis/google-cloud-go/commit/c1e936df6527933f5e7c31be0f95aa46ff2c0e61)) + ## [0.6.2](https://github.com/googleapis/google-cloud-go/compare/longrunning/v0.6.1...longrunning/v0.6.2) (2024-10-23) diff --git a/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go b/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go index a42e61e99c382..f3d679ccfd7af 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/auxiliary.go @@ -41,7 +41,7 @@ type OperationIterator struct { InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error) } -// PageInfo supports pagination. See the google.golang.org/api/iterator package for details. +// PageInfo supports pagination. See the [google.golang.org/api/iterator] package for details. func (it *OperationIterator) PageInfo() *iterator.PageInfo { return it.pageInfo } diff --git a/vendor/cloud.google.com/go/longrunning/autogen/doc.go b/vendor/cloud.google.com/go/longrunning/autogen/doc.go index 7976ed73455f8..7f5c0bef3c357 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/doc.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/doc.go @@ -33,6 +33,7 @@ // // To get started with this package, create a client. // +// // go get cloud.google.com/go/longrunning/autogen@latest // ctx := context.Background() // // This snippet has been automatically generated and should be regarded as a code template only. // // It will require modifications to work: @@ -51,19 +52,7 @@ // // # Using the Client // -// The following is an example of making an API call with the newly created client. -// -// ctx := context.Background() -// // This snippet has been automatically generated and should be regarded as a code template only. -// // It will require modifications to work: -// // - It may require correct/in-range values for request initialization. -// // - It may require specifying regional endpoints when creating the service client as shown in: -// // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options -// c, err := longrunning.NewOperationsClient(ctx) -// if err != nil { -// // TODO: Handle error. -// } -// defer c.Close() +// The following is an example of making an API call with the newly created client, mentioned above. // // req := &longrunningpb.CancelOperationRequest{ // // TODO: Fill request struct fields. @@ -88,30 +77,3 @@ // [Debugging Client Libraries]: https://pkg.go.dev/cloud.google.com/go#hdr-Debugging // [Inspecting errors]: https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors package longrunning // import "cloud.google.com/go/longrunning/autogen" - -import ( - "context" - - "google.golang.org/api/option" -) - -// For more information on implementing a client constructor hook, see -// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. -type clientHookParams struct{} -type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) - -var versionClient string - -func getVersionClient() string { - if versionClient == "" { - return "UNKNOWN" - } - return versionClient -} - -// DefaultAuthScopes reports the default set of authentication scopes to use with this package. -func DefaultAuthScopes() []string { - return []string{ - "", - } -} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/helpers.go b/vendor/cloud.google.com/go/longrunning/autogen/helpers.go new file mode 100644 index 0000000000000..d14fac0d3f816 --- /dev/null +++ b/vendor/cloud.google.com/go/longrunning/autogen/helpers.go @@ -0,0 +1,99 @@ +// Copyright 2024 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 +// +// https://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 protoc-gen-go_gapic. DO NOT EDIT. + +package longrunning + +import ( + "context" + "io" + "log/slog" + "net/http" + + "github.com/googleapis/gax-go/v2/internallog" + "github.com/googleapis/gax-go/v2/internallog/grpclog" + "google.golang.org/api/googleapi" + "google.golang.org/api/option" + "google.golang.org/grpc" + "google.golang.org/protobuf/proto" +) + +const serviceName = "longrunning.googleapis.com" + +// For more information on implementing a client constructor hook, see +// https://github.com/googleapis/google-cloud-go/wiki/Customizing-constructors. +type clientHookParams struct{} +type clientHook func(context.Context, clientHookParams) ([]option.ClientOption, error) + +var versionClient string + +func getVersionClient() string { + if versionClient == "" { + return "UNKNOWN" + } + return versionClient +} + +// DefaultAuthScopes reports the default set of authentication scopes to use with this package. +func DefaultAuthScopes() []string { + return []string{} +} + +func executeHTTPRequestWithResponse(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, *http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, nil, err + } + defer resp.Body.Close() + buf, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, buf)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, nil, err + } + return buf, resp, nil +} + +func executeHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) ([]byte, error) { + buf, _, err := executeHTTPRequestWithResponse(ctx, client, req, logger, body, rpc) + return buf, err +} + +func executeStreamingHTTPRequest(ctx context.Context, client *http.Client, req *http.Request, logger *slog.Logger, body []byte, rpc string) (*http.Response, error) { + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", internallog.HTTPRequest(req, body)) + resp, err := client.Do(req) + if err != nil { + return nil, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", internallog.HTTPResponse(resp, nil)) + if err = googleapi.CheckResponse(resp); err != nil { + return nil, err + } + return resp, nil +} + +func executeRPC[I proto.Message, O proto.Message](ctx context.Context, fn func(context.Context, I, ...grpc.CallOption) (O, error), req I, opts []grpc.CallOption, logger *slog.Logger, rpc string) (O, error) { + var zero O + logger.DebugContext(ctx, "api request", "serviceName", serviceName, "rpcName", rpc, "request", grpclog.ProtoMessageRequest(ctx, req)) + resp, err := fn(ctx, req, opts...) + if err != nil { + return zero, err + } + logger.DebugContext(ctx, "api response", "serviceName", serviceName, "rpcName", rpc, "response", grpclog.ProtoMessageResponse(resp)) + return resp, err +} diff --git a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go index 0a4d66c6373a4..7f779c74d0b52 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/longrunningpb/operations.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 +// protoc-gen-go v1.35.2 // protoc v4.25.3 // source: google/longrunning/operations.proto @@ -67,7 +67,8 @@ type Operation struct { Done bool `protobuf:"varint,3,opt,name=done,proto3" json:"done,omitempty"` // The operation result, which can be either an `error` or a valid `response`. // If `done` == `false`, neither `error` nor `response` is set. - // If `done` == `true`, exactly one of `error` or `response` is set. + // If `done` == `true`, exactly one of `error` or `response` can be set. + // Some services might not provide the result. // // Types that are assignable to Result: // @@ -78,11 +79,9 @@ type Operation struct { func (x *Operation) Reset() { *x = Operation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *Operation) String() string { @@ -93,7 +92,7 @@ func (*Operation) ProtoMessage() {} func (x *Operation) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -160,7 +159,7 @@ type Operation_Error struct { } type Operation_Response struct { - // The normal response of the operation in case of success. If the original + // The normal, successful response of the operation. If the original // method returns no data on success, such as `Delete`, the response is // `google.protobuf.Empty`. If the original method is standard // `Get`/`Create`/`Update`, the response should be the resource. For other @@ -175,7 +174,8 @@ func (*Operation_Error) isOperation_Result() {} func (*Operation_Response) isOperation_Result() {} -// The request message for [Operations.GetOperation][google.longrunning.Operations.GetOperation]. +// The request message for +// [Operations.GetOperation][google.longrunning.Operations.GetOperation]. type GetOperationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -187,11 +187,9 @@ type GetOperationRequest struct { func (x *GetOperationRequest) Reset() { *x = GetOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *GetOperationRequest) String() string { @@ -202,7 +200,7 @@ func (*GetOperationRequest) ProtoMessage() {} func (x *GetOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -224,7 +222,8 @@ func (x *GetOperationRequest) GetName() string { return "" } -// The request message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +// The request message for +// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. type ListOperationsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -242,11 +241,9 @@ type ListOperationsRequest struct { func (x *ListOperationsRequest) Reset() { *x = ListOperationsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperationsRequest) String() string { @@ -257,7 +254,7 @@ func (*ListOperationsRequest) ProtoMessage() {} func (x *ListOperationsRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -300,7 +297,8 @@ func (x *ListOperationsRequest) GetPageToken() string { return "" } -// The response message for [Operations.ListOperations][google.longrunning.Operations.ListOperations]. +// The response message for +// [Operations.ListOperations][google.longrunning.Operations.ListOperations]. type ListOperationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -314,11 +312,9 @@ type ListOperationsResponse struct { func (x *ListOperationsResponse) Reset() { *x = ListOperationsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *ListOperationsResponse) String() string { @@ -329,7 +325,7 @@ func (*ListOperationsResponse) ProtoMessage() {} func (x *ListOperationsResponse) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -358,7 +354,8 @@ func (x *ListOperationsResponse) GetNextPageToken() string { return "" } -// The request message for [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. +// The request message for +// [Operations.CancelOperation][google.longrunning.Operations.CancelOperation]. type CancelOperationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -370,11 +367,9 @@ type CancelOperationRequest struct { func (x *CancelOperationRequest) Reset() { *x = CancelOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *CancelOperationRequest) String() string { @@ -385,7 +380,7 @@ func (*CancelOperationRequest) ProtoMessage() {} func (x *CancelOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -407,7 +402,8 @@ func (x *CancelOperationRequest) GetName() string { return "" } -// The request message for [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. +// The request message for +// [Operations.DeleteOperation][google.longrunning.Operations.DeleteOperation]. type DeleteOperationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -419,11 +415,9 @@ type DeleteOperationRequest struct { func (x *DeleteOperationRequest) Reset() { *x = DeleteOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *DeleteOperationRequest) String() string { @@ -434,7 +428,7 @@ func (*DeleteOperationRequest) ProtoMessage() {} func (x *DeleteOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -456,7 +450,8 @@ func (x *DeleteOperationRequest) GetName() string { return "" } -// The request message for [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. +// The request message for +// [Operations.WaitOperation][google.longrunning.Operations.WaitOperation]. type WaitOperationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -472,11 +467,9 @@ type WaitOperationRequest struct { func (x *WaitOperationRequest) Reset() { *x = WaitOperationRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *WaitOperationRequest) String() string { @@ -487,7 +480,7 @@ func (*WaitOperationRequest) ProtoMessage() {} func (x *WaitOperationRequest) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -520,11 +513,10 @@ func (x *WaitOperationRequest) GetTimeout() *durationpb.Duration { // // Example: // -// rpc LongRunningRecognize(LongRunningRecognizeRequest) -// returns (google.longrunning.Operation) { +// rpc Export(ExportRequest) returns (google.longrunning.Operation) { // option (google.longrunning.operation_info) = { -// response_type: "LongRunningRecognizeResponse" -// metadata_type: "LongRunningRecognizeMetadata" +// response_type: "ExportResponse" +// metadata_type: "ExportMetadata" // }; // } type OperationInfo struct { @@ -553,11 +545,9 @@ type OperationInfo struct { func (x *OperationInfo) Reset() { *x = OperationInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_longrunning_operations_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } + mi := &file_google_longrunning_operations_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } func (x *OperationInfo) String() string { @@ -568,7 +558,7 @@ func (*OperationInfo) ProtoMessage() {} func (x *OperationInfo) ProtoReflect() protoreflect.Message { mi := &file_google_longrunning_operations_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { + if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -632,14 +622,14 @@ var file_google_longrunning_operations_proto_rawDesc = []byte{ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, - 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, + 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, @@ -739,17 +729,18 @@ var file_google_longrunning_operations_proto_rawDesc = []byte{ 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0d, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, - 0x66, 0x6f, 0x42, 0x9d, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x66, 0x6f, 0x42, 0xa5, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x0f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x43, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x2f, 0x61, 0x75, 0x74, 0x6f, 0x67, 0x65, 0x6e, 0x2f, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x70, 0x62, 0x3b, 0x6c, 0x6f, 0x6e, 0x67, 0x72, 0x75, 0x6e, 0x6e, - 0x69, 0x6e, 0x67, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xaa, 0x02, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x12, - 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, - 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x6e, 0x67, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x05, 0x47, 0x4c, 0x52, 0x55, 0x4e, + 0xaa, 0x02, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x6e, 0x67, 0x52, 0x75, + 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x12, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x4c, + 0x6f, 0x6e, 0x67, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -810,104 +801,6 @@ func file_google_longrunning_operations_proto_init() { if File_google_longrunning_operations_proto != nil { return } - if !protoimpl.UnsafeEnabled { - file_google_longrunning_operations_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Operation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*GetOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ListOperationsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*ListOperationsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*CancelOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*DeleteOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*WaitOperationRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_longrunning_operations_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OperationInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } file_google_longrunning_operations_proto_msgTypes[0].OneofWrappers = []any{ (*Operation_Error)(nil), (*Operation_Response)(nil), @@ -947,14 +840,6 @@ const _ = grpc.SupportPackageIsVersion6 type OperationsClient interface { // Lists operations that match the specified filter in the request. If the // server doesn't support this method, it returns `UNIMPLEMENTED`. - // - // NOTE: the `name` binding allows API services to override the binding - // to use different resource name schemes, such as `users/*/operations`. To - // override the binding, API services can add a binding such as - // `"/v1/{name=users/*}/operations"` to their service configuration. - // For backwards compatibility, the default name includes the operations - // collection id, however overriding users must ensure the name binding - // is the parent resource, without the operations collection id. ListOperations(ctx context.Context, in *ListOperationsRequest, opts ...grpc.CallOption) (*ListOperationsResponse, error) // Gets the latest state of a long-running operation. Clients can use this // method to poll the operation result at intervals as recommended by the API @@ -973,8 +858,9 @@ type OperationsClient interface { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to + // `Code.CANCELLED`. CancelOperation(ctx context.Context, in *CancelOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Waits until the specified long-running operation is done or reaches at most // a specified timeout, returning the latest state. If the operation is @@ -1045,14 +931,6 @@ func (c *operationsClient) WaitOperation(ctx context.Context, in *WaitOperationR type OperationsServer interface { // Lists operations that match the specified filter in the request. If the // server doesn't support this method, it returns `UNIMPLEMENTED`. - // - // NOTE: the `name` binding allows API services to override the binding - // to use different resource name schemes, such as `users/*/operations`. To - // override the binding, API services can add a binding such as - // `"/v1/{name=users/*}/operations"` to their service configuration. - // For backwards compatibility, the default name includes the operations - // collection id, however overriding users must ensure the name binding - // is the parent resource, without the operations collection id. ListOperations(context.Context, *ListOperationsRequest) (*ListOperationsResponse, error) // Gets the latest state of a long-running operation. Clients can use this // method to poll the operation result at intervals as recommended by the API @@ -1071,8 +949,9 @@ type OperationsServer interface { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with - // an [Operation.error][google.longrunning.Operation.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, - // corresponding to `Code.CANCELLED`. + // an [Operation.error][google.longrunning.Operation.error] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to + // `Code.CANCELLED`. CancelOperation(context.Context, *CancelOperationRequest) (*emptypb.Empty, error) // Waits until the specified long-running operation is done or reaches at most // a specified timeout, returning the latest state. If the operation is diff --git a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go index 3be65a155e67e..a0a229cf0e9aa 100644 --- a/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go +++ b/vendor/cloud.google.com/go/longrunning/autogen/operations_client.go @@ -20,7 +20,7 @@ import ( "bytes" "context" "fmt" - "io" + "log/slog" "math" "net/http" "net/url" @@ -28,7 +28,6 @@ import ( longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb" gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" "google.golang.org/api/iterator" "google.golang.org/api/option" "google.golang.org/api/option/internaloption" @@ -188,12 +187,12 @@ type internalOperationsClient interface { // Manages long-running operations with an API service. // // When an API method normally takes long time to complete, it can be designed -// to return Operation to the client, and the client can use this -// interface to receive the real response asynchronously by polling the -// operation resource, or pass the operation resource to another API (such as -// Google Cloud Pub/Sub API) to receive the response. Any API service that -// returns long-running operations should implement the Operations interface -// so developers can have a consistent client experience. +// to return Operation to the client, and the +// client can use this interface to receive the real response asynchronously by +// polling the operation resource, or pass the operation resource to another API +// (such as Pub/Sub API) to receive the response. Any API service that returns +// long-running operations should implement the Operations interface so +// developers can have a consistent client experience. type OperationsClient struct { // The internal transport-dependent client. internalClient internalOperationsClient @@ -227,14 +226,6 @@ func (c *OperationsClient) Connection() *grpc.ClientConn { // ListOperations lists operations that match the specified filter in the request. If the // server doesn’t support this method, it returns UNIMPLEMENTED. -// -// NOTE: the name binding allows API services to override the binding -// to use different resource name schemes, such as users/*/operations. To -// override the binding, API services can add a binding such as -// "/v1/{name=users/*}/operations" to their service configuration. -// For backwards compatibility, the default name includes the operations -// collection id, however overriding users must ensure the name binding -// is the parent resource, without the operations collection id. func (c *OperationsClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { return c.internalClient.ListOperations(ctx, req, opts...) } @@ -262,8 +253,9 @@ func (c *OperationsClient) DeleteOperation(ctx context.Context, req *longrunning // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with -// an Operation.error value with a google.rpc.Status.code of 1, -// corresponding to Code.CANCELLED. +// an Operation.error value with a +// google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. func (c *OperationsClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { return c.internalClient.CancelOperation(ctx, req, opts...) } @@ -296,6 +288,8 @@ type operationsGRPCClient struct { // The x-goog-* metadata to be sent with each request. xGoogHeaders []string + + logger *slog.Logger } // NewOperationsClient creates a new operations client based on gRPC. @@ -304,12 +298,12 @@ type operationsGRPCClient struct { // Manages long-running operations with an API service. // // When an API method normally takes long time to complete, it can be designed -// to return Operation to the client, and the client can use this -// interface to receive the real response asynchronously by polling the -// operation resource, or pass the operation resource to another API (such as -// Google Cloud Pub/Sub API) to receive the response. Any API service that -// returns long-running operations should implement the Operations interface -// so developers can have a consistent client experience. +// to return Operation to the client, and the +// client can use this interface to receive the real response asynchronously by +// polling the operation resource, or pass the operation resource to another API +// (such as Pub/Sub API) to receive the response. Any API service that returns +// long-running operations should implement the Operations interface so +// developers can have a consistent client experience. func NewOperationsClient(ctx context.Context, opts ...option.ClientOption) (*OperationsClient, error) { clientOpts := defaultOperationsGRPCClientOptions() if newOperationsClientHook != nil { @@ -330,6 +324,7 @@ func NewOperationsClient(ctx context.Context, opts ...option.ClientOption) (*Ope connPool: connPool, operationsClient: longrunningpb.NewOperationsClient(connPool), CallOptions: &client.CallOptions, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -376,6 +371,8 @@ type operationsRESTClient struct { // Points back to the CallOptions field of the containing OperationsClient CallOptions **OperationsCallOptions + + logger *slog.Logger } // NewOperationsRESTClient creates a new operations rest client. @@ -383,12 +380,12 @@ type operationsRESTClient struct { // Manages long-running operations with an API service. // // When an API method normally takes long time to complete, it can be designed -// to return Operation to the client, and the client can use this -// interface to receive the real response asynchronously by polling the -// operation resource, or pass the operation resource to another API (such as -// Google Cloud Pub/Sub API) to receive the response. Any API service that -// returns long-running operations should implement the Operations interface -// so developers can have a consistent client experience. +// to return Operation to the client, and the +// client can use this interface to receive the real response asynchronously by +// polling the operation resource, or pass the operation resource to another API +// (such as Pub/Sub API) to receive the response. Any API service that returns +// long-running operations should implement the Operations interface so +// developers can have a consistent client experience. func NewOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*OperationsClient, error) { clientOpts := append(defaultOperationsRESTClientOptions(), opts...) httpClient, endpoint, err := httptransport.NewClient(ctx, clientOpts...) @@ -401,6 +398,7 @@ func NewOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) ( endpoint: endpoint, httpClient: httpClient, CallOptions: &callOpts, + logger: internaloption.GetLogger(opts), } c.setGoogleClientInfo() @@ -464,7 +462,7 @@ func (c *operationsGRPCClient) ListOperations(ctx context.Context, req *longrunn } err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.ListOperations(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.ListOperations, req, settings.GRPC, c.logger, "ListOperations") return err }, opts...) if err != nil { @@ -499,7 +497,7 @@ func (c *operationsGRPCClient) GetOperation(ctx context.Context, req *longrunnin var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.GetOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.GetOperation, req, settings.GRPC, c.logger, "GetOperation") return err }, opts...) if err != nil { @@ -516,7 +514,7 @@ func (c *operationsGRPCClient) DeleteOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).DeleteOperation[0:len((*c.CallOptions).DeleteOperation):len((*c.CallOptions).DeleteOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.DeleteOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.DeleteOperation, req, settings.GRPC, c.logger, "DeleteOperation") return err }, opts...) return err @@ -530,7 +528,7 @@ func (c *operationsGRPCClient) CancelOperation(ctx context.Context, req *longrun opts = append((*c.CallOptions).CancelOperation[0:len((*c.CallOptions).CancelOperation):len((*c.CallOptions).CancelOperation)], opts...) err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - _, err = c.operationsClient.CancelOperation(ctx, req, settings.GRPC...) + _, err = executeRPC(ctx, c.operationsClient.CancelOperation, req, settings.GRPC, c.logger, "CancelOperation") return err }, opts...) return err @@ -542,7 +540,7 @@ func (c *operationsGRPCClient) WaitOperation(ctx context.Context, req *longrunni var resp *longrunningpb.Operation err := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error { var err error - resp, err = c.operationsClient.WaitOperation(ctx, req, settings.GRPC...) + resp, err = executeRPC(ctx, c.operationsClient.WaitOperation, req, settings.GRPC, c.logger, "WaitOperation") return err }, opts...) if err != nil { @@ -553,14 +551,6 @@ func (c *operationsGRPCClient) WaitOperation(ctx context.Context, req *longrunni // ListOperations lists operations that match the specified filter in the request. If the // server doesn’t support this method, it returns UNIMPLEMENTED. -// -// NOTE: the name binding allows API services to override the binding -// to use different resource name schemes, such as users/*/operations. To -// override the binding, API services can add a binding such as -// "/v1/{name=users/*}/operations" to their service configuration. -// For backwards compatibility, the default name includes the operations -// collection id, however overriding users must ensure the name binding -// is the parent resource, without the operations collection id. func (c *operationsRESTClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator { it := &OperationIterator{} req = proto.Clone(req).(*longrunningpb.ListOperationsRequest) @@ -607,21 +597,10 @@ func (c *operationsRESTClient) ListOperations(ctx context.Context, req *longrunn } httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "ListOperations") if err != nil { return err } - if err := unm.Unmarshal(buf, resp); err != nil { return err } @@ -681,17 +660,7 @@ func (c *operationsRESTClient) GetOperation(ctx context.Context, req *longrunnin httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "GetOperation") if err != nil { return err } @@ -736,15 +705,8 @@ func (c *operationsRESTClient) DeleteOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "DeleteOperation") + return err }, opts...) } @@ -756,8 +718,9 @@ func (c *operationsRESTClient) DeleteOperation(ctx context.Context, req *longrun // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, // the operation is not deleted; instead, it becomes an operation with -// an Operation.error value with a google.rpc.Status.code of 1, -// corresponding to Code.CANCELLED. +// an Operation.error value with a +// google.rpc.Status.code of 1, corresponding to +// Code.CANCELLED. func (c *operationsRESTClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error { m := protojson.MarshalOptions{AllowPartial: true, UseEnumNumbers: true} jsonReq, err := m.Marshal(req) @@ -788,15 +751,8 @@ func (c *operationsRESTClient) CancelOperation(ctx context.Context, req *longrun httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - // Returns nil if there is no error, otherwise wraps - // the response code and body into a non-nil error - return googleapi.CheckResponse(httpRsp) + _, err = executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, jsonReq, "CancelOperation") + return err }, opts...) } @@ -847,17 +803,7 @@ func (c *operationsRESTClient) WaitOperation(ctx context.Context, req *longrunni httpReq = httpReq.WithContext(ctx) httpReq.Header = headers - httpRsp, err := c.httpClient.Do(httpReq) - if err != nil { - return err - } - defer httpRsp.Body.Close() - - if err = googleapi.CheckResponse(httpRsp); err != nil { - return err - } - - buf, err := io.ReadAll(httpRsp.Body) + buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "WaitOperation") if err != nil { return err } diff --git a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json index 3d73202baf892..f2029f249bb50 100644 --- a/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json +++ b/vendor/cloud.google.com/go/release-please-config-yoshi-submodules.json @@ -252,6 +252,9 @@ "memcache": { "component": "memcache" }, + "memorystore": { + "component": "memorystore" + }, "metastore": { "component": "metastore" }, diff --git a/vendor/modules.txt b/vendor/modules.txt index 81e2943465455..5e30ec37a3aba 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,7 @@ # cel.dev/expr v0.19.1 ## explicit; go 1.21.1 cel.dev/expr -# cloud.google.com/go v0.117.0 +# cloud.google.com/go v0.118.0 ## explicit; go 1.21 cloud.google.com/go cloud.google.com/go/internal @@ -30,8 +30,8 @@ cloud.google.com/go/auth/internal/transport/cert # cloud.google.com/go/auth/oauth2adapt v0.2.7 ## explicit; go 1.22 cloud.google.com/go/auth/oauth2adapt -# cloud.google.com/go/bigtable v1.34.0 -## explicit; go 1.21 +# cloud.google.com/go/bigtable v1.35.0 +## explicit; go 1.22.7 cloud.google.com/go/bigtable cloud.google.com/go/bigtable/admin/apiv2/adminpb cloud.google.com/go/bigtable/apiv2/bigtablepb @@ -41,11 +41,11 @@ cloud.google.com/go/bigtable/internal/option # cloud.google.com/go/compute/metadata v0.6.0 ## explicit; go 1.21 cloud.google.com/go/compute/metadata -# cloud.google.com/go/iam v1.2.2 +# cloud.google.com/go/iam v1.3.1 ## explicit; go 1.21 cloud.google.com/go/iam cloud.google.com/go/iam/apiv1/iampb -# cloud.google.com/go/longrunning v0.6.2 +# cloud.google.com/go/longrunning v0.6.4 ## explicit; go 1.21 cloud.google.com/go/longrunning cloud.google.com/go/longrunning/autogen @@ -2028,14 +2028,14 @@ google.golang.org/api/support/bundler google.golang.org/api/transport google.golang.org/api/transport/grpc google.golang.org/api/transport/http -# google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 +# google.golang.org/genproto v0.0.0-20241216192217-9240e9c98484 ## explicit; go 1.21 google.golang.org/genproto/googleapis/type/calendarperiod google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/googleapis/type/timeofday google.golang.org/genproto/protobuf/api -# google.golang.org/genproto/googleapis/api v0.0.0-20250102185135-69823020774d +# google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f ## explicit; go 1.22 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations