From 11f0b024f7c024e59c3b920b419c0cce50e691c0 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 31 Mar 2026 00:24:04 +0000 Subject: [PATCH 1/2] feat: [Memorystore for Redis Cluster] Add support for Flexible CA feature PiperOrigin-RevId: 891891848 Source-Link: https://github.com/googleapis/googleapis/commit/0eb2a362d06c0f3bc739c2dccfc4593c552bb98f Source-Link: https://github.com/googleapis/googleapis-gen/commit/e41edbefa8a28491df182ec22394de70381e6019 Copy-Tag: eyJwIjoiUmVkaXNDbHVzdGVyLy5Pd2xCb3QueWFtbCIsImgiOiJlNDFlZGJlZmE4YTI4NDkxZGYxODJlYzIyMzk0ZGU3MDM4MWU2MDE5In0= --- .../Redis/Cluster/V1/CloudRedisCluster.php | 37 + .../Redis/Cluster/V1/AuthorizationMode.php | 61 + .../Cluster/V1/AutomatedBackupConfig.php | 165 ++ .../AutomatedBackupMode.php | 61 + .../FixedFrequencySchedule.php | 82 + .../Google/Cloud/Redis/Cluster/V1/Backup.php | 585 ++++++ .../Redis/Cluster/V1/Backup/BackupType.php | 61 + .../Cloud/Redis/Cluster/V1/Backup/State.php | 76 + .../Redis/Cluster/V1/BackupClusterRequest.php | 187 ++ .../Redis/Cluster/V1/BackupCollection.php | 215 ++ .../Cloud/Redis/Cluster/V1/BackupFile.php | 145 ++ .../Redis/Cluster/V1/CertificateAuthority.php | 112 + .../ManagedCertificateAuthority.php | 69 + .../ManagedCertificateAuthority/CertChain.php | 65 + .../Google/Cloud/Redis/Cluster/V1/Cluster.php | 1433 +++++++++++++ .../Cluster/V1/Cluster/GcsBackupSource.php | 72 + .../V1/Cluster/ManagedBackupSource.php | 87 + .../Cloud/Redis/Cluster/V1/Cluster/State.php | 75 + .../Redis/Cluster/V1/Cluster/StateInfo.php | 75 + .../V1/Cluster/StateInfo/UpdateInfo.php | 121 ++ .../Redis/Cluster/V1/ClusterEndpoint.php | 73 + .../Cluster/V1/ClusterMaintenancePolicy.php | 171 ++ .../Cluster/V1/ClusterMaintenanceSchedule.php | 129 ++ .../Cluster/V1/ClusterPersistenceConfig.php | 155 ++ .../V1/ClusterPersistenceConfig/AOFConfig.php | 67 + .../AOFConfig/AppendFsync.php | 71 + .../PersistenceMode.php | 68 + .../V1/ClusterPersistenceConfig/RDBConfig.php | 119 ++ .../RDBConfig/SnapshotPeriod.php | 75 + .../V1/ClusterWeeklyMaintenanceWindow.php | 111 + .../Redis/Cluster/V1/ConnectionDetail.php | 114 + .../Cloud/Redis/Cluster/V1/ConnectionType.php | 68 + .../Redis/Cluster/V1/CreateClusterRequest.php | 238 +++ .../V1/CrossClusterReplicationConfig.php | 277 +++ .../ClusterRole.php | 72 + .../Membership.php | 120 ++ .../RemoteCluster.php | 106 + .../Redis/Cluster/V1/DeleteBackupRequest.php | 120 ++ .../Redis/Cluster/V1/DeleteClusterRequest.php | 125 ++ .../Redis/Cluster/V1/DiscoveryEndpoint.php | 153 ++ .../Cloud/Redis/Cluster/V1/EncryptionInfo.php | 187 ++ .../Cluster/V1/EncryptionInfo/KmsKeyState.php | 104 + .../Redis/Cluster/V1/EncryptionInfo/Type.php | 63 + .../Redis/Cluster/V1/ExportBackupRequest.php | 113 + .../Cluster/V1/GetBackupCollectionRequest.php | 91 + .../Redis/Cluster/V1/GetBackupRequest.php | 86 + .../GetClusterCertificateAuthorityRequest.php | 92 + .../Redis/Cluster/V1/GetClusterRequest.php | 91 + ...redRegionalCertificateAuthorityRequest.php | 92 + .../V1/ListBackupCollectionsRequest.php | 188 ++ .../V1/ListBackupCollectionsResponse.php | 171 ++ .../Redis/Cluster/V1/ListBackupsRequest.php | 178 ++ .../Redis/Cluster/V1/ListBackupsResponse.php | 139 ++ .../Redis/Cluster/V1/ListClustersRequest.php | 183 ++ .../Redis/Cluster/V1/ListClustersResponse.php | 175 ++ .../Cloud/Redis/Cluster/V1/NodeType.php | 75 + .../Redis/Cluster/V1/OperationMetadata.php | 307 +++ .../Redis/Cluster/V1/PscAutoConnection.php | 346 +++ .../Cloud/Redis/Cluster/V1/PscConfig.php | 73 + .../Cloud/Redis/Cluster/V1/PscConnection.php | 349 +++ .../Redis/Cluster/V1/PscConnectionStatus.php | 61 + .../Redis/Cluster/V1/PscServiceAttachment.php | 106 + .../RescheduleClusterMaintenanceRequest.php | 189 ++ .../RescheduleType.php | 61 + .../Cloud/Redis/Cluster/V1/ServerCaMode.php | 68 + .../V1/SharedRegionalCertificateAuthority.php | 117 ++ .../RegionalManagedCertificateAuthority.php | 71 + .../RegionalCertChain.php | 67 + .../Cluster/V1/TransitEncryptionMode.php | 61 + .../Redis/Cluster/V1/UpdateClusterRequest.php | 196 ++ .../Cluster/V1/ZoneDistributionConfig.php | 113 + .../ZoneDistributionMode.php | 63 + .../backup_cluster.php | 96 + .../create_cluster.php | 112 + .../CloudRedisClusterClient/delete_backup.php | 86 + .../delete_cluster.php | 83 + .../CloudRedisClusterClient/export_backup.php | 89 + .../V1/CloudRedisClusterClient/get_backup.php | 77 + .../get_backup_collection.php | 77 + .../CloudRedisClusterClient/get_cluster.php | 73 + .../get_cluster_certificate_authority.php | 77 + .../CloudRedisClusterClient/get_location.php | 57 + ..._shared_regional_certificate_authority.php | 77 + .../list_backup_collections.php | 83 + .../CloudRedisClusterClient/list_backups.php | 81 + .../CloudRedisClusterClient/list_clusters.php | 86 + .../list_locations.php | 62 + .../reschedule_cluster_maintenance.php | 90 + .../update_cluster.php | 93 + .../src/V1/Client/CloudRedisClusterClient.php | 1041 +++++++++ .../v1/src/V1/gapic_metadata.json | 103 + .../cloud_redis_cluster_client_config.json | 117 ++ .../cloud_redis_cluster_descriptor_config.php | 330 +++ ...cloud_redis_cluster_rest_client_config.php | 276 +++ .../V1/Client/CloudRedisClusterClientTest.php | 1865 +++++++++++++++++ 95 files changed, 15623 insertions(+) create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetSharedRegionalCertificateAuthorityRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ServerCaMode.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php create mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php create mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php create mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php create mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json create mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php create mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php create mode 100644 owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php b/owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php new file mode 100644 index 000000000000..84028f522715 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + "\x0A\xEE\x96\x01\x0A7google/cloud/redis/cluster/v1/cloud_redis_cluster.proto\x12\x1Dgoogle.cloud.redis.cluster.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x19google/protobuf/any.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\x1A\x1Bgoogle/type/timeofday.proto\"\xBC\x01\x0A\x14CreateClusterRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x17\x0A\x0Acluster_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x03 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x04 \x01(\x09\"w\x0A\x13ListClustersRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"~\x0A\x14ListClustersResponse\x128\x0A\x08clusters\x18\x01 \x03(\x0B2&.google.cloud.redis.cluster.v1.Cluster\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"\x9E\x01\x0A\x14UpdateClusterRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x02 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\"G\x0A\x11GetClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\"^\x0A\x14DeleteClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x12\x0A\x0Arequest_id\x18\x02 \x01(\x09\"h\x0A%GetClusterCertificateAuthorityRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)redis.googleapis.com/CertificateAuthority\"\x8E\x01\x0A\x1CListBackupCollectionsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%redis.googleapis.com/BackupCollection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x9A\x01\x0A\x1DListBackupCollectionsResponse\x12K\x0A\x12backup_collections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.BackupCollection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Y\x0A\x1AGetBackupCollectionRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%redis.googleapis.com/BackupCollection\"z\x0A\x12ListBackupsRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Bredis.googleapis.com/Backup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"{\x0A\x13ListBackupsResponse\x126\x0A\x07backups\x18\x01 \x03(\x0B2%.google.cloud.redis.cluster.v1.Backup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"E\x0A\x10GetBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\"i\x0A\x13DeleteBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"m\x0A\x13ExportBackupRequest\x12\x14\x0A\x0Agcs_bucket\x18\x03 \x01(\x09H\x00\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/BackupB\x0D\x0A\x0Bdestination\"\xA2\x01\x0A\x14BackupClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12+\x0A\x03ttl\x18\x02 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x12\x1B\x0A\x09backup_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x0C\x0A\x0A_backup_id\"\xD9\x18\x0A\x07Cluster\x12Q\x0A\x0Agcs_source\x18\" \x01(\x0B26.google.cloud.redis.cluster.v1.Cluster.GcsBackupSourceB\x03\xE0A\x01H\x00\x12`\x0A\x15managed_backup_source\x18# \x01(\x0B2:.google.cloud.redis.cluster.v1.Cluster.ManagedBackupSourceB\x03\xE0A\x01H\x00\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x02\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12@\x0A\x05state\x18\x04 \x01(\x0E2,.google.cloud.redis.cluster.v1.Cluster.StateB\x03\xE0A\x03\x12\x10\x0A\x03uid\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12Q\x0A\x12authorization_mode\x18\x0B \x01(\x0E20.google.cloud.redis.cluster.v1.AuthorizationModeB\x03\xE0A\x01\x12Z\x0A\x17transit_encryption_mode\x18\x0C \x01(\x0E24.google.cloud.redis.cluster.v1.TransitEncryptionModeB\x03\xE0A\x01\x12\x19\x0A\x07size_gb\x18\x0D \x01(\x05B\x03\xE0A\x03H\x02\x88\x01\x01\x12\x1D\x0A\x0Bshard_count\x18\x0E \x01(\x05B\x03\xE0A\x01H\x03\x88\x01\x01\x12B\x0A\x0Bpsc_configs\x18\x0F \x03(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x01\x12R\x0A\x13discovery_endpoints\x18\x10 \x03(\x0B20.google.cloud.redis.cluster.v1.DiscoveryEndpointB\x03\xE0A\x03\x12J\x0A\x0Fpsc_connections\x18\x11 \x03(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionB\x03\xE0A\x03\x12I\x0A\x0Astate_info\x18\x12 \x01(\x0B20.google.cloud.redis.cluster.v1.Cluster.StateInfoB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x13 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x01\x12X\x0A\x12persistence_config\x18\x14 \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterPersistenceConfigB\x03\xE0A\x01\x12T\x0A\x0Dredis_configs\x18\x15 \x03(\x0B28.google.cloud.redis.cluster.v1.Cluster.RedisConfigsEntryB\x03\xE0A\x01\x12!\x0A\x0Fprecise_size_gb\x18\x16 \x01(\x01B\x03\xE0A\x03H\x04\x88\x01\x01\x12\\\x0A\x18zone_distribution_config\x18\x17 \x01(\x0B25.google.cloud.redis.cluster.v1.ZoneDistributionConfigB\x03\xE0A\x01\x12k\x0A cross_cluster_replication_config\x18\x18 \x01(\x0B2<.google.cloud.redis.cluster.v1.CrossClusterReplicationConfigB\x03\xE0A\x01\x12-\x0A\x1Bdeletion_protection_enabled\x18\x19 \x01(\x08B\x03\xE0A\x01H\x05\x88\x01\x01\x12]\x0A\x12maintenance_policy\x18\x1A \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterMaintenancePolicyB\x03\xE0A\x01H\x06\x88\x01\x01\x12a\x0A\x14maintenance_schedule\x18\x1B \x01(\x0B29.google.cloud.redis.cluster.v1.ClusterMaintenanceScheduleB\x03\xE0A\x03H\x07\x88\x01\x01\x12Y\x0A\x17psc_service_attachments\x18\x1E \x03(\x0B23.google.cloud.redis.cluster.v1.PscServiceAttachmentB\x03\xE0A\x03\x12N\x0A\x11cluster_endpoints\x18\$ \x03(\x0B2..google.cloud.redis.cluster.v1.ClusterEndpointB\x03\xE0A\x01\x12P\x0A\x11backup_collection\x18' \x01(\x09B0\xE0A\x01\xE0A\x03\xFAA'\x0A%redis.googleapis.com/BackupCollectionH\x08\x88\x01\x01\x12?\x0A\x07kms_key\x18( \x01(\x09B)\xE0A\x01\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyH\x09\x88\x01\x01\x12Z\x0A\x17automated_backup_config\x18* \x01(\x0B24.google.cloud.redis.cluster.v1.AutomatedBackupConfigB\x03\xE0A\x01\x12K\x0A\x0Fencryption_info\x18+ \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12M\x0A\x0Eserver_ca_mode\x185 \x01(\x0E2+.google.cloud.redis.cluster.v1.ServerCaModeB\x03\xE0A\x01H\x0A\x88\x01\x01\x12D\x0A\x0Eserver_ca_pool\x186 \x01(\x09B'\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x0B\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x187 \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x0C\x88\x01\x01\x1A\xEA\x01\x0A\x09StateInfo\x12R\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2;.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoH\x00\x1A\x80\x01\x0A\x0AUpdateInfo\x12\x1F\x0A\x12target_shard_count\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12!\x0A\x14target_replica_count\x18\x02 \x01(\x05H\x01\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x06\x0A\x04info\x1A\$\x0A\x0FGcsBackupSource\x12\x11\x0A\x04uris\x18\x01 \x03(\x09B\x03\xE0A\x01\x1A*\x0A\x13ManagedBackupSource\x12\x13\x0A\x06backup\x18\x01 \x01(\x09B\x03\xE0A\x01\x1A3\x0A\x11RedisConfigsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"T\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04:p\xEAAm\x0A\x1Credis.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08clusters2\x07clusterB\x10\x0A\x0Eimport_sourcesB\x10\x0A\x0E_replica_countB\x0A\x0A\x08_size_gbB\x0E\x0A\x0C_shard_countB\x12\x0A\x10_precise_size_gbB\x1E\x0A\x1C_deletion_protection_enabledB\x15\x0A\x13_maintenance_policyB\x17\x0A\x15_maintenance_scheduleB\x14\x0A\x12_backup_collectionB\x0A\x0A\x08_kms_keyB\x11\x0A\x0F_server_ca_modeB\x11\x0A\x0F_server_ca_poolB\x1C\x0A\x1A_rotate_server_certificate\"\x85\x04\x0A\x15AutomatedBackupConfig\x12t\x0A\x18fixed_frequency_schedule\x18\x02 \x01(\x0B2K.google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencyScheduleB\x03\xE0A\x01H\x00\x12l\x0A\x15automated_backup_mode\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupModeB\x03\xE0A\x01\x126\x0A\x09retention\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01H\x01\x88\x01\x01\x1A]\x0A\x16FixedFrequencySchedule\x124\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDayB\x03\xE0A\x02H\x00\x88\x01\x01B\x0D\x0A\x0B_start_time\"W\x0A\x13AutomatedBackupMode\x12%\x0A!AUTOMATED_BACKUP_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x0B\x0A\x07ENABLED\x10\x02B\x0A\x0A\x08scheduleB\x0C\x0A\x0A_retention\"\xF6\x02\x0A\x10BackupCollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12 \x0A\x0Bcluster_uid\x18\x03 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x125\x0A\x07cluster\x18\x04 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12:\x0A\x07kms_key\x18\x05 \x01(\x09B)\xE0A\x03\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12\x18\x0A\x03uid\x18\x06 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01:\x9F\x01\xEAA\x9B\x01\x0A%redis.googleapis.com/BackupCollection\x12Mprojects/{project}/locations/{location}/backupCollections/{backup_collection}*\x11backupCollections2\x10backupCollection\"\x82\x08\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x125\x0A\x07cluster\x18\x03 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12 \x0A\x0Bcluster_uid\x18\x04 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1D\x0A\x10total_size_bytes\x18\x05 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1B\x0A\x0Eengine_version\x18\x07 \x01(\x09B\x03\xE0A\x03\x12D\x0A\x0Cbackup_files\x18\x08 \x03(\x0B2).google.cloud.redis.cluster.v1.BackupFileB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x09 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x03\x12\x1A\x0A\x0Dreplica_count\x18\x0A \x01(\x05B\x03\xE0A\x03\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x03\x12J\x0A\x0Bbackup_type\x18\x0C \x01(\x0E20.google.cloud.redis.cluster.v1.Backup.BackupTypeB\x03\xE0A\x03\x12?\x0A\x05state\x18\x0D \x01(\x0E2+.google.cloud.redis.cluster.v1.Backup.StateB\x03\xE0A\x03\x12K\x0A\x0Fencryption_info\x18\x0E \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x0F \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"G\x0A\x0ABackupType\x12\x1B\x0A\x17BACKUP_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ON_DEMAND\x10\x01\x12\x0D\x0A\x09AUTOMATED\x10\x02\"U\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0D\x0A\x09SUSPENDED\x10\x04:\x92\x01\xEAA\x8E\x01\x0A\x1Bredis.googleapis.com/Backup\x12^projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}*\x07backups2\x06backup\"s\x0A\x0ABackupFile\x12\x16\x0A\x09file_name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x02 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x84\x01\x0A\x14PscServiceAttachment\x12\x1F\x0A\x12service_attachment\x18\x01 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x03 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xF4\x06\x0A\x1DCrossClusterReplicationConfig\x12^\x0A\x0Ccluster_role\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole\x12c\x0A\x0Fprimary_cluster\x18\x02 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x12f\x0A\x12secondary_clusters\x18\x03 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x0Amembership\x18\x05 \x01(\x0B2G.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.MembershipB\x03\xE0A\x03\x1AU\x0A\x0DRemoteCluster\x122\x0A\x07cluster\x18\x01 \x01(\x09B!\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x10\x0A\x03uid\x18\x02 \x01(\x09B\x03\xE0A\x03\x1A\xE3\x01\x0A\x0AMembership\x12h\x0A\x0Fprimary_cluster\x18\x01 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\x12k\x0A\x12secondary_clusters\x18\x02 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\"Q\x0A\x0BClusterRole\x12\x1C\x0A\x18CLUSTER_ROLE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x0B\x0A\x07PRIMARY\x10\x02\x12\x0D\x0A\x09SECONDARY\x10\x03\"\xE8\x01\x0A\x18ClusterMaintenancePolicy\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x19weekly_maintenance_window\x18\x03 \x03(\x0B2=.google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow\"q\x0A\x1EClusterWeeklyMaintenanceWindow\x12#\x0A\x03day\x18\x01 \x01(\x0E2\x16.google.type.DayOfWeek\x12*\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDay\"\x84\x01\x0A\x1AClusterMaintenanceSchedule\x123\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"!\x0A\x09PscConfig\x12\x14\x0A\x07network\x18\x02 \x01(\x09B\x03\xE0A\x02\"\x7F\x0A\x11DiscoveryEndpoint\x12\x14\x0A\x07address\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04port\x18\x02 \x01(\x05B\x03\xE0A\x03\x12A\x0A\x0Apsc_config\x18\x03 \x01(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x03\"\xDA\x03\x0A\x0DPscConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x02\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x02\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x02\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x0A \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"W\x0A\x0FClusterEndpoint\x12D\x0A\x0Bconnections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.ConnectionDetail\"\xB9\x01\x0A\x10ConnectionDetail\x12O\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B20.google.cloud.redis.cluster.v1.PscAutoConnectionH\x00\x12F\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionH\x00B\x0C\x0A\x0Aconnection\"\xDE\x03\x0A\x11PscAutoConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x03\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x09 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xFE\x04\x0A\"SharedRegionalCertificateAuthority\x12\x82\x01\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2e.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xDC\x01\x0A#RegionalManagedCertificateAuthority\x12\x89\x01\x0A\x08ca_certs\x18\x01 \x03(\x0B2w.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1A)\x0A\x11RegionalCertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xD3\x01\xEAA\xCF\x01\x0A7redis.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*\$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0B\x0A\x09server_ca\"}\x0A,GetSharedRegionalCertificateAuthorityRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7redis.googleapis.com/SharedRegionalCertificateAuthority\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x85\x04\x0A\x14CertificateAuthority\x12l\x0A\x11managed_server_ca\x18\x01 \x01(\x0B2O.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08\x1A\xAD\x01\x0A\x1BManagedCertificateAuthority\x12k\x0A\x08ca_certs\x18\x01 \x03(\x0B2Y.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1A!\x0A\x09CertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xAE\x01\xEAA\xAA\x01\x0A)redis.googleapis.com/CertificateAuthority\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority*\x16certificateAuthorities2\x14certificateAuthorityB\x0B\x0A\x09server_ca\"\x87\x07\x0A\x18ClusterPersistenceConfig\x12Z\x0A\x04mode\x18\x01 \x01(\x0E2G.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceModeB\x03\xE0A\x01\x12Z\x0A\x0Ardb_config\x18\x02 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigB\x03\xE0A\x01\x12Z\x0A\x0Aaof_config\x18\x03 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigB\x03\xE0A\x01\x1A\xBA\x02\x0A\x09RDBConfig\x12r\x0A\x13rdb_snapshot_period\x18\x01 \x01(\x0E2P.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xE0A\x01\x12@\x0A\x17rdb_snapshot_start_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"w\x0A\x0ESnapshotPeriod\x12\x1F\x0A\x1BSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08ONE_HOUR\x10\x01\x12\x0D\x0A\x09SIX_HOURS\x10\x02\x12\x10\x0A\x0CTWELVE_HOURS\x10\x03\x12\x15\x0A\x11TWENTY_FOUR_HOURS\x10\x04\x1A\xC4\x01\x0A\x09AOFConfig\x12h\x0A\x0Cappend_fsync\x18\x01 \x01(\x0E2M.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsyncB\x03\xE0A\x01\"M\x0A\x0BAppendFsync\x12\x1C\x0A\x18APPEND_FSYNC_UNSPECIFIED\x10\x00\x12\x06\x0A\x02NO\x10\x01\x12\x0C\x0A\x08EVERYSEC\x10\x02\x12\x0A\x0A\x06ALWAYS\x10\x03\"S\x0A\x0FPersistenceMode\x12 \x0A\x1CPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x07\x0A\x03RDB\x10\x02\x12\x07\x0A\x03AOF\x10\x03\"\xEB\x01\x0A\x16ZoneDistributionConfig\x12]\x0A\x04mode\x18\x01 \x01(\x0E2J.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xE0A\x01\x12\x11\x0A\x04zone\x18\x02 \x01(\x09B\x03\xE0A\x01\"_\x0A\x14ZoneDistributionMode\x12&\x0A\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AMULTI_ZONE\x10\x01\x12\x0F\x0A\x0BSINGLE_ZONE\x10\x02\"\xD7\x02\x0A#RescheduleClusterMaintenanceRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12o\x0A\x0Freschedule_type\x18\x02 \x01(\x0E2Q.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleTypeB\x03\xE0A\x02\x126\x0A\x0Dschedule_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"S\x0A\x0ERescheduleType\x12\x1F\x0A\x1BRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09IMMEDIATE\x10\x01\x12\x11\x0A\x0DSPECIFIC_TIME\x10\x03\"\xFA\x04\x0A\x0EEncryptionInfo\x12P\x0A\x0Fencryption_type\x18\x01 \x01(\x0E22.google.cloud.redis.cluster.v1.EncryptionInfo.TypeB\x03\xE0A\x03\x12J\x0A\x10kms_key_versions\x18\x02 \x03(\x09B0\xE0A\x03\xFAA*\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12]\x0A\x15kms_key_primary_state\x18\x03 \x01(\x0E29.google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyStateB\x03\xE0A\x03\x129\x0A\x10last_update_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\\\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1F\x0A\x1BCUSTOMER_MANAGED_ENCRYPTION\x10\x02\"\xD1\x01\x0A\x0BKmsKeyState\x12\x1D\x0A\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x15\x0A\x11PERMISSION_DENIED\x10\x02\x12\x0C\x0A\x08DISABLED\x10\x03\x12\x0D\x0A\x09DESTROYED\x10\x04\x12\x15\x0A\x11DESTROY_SCHEDULED\x10\x05\x12 \x0A\x1CEKM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\x0A\x10BILLING_DISABLED\x10\x07\x12\x13\x0A\x0FUNKNOWN_FAILURE\x10\x08*\x83\x01\x0A\x13PscConnectionStatus\x12%\x0A!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12 \x0A\x1CPSC_CONNECTION_STATUS_ACTIVE\x10\x01\x12#\x0A\x1FPSC_CONNECTION_STATUS_NOT_FOUND\x10\x02*^\x0A\x11AuthorizationMode\x12\x19\x0A\x15AUTH_MODE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12AUTH_MODE_IAM_AUTH\x10\x01\x12\x16\x0A\x12AUTH_MODE_DISABLED\x10\x02*\x8F\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x1A\x0A\x16REDIS_SHARED_CORE_NANO\x10\x01\x12\x18\x0A\x14REDIS_HIGHMEM_MEDIUM\x10\x02\x12\x18\x0A\x14REDIS_HIGHMEM_XLARGE\x10\x03\x12\x18\x0A\x14REDIS_STANDARD_SMALL\x10\x04*\x99\x01\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\$\x0A TRANSIT_ENCRYPTION_MODE_DISABLED\x10\x01\x121\x0A-TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION\x10\x02*\xBA\x01\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x121\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12+\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x12*\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03*\x89\x01\x0A\x0EConnectionType\x12\x1F\x0A\x1BCONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19CONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1B\x0A\x17CONNECTION_TYPE_PRIMARY\x10\x02\x12\x1A\x0A\x16CONNECTION_TYPE_READER\x10\x032\xA2\x1A\x0A\x11CloudRedisCluster\x12\xB6\x01\x0A\x0CListClusters\x122.google.cloud.redis.cluster.v1.ListClustersRequest\x1A3.google.cloud.redis.cluster.v1.ListClustersResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xA3\x01\x0A\x0AGetCluster\x120.google.cloud.redis.cluster.v1.GetClusterRequest\x1A&.google.cloud.redis.cluster.v1.Cluster\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xE1\x01\x0A\x0DUpdateCluster\x123.google.cloud.redis.cluster.v1.UpdateClusterRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x13cluster,update_mask\x82\xD3\xE4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07cluster\x12\xCF\x01\x0A\x0DDeleteCluster\x123.google.cloud.redis.cluster.v1.DeleteClusterRequest\x1A\x1D.google.longrunning.Operation\"j\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xDF\x01\x0A\x0DCreateCluster\x123.google.cloud.redis.cluster.v1.CreateClusterRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x19parent,cluster,cluster_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/clusters:\x07cluster\x12\xED\x01\x0A\x1EGetClusterCertificateAuthority\x12D.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest\x1A3.google.cloud.redis.cluster.v1.CertificateAuthority\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\x12A/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}\x12\x8C\x02\x0A%GetSharedRegionalCertificateAuthority\x12K.google.cloud.redis.cluster.v1.GetSharedRegionalCertificateAuthorityRequest\x1AA.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority\"S\xDAA\x04name\x82\xD3\xE4\x93\x02F\x12D/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x9E\x02\x0A\x1CRescheduleClusterMaintenance\x12B.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest\x1A\x1D.google.longrunning.Operation\"\x9A\x01\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\"name,reschedule_type,schedule_time\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/clusters/*}:rescheduleClusterMaintenance:\x01*\x12\xDA\x01\x0A\x15ListBackupCollections\x12;.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest\x1A<.google.cloud.redis.cluster.v1.ListBackupCollectionsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/backupCollections\x12\xC7\x01\x0A\x13GetBackupCollection\x129.google.cloud.redis.cluster.v1.GetBackupCollectionRequest\x1A/.google.cloud.redis.cluster.v1.BackupCollection\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xC6\x01\x0A\x0BListBackups\x121.google.cloud.redis.cluster.v1.ListBackupsRequest\x1A2.google.cloud.redis.cluster.v1.ListBackupsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xB3\x01\x0A\x09GetBackup\x12/.google.cloud.redis.cluster.v1.GetBackupRequest\x1A%.google.cloud.redis.cluster.v1.Backup\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xE0\x01\x0A\x0CDeleteBackup\x122.google.cloud.redis.cluster.v1.DeleteBackupRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02A*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xD4\x01\x0A\x0CExportBackup\x122.google.cloud.redis.cluster.v1.ExportBackupRequest\x1A\x1D.google.longrunning.Operation\"q\xCAA\x1D\x0A\x06Backup\x12\x13google.protobuf.Any\x82\xD3\xE4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xCB\x01\x0A\x0DBackupCluster\x123.google.cloud.redis.cluster.v1.BackupClusterRequest\x1A\x1D.google.longrunning.Operation\"f\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/locations/*/clusters/*}:backup:\x01*\x1AH\xCAA\x14redis.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDE\x06\x0A!com.google.cloud.redis.cluster.v1B\x16CloudRedisClusterProtoP\x01Z;cloud.google.com/go/redis/cluster/apiv1/clusterpb;clusterpb\xEA\x02!Google::Cloud::Redis::Cluster::V1\xEAAn\x0A%compute.googleapis.com/ForwardingRule\x12Eprojects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xEAAN\x0A\x1Ecompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\xA6\x01\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php new file mode 100644 index 000000000000..ff6184311f1f --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php @@ -0,0 +1,61 @@ +google.cloud.redis.cluster.v1.AuthorizationMode + */ +class AuthorizationMode +{ + /** + * Not set. + * + * Generated from protobuf enum AUTH_MODE_UNSPECIFIED = 0; + */ + const AUTH_MODE_UNSPECIFIED = 0; + /** + * IAM basic authorization mode + * + * Generated from protobuf enum AUTH_MODE_IAM_AUTH = 1; + */ + const AUTH_MODE_IAM_AUTH = 1; + /** + * Authorization disabled mode + * + * Generated from protobuf enum AUTH_MODE_DISABLED = 2; + */ + const AUTH_MODE_DISABLED = 2; + + private static $valueToName = [ + self::AUTH_MODE_UNSPECIFIED => 'AUTH_MODE_UNSPECIFIED', + self::AUTH_MODE_IAM_AUTH => 'AUTH_MODE_IAM_AUTH', + self::AUTH_MODE_DISABLED => 'AUTH_MODE_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php new file mode 100644 index 000000000000..e638085eaa44 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php @@ -0,0 +1,165 @@ +google.cloud.redis.cluster.v1.AutomatedBackupConfig + */ +class AutomatedBackupConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The automated backup mode. If the mode is disabled, the other + * fields will be ignored. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode automated_backup_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $automated_backup_mode = 0; + /** + * Optional. How long to keep automated backups before the backups are + * deleted. The value should be between 1 day and 365 days. If not specified, + * the default value is 35 days. + * + * Generated from protobuf field optional .google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retention = null; + protected $schedule; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule $fixed_frequency_schedule + * Optional. Trigger automated backups at a fixed frequency. + * @type int $automated_backup_mode + * Optional. The automated backup mode. If the mode is disabled, the other + * fields will be ignored. + * @type \Google\Protobuf\Duration $retention + * Optional. How long to keep automated backups before the backups are + * deleted. The value should be between 1 day and 365 days. If not specified, + * the default value is 35 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Trigger automated backups at a fixed frequency. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule|null + */ + public function getFixedFrequencySchedule() + { + return $this->readOneof(2); + } + + public function hasFixedFrequencySchedule() + { + return $this->hasOneof(2); + } + + /** + * Optional. Trigger automated backups at a fixed frequency. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule $var + * @return $this + */ + public function setFixedFrequencySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Optional. The automated backup mode. If the mode is disabled, the other + * fields will be ignored. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode automated_backup_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAutomatedBackupMode() + { + return $this->automated_backup_mode; + } + + /** + * Optional. The automated backup mode. If the mode is disabled, the other + * fields will be ignored. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode automated_backup_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAutomatedBackupMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\AutomatedBackupMode::class); + $this->automated_backup_mode = $var; + + return $this; + } + + /** + * Optional. How long to keep automated backups before the backups are + * deleted. The value should be between 1 day and 365 days. If not specified, + * the default value is 35 days. + * + * Generated from protobuf field optional .google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getRetention() + { + return $this->retention; + } + + public function hasRetention() + { + return isset($this->retention); + } + + public function clearRetention() + { + unset($this->retention); + } + + /** + * Optional. How long to keep automated backups before the backups are + * deleted. The value should be between 1 day and 365 days. If not specified, + * the default value is 35 days. + * + * Generated from protobuf field optional .google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetention($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention = $var; + + return $this; + } + + /** + * @return string + */ + public function getSchedule() + { + return $this->whichOneof("schedule"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php new file mode 100644 index 000000000000..abf8501fa4c4 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php @@ -0,0 +1,61 @@ +google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode + */ +class AutomatedBackupMode +{ + /** + * Default value. Automated backup config is not specified. + * + * Generated from protobuf enum AUTOMATED_BACKUP_MODE_UNSPECIFIED = 0; + */ + const AUTOMATED_BACKUP_MODE_UNSPECIFIED = 0; + /** + * Automated backup config disabled. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * Automated backup config enabled. + * + * Generated from protobuf enum ENABLED = 2; + */ + const ENABLED = 2; + + private static $valueToName = [ + self::AUTOMATED_BACKUP_MODE_UNSPECIFIED => 'AUTOMATED_BACKUP_MODE_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::ENABLED => 'ENABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php new file mode 100644 index 000000000000..e17635096397 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php @@ -0,0 +1,82 @@ +google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencySchedule + */ +class FixedFrequencySchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The start time of every automated backup in UTC. It must be set + * to the start of an hour. This field is required. + * + * Generated from protobuf field optional .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\TimeOfDay $start_time + * Required. The start time of every automated backup in UTC. It must be set + * to the start of an hour. This field is required. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The start time of every automated backup in UTC. It must be set + * to the start of an hour. This field is required. + * + * Generated from protobuf field optional .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Required. The start time of every automated backup in UTC. It must be set + * to the start of an hour. This field is required. + * + * Generated from protobuf field optional .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php new file mode 100644 index 000000000000..4fe2ec3fed63 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php @@ -0,0 +1,585 @@ +google.cloud.redis.cluster.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Full resource path of the backup. the last part of the name is + * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster + * UID] OR customer specified while backup cluster. Example: + * 20240515123000_1234 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Cluster resource path of this backup. + * + * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * Output only. Cluster uid of this backup. + * + * Generated from protobuf field string cluster_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $cluster_uid = ''; + /** + * Output only. Total size of the backup in bytes. + * + * Generated from protobuf field int64 total_size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_size_bytes = 0; + /** + * Output only. The time when the backup will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. redis-7.2, valkey-7.5 + * + * Generated from protobuf field string engine_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $engine_version = ''; + /** + * Output only. List of backup files of the backup. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $backup_files; + /** + * Output only. Node type of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_type = 0; + /** + * Output only. Number of replicas for the cluster. + * + * Generated from protobuf field int32 replica_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $replica_count = 0; + /** + * Output only. Number of shards for the cluster. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $shard_count = 0; + /** + * Output only. Type of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.BackupType backup_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $backup_type = 0; + /** + * Output only. State of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Encryption information of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_info = null; + /** + * Output only. System assigned unique identifier of the backup. + * + * Generated from protobuf field string uid = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Full resource path of the backup. the last part of the name is + * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster + * UID] OR customer specified while backup cluster. Example: + * 20240515123000_1234 + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup was created. + * @type string $cluster + * Output only. Cluster resource path of this backup. + * @type string $cluster_uid + * Output only. Cluster uid of this backup. + * @type int|string $total_size_bytes + * Output only. Total size of the backup in bytes. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The time when the backup will expire. + * @type string $engine_version + * Output only. redis-7.2, valkey-7.5 + * @type \Google\Cloud\Redis\Cluster\V1\BackupFile[] $backup_files + * Output only. List of backup files of the backup. + * @type int $node_type + * Output only. Node type of the cluster. + * @type int $replica_count + * Output only. Number of replicas for the cluster. + * @type int $shard_count + * Output only. Number of shards for the cluster. + * @type int $backup_type + * Output only. Type of the backup. + * @type int $state + * Output only. State of the backup. + * @type \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $encryption_info + * Output only. Encryption information of the backup. + * @type string $uid + * Output only. System assigned unique identifier of the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Full resource path of the backup. the last part of the name is + * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster + * UID] OR customer specified while backup cluster. Example: + * 20240515123000_1234 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Full resource path of the backup. the last part of the name is + * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster + * UID] OR customer specified while backup cluster. Example: + * 20240515123000_1234 + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the backup was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. Cluster resource path of this backup. + * + * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Output only. Cluster resource path of this backup. + * + * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Output only. Cluster uid of this backup. + * + * Generated from protobuf field string cluster_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getClusterUid() + { + return $this->cluster_uid; + } + + /** + * Output only. Cluster uid of this backup. + * + * Generated from protobuf field string cluster_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setClusterUid($var) + { + GPBUtil::checkString($var, True); + $this->cluster_uid = $var; + + return $this; + } + + /** + * Output only. Total size of the backup in bytes. + * + * Generated from protobuf field int64 total_size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalSizeBytes() + { + return $this->total_size_bytes; + } + + /** + * Output only. Total size of the backup in bytes. + * + * Generated from protobuf field int64 total_size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_size_bytes = $var; + + return $this; + } + + /** + * Output only. The time when the backup will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The time when the backup will expire. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. redis-7.2, valkey-7.5 + * + * Generated from protobuf field string engine_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEngineVersion() + { + return $this->engine_version; + } + + /** + * Output only. redis-7.2, valkey-7.5 + * + * Generated from protobuf field string engine_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEngineVersion($var) + { + GPBUtil::checkString($var, True); + $this->engine_version = $var; + + return $this; + } + + /** + * Output only. List of backup files of the backup. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\BackupFile> + */ + public function getBackupFiles() + { + return $this->backup_files; + } + + /** + * Output only. List of backup files of the backup. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\BackupFile[] $var + * @return $this + */ + public function setBackupFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\BackupFile::class); + $this->backup_files = $arr; + + return $this; + } + + /** + * Output only. Node type of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getNodeType() + { + return $this->node_type; + } + + /** + * Output only. Node type of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setNodeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\NodeType::class); + $this->node_type = $var; + + return $this; + } + + /** + * Output only. Number of replicas for the cluster. + * + * Generated from protobuf field int32 replica_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getReplicaCount() + { + return $this->replica_count; + } + + /** + * Output only. Number of replicas for the cluster. + * + * Generated from protobuf field int32 replica_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->replica_count = $var; + + return $this; + } + + /** + * Output only. Number of shards for the cluster. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Output only. Number of shards for the cluster. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt32($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Output only. Type of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.BackupType backup_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getBackupType() + { + return $this->backup_type; + } + + /** + * Output only. Type of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.BackupType backup_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setBackupType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\Backup\BackupType::class); + $this->backup_type = $var; + + return $this; + } + + /** + * Output only. State of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Encryption information of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\EncryptionInfo|null + */ + public function getEncryptionInfo() + { + return $this->encryption_info; + } + + public function hasEncryptionInfo() + { + return isset($this->encryption_info); + } + + public function clearEncryptionInfo() + { + unset($this->encryption_info); + } + + /** + * Output only. Encryption information of the backup. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $var + * @return $this + */ + public function setEncryptionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo::class); + $this->encryption_info = $var; + + return $this; + } + + /** + * Output only. System assigned unique identifier of the backup. + * + * Generated from protobuf field string uid = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System assigned unique identifier of the backup. + * + * Generated from protobuf field string uid = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php new file mode 100644 index 000000000000..b6fd235a0783 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php @@ -0,0 +1,61 @@ +google.cloud.redis.cluster.v1.Backup.BackupType + */ +class BackupType +{ + /** + * The default value, not set. + * + * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; + */ + const BACKUP_TYPE_UNSPECIFIED = 0; + /** + * On-demand backup. + * + * Generated from protobuf enum ON_DEMAND = 1; + */ + const ON_DEMAND = 1; + /** + * Automated backup. + * + * Generated from protobuf enum AUTOMATED = 2; + */ + const AUTOMATED = 2; + + private static $valueToName = [ + self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', + self::ON_DEMAND => 'ON_DEMAND', + self::AUTOMATED => 'AUTOMATED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php new file mode 100644 index 000000000000..d5a5f714e085 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php @@ -0,0 +1,76 @@ +google.cloud.redis.cluster.v1.Backup.State + */ +class State +{ + /** + * The default value, not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The backup is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The backup is active to be used. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The backup is being deleted. + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * The backup is currently suspended due to reasons like project deletion, + * billing account closure, etc. + * + * Generated from protobuf enum SUSPENDED = 4; + */ + const SUSPENDED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::SUSPENDED => 'SUSPENDED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php new file mode 100644 index 000000000000..c454345ba439 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php @@ -0,0 +1,187 @@ +google.cloud.redis.cluster.v1.BackupClusterRequest + */ +class BackupClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. + * If not specified, the default value is 100 years. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $ttl = null; + /** + * Optional. The id of the backup to be created. If not specified, the + * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. + * + * Generated from protobuf field optional string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $backup_id = null; + + /** + * @param string $name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\BackupClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * @type \Google\Protobuf\Duration $ttl + * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. + * If not specified, the default value is 100 years. + * @type string $backup_id + * Optional. The id of the backup to be created. If not specified, the + * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. + * If not specified, the default value is 100 years. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTtl() + { + return $this->ttl; + } + + public function hasTtl() + { + return isset($this->ttl); + } + + public function clearTtl() + { + unset($this->ttl); + } + + /** + * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. + * If not specified, the default value is 100 years. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + + /** + * Optional. The id of the backup to be created. If not specified, the + * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. + * + * Generated from protobuf field optional string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBackupId() + { + return isset($this->backup_id) ? $this->backup_id : ''; + } + + public function hasBackupId() + { + return isset($this->backup_id); + } + + public function clearBackupId() + { + unset($this->backup_id); + } + + /** + * Optional. The id of the backup to be created. If not specified, the + * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. + * + * Generated from protobuf field optional string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBackupId($var) + { + GPBUtil::checkString($var, True); + $this->backup_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php new file mode 100644 index 000000000000..91af3016374f --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php @@ -0,0 +1,215 @@ +google.cloud.redis.cluster.v1.BackupCollection + */ +class BackupCollection extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Full resource path of the backup collection. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The cluster uid of the backup collection. + * + * Generated from protobuf field string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $cluster_uid = ''; + /** + * Output only. The full resource path of the cluster the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/clusters/{cluster} + * + * Generated from protobuf field string cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * Output only. The KMS key used to encrypt the backups under this backup + * collection. + * + * Generated from protobuf field string kms_key = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + /** + * Output only. System assigned unique identifier of the backup collection. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Full resource path of the backup collection. + * @type string $cluster_uid + * Output only. The cluster uid of the backup collection. + * @type string $cluster + * Output only. The full resource path of the cluster the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/clusters/{cluster} + * @type string $kms_key + * Output only. The KMS key used to encrypt the backups under this backup + * collection. + * @type string $uid + * Output only. System assigned unique identifier of the backup collection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Full resource path of the backup collection. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Full resource path of the backup collection. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The cluster uid of the backup collection. + * + * Generated from protobuf field string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getClusterUid() + { + return $this->cluster_uid; + } + + /** + * Output only. The cluster uid of the backup collection. + * + * Generated from protobuf field string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setClusterUid($var) + { + GPBUtil::checkString($var, True); + $this->cluster_uid = $var; + + return $this; + } + + /** + * Output only. The full resource path of the cluster the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/clusters/{cluster} + * + * Generated from protobuf field string cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * Output only. The full resource path of the cluster the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/clusters/{cluster} + * + * Generated from protobuf field string cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Output only. The KMS key used to encrypt the backups under this backup + * collection. + * + * Generated from protobuf field string kms_key = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Output only. The KMS key used to encrypt the backups under this backup + * collection. + * + * Generated from protobuf field string kms_key = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + + /** + * Output only. System assigned unique identifier of the backup collection. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System assigned unique identifier of the backup collection. + * + * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php new file mode 100644 index 000000000000..41f1b7343ccf --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php @@ -0,0 +1,145 @@ +google.cloud.redis.cluster.v1.BackupFile + */ +class BackupFile extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. e.g: .rdb + * + * Generated from protobuf field string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $file_name = ''; + /** + * Output only. Size of the backup file in bytes. + * + * Generated from protobuf field int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + /** + * Output only. The time when the backup file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_name + * Output only. e.g: .rdb + * @type int|string $size_bytes + * Output only. Size of the backup file in bytes. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup file was created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. e.g: .rdb + * + * Generated from protobuf field string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFileName() + { + return $this->file_name; + } + + /** + * Output only. e.g: .rdb + * + * Generated from protobuf field string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkString($var, True); + $this->file_name = $var; + + return $this; + } + + /** + * Output only. Size of the backup file in bytes. + * + * Generated from protobuf field int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. Size of the backup file in bytes. + * + * Generated from protobuf field int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Output only. The time when the backup file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the backup file was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php new file mode 100644 index 000000000000..13f865d5b272 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php @@ -0,0 +1,112 @@ +google.cloud.redis.cluster.v1.CertificateAuthority + */ +class CertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the resource in this scope including project, + * location and cluster using the form: + * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + protected $server_ca; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority $managed_server_ca + * @type string $name + * Identifier. Unique name of the resource in this scope including project, + * location and cluster using the form: + * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * @return \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority|null + */ + public function getManagedServerCa() + { + return $this->readOneof(1); + } + + public function hasManagedServerCa() + { + return $this->hasOneof(1); + } + + /** + * Generated from protobuf field .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; + * @param \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority $var + * @return $this + */ + public function setManagedServerCa($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Identifier. Unique name of the resource in this scope including project, + * location and cluster using the form: + * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Unique name of the resource in this scope including project, + * location and cluster using the form: + * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` + * + * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getServerCa() + { + return $this->whichOneof("server_ca"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php new file mode 100644 index 000000000000..59407cbc0cb8 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php @@ -0,0 +1,69 @@ +google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority + */ +class ManagedCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * The PEM encoded CA certificate chains for redis managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $ca_certs + * The PEM encoded CA certificate chains for redis managed + * server authentication + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * The PEM encoded CA certificate chains for redis managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain> + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * The PEM encoded CA certificate chains for redis managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * @param \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain::class); + $this->ca_certs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php new file mode 100644 index 000000000000..59b88b8bc643 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php @@ -0,0 +1,65 @@ +google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain + */ +class CertChain extends \Google\Protobuf\Internal\Message +{ + /** + * The certificates that form the CA chain, from leaf to root order. + * + * Generated from protobuf field repeated string certificates = 1; + */ + private $certificates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $certificates + * The certificates that form the CA chain, from leaf to root order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * The certificates that form the CA chain, from leaf to root order. + * + * Generated from protobuf field repeated string certificates = 1; + * @return RepeatedField + */ + public function getCertificates() + { + return $this->certificates; + } + + /** + * The certificates that form the CA chain, from leaf to root order. + * + * Generated from protobuf field repeated string certificates = 1; + * @param string[] $var + * @return $this + */ + public function setCertificates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->certificates = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php new file mode 100644 index 000000000000..e1f7f1ec77fa --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php @@ -0,0 +1,1433 @@ +google.cloud.redis.cluster.v1.Cluster + */ +class Cluster extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Identifier. Unique name of the resource in this scope including + * project and location using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The timestamp associated with the cluster creation request. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The current state of this cluster. + * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. System assigned, unique identifier for the cluster. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Optional. The number of replica nodes per shard. + * + * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replica_count = null; + /** + * Optional. The authorization mode of the Redis cluster. + * If not provided, auth feature is disabled for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $authorization_mode = 0; + /** + * Optional. The in-transit encryption for the Redis cluster. + * If not provided, encryption is disabled for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $transit_encryption_mode = 0; + /** + * Output only. Redis memory size in GB for the entire cluster rounded up to + * the next integer. + * + * Generated from protobuf field optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gb = null; + /** + * Optional. Number of shards for the Redis cluster. + * + * Generated from protobuf field optional int32 shard_count = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shard_count = null; + /** + * Optional. Each PscConfig configures the consumer network where IPs will + * be designated to the cluster for client access through Private Service + * Connect Automation. Currently, only one PscConfig is supported. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $psc_configs; + /** + * Output only. Endpoints created on each given network, for Redis clients to + * connect to the cluster. Currently only one discovery endpoint is supported. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $discovery_endpoints; + /** + * Output only. The list of PSC connections that are auto-created through + * service connectivity automation. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $psc_connections; + /** + * Output only. Additional information about the current state of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_info = null; + /** + * Optional. The type of a redis node in the cluster. NodeType determines the + * underlying machine-type of a redis node. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_type = 0; + /** + * Optional. Persistence config (RDB, AOF) for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $persistence_config = null; + /** + * Optional. Key/Value pairs of customer overrides for mutable Redis Configs + * + * Generated from protobuf field map redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $redis_configs; + /** + * Output only. Precise value of redis memory size in GB for the entire + * cluster. + * + * Generated from protobuf field optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $precise_size_gb = null; + /** + * Optional. This config will be used to determine how the customer wants us + * to distribute cluster resources within the region. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone_distribution_config = null; + /** + * Optional. Cross cluster replication config. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig cross_cluster_replication_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cross_cluster_replication_config = null; + /** + * Optional. The delete operation will fail when the value is set to true. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deletion_protection_enabled = null; + /** + * Optional. ClusterMaintenancePolicy determines when to allow or deny + * updates. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenancePolicy maintenance_policy = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance_policy = null; + /** + * Output only. ClusterMaintenanceSchedule Output only Published maintenance + * schedule. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule maintenance_schedule = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $maintenance_schedule = null; + /** + * Output only. Service attachment details to configure Psc connections + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscServiceAttachment psc_service_attachments = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $psc_service_attachments; + /** + * Optional. A list of cluster enpoints. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterEndpoint cluster_endpoints = 36 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $cluster_endpoints; + /** + * Optional. Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * + * Generated from protobuf field optional string backup_collection = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $backup_collection = null; + /** + * Optional. The KMS key used to encrypt the at-rest data of the cluster. + * + * Generated from protobuf field optional string kms_key = 40 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $kms_key = null; + /** + * Optional. The automated backup config for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig automated_backup_config = 42 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $automated_backup_config = null; + /** + * Output only. Encryption information of the data at rest of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_info = null; + /** + * Optional. Server CA mode for the cluster. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $server_ca_mode = null; + /** + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $server_ca_pool = null; + /** + * Optional. Input only. Rotate the server certificates. + * + * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $rotate_server_certificate = null; + protected $import_sources; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource $gcs_source + * Optional. Backups stored in Cloud Storage buckets. + * The Cloud Storage buckets need to be the same region as the clusters. + * Read permission is required to import from the provided Cloud Storage + * objects. + * @type \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource $managed_backup_source + * Optional. Backups generated and managed by memorystore service. + * @type string $name + * Required. Identifier. Unique name of the resource in this scope including + * project and location using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp associated with the cluster creation request. + * @type int $state + * Output only. The current state of this cluster. + * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + * @type string $uid + * Output only. System assigned, unique identifier for the cluster. + * @type int $replica_count + * Optional. The number of replica nodes per shard. + * @type int $authorization_mode + * Optional. The authorization mode of the Redis cluster. + * If not provided, auth feature is disabled for the cluster. + * @type int $transit_encryption_mode + * Optional. The in-transit encryption for the Redis cluster. + * If not provided, encryption is disabled for the cluster. + * @type int $size_gb + * Output only. Redis memory size in GB for the entire cluster rounded up to + * the next integer. + * @type int $shard_count + * Optional. Number of shards for the Redis cluster. + * @type \Google\Cloud\Redis\Cluster\V1\PscConfig[] $psc_configs + * Optional. Each PscConfig configures the consumer network where IPs will + * be designated to the cluster for client access through Private Service + * Connect Automation. Currently, only one PscConfig is supported. + * @type \Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint[] $discovery_endpoints + * Output only. Endpoints created on each given network, for Redis clients to + * connect to the cluster. Currently only one discovery endpoint is supported. + * @type \Google\Cloud\Redis\Cluster\V1\PscConnection[] $psc_connections + * Output only. The list of PSC connections that are auto-created through + * service connectivity automation. + * @type \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo $state_info + * Output only. Additional information about the current state of the cluster. + * @type int $node_type + * Optional. The type of a redis node in the cluster. NodeType determines the + * underlying machine-type of a redis node. + * @type \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig $persistence_config + * Optional. Persistence config (RDB, AOF) for the cluster. + * @type array|\Google\Protobuf\Internal\MapField $redis_configs + * Optional. Key/Value pairs of customer overrides for mutable Redis Configs + * @type float $precise_size_gb + * Output only. Precise value of redis memory size in GB for the entire + * cluster. + * @type \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig $zone_distribution_config + * Optional. This config will be used to determine how the customer wants us + * to distribute cluster resources within the region. + * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig $cross_cluster_replication_config + * Optional. Cross cluster replication config. + * @type bool $deletion_protection_enabled + * Optional. The delete operation will fail when the value is set to true. + * @type \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy $maintenance_policy + * Optional. ClusterMaintenancePolicy determines when to allow or deny + * updates. + * @type \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule $maintenance_schedule + * Output only. ClusterMaintenanceSchedule Output only Published maintenance + * schedule. + * @type \Google\Cloud\Redis\Cluster\V1\PscServiceAttachment[] $psc_service_attachments + * Output only. Service attachment details to configure Psc connections + * @type \Google\Cloud\Redis\Cluster\V1\ClusterEndpoint[] $cluster_endpoints + * Optional. A list of cluster enpoints. + * @type string $backup_collection + * Optional. Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * @type string $kms_key + * Optional. The KMS key used to encrypt the at-rest data of the cluster. + * @type \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig $automated_backup_config + * Optional. The automated backup config for the cluster. + * @type \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $encryption_info + * Output only. Encryption information of the data at rest of the cluster. + * @type int $server_ca_mode + * Optional. Server CA mode for the cluster. + * @type string $server_ca_pool + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * @type bool $rotate_server_certificate + * Optional. Input only. Rotate the server certificates. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Backups stored in Cloud Storage buckets. + * The Cloud Storage buckets need to be the same region as the clusters. + * Read permission is required to import from the provided Cloud Storage + * objects. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.GcsBackupSource gcs_source = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource|null + */ + public function getGcsSource() + { + return $this->readOneof(34); + } + + public function hasGcsSource() + { + return $this->hasOneof(34); + } + + /** + * Optional. Backups stored in Cloud Storage buckets. + * The Cloud Storage buckets need to be the same region as the clusters. + * Read permission is required to import from the provided Cloud Storage + * objects. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.GcsBackupSource gcs_source = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource::class); + $this->writeOneof(34, $var); + + return $this; + } + + /** + * Optional. Backups generated and managed by memorystore service. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.ManagedBackupSource managed_backup_source = 35 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource|null + */ + public function getManagedBackupSource() + { + return $this->readOneof(35); + } + + public function hasManagedBackupSource() + { + return $this->hasOneof(35); + } + + /** + * Optional. Backups generated and managed by memorystore service. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.ManagedBackupSource managed_backup_source = 35 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource $var + * @return $this + */ + public function setManagedBackupSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource::class); + $this->writeOneof(35, $var); + + return $this; + } + + /** + * Required. Identifier. Unique name of the resource in this scope including + * project and location using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Identifier. Unique name of the resource in this scope including + * project and location using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp associated with the cluster creation request. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp associated with the cluster creation request. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The current state of this cluster. + * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of this cluster. + * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\Cluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. System assigned, unique identifier for the cluster. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System assigned, unique identifier for the cluster. + * + * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Optional. The number of replica nodes per shard. + * + * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getReplicaCount() + { + return isset($this->replica_count) ? $this->replica_count : 0; + } + + public function hasReplicaCount() + { + return isset($this->replica_count); + } + + public function clearReplicaCount() + { + unset($this->replica_count); + } + + /** + * Optional. The number of replica nodes per shard. + * + * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->replica_count = $var; + + return $this; + } + + /** + * Optional. The authorization mode of the Redis cluster. + * If not provided, auth feature is disabled for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAuthorizationMode() + { + return $this->authorization_mode; + } + + /** + * Optional. The authorization mode of the Redis cluster. + * If not provided, auth feature is disabled for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAuthorizationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\AuthorizationMode::class); + $this->authorization_mode = $var; + + return $this; + } + + /** + * Optional. The in-transit encryption for the Redis cluster. + * If not provided, encryption is disabled for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getTransitEncryptionMode() + { + return $this->transit_encryption_mode; + } + + /** + * Optional. The in-transit encryption for the Redis cluster. + * If not provided, encryption is disabled for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setTransitEncryptionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\TransitEncryptionMode::class); + $this->transit_encryption_mode = $var; + + return $this; + } + + /** + * Output only. Redis memory size in GB for the entire cluster rounded up to + * the next integer. + * + * Generated from protobuf field optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSizeGb() + { + return isset($this->size_gb) ? $this->size_gb : 0; + } + + public function hasSizeGb() + { + return isset($this->size_gb); + } + + public function clearSizeGb() + { + unset($this->size_gb); + } + + /** + * Output only. Redis memory size in GB for the entire cluster rounded up to + * the next integer. + * + * Generated from protobuf field optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->size_gb = $var; + + return $this; + } + + /** + * Optional. Number of shards for the Redis cluster. + * + * Generated from protobuf field optional int32 shard_count = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShardCount() + { + return isset($this->shard_count) ? $this->shard_count : 0; + } + + public function hasShardCount() + { + return isset($this->shard_count); + } + + public function clearShardCount() + { + unset($this->shard_count); + } + + /** + * Optional. Number of shards for the Redis cluster. + * + * Generated from protobuf field optional int32 shard_count = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt32($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Optional. Each PscConfig configures the consumer network where IPs will + * be designated to the cluster for client access through Private Service + * Connect Automation. Currently, only one PscConfig is supported. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\PscConfig> + */ + public function getPscConfigs() + { + return $this->psc_configs; + } + + /** + * Optional. Each PscConfig configures the consumer network where IPs will + * be designated to the cluster for client access through Private Service + * Connect Automation. Currently, only one PscConfig is supported. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\PscConfig[] $var + * @return $this + */ + public function setPscConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\PscConfig::class); + $this->psc_configs = $arr; + + return $this; + } + + /** + * Output only. Endpoints created on each given network, for Redis clients to + * connect to the cluster. Currently only one discovery endpoint is supported. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint> + */ + public function getDiscoveryEndpoints() + { + return $this->discovery_endpoints; + } + + /** + * Output only. Endpoints created on each given network, for Redis clients to + * connect to the cluster. Currently only one discovery endpoint is supported. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint[] $var + * @return $this + */ + public function setDiscoveryEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint::class); + $this->discovery_endpoints = $arr; + + return $this; + } + + /** + * Output only. The list of PSC connections that are auto-created through + * service connectivity automation. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\PscConnection> + */ + public function getPscConnections() + { + return $this->psc_connections; + } + + /** + * Output only. The list of PSC connections that are auto-created through + * service connectivity automation. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\PscConnection[] $var + * @return $this + */ + public function setPscConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\PscConnection::class); + $this->psc_connections = $arr; + + return $this; + } + + /** + * Output only. Additional information about the current state of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo|null + */ + public function getStateInfo() + { + return $this->state_info; + } + + public function hasStateInfo() + { + return isset($this->state_info); + } + + public function clearStateInfo() + { + unset($this->state_info); + } + + /** + * Output only. Additional information about the current state of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo $var + * @return $this + */ + public function setStateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo::class); + $this->state_info = $var; + + return $this; + } + + /** + * Optional. The type of a redis node in the cluster. NodeType determines the + * underlying machine-type of a redis node. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNodeType() + { + return $this->node_type; + } + + /** + * Optional. The type of a redis node in the cluster. NodeType determines the + * underlying machine-type of a redis node. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNodeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\NodeType::class); + $this->node_type = $var; + + return $this; + } + + /** + * Optional. Persistence config (RDB, AOF) for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig|null + */ + public function getPersistenceConfig() + { + return $this->persistence_config; + } + + public function hasPersistenceConfig() + { + return isset($this->persistence_config); + } + + public function clearPersistenceConfig() + { + unset($this->persistence_config); + } + + /** + * Optional. Persistence config (RDB, AOF) for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig $var + * @return $this + */ + public function setPersistenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig::class); + $this->persistence_config = $var; + + return $this; + } + + /** + * Optional. Key/Value pairs of customer overrides for mutable Redis Configs + * + * Generated from protobuf field map redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getRedisConfigs() + { + return $this->redis_configs; + } + + /** + * Optional. Key/Value pairs of customer overrides for mutable Redis Configs + * + * Generated from protobuf field map redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setRedisConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->redis_configs = $arr; + + return $this; + } + + /** + * Output only. Precise value of redis memory size in GB for the entire + * cluster. + * + * Generated from protobuf field optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getPreciseSizeGb() + { + return isset($this->precise_size_gb) ? $this->precise_size_gb : 0.0; + } + + public function hasPreciseSizeGb() + { + return isset($this->precise_size_gb); + } + + public function clearPreciseSizeGb() + { + unset($this->precise_size_gb); + } + + /** + * Output only. Precise value of redis memory size in GB for the entire + * cluster. + * + * Generated from protobuf field optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setPreciseSizeGb($var) + { + GPBUtil::checkDouble($var); + $this->precise_size_gb = $var; + + return $this; + } + + /** + * Optional. This config will be used to determine how the customer wants us + * to distribute cluster resources within the region. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig|null + */ + public function getZoneDistributionConfig() + { + return $this->zone_distribution_config; + } + + public function hasZoneDistributionConfig() + { + return isset($this->zone_distribution_config); + } + + public function clearZoneDistributionConfig() + { + unset($this->zone_distribution_config); + } + + /** + * Optional. This config will be used to determine how the customer wants us + * to distribute cluster resources within the region. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig $var + * @return $this + */ + public function setZoneDistributionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig::class); + $this->zone_distribution_config = $var; + + return $this; + } + + /** + * Optional. Cross cluster replication config. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig cross_cluster_replication_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig|null + */ + public function getCrossClusterReplicationConfig() + { + return $this->cross_cluster_replication_config; + } + + public function hasCrossClusterReplicationConfig() + { + return isset($this->cross_cluster_replication_config); + } + + public function clearCrossClusterReplicationConfig() + { + unset($this->cross_cluster_replication_config); + } + + /** + * Optional. Cross cluster replication config. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig cross_cluster_replication_config = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig $var + * @return $this + */ + public function setCrossClusterReplicationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig::class); + $this->cross_cluster_replication_config = $var; + + return $this; + } + + /** + * Optional. The delete operation will fail when the value is set to true. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDeletionProtectionEnabled() + { + return isset($this->deletion_protection_enabled) ? $this->deletion_protection_enabled : false; + } + + public function hasDeletionProtectionEnabled() + { + return isset($this->deletion_protection_enabled); + } + + public function clearDeletionProtectionEnabled() + { + unset($this->deletion_protection_enabled); + } + + /** + * Optional. The delete operation will fail when the value is set to true. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDeletionProtectionEnabled($var) + { + GPBUtil::checkBool($var); + $this->deletion_protection_enabled = $var; + + return $this; + } + + /** + * Optional. ClusterMaintenancePolicy determines when to allow or deny + * updates. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenancePolicy maintenance_policy = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy|null + */ + public function getMaintenancePolicy() + { + return $this->maintenance_policy; + } + + public function hasMaintenancePolicy() + { + return isset($this->maintenance_policy); + } + + public function clearMaintenancePolicy() + { + unset($this->maintenance_policy); + } + + /** + * Optional. ClusterMaintenancePolicy determines when to allow or deny + * updates. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenancePolicy maintenance_policy = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy $var + * @return $this + */ + public function setMaintenancePolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy::class); + $this->maintenance_policy = $var; + + return $this; + } + + /** + * Output only. ClusterMaintenanceSchedule Output only Published maintenance + * schedule. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule maintenance_schedule = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule|null + */ + public function getMaintenanceSchedule() + { + return $this->maintenance_schedule; + } + + public function hasMaintenanceSchedule() + { + return isset($this->maintenance_schedule); + } + + public function clearMaintenanceSchedule() + { + unset($this->maintenance_schedule); + } + + /** + * Output only. ClusterMaintenanceSchedule Output only Published maintenance + * schedule. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule maintenance_schedule = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule $var + * @return $this + */ + public function setMaintenanceSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule::class); + $this->maintenance_schedule = $var; + + return $this; + } + + /** + * Output only. Service attachment details to configure Psc connections + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscServiceAttachment psc_service_attachments = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\PscServiceAttachment> + */ + public function getPscServiceAttachments() + { + return $this->psc_service_attachments; + } + + /** + * Output only. Service attachment details to configure Psc connections + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscServiceAttachment psc_service_attachments = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\PscServiceAttachment[] $var + * @return $this + */ + public function setPscServiceAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\PscServiceAttachment::class); + $this->psc_service_attachments = $arr; + + return $this; + } + + /** + * Optional. A list of cluster enpoints. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterEndpoint cluster_endpoints = 36 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\ClusterEndpoint> + */ + public function getClusterEndpoints() + { + return $this->cluster_endpoints; + } + + /** + * Optional. A list of cluster enpoints. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterEndpoint cluster_endpoints = 36 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterEndpoint[] $var + * @return $this + */ + public function setClusterEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\ClusterEndpoint::class); + $this->cluster_endpoints = $arr; + + return $this; + } + + /** + * Optional. Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * + * Generated from protobuf field optional string backup_collection = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getBackupCollection() + { + return isset($this->backup_collection) ? $this->backup_collection : ''; + } + + public function hasBackupCollection() + { + return isset($this->backup_collection); + } + + public function clearBackupCollection() + { + unset($this->backup_collection); + } + + /** + * Optional. Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * + * Generated from protobuf field optional string backup_collection = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackupCollection($var) + { + GPBUtil::checkString($var, True); + $this->backup_collection = $var; + + return $this; + } + + /** + * Optional. The KMS key used to encrypt the at-rest data of the cluster. + * + * Generated from protobuf field optional string kms_key = 40 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return isset($this->kms_key) ? $this->kms_key : ''; + } + + public function hasKmsKey() + { + return isset($this->kms_key); + } + + public function clearKmsKey() + { + unset($this->kms_key); + } + + /** + * Optional. The KMS key used to encrypt the at-rest data of the cluster. + * + * Generated from protobuf field optional string kms_key = 40 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + + /** + * Optional. The automated backup config for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig automated_backup_config = 42 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig|null + */ + public function getAutomatedBackupConfig() + { + return $this->automated_backup_config; + } + + public function hasAutomatedBackupConfig() + { + return isset($this->automated_backup_config); + } + + public function clearAutomatedBackupConfig() + { + unset($this->automated_backup_config); + } + + /** + * Optional. The automated backup config for the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig automated_backup_config = 42 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig $var + * @return $this + */ + public function setAutomatedBackupConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig::class); + $this->automated_backup_config = $var; + + return $this; + } + + /** + * Output only. Encryption information of the data at rest of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\EncryptionInfo|null + */ + public function getEncryptionInfo() + { + return $this->encryption_info; + } + + public function hasEncryptionInfo() + { + return isset($this->encryption_info); + } + + public function clearEncryptionInfo() + { + unset($this->encryption_info); + } + + /** + * Output only. Encryption information of the data at rest of the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $var + * @return $this + */ + public function setEncryptionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo::class); + $this->encryption_info = $var; + + return $this; + } + + /** + * Optional. Server CA mode for the cluster. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getServerCaMode() + { + return isset($this->server_ca_mode) ? $this->server_ca_mode : 0; + } + + public function hasServerCaMode() + { + return isset($this->server_ca_mode); + } + + public function clearServerCaMode() + { + unset($this->server_ca_mode); + } + + /** + * Optional. Server CA mode for the cluster. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setServerCaMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ServerCaMode::class); + $this->server_ca_mode = $var; + + return $this; + } + + /** + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServerCaPool() + { + return isset($this->server_ca_pool) ? $this->server_ca_pool : ''; + } + + public function hasServerCaPool() + { + return isset($this->server_ca_pool); + } + + public function clearServerCaPool() + { + unset($this->server_ca_pool); + } + + /** + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServerCaPool($var) + { + GPBUtil::checkString($var, True); + $this->server_ca_pool = $var; + + return $this; + } + + /** + * Optional. Input only. Rotate the server certificates. + * + * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getRotateServerCertificate() + { + return isset($this->rotate_server_certificate) ? $this->rotate_server_certificate : false; + } + + public function hasRotateServerCertificate() + { + return isset($this->rotate_server_certificate); + } + + public function clearRotateServerCertificate() + { + unset($this->rotate_server_certificate); + } + + /** + * Optional. Input only. Rotate the server certificates. + * + * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRotateServerCertificate($var) + { + GPBUtil::checkBool($var); + $this->rotate_server_certificate = $var; + + return $this; + } + + /** + * @return string + */ + public function getImportSources() + { + return $this->whichOneof("import_sources"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php new file mode 100644 index 000000000000..53420b002a11 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php @@ -0,0 +1,72 @@ +google.cloud.redis.cluster.v1.Cluster.GcsBackupSource + */ +class GcsBackupSource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. URIs of the GCS objects to import. + * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $uris + * Optional. URIs of the GCS objects to import. + * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. URIs of the GCS objects to import. + * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * Optional. URIs of the GCS objects to import. + * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php new file mode 100644 index 000000000000..9a7992aec735 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php @@ -0,0 +1,87 @@ +google.cloud.redis.cluster.v1.Cluster.ManagedBackupSource + */ +class ManagedBackupSource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Example: + * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} + * A shorter version (without the prefix) of the backup name is also + * supported, like + * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} + * In this case, it assumes the backup is under redis.googleapis.com. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $backup = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $backup + * Optional. Example: + * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} + * A shorter version (without the prefix) of the backup name is also + * supported, like + * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} + * In this case, it assumes the backup is under redis.googleapis.com. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Example: + * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} + * A shorter version (without the prefix) of the backup name is also + * supported, like + * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} + * In this case, it assumes the backup is under redis.googleapis.com. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Optional. Example: + * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} + * A shorter version (without the prefix) of the backup name is also + * supported, like + * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} + * In this case, it assumes the backup is under redis.googleapis.com. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php new file mode 100644 index 000000000000..d0b8109af356 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php @@ -0,0 +1,75 @@ +google.cloud.redis.cluster.v1.Cluster.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Redis cluster is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Redis cluster has been created and is fully usable. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Redis cluster configuration is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Redis cluster is being deleted. + * + * Generated from protobuf enum DELETING = 4; + */ + const DELETING = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php new file mode 100644 index 000000000000..9b1ffce60fbb --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php @@ -0,0 +1,75 @@ +google.cloud.redis.cluster.v1.Cluster.StateInfo + */ +class StateInfo extends \Google\Protobuf\Internal\Message +{ + protected $info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo $update_info + * Describes ongoing update on the cluster when cluster state is UPDATING. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Describes ongoing update on the cluster when cluster state is UPDATING. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * @return \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo|null + */ + public function getUpdateInfo() + { + return $this->readOneof(1); + } + + public function hasUpdateInfo() + { + return $this->hasOneof(1); + } + + /** + * Describes ongoing update on the cluster when cluster state is UPDATING. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo $var + * @return $this + */ + public function setUpdateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getInfo() + { + return $this->whichOneof("info"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php new file mode 100644 index 000000000000..0eea1fbdaff9 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php @@ -0,0 +1,121 @@ +google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo + */ +class UpdateInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Target number of shards for redis cluster + * + * Generated from protobuf field optional int32 target_shard_count = 1; + */ + protected $target_shard_count = null; + /** + * Target number of replica nodes per shard. + * + * Generated from protobuf field optional int32 target_replica_count = 2; + */ + protected $target_replica_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_shard_count + * Target number of shards for redis cluster + * @type int $target_replica_count + * Target number of replica nodes per shard. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Target number of shards for redis cluster + * + * Generated from protobuf field optional int32 target_shard_count = 1; + * @return int + */ + public function getTargetShardCount() + { + return isset($this->target_shard_count) ? $this->target_shard_count : 0; + } + + public function hasTargetShardCount() + { + return isset($this->target_shard_count); + } + + public function clearTargetShardCount() + { + unset($this->target_shard_count); + } + + /** + * Target number of shards for redis cluster + * + * Generated from protobuf field optional int32 target_shard_count = 1; + * @param int $var + * @return $this + */ + public function setTargetShardCount($var) + { + GPBUtil::checkInt32($var); + $this->target_shard_count = $var; + + return $this; + } + + /** + * Target number of replica nodes per shard. + * + * Generated from protobuf field optional int32 target_replica_count = 2; + * @return int + */ + public function getTargetReplicaCount() + { + return isset($this->target_replica_count) ? $this->target_replica_count : 0; + } + + public function hasTargetReplicaCount() + { + return isset($this->target_replica_count); + } + + public function clearTargetReplicaCount() + { + unset($this->target_replica_count); + } + + /** + * Target number of replica nodes per shard. + * + * Generated from protobuf field optional int32 target_replica_count = 2; + * @param int $var + * @return $this + */ + public function setTargetReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->target_replica_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php new file mode 100644 index 000000000000..007124ee0639 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php @@ -0,0 +1,73 @@ +google.cloud.redis.cluster.v1.ClusterEndpoint + */ +class ClusterEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * A group of PSC connections. They are created in the same VPC network, one + * for each service attachment in the cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ConnectionDetail connections = 1; + */ + private $connections; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\ConnectionDetail[] $connections + * A group of PSC connections. They are created in the same VPC network, one + * for each service attachment in the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * A group of PSC connections. They are created in the same VPC network, one + * for each service attachment in the cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ConnectionDetail connections = 1; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\ConnectionDetail> + */ + public function getConnections() + { + return $this->connections; + } + + /** + * A group of PSC connections. They are created in the same VPC network, one + * for each service attachment in the cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ConnectionDetail connections = 1; + * @param \Google\Cloud\Redis\Cluster\V1\ConnectionDetail[] $var + * @return $this + */ + public function setConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\ConnectionDetail::class); + $this->connections = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php new file mode 100644 index 000000000000..3538c5e6049a --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php @@ -0,0 +1,171 @@ +google.cloud.redis.cluster.v1.ClusterMaintenancePolicy + */ +class ClusterMaintenancePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time when the policy was created i.e. Maintenance Window + * or Deny Period was assigned. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time when the policy was updated i.e. Maintenance Window + * or Deny Period was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_window is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow weekly_maintenance_window = 3; + */ + private $weekly_maintenance_window; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the policy was created i.e. Maintenance Window + * or Deny Period was assigned. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the policy was updated i.e. Maintenance Window + * or Deny Period was updated. + * @type \Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow[] $weekly_maintenance_window + * Optional. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_window is expected to be one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time when the policy was created i.e. Maintenance Window + * or Deny Period was assigned. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time when the policy was created i.e. Maintenance Window + * or Deny Period was assigned. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time when the policy was updated i.e. Maintenance Window + * or Deny Period was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time when the policy was updated i.e. Maintenance Window + * or Deny Period was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Optional. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_window is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow weekly_maintenance_window = 3; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow> + */ + public function getWeeklyMaintenanceWindow() + { + return $this->weekly_maintenance_window; + } + + /** + * Optional. Maintenance window that is applied to resources covered by this + * policy. Minimum 1. For the current version, the maximum number of + * weekly_maintenance_window is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow weekly_maintenance_window = 3; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow[] $var + * @return $this + */ + public function setWeeklyMaintenanceWindow($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow::class); + $this->weekly_maintenance_window = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php new file mode 100644 index 000000000000..8133740daee1 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php @@ -0,0 +1,129 @@ +google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule + */ +class ClusterMaintenanceSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The start time of any upcoming scheduled maintenance for this + * instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The end time of any upcoming scheduled maintenance for this + * instance. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The start time of any upcoming scheduled maintenance for this + * instance. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The end time of any upcoming scheduled maintenance for this + * instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The start time of any upcoming scheduled maintenance for this + * instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. The start time of any upcoming scheduled maintenance for this + * instance. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. The end time of any upcoming scheduled maintenance for this + * instance. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The end time of any upcoming scheduled maintenance for this + * instance. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php new file mode 100644 index 000000000000..ec087c2aeeff --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php @@ -0,0 +1,155 @@ +google.cloud.redis.cluster.v1.ClusterPersistenceConfig + */ +class ClusterPersistenceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The mode of persistence. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + /** + * Optional. RDB configuration. This field will be ignored if mode is not RDB. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rdb_config = null; + /** + * Optional. AOF configuration. This field will be ignored if mode is not AOF. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $aof_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Optional. The mode of persistence. + * @type \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig $rdb_config + * Optional. RDB configuration. This field will be ignored if mode is not RDB. + * @type \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig $aof_config + * Optional. AOF configuration. This field will be ignored if mode is not AOF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The mode of persistence. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The mode of persistence. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\PersistenceMode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. RDB configuration. This field will be ignored if mode is not RDB. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig|null + */ + public function getRdbConfig() + { + return $this->rdb_config; + } + + public function hasRdbConfig() + { + return isset($this->rdb_config); + } + + public function clearRdbConfig() + { + unset($this->rdb_config); + } + + /** + * Optional. RDB configuration. This field will be ignored if mode is not RDB. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig $var + * @return $this + */ + public function setRdbConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig::class); + $this->rdb_config = $var; + + return $this; + } + + /** + * Optional. AOF configuration. This field will be ignored if mode is not AOF. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig|null + */ + public function getAofConfig() + { + return $this->aof_config; + } + + public function hasAofConfig() + { + return isset($this->aof_config); + } + + public function clearAofConfig() + { + unset($this->aof_config); + } + + /** + * Optional. AOF configuration. This field will be ignored if mode is not AOF. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig $var + * @return $this + */ + public function setAofConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig::class); + $this->aof_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php new file mode 100644 index 000000000000..5b9b1650d94f --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php @@ -0,0 +1,67 @@ +google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig + */ +class AOFConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. fsync configuration. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $append_fsync = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $append_fsync + * Optional. fsync configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. fsync configuration. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAppendFsync() + { + return $this->append_fsync; + } + + /** + * Optional. fsync configuration. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAppendFsync($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig\AppendFsync::class); + $this->append_fsync = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php new file mode 100644 index 000000000000..ce6a56156b24 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php @@ -0,0 +1,71 @@ +google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync + */ +class AppendFsync +{ + /** + * Not set. Default: EVERYSEC + * + * Generated from protobuf enum APPEND_FSYNC_UNSPECIFIED = 0; + */ + const APPEND_FSYNC_UNSPECIFIED = 0; + /** + * Never fsync. Normally Linux will flush data every 30 seconds with this + * configuration, but it's up to the kernel's exact tuning. + * + * Generated from protobuf enum NO = 1; + */ + const NO = 1; + /** + * fsync every second. Fast enough, and you may lose 1 second of data if + * there is a disaster + * + * Generated from protobuf enum EVERYSEC = 2; + */ + const EVERYSEC = 2; + /** + * fsync every time new write commands are appended to the AOF. It has the + * best data loss protection at the cost of performance + * + * Generated from protobuf enum ALWAYS = 3; + */ + const ALWAYS = 3; + + private static $valueToName = [ + self::APPEND_FSYNC_UNSPECIFIED => 'APPEND_FSYNC_UNSPECIFIED', + self::NO => 'NO', + self::EVERYSEC => 'EVERYSEC', + self::ALWAYS => 'ALWAYS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php new file mode 100644 index 000000000000..b1648921fa93 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php @@ -0,0 +1,68 @@ +google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode + */ +class PersistenceMode +{ + /** + * Not set. + * + * Generated from protobuf enum PERSISTENCE_MODE_UNSPECIFIED = 0; + */ + const PERSISTENCE_MODE_UNSPECIFIED = 0; + /** + * Persistence is disabled, and any snapshot data is deleted. + * + * Generated from protobuf enum DISABLED = 1; + */ + const DISABLED = 1; + /** + * RDB based persistence is enabled. + * + * Generated from protobuf enum RDB = 2; + */ + const RDB = 2; + /** + * AOF based persistence is enabled. + * + * Generated from protobuf enum AOF = 3; + */ + const AOF = 3; + + private static $valueToName = [ + self::PERSISTENCE_MODE_UNSPECIFIED => 'PERSISTENCE_MODE_UNSPECIFIED', + self::DISABLED => 'DISABLED', + self::RDB => 'RDB', + self::AOF => 'AOF', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php new file mode 100644 index 000000000000..e7a6dafbd26c --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php @@ -0,0 +1,119 @@ +google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig + */ +class RDBConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rdb_snapshot_period = 0; + /** + * Optional. The time that the first snapshot was/will be attempted, and to + * which future snapshots will be aligned. If not provided, the current time + * will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rdb_snapshot_start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $rdb_snapshot_period + * Optional. Period between RDB snapshots. + * @type \Google\Protobuf\Timestamp $rdb_snapshot_start_time + * Optional. The time that the first snapshot was/will be attempted, and to + * which future snapshots will be aligned. If not provided, the current time + * will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRdbSnapshotPeriod() + { + return $this->rdb_snapshot_period; + } + + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRdbSnapshotPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig\SnapshotPeriod::class); + $this->rdb_snapshot_period = $var; + + return $this; + } + + /** + * Optional. The time that the first snapshot was/will be attempted, and to + * which future snapshots will be aligned. If not provided, the current time + * will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getRdbSnapshotStartTime() + { + return $this->rdb_snapshot_start_time; + } + + public function hasRdbSnapshotStartTime() + { + return isset($this->rdb_snapshot_start_time); + } + + public function clearRdbSnapshotStartTime() + { + unset($this->rdb_snapshot_start_time); + } + + /** + * Optional. The time that the first snapshot was/will be attempted, and to + * which future snapshots will be aligned. If not provided, the current time + * will be used. + * + * Generated from protobuf field .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setRdbSnapshotStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->rdb_snapshot_start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php new file mode 100644 index 000000000000..51c678d4686b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php @@ -0,0 +1,75 @@ +google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod + */ +class SnapshotPeriod +{ + /** + * Not set. + * + * Generated from protobuf enum SNAPSHOT_PERIOD_UNSPECIFIED = 0; + */ + const SNAPSHOT_PERIOD_UNSPECIFIED = 0; + /** + * One hour. + * + * Generated from protobuf enum ONE_HOUR = 1; + */ + const ONE_HOUR = 1; + /** + * Six hours. + * + * Generated from protobuf enum SIX_HOURS = 2; + */ + const SIX_HOURS = 2; + /** + * Twelve hours. + * + * Generated from protobuf enum TWELVE_HOURS = 3; + */ + const TWELVE_HOURS = 3; + /** + * Twenty four hours. + * + * Generated from protobuf enum TWENTY_FOUR_HOURS = 4; + */ + const TWENTY_FOUR_HOURS = 4; + + private static $valueToName = [ + self::SNAPSHOT_PERIOD_UNSPECIFIED => 'SNAPSHOT_PERIOD_UNSPECIFIED', + self::ONE_HOUR => 'ONE_HOUR', + self::SIX_HOURS => 'SIX_HOURS', + self::TWELVE_HOURS => 'TWELVE_HOURS', + self::TWENTY_FOUR_HOURS => 'TWENTY_FOUR_HOURS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php new file mode 100644 index 000000000000..05cec117b73b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php @@ -0,0 +1,111 @@ +google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow + */ +class ClusterWeeklyMaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1; + */ + protected $day = 0; + /** + * Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day + * Allows to define schedule that runs specified day of the week. + * @type \Google\Type\TimeOfDay $start_time + * Start time of the window in UTC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1; + * @return int + */ + public function getDay() + { + return $this->day; + } + + /** + * Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1; + * @param int $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day = $var; + + return $this; + } + + /** + * Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2; + * @return \Google\Type\TimeOfDay|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2; + * @param \Google\Type\TimeOfDay $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); + $this->start_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php new file mode 100644 index 000000000000..b4616367fe22 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php @@ -0,0 +1,114 @@ +google.cloud.redis.cluster.v1.ConnectionDetail + */ +class ConnectionDetail extends \Google\Protobuf\Internal\Message +{ + protected $connection; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\PscAutoConnection $psc_auto_connection + * Detailed information of a PSC connection that is created through + * service connectivity automation. + * @type \Google\Cloud\Redis\Cluster\V1\PscConnection $psc_connection + * Detailed information of a PSC connection that is created by the customer + * who owns the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Detailed information of a PSC connection that is created through + * service connectivity automation. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscAutoConnection psc_auto_connection = 1; + * @return \Google\Cloud\Redis\Cluster\V1\PscAutoConnection|null + */ + public function getPscAutoConnection() + { + return $this->readOneof(1); + } + + public function hasPscAutoConnection() + { + return $this->hasOneof(1); + } + + /** + * Detailed information of a PSC connection that is created through + * service connectivity automation. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscAutoConnection psc_auto_connection = 1; + * @param \Google\Cloud\Redis\Cluster\V1\PscAutoConnection $var + * @return $this + */ + public function setPscAutoConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\PscAutoConnection::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Detailed information of a PSC connection that is created by the customer + * who owns the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnection psc_connection = 2; + * @return \Google\Cloud\Redis\Cluster\V1\PscConnection|null + */ + public function getPscConnection() + { + return $this->readOneof(2); + } + + public function hasPscConnection() + { + return $this->hasOneof(2); + } + + /** + * Detailed information of a PSC connection that is created by the customer + * who owns the cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnection psc_connection = 2; + * @param \Google\Cloud\Redis\Cluster\V1\PscConnection $var + * @return $this + */ + public function setPscConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\PscConnection::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConnection() + { + return $this->whichOneof("connection"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php new file mode 100644 index 000000000000..1c83655e40bd --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php @@ -0,0 +1,68 @@ +google.cloud.redis.cluster.v1.ConnectionType + */ +class ConnectionType +{ + /** + * Cluster endpoint Type is not set + * + * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; + */ + const CONNECTION_TYPE_UNSPECIFIED = 0; + /** + * Cluster endpoint that will be used as for cluster topology discovery. + * + * Generated from protobuf enum CONNECTION_TYPE_DISCOVERY = 1; + */ + const CONNECTION_TYPE_DISCOVERY = 1; + /** + * Cluster endpoint that will be used as primary endpoint to access primary. + * + * Generated from protobuf enum CONNECTION_TYPE_PRIMARY = 2; + */ + const CONNECTION_TYPE_PRIMARY = 2; + /** + * Cluster endpoint that will be used as reader endpoint to access replicas. + * + * Generated from protobuf enum CONNECTION_TYPE_READER = 3; + */ + const CONNECTION_TYPE_READER = 3; + + private static $valueToName = [ + self::CONNECTION_TYPE_UNSPECIFIED => 'CONNECTION_TYPE_UNSPECIFIED', + self::CONNECTION_TYPE_DISCOVERY => 'CONNECTION_TYPE_DISCOVERY', + self::CONNECTION_TYPE_PRIMARY => 'CONNECTION_TYPE_PRIMARY', + self::CONNECTION_TYPE_READER => 'CONNECTION_TYPE_READER', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php new file mode 100644 index 000000000000..3ff48ed88beb --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php @@ -0,0 +1,238 @@ +google.cloud.redis.cluster.v1.CreateClusterRequest + */ +class CreateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The logical name of the Redis cluster in the customer project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The cluster that is to be created. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Redis\Cluster\V1\Cluster $cluster Required. The cluster that is to be created. + * @param string $clusterId Required. The logical name of the Redis cluster in the customer project + * with the following restrictions: + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * @return \Google\Cloud\Redis\Cluster\V1\CreateClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Redis\Cluster\V1\Cluster $cluster, string $clusterId): self + { + return (new self()) + ->setParent($parent) + ->setCluster($cluster) + ->setClusterId($clusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @type string $cluster_id + * Required. The logical name of the Redis cluster in the customer project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * @type \Google\Cloud\Redis\Cluster\V1\Cluster $cluster + * Required. The cluster that is to be created. + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The logical name of the Redis cluster in the customer project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. The logical name of the Redis cluster in the customer project + * with the following restrictions: + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * * Must be unique within the customer project / location + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setClusterId($var) + { + GPBUtil::checkString($var, True); + $this->cluster_id = $var; + + return $this; + } + + /** + * Required. The cluster that is to be created. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Redis\Cluster\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The cluster that is to be created. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 4; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php new file mode 100644 index 000000000000..2c0e0e5e42fe --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php @@ -0,0 +1,277 @@ +google.cloud.redis.cluster.v1.CrossClusterReplicationConfig + */ +class CrossClusterReplicationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The role of the cluster in cross cluster replication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole cluster_role = 1; + */ + protected $cluster_role = 0; + /** + * Details of the primary cluster that is used as the replication source for + * this secondary cluster. + * This field is only set for a secondary cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 2; + */ + protected $primary_cluster = null; + /** + * List of secondary clusters that are replicating from this primary cluster. + * This field is only set for a primary cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 3; + */ + private $secondary_clusters; + /** + * Output only. The last time cross cluster replication config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. An output only view of all the member clusters participating + * in the cross cluster replication. This view will be provided by every + * member cluster irrespective of its cluster role(primary or secondary). + * A primary cluster can provide information about all the secondary clusters + * replicating from it. However, a secondary cluster only knows about the + * primary cluster from which it is replicating. However, for scenarios, where + * the primary cluster is unavailable(e.g. regional outage), a GetCluster + * request can be sent to any other member cluster and this field will list + * all the member clusters participating in cross cluster replication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $membership = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $cluster_role + * The role of the cluster in cross cluster replication. + * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $primary_cluster + * Details of the primary cluster that is used as the replication source for + * this secondary cluster. + * This field is only set for a secondary cluster. + * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $secondary_clusters + * List of secondary clusters that are replicating from this primary cluster. + * This field is only set for a primary cluster. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time cross cluster replication config was updated. + * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership $membership + * Output only. An output only view of all the member clusters participating + * in the cross cluster replication. This view will be provided by every + * member cluster irrespective of its cluster role(primary or secondary). + * A primary cluster can provide information about all the secondary clusters + * replicating from it. However, a secondary cluster only knows about the + * primary cluster from which it is replicating. However, for scenarios, where + * the primary cluster is unavailable(e.g. regional outage), a GetCluster + * request can be sent to any other member cluster and this field will list + * all the member clusters participating in cross cluster replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * The role of the cluster in cross cluster replication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole cluster_role = 1; + * @return int + */ + public function getClusterRole() + { + return $this->cluster_role; + } + + /** + * The role of the cluster in cross cluster replication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole cluster_role = 1; + * @param int $var + * @return $this + */ + public function setClusterRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\ClusterRole::class); + $this->cluster_role = $var; + + return $this; + } + + /** + * Details of the primary cluster that is used as the replication source for + * this secondary cluster. + * This field is only set for a secondary cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 2; + * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster|null + */ + public function getPrimaryCluster() + { + return $this->primary_cluster; + } + + public function hasPrimaryCluster() + { + return isset($this->primary_cluster); + } + + public function clearPrimaryCluster() + { + unset($this->primary_cluster); + } + + /** + * Details of the primary cluster that is used as the replication source for + * this secondary cluster. + * This field is only set for a secondary cluster. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 2; + * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $var + * @return $this + */ + public function setPrimaryCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); + $this->primary_cluster = $var; + + return $this; + } + + /** + * List of secondary clusters that are replicating from this primary cluster. + * This field is only set for a primary cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 3; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster> + */ + public function getSecondaryClusters() + { + return $this->secondary_clusters; + } + + /** + * List of secondary clusters that are replicating from this primary cluster. + * This field is only set for a primary cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 3; + * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $var + * @return $this + */ + public function setSecondaryClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); + $this->secondary_clusters = $arr; + + return $this; + } + + /** + * Output only. The last time cross cluster replication config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last time cross cluster replication config was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. An output only view of all the member clusters participating + * in the cross cluster replication. This view will be provided by every + * member cluster irrespective of its cluster role(primary or secondary). + * A primary cluster can provide information about all the secondary clusters + * replicating from it. However, a secondary cluster only knows about the + * primary cluster from which it is replicating. However, for scenarios, where + * the primary cluster is unavailable(e.g. regional outage), a GetCluster + * request can be sent to any other member cluster and this field will list + * all the member clusters participating in cross cluster replication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * Output only. An output only view of all the member clusters participating + * in the cross cluster replication. This view will be provided by every + * member cluster irrespective of its cluster role(primary or secondary). + * A primary cluster can provide information about all the secondary clusters + * replicating from it. However, a secondary cluster only knows about the + * primary cluster from which it is replicating. However, for scenarios, where + * the primary cluster is unavailable(e.g. regional outage), a GetCluster + * request can be sent to any other member cluster and this field will list + * all the member clusters participating in cross cluster replication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership::class); + $this->membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php new file mode 100644 index 000000000000..c38ca6bf024b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php @@ -0,0 +1,72 @@ +google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole + */ +class ClusterRole +{ + /** + * Cluster role is not set. + * The behavior is equivalent to NONE. + * + * Generated from protobuf enum CLUSTER_ROLE_UNSPECIFIED = 0; + */ + const CLUSTER_ROLE_UNSPECIFIED = 0; + /** + * This cluster does not participate in cross cluster replication. It is an + * independent cluster and does not replicate to or from any other clusters. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * A cluster that allows both reads and writes. Any data written to this + * cluster is also replicated to the attached secondary clusters. + * + * Generated from protobuf enum PRIMARY = 2; + */ + const PRIMARY = 2; + /** + * A cluster that allows only reads and replicates data from a primary + * cluster. + * + * Generated from protobuf enum SECONDARY = 3; + */ + const SECONDARY = 3; + + private static $valueToName = [ + self::CLUSTER_ROLE_UNSPECIFIED => 'CLUSTER_ROLE_UNSPECIFIED', + self::NONE => 'NONE', + self::PRIMARY => 'PRIMARY', + self::SECONDARY => 'SECONDARY', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php new file mode 100644 index 000000000000..58134f4dc3f2 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php @@ -0,0 +1,120 @@ +google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership + */ +class Membership extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The primary cluster that acts as the source of replication + * for the secondary clusters. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $primary_cluster = null; + /** + * Output only. The list of secondary clusters replicating from the primary + * cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $secondary_clusters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $primary_cluster + * Output only. The primary cluster that acts as the source of replication + * for the secondary clusters. + * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $secondary_clusters + * Output only. The list of secondary clusters replicating from the primary + * cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The primary cluster that acts as the source of replication + * for the secondary clusters. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster|null + */ + public function getPrimaryCluster() + { + return $this->primary_cluster; + } + + public function hasPrimaryCluster() + { + return isset($this->primary_cluster); + } + + public function clearPrimaryCluster() + { + unset($this->primary_cluster); + } + + /** + * Output only. The primary cluster that acts as the source of replication + * for the secondary clusters. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $var + * @return $this + */ + public function setPrimaryCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); + $this->primary_cluster = $var; + + return $this; + } + + /** + * Output only. The list of secondary clusters replicating from the primary + * cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster> + */ + public function getSecondaryClusters() + { + return $this->secondary_clusters; + } + + /** + * Output only. The list of secondary clusters replicating from the primary + * cluster. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $var + * @return $this + */ + public function setSecondaryClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); + $this->secondary_clusters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php new file mode 100644 index 000000000000..4e84767fb1df --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php @@ -0,0 +1,106 @@ +google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster + */ +class RemoteCluster extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource path of the remote cluster in + * the format: projects//locations//clusters/ + * + * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + */ + protected $cluster = ''; + /** + * Output only. The unique identifier of the remote cluster. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * The full resource path of the remote cluster in + * the format: projects//locations//clusters/ + * @type string $uid + * Output only. The unique identifier of the remote cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * The full resource path of the remote cluster in + * the format: projects//locations//clusters/ + * + * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The full resource path of the remote cluster in + * the format: projects//locations//clusters/ + * + * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * Output only. The unique identifier of the remote cluster. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the remote cluster. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..a3a0206982a5 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php @@ -0,0 +1,120 @@ +google.cloud.redis.cluster.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * Please see {@see CloudRedisClusterClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\DeleteBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * @type string $request_id + * Optional. Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php new file mode 100644 index 000000000000..4552fa1b6335 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php @@ -0,0 +1,125 @@ +google.cloud.redis.cluster.v1.DeleteClusterRequest + */ +class DeleteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\DeleteClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 2; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php new file mode 100644 index 000000000000..5610a9f4fea3 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php @@ -0,0 +1,153 @@ +google.cloud.redis.cluster.v1.DiscoveryEndpoint + */ +class DiscoveryEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Address of the exposed Redis endpoint used by clients to + * connect to the service. The address could be either IP or hostname. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $address = ''; + /** + * Output only. The port number of the exposed Redis endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $port = 0; + /** + * Output only. Customer configuration for where the endpoint is created and + * accessed from. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address + * Output only. Address of the exposed Redis endpoint used by clients to + * connect to the service. The address could be either IP or hostname. + * @type int $port + * Output only. The port number of the exposed Redis endpoint. + * @type \Google\Cloud\Redis\Cluster\V1\PscConfig $psc_config + * Output only. Customer configuration for where the endpoint is created and + * accessed from. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Address of the exposed Redis endpoint used by clients to + * connect to the service. The address could be either IP or hostname. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Output only. Address of the exposed Redis endpoint used by clients to + * connect to the service. The address could be either IP or hostname. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Output only. The port number of the exposed Redis endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPort() + { + return $this->port; + } + + /** + * Output only. The port number of the exposed Redis endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->port = $var; + + return $this; + } + + /** + * Output only. Customer configuration for where the endpoint is created and + * accessed from. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Redis\Cluster\V1\PscConfig|null + */ + public function getPscConfig() + { + return $this->psc_config; + } + + public function hasPscConfig() + { + return isset($this->psc_config); + } + + public function clearPscConfig() + { + unset($this->psc_config); + } + + /** + * Output only. Customer configuration for where the endpoint is created and + * accessed from. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Redis\Cluster\V1\PscConfig $var + * @return $this + */ + public function setPscConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\PscConfig::class); + $this->psc_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php new file mode 100644 index 000000000000..34d6ff002e2d --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php @@ -0,0 +1,187 @@ +google.cloud.redis.cluster.v1.EncryptionInfo + */ +class EncryptionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Type of encryption. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.Type encryption_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_type = 0; + /** + * Output only. KMS key versions that are being used to protect the data + * at-rest. + * + * Generated from protobuf field repeated string kms_key_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + private $kms_key_versions; + /** + * Output only. The state of the primary version of the KMS key perceived by + * the system. This field is not populated in backups. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState kms_key_primary_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kms_key_primary_state = 0; + /** + * Output only. The most recent time when the encryption info was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $encryption_type + * Output only. Type of encryption. + * @type string[] $kms_key_versions + * Output only. KMS key versions that are being used to protect the data + * at-rest. + * @type int $kms_key_primary_state + * Output only. The state of the primary version of the KMS key perceived by + * the system. This field is not populated in backups. + * @type \Google\Protobuf\Timestamp $last_update_time + * Output only. The most recent time when the encryption info was updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Type of encryption. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.Type encryption_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getEncryptionType() + { + return $this->encryption_type; + } + + /** + * Output only. Type of encryption. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.Type encryption_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setEncryptionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo\Type::class); + $this->encryption_type = $var; + + return $this; + } + + /** + * Output only. KMS key versions that are being used to protect the data + * at-rest. + * + * Generated from protobuf field repeated string kms_key_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getKmsKeyVersions() + { + return $this->kms_key_versions; + } + + /** + * Output only. KMS key versions that are being used to protect the data + * at-rest. + * + * Generated from protobuf field repeated string kms_key_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setKmsKeyVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->kms_key_versions = $arr; + + return $this; + } + + /** + * Output only. The state of the primary version of the KMS key perceived by + * the system. This field is not populated in backups. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState kms_key_primary_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getKmsKeyPrimaryState() + { + return $this->kms_key_primary_state; + } + + /** + * Output only. The state of the primary version of the KMS key perceived by + * the system. This field is not populated in backups. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState kms_key_primary_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setKmsKeyPrimaryState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo\KmsKeyState::class); + $this->kms_key_primary_state = $var; + + return $this; + } + + /** + * Output only. The most recent time when the encryption info was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Output only. The most recent time when the encryption info was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php new file mode 100644 index 000000000000..3682440ad78e --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php @@ -0,0 +1,104 @@ +google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState + */ +class KmsKeyState +{ + /** + * The default value. This value is unused. + * + * Generated from protobuf enum KMS_KEY_STATE_UNSPECIFIED = 0; + */ + const KMS_KEY_STATE_UNSPECIFIED = 0; + /** + * The KMS key is enabled and correctly configured. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * Permission denied on the KMS key. + * + * Generated from protobuf enum PERMISSION_DENIED = 2; + */ + const PERMISSION_DENIED = 2; + /** + * The KMS key is disabled. + * + * Generated from protobuf enum DISABLED = 3; + */ + const DISABLED = 3; + /** + * The KMS key is destroyed. + * + * Generated from protobuf enum DESTROYED = 4; + */ + const DESTROYED = 4; + /** + * The KMS key is scheduled to be destroyed. + * + * Generated from protobuf enum DESTROY_SCHEDULED = 5; + */ + const DESTROY_SCHEDULED = 5; + /** + * The EKM key is unreachable. + * + * Generated from protobuf enum EKM_KEY_UNREACHABLE_DETECTED = 6; + */ + const EKM_KEY_UNREACHABLE_DETECTED = 6; + /** + * Billing is disabled for the project. + * + * Generated from protobuf enum BILLING_DISABLED = 7; + */ + const BILLING_DISABLED = 7; + /** + * All other unknown failures. + * + * Generated from protobuf enum UNKNOWN_FAILURE = 8; + */ + const UNKNOWN_FAILURE = 8; + + private static $valueToName = [ + self::KMS_KEY_STATE_UNSPECIFIED => 'KMS_KEY_STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::DISABLED => 'DISABLED', + self::DESTROYED => 'DESTROYED', + self::DESTROY_SCHEDULED => 'DESTROY_SCHEDULED', + self::EKM_KEY_UNREACHABLE_DETECTED => 'EKM_KEY_UNREACHABLE_DETECTED', + self::BILLING_DISABLED => 'BILLING_DISABLED', + self::UNKNOWN_FAILURE => 'UNKNOWN_FAILURE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php new file mode 100644 index 000000000000..550151bb958b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php @@ -0,0 +1,63 @@ +google.cloud.redis.cluster.v1.EncryptionInfo.Type + */ +class Type +{ + /** + * Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * The data is encrypted at rest with a key that is fully managed by Google. + * No key version will be populated. This is the default state. + * + * Generated from protobuf enum GOOGLE_DEFAULT_ENCRYPTION = 1; + */ + const GOOGLE_DEFAULT_ENCRYPTION = 1; + /** + * The data is encrypted at rest with a key that is managed by the customer. + * KMS key versions will be populated. + * + * Generated from protobuf enum CUSTOMER_MANAGED_ENCRYPTION = 2; + */ + const CUSTOMER_MANAGED_ENCRYPTION = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::GOOGLE_DEFAULT_ENCRYPTION => 'GOOGLE_DEFAULT_ENCRYPTION', + self::CUSTOMER_MANAGED_ENCRYPTION => 'CUSTOMER_MANAGED_ENCRYPTION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php new file mode 100644 index 000000000000..42c93ee16d1b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php @@ -0,0 +1,113 @@ +google.cloud.redis.cluster.v1.ExportBackupRequest + */ +class ExportBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_bucket + * Google Cloud Storage bucket, like "my-bucket". + * @type string $name + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage bucket, like "my-bucket". + * + * Generated from protobuf field string gcs_bucket = 3; + * @return string + */ + public function getGcsBucket() + { + return $this->readOneof(3); + } + + public function hasGcsBucket() + { + return $this->hasOneof(3); + } + + /** + * Google Cloud Storage bucket, like "my-bucket". + * + * Generated from protobuf field string gcs_bucket = 3; + * @param string $var + * @return $this + */ + public function setGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php new file mode 100644 index 000000000000..748793294ac4 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php @@ -0,0 +1,91 @@ +google.cloud.redis.cluster.v1.GetBackupCollectionRequest + */ +class GetBackupCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Redis backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::backupCollectionName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\GetBackupCollectionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a GCP region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php new file mode 100644 index 000000000000..b75c5690e12c --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php @@ -0,0 +1,86 @@ +google.cloud.redis.cluster.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * Please see {@see CloudRedisClusterClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\GetBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php new file mode 100644 index 000000000000..43114cc06304 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php @@ -0,0 +1,92 @@ +google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest + */ +class GetClusterCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::certificateAuthorityName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\GetClusterCertificateAuthorityRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis cluster certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php new file mode 100644 index 000000000000..832cadbab3d5 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php @@ -0,0 +1,91 @@ +google.cloud.redis.cluster.v1.GetClusterRequest + */ +class GetClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\GetClusterRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis cluster resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetSharedRegionalCertificateAuthorityRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetSharedRegionalCertificateAuthorityRequest.php new file mode 100644 index 000000000000..5a17d01357c0 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetSharedRegionalCertificateAuthorityRequest.php @@ -0,0 +1,92 @@ +google.cloud.redis.cluster.v1.GetSharedRegionalCertificateAuthorityRequest + */ +class GetSharedRegionalCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Regional certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. Please see + * {@see CloudRedisClusterClient::sharedRegionalCertificateAuthorityName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\GetSharedRegionalCertificateAuthorityRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Regional certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php new file mode 100644 index 000000000000..b9fd5cac61ff --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php @@ -0,0 +1,188 @@ +google.cloud.redis.cluster.v1.ListBackupCollectionsRequest + */ +class ListBackupCollectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the backupCollection location using the + * form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the backupCollection location using the + * form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the backupCollection location using the + * form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * @type string $page_token + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the backupCollection location using the + * form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the backupCollection location using the + * form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php new file mode 100644 index 000000000000..180a17efe9e6 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php @@ -0,0 +1,171 @@ +google.cloud.redis.cluster.v1.ListBackupCollectionsResponse + */ +class ListBackupCollectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backupCollections in the project. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * backupCollection entry is included in the response with the `name` field + * set to a value of the form + * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListBackupCollections". + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupCollection backup_collections = 1; + */ + private $backup_collections; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\BackupCollection[] $backup_collections + * A list of backupCollections in the project. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * backupCollection entry is included in the response with the `name` field + * set to a value of the form + * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListBackupCollections". + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * A list of backupCollections in the project. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * backupCollection entry is included in the response with the `name` field + * set to a value of the form + * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListBackupCollections". + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupCollection backup_collections = 1; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\BackupCollection> + */ + public function getBackupCollections() + { + return $this->backup_collections; + } + + /** + * A list of backupCollections in the project. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * backupCollection entry is included in the response with the `name` field + * set to a value of the form + * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListBackupCollections". + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupCollection backup_collections = 1; + * @param \Google\Cloud\Redis\Cluster\V1\BackupCollection[] $var + * @return $this + */ + public function setBackupCollections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\BackupCollection::class); + $this->backup_collections = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..7186b9daf83a --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php @@ -0,0 +1,178 @@ +google.cloud.redis.cluster.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the backupCollection using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the backupCollection using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * Please see {@see CloudRedisClusterClient::backupCollectionName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\ListBackupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the backupCollection using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * @type int $page_size + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * @type string $page_token + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the backupCollection using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the backupCollection using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. The `next_page_token` value returned from a previous + * [ListBackupCollections] request, if any. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..860b3fe48698 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php @@ -0,0 +1,139 @@ +google.cloud.redis.cluster.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Backup backups = 1; + */ + private $backups; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Backups that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\Backup[] $backups + * A list of backups in the project. + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type string[] $unreachable + * Backups that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Backup backups = 1; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\Backup> + */ + public function getBackups() + { + return $this->backups; + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Backup backups = 1; + * @param \Google\Cloud\Redis\Cluster\V1\Backup[] $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Backups that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Backups that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php new file mode 100644 index 000000000000..7ae9f3595c93 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php @@ -0,0 +1,183 @@ +google.cloud.redis.cluster.v1.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The `next_page_token` value returned from a previous + * [ListClusters][CloudRedis.ListClusters] request, if any. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Redis\Cluster\V1\ListClustersRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * @type int $page_size + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * @type string $page_token + * The `next_page_token` value returned from a previous + * [ListClusters][CloudRedis.ListClusters] request, if any. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the cluster location using the form: + * `projects/{project_id}/locations/{location_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of items to return. + * If not specified, a default value of 1000 will be used by the service. + * Regardless of the page_size value, the response may include a partial list + * and a caller should only rely on response's + * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] + * to determine if there are more clusters left to be queried. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous + * [ListClusters][CloudRedis.ListClusters] request, if any. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous + * [ListClusters][CloudRedis.ListClusters] request, if any. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php new file mode 100644 index 000000000000..34f8e14aa2b0 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php @@ -0,0 +1,175 @@ +google.cloud.redis.cluster.v1.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of Redis clusters in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * Redis entry is included in the response with the `name` field set to a + * value of the form + * `projects/{project_id}/locations/{location_id}/clusters/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListClusters". + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + */ + private $clusters; + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\Cluster[] $clusters + * A list of Redis clusters in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * Redis entry is included in the response with the `name` field set to a + * value of the form + * `projects/{project_id}/locations/{location_id}/clusters/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListClusters". + * @type string $next_page_token + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * A list of Redis clusters in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * Redis entry is included in the response with the `name` field set to a + * value of the form + * `projects/{project_id}/locations/{location_id}/clusters/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListClusters". + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\Cluster> + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * A list of Redis clusters in the project in the specified location, + * or across all locations. + * If the `location_id` in the parent field of the request is "-", all regions + * available to the project are queried, and the results aggregated. + * If in such an aggregated query a location is unavailable, a placeholder + * Redis entry is included in the response with the `name` field set to a + * value of the form + * `projects/{project_id}/locations/{location_id}/clusters/`- and the + * `status` field set to ERROR and `status_message` field set to "location not + * available for ListClusters". + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster[] $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\Cluster::class); + $this->clusters = $arr; + + return $this; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to retrieve the next page of results, or empty if there are no more + * results in the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php new file mode 100644 index 000000000000..777833d4e42e --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php @@ -0,0 +1,75 @@ +google.cloud.redis.cluster.v1.NodeType + */ +class NodeType +{ + /** + * Node type unspecified + * + * Generated from protobuf enum NODE_TYPE_UNSPECIFIED = 0; + */ + const NODE_TYPE_UNSPECIFIED = 0; + /** + * Redis shared core nano node_type. + * + * Generated from protobuf enum REDIS_SHARED_CORE_NANO = 1; + */ + const REDIS_SHARED_CORE_NANO = 1; + /** + * Redis highmem medium node_type. + * + * Generated from protobuf enum REDIS_HIGHMEM_MEDIUM = 2; + */ + const REDIS_HIGHMEM_MEDIUM = 2; + /** + * Redis highmem xlarge node_type. + * + * Generated from protobuf enum REDIS_HIGHMEM_XLARGE = 3; + */ + const REDIS_HIGHMEM_XLARGE = 3; + /** + * Redis standard small node_type. + * + * Generated from protobuf enum REDIS_STANDARD_SMALL = 4; + */ + const REDIS_STANDARD_SMALL = 4; + + private static $valueToName = [ + self::NODE_TYPE_UNSPECIFIED => 'NODE_TYPE_UNSPECIFIED', + self::REDIS_SHARED_CORE_NANO => 'REDIS_SHARED_CORE_NANO', + self::REDIS_HIGHMEM_MEDIUM => 'REDIS_HIGHMEM_MEDIUM', + self::REDIS_HIGHMEM_XLARGE => 'REDIS_HIGHMEM_XLARGE', + self::REDIS_STANDARD_SMALL => 'REDIS_STANDARD_SMALL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php new file mode 100644 index 000000000000..76be7cd32a45 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.redis.cluster.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php new file mode 100644 index 000000000000..531147ea136f --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php @@ -0,0 +1,346 @@ +google.cloud.redis.cluster.v1.PscAutoConnection + */ +class PscAutoConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The PSC connection id of the forwarding rule connected to the + * service attachment. + * + * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_id = ''; + /** + * Output only. The IP allocated on the consumer network for the PSC + * forwarding rule. + * + * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $address = ''; + /** + * Output only. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $forwarding_rule = ''; + /** + * Required. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Output only. The service attachment which is the target of the PSC + * connection, in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * + * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $service_attachment = ''; + /** + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * Please use Private Service Connect APIs for the latest status. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_status = 0; + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $psc_connection_id + * Output only. The PSC connection id of the forwarding rule connected to the + * service attachment. + * @type string $address + * Output only. The IP allocated on the consumer network for the PSC + * forwarding rule. + * @type string $forwarding_rule + * Output only. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * @type string $project_id + * Required. The consumer project_id where the forwarding rule is created + * from. + * @type string $network + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * @type string $service_attachment + * Output only. The service attachment which is the target of the PSC + * connection, in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * @type int $psc_connection_status + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * Please use Private Service Connect APIs for the latest status. + * @type int $connection_type + * Output only. Type of the PSC connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The PSC connection id of the forwarding rule connected to the + * service attachment. + * + * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPscConnectionId() + { + return $this->psc_connection_id; + } + + /** + * Output only. The PSC connection id of the forwarding rule connected to the + * service attachment. + * + * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPscConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->psc_connection_id = $var; + + return $this; + } + + /** + * Output only. The IP allocated on the consumer network for the PSC + * forwarding rule. + * + * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Output only. The IP allocated on the consumer network for the PSC + * forwarding rule. + * + * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Output only. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getForwardingRule() + { + return $this->forwarding_rule; + } + + /** + * Output only. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->forwarding_rule = $var; + + return $this; + } + + /** + * Required. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Output only. The service attachment which is the target of the PSC + * connection, in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * + * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAttachment() + { + return $this->service_attachment; + } + + /** + * Output only. The service attachment which is the target of the PSC + * connection, in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * + * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceAttachment($var) + { + GPBUtil::checkString($var, True); + $this->service_attachment = $var; + + return $this; + } + + /** + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * Please use Private Service Connect APIs for the latest status. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPscConnectionStatus() + { + return $this->psc_connection_status; + } + + /** + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * Please use Private Service Connect APIs for the latest status. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPscConnectionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\PscConnectionStatus::class); + $this->psc_connection_status = $var; + + return $this; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getConnectionType() + { + return $this->connection_type; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php new file mode 100644 index 000000000000..b727fe1f2dca --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php @@ -0,0 +1,73 @@ +google.cloud.redis.cluster.v1.PscConfig + */ +class PscConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The network where the IP address of the discovery endpoint will + * be reserved, in the form of + * projects/{network_project}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Required. The network where the IP address of the discovery endpoint will + * be reserved, in the form of + * projects/{network_project}/global/networks/{network_id}. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The network where the IP address of the discovery endpoint will + * be reserved, in the form of + * projects/{network_project}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The network where the IP address of the discovery endpoint will + * be reserved, in the form of + * projects/{network_project}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php new file mode 100644 index 000000000000..afda810affb7 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php @@ -0,0 +1,349 @@ +google.cloud.redis.cluster.v1.PscConnection + */ +class PscConnection extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The PSC connection id of the forwarding rule connected to the + * service attachment. + * + * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $psc_connection_id = ''; + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + */ + protected $address = ''; + /** + * Required. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $forwarding_rule = ''; + /** + * Optional. Project ID of the consumer project where the forwarding rule is + * created in. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $project_id = ''; + /** + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $network = ''; + /** + * Required. The service attachment which is the target of the PSC connection, + * in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * + * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $service_attachment = ''; + /** + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * To get the latest status of a PSC connection, follow + * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_status = 0; + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $psc_connection_id + * Required. The PSC connection id of the forwarding rule connected to the + * service attachment. + * @type string $address + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * @type string $forwarding_rule + * Required. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * @type string $project_id + * Optional. Project ID of the consumer project where the forwarding rule is + * created in. + * @type string $network + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * @type string $service_attachment + * Required. The service attachment which is the target of the PSC connection, + * in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * @type int $psc_connection_status + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * To get the latest status of a PSC connection, follow + * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. + * @type int $connection_type + * Output only. Type of the PSC connection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. The PSC connection id of the forwarding rule connected to the + * service attachment. + * + * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPscConnectionId() + { + return $this->psc_connection_id; + } + + /** + * Required. The PSC connection id of the forwarding rule connected to the + * service attachment. + * + * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPscConnectionId($var) + { + GPBUtil::checkString($var, True); + $this->psc_connection_id = $var; + + return $this; + } + + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setAddress($var) + { + GPBUtil::checkString($var, True); + $this->address = $var; + + return $this; + } + + /** + * Required. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getForwardingRule() + { + return $this->forwarding_rule; + } + + /** + * Required. The URI of the consumer side forwarding rule. + * Example: + * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setForwardingRule($var) + { + GPBUtil::checkString($var, True); + $this->forwarding_rule = $var; + + return $this; + } + + /** + * Optional. Project ID of the consumer project where the forwarding rule is + * created in. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Optional. Project ID of the consumer project where the forwarding rule is + * created in. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Required. The consumer network where the IP address resides, in the form of + * projects/{project_id}/global/networks/{network_id}. + * + * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + + /** + * Required. The service attachment which is the target of the PSC connection, + * in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * + * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getServiceAttachment() + { + return $this->service_attachment; + } + + /** + * Required. The service attachment which is the target of the PSC connection, + * in the form of + * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. + * + * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServiceAttachment($var) + { + GPBUtil::checkString($var, True); + $this->service_attachment = $var; + + return $this; + } + + /** + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * To get the latest status of a PSC connection, follow + * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPscConnectionStatus() + { + return $this->psc_connection_status; + } + + /** + * Output only. The status of the PSC connection. + * Please note that this value is updated periodically. + * To get the latest status of a PSC connection, follow + * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPscConnectionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\PscConnectionStatus::class); + $this->psc_connection_status = $var; + + return $this; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getConnectionType() + { + return $this->connection_type; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php new file mode 100644 index 000000000000..952a818b60c9 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php @@ -0,0 +1,61 @@ +google.cloud.redis.cluster.v1.PscConnectionStatus + */ +class PscConnectionStatus +{ + /** + * PSC connection status is not specified. + * + * Generated from protobuf enum PSC_CONNECTION_STATUS_UNSPECIFIED = 0; + */ + const PSC_CONNECTION_STATUS_UNSPECIFIED = 0; + /** + * The connection is active + * + * Generated from protobuf enum PSC_CONNECTION_STATUS_ACTIVE = 1; + */ + const PSC_CONNECTION_STATUS_ACTIVE = 1; + /** + * Connection not found + * + * Generated from protobuf enum PSC_CONNECTION_STATUS_NOT_FOUND = 2; + */ + const PSC_CONNECTION_STATUS_NOT_FOUND = 2; + + private static $valueToName = [ + self::PSC_CONNECTION_STATUS_UNSPECIFIED => 'PSC_CONNECTION_STATUS_UNSPECIFIED', + self::PSC_CONNECTION_STATUS_ACTIVE => 'PSC_CONNECTION_STATUS_ACTIVE', + self::PSC_CONNECTION_STATUS_NOT_FOUND => 'PSC_CONNECTION_STATUS_NOT_FOUND', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php new file mode 100644 index 000000000000..f3941aae4b7f --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php @@ -0,0 +1,106 @@ +google.cloud.redis.cluster.v1.PscServiceAttachment + */ +class PscServiceAttachment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Service attachment URI which your self-created PscConnection + * should use as target + * + * Generated from protobuf field string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_attachment = ''; + /** + * Output only. Type of a PSC connection targeting this service attachment. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service_attachment + * Output only. Service attachment URI which your self-created PscConnection + * should use as target + * @type int $connection_type + * Output only. Type of a PSC connection targeting this service attachment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Service attachment URI which your self-created PscConnection + * should use as target + * + * Generated from protobuf field string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAttachment() + { + return $this->service_attachment; + } + + /** + * Output only. Service attachment URI which your self-created PscConnection + * should use as target + * + * Generated from protobuf field string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAttachment($var) + { + GPBUtil::checkString($var, True); + $this->service_attachment = $var; + + return $this; + } + + /** + * Output only. Type of a PSC connection targeting this service attachment. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getConnectionType() + { + return $this->connection_type; + } + + /** + * Output only. Type of a PSC connection targeting this service attachment. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php new file mode 100644 index 000000000000..367052fd9c76 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php @@ -0,0 +1,189 @@ +google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest + */ +class RescheduleClusterMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Redis Cluster instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reschedule_type = 0; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $schedule_time = null; + + /** + * @param string $name Required. Redis Cluster instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. Please see + * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. + * @param int $rescheduleType Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. + * For allowed values, use constants defined on {@see \Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest\RescheduleType} + * @param \Google\Protobuf\Timestamp $scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * @return \Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest + * + * @experimental + */ + public static function build(string $name, int $rescheduleType, \Google\Protobuf\Timestamp $scheduleTime): self + { + return (new self()) + ->setName($name) + ->setRescheduleType($rescheduleType) + ->setScheduleTime($scheduleTime); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Redis Cluster instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * @type int $reschedule_type + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. + * @type \Google\Protobuf\Timestamp $schedule_time + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Redis Cluster instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Redis Cluster instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` + * where `location_id` refers to a GCP region. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getRescheduleType() + { + return $this->reschedule_type; + } + + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as + * well. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRescheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest\RescheduleType::class); + $this->reschedule_type = $var; + + return $this; + } + + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getScheduleTime() + { + return $this->schedule_time; + } + + public function hasScheduleTime() + { + return isset($this->schedule_time); + } + + public function clearScheduleTime() + { + unset($this->schedule_time); + } + + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for + * example `2012-11-15T16:19:00.094Z`. + * + * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setScheduleTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->schedule_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php new file mode 100644 index 000000000000..d9f768cc749f --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php @@ -0,0 +1,61 @@ +google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType + */ +class RescheduleType +{ + /** + * Not set. + * + * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; + */ + const RESCHEDULE_TYPE_UNSPECIFIED = 0; + /** + * If the user wants to schedule the maintenance to happen now. + * + * Generated from protobuf enum IMMEDIATE = 1; + */ + const IMMEDIATE = 1; + /** + * If the user wants to reschedule the maintenance to a specific time. + * + * Generated from protobuf enum SPECIFIC_TIME = 3; + */ + const SPECIFIC_TIME = 3; + + private static $valueToName = [ + self::RESCHEDULE_TYPE_UNSPECIFIED => 'RESCHEDULE_TYPE_UNSPECIFIED', + self::IMMEDIATE => 'IMMEDIATE', + self::SPECIFIC_TIME => 'SPECIFIC_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ServerCaMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ServerCaMode.php new file mode 100644 index 000000000000..c22799a4901b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ServerCaMode.php @@ -0,0 +1,68 @@ +google.cloud.redis.cluster.v1.ServerCaMode + */ +class ServerCaMode +{ + /** + * Server CA mode not specified. + * + * Generated from protobuf enum SERVER_CA_MODE_UNSPECIFIED = 0; + */ + const SERVER_CA_MODE_UNSPECIFIED = 0; + /** + * Each cluster has its own Google managed CA. + * + * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + */ + const SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + /** + * The cluster uses Google managed shared CA in the region. + * + * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2; + */ + const SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2; + /** + * The cluster uses customer managed CA from CAS. + * + * Generated from protobuf enum SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3; + */ + const SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3; + + private static $valueToName = [ + self::SERVER_CA_MODE_UNSPECIFIED => 'SERVER_CA_MODE_UNSPECIFIED', + self::SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA => 'SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA', + self::SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA => 'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA', + self::SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA => 'SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority.php new file mode 100644 index 000000000000..5970a38a1a05 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority.php @@ -0,0 +1,117 @@ +google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority + */ +class SharedRegionalCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + protected $server_ca; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $managed_server_ca + * CA certificate chains for redis managed server authentication. + * @type string $name + * Identifier. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * CA certificate chains for redis managed server authentication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * @return \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority|null + */ + public function getManagedServerCa() + { + return $this->readOneof(2); + } + + public function hasManagedServerCa() + { + return $this->hasOneof(2); + } + + /** + * CA certificate chains for redis managed server authentication. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * @param \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $var + * @return $this + */ + public function setManagedServerCa($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Identifier. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Unique name of the resource in this scope including project and + * location using the form: + * `projects/{project}/locations/{location}/sharedRegionalCertificateAuthority` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getServerCa() + { + return $this->whichOneof("server_ca"); + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php new file mode 100644 index 000000000000..64088e751e82 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php @@ -0,0 +1,71 @@ +google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority + */ +class RegionalManagedCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * The PEM encoded CA certificate chains for redis managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $ca_certs + * The PEM encoded CA certificate chains for redis managed + * server authentication + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * The PEM encoded CA certificate chains for redis managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain> + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * The PEM encoded CA certificate chains for redis managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * @param \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain::class); + $this->ca_certs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php new file mode 100644 index 000000000000..54dcb107f3de --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php @@ -0,0 +1,67 @@ +google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain + */ +class RegionalCertChain extends \Google\Protobuf\Internal\Message +{ + /** + * The certificates that form the CA chain, from leaf to root order. + * + * Generated from protobuf field repeated string certificates = 1; + */ + private $certificates; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $certificates + * The certificates that form the CA chain, from leaf to root order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * The certificates that form the CA chain, from leaf to root order. + * + * Generated from protobuf field repeated string certificates = 1; + * @return RepeatedField + */ + public function getCertificates() + { + return $this->certificates; + } + + /** + * The certificates that form the CA chain, from leaf to root order. + * + * Generated from protobuf field repeated string certificates = 1; + * @param string[] $var + * @return $this + */ + public function setCertificates($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->certificates = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php new file mode 100644 index 000000000000..70baeb4693b6 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php @@ -0,0 +1,61 @@ +google.cloud.redis.cluster.v1.TransitEncryptionMode + */ +class TransitEncryptionMode +{ + /** + * In-transit encryption not set. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + const TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + /** + * In-transit encryption disabled. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + */ + const TRANSIT_ENCRYPTION_MODE_DISABLED = 1; + /** + * Use server managed encryption for in-transit encryption. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; + */ + const TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; + + private static $valueToName = [ + self::TRANSIT_ENCRYPTION_MODE_UNSPECIFIED => 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', + self::TRANSIT_ENCRYPTION_MODE_DISABLED => 'TRANSIT_ENCRYPTION_MODE_DISABLED', + self::TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION => 'TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php new file mode 100644 index 000000000000..810f3910d81c --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php @@ -0,0 +1,196 @@ +google.cloud.redis.cluster.v1.UpdateClusterRequest + */ +class UpdateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: + * * `size_gb` + * * `replica_count` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. Update description. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Redis\Cluster\V1\Cluster $cluster Required. Update description. + * Only fields specified in update_mask are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: + * + * * `size_gb` + * * `replica_count` + * + * @return \Google\Cloud\Redis\Cluster\V1\UpdateClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Redis\Cluster\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCluster($cluster) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: + * * `size_gb` + * * `replica_count` + * @type \Google\Cloud\Redis\Cluster\V1\Cluster $cluster + * Required. Update description. + * Only fields specified in update_mask are updated. + * @type string $request_id + * Idempotent request UUID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: + * * `size_gb` + * * `replica_count` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Required. Mask of fields to update. At least one path must be supplied in + * this field. The elements of the repeated paths field may only include these + * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: + * * `size_gb` + * * `replica_count` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. Update description. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Redis\Cluster\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. Update description. + * Only fields specified in update_mask are updated. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Redis\Cluster\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Idempotent request UUID. + * + * Generated from protobuf field string request_id = 3; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php new file mode 100644 index 000000000000..12ea86e5b523 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php @@ -0,0 +1,113 @@ +google.cloud.redis.cluster.v1.ZoneDistributionConfig + */ +class ZoneDistributionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not + * specified. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + /** + * Optional. When SINGLE ZONE distribution is selected, zone field would be + * used to allocate all resources in that zone. This is not applicable to + * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $mode + * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not + * specified. + * @type string $zone + * Optional. When SINGLE ZONE distribution is selected, zone field would be + * used to allocate all resources in that zone. This is not applicable to + * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not + * specified. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not + * specified. + * + * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig\ZoneDistributionMode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. When SINGLE ZONE distribution is selected, zone field would be + * used to allocate all resources in that zone. This is not applicable to + * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Optional. When SINGLE ZONE distribution is selected, zone field would be + * used to allocate all resources in that zone. This is not applicable to + * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php new file mode 100644 index 000000000000..a96e509c6139 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php @@ -0,0 +1,63 @@ +google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode + */ +class ZoneDistributionMode +{ + /** + * Not Set. Default: MULTI_ZONE + * + * Generated from protobuf enum ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + */ + const ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; + /** + * Distribute all resources across 3 zones picked at random, within the + * region. + * + * Generated from protobuf enum MULTI_ZONE = 1; + */ + const MULTI_ZONE = 1; + /** + * Distribute all resources in a single zone. The zone field must be + * specified, when this mode is selected. + * + * Generated from protobuf enum SINGLE_ZONE = 2; + */ + const SINGLE_ZONE = 2; + + private static $valueToName = [ + self::ZONE_DISTRIBUTION_MODE_UNSPECIFIED => 'ZONE_DISTRIBUTION_MODE_UNSPECIFIED', + self::MULTI_ZONE => 'MULTI_ZONE', + self::SINGLE_ZONE => 'SINGLE_ZONE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php new file mode 100644 index 000000000000..309a591825ce --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php @@ -0,0 +1,96 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->backupCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + backup_cluster_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_BackupCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php new file mode 100644 index 000000000000..31900d9bac8b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php @@ -0,0 +1,112 @@ +setName($clusterName); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->createCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CloudRedisClusterClient::locationName('[PROJECT]', '[LOCATION]'); + $clusterId = '[CLUSTER_ID]'; + $clusterName = '[NAME]'; + + create_cluster_sample($formattedParent, $clusterId, $clusterName); +} +// [END redis_v1_generated_CloudRedisCluster_CreateCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php new file mode 100644 index 000000000000..e472a25c4045 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->deleteBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]', + '[BACKUP]' + ); + + delete_backup_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_DeleteBackup_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php new file mode 100644 index 000000000000..b7c300c9a618 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->deleteCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + delete_cluster_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php new file mode 100644 index 000000000000..d25b00363646 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->exportBackup($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Backup $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]', + '[BACKUP]' + ); + + export_backup_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_ExportBackup_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php new file mode 100644 index 000000000000..84998ce916bd --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $cloudRedisClusterClient->getBackup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]', + '[BACKUP]' + ); + + get_backup_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_GetBackup_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php new file mode 100644 index 000000000000..fe5956c888c7 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupCollection $response */ + $response = $cloudRedisClusterClient->getBackupCollection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::backupCollectionName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]' + ); + + get_backup_collection_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_GetBackupCollection_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php new file mode 100644 index 000000000000..b451cd7de969 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $cloudRedisClusterClient->getCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + get_cluster_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_GetCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php new file mode 100644 index 000000000000..bd2bf8b2fccf --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CertificateAuthority $response */ + $response = $cloudRedisClusterClient->getClusterCertificateAuthority($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::certificateAuthorityName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]' + ); + + get_cluster_certificate_authority_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php new file mode 100644 index 000000000000..fda219326345 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END redis_v1_generated_CloudRedisCluster_GetLocation_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php new file mode 100644 index 000000000000..800eee1437d1 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SharedRegionalCertificateAuthority $response */ + $response = $cloudRedisClusterClient->getSharedRegionalCertificateAuthority($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::sharedRegionalCertificateAuthorityName( + '[PROJECT]', + '[LOCATION]' + ); + + get_shared_regional_certificate_authority_sample($formattedName); +} +// [END redis_v1_generated_CloudRedisCluster_GetSharedRegionalCertificateAuthority_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php new file mode 100644 index 000000000000..cd3982954baf --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudRedisClusterClient->listBackupCollections($request); + + /** @var BackupCollection $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CloudRedisClusterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_collections_sample($formattedParent); +} +// [END redis_v1_generated_CloudRedisCluster_ListBackupCollections_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php new file mode 100644 index 000000000000..fcce6e5a4588 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudRedisClusterClient->listBackups($request); + + /** @var Backup $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CloudRedisClusterClient::backupCollectionName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]' + ); + + list_backups_sample($formattedParent); +} +// [END redis_v1_generated_CloudRedisCluster_ListBackups_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php new file mode 100644 index 000000000000..225f59223d37 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $cloudRedisClusterClient->listClusters($request); + + /** @var Cluster $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = CloudRedisClusterClient::locationName('[PROJECT]', '[LOCATION]'); + + list_clusters_sample($formattedParent); +} +// [END redis_v1_generated_CloudRedisCluster_ListClusters_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php new file mode 100644 index 000000000000..63fcb648cf0e --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END redis_v1_generated_CloudRedisCluster_ListLocations_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php new file mode 100644 index 000000000000..926269be4fd8 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setRescheduleType($rescheduleType); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->rescheduleClusterMaintenance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + + reschedule_cluster_maintenance_sample($formattedName, $rescheduleType); +} +// [END redis_v1_generated_CloudRedisCluster_RescheduleClusterMaintenance_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php new file mode 100644 index 000000000000..1c8eb29f1c3a --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php @@ -0,0 +1,93 @@ +setName($clusterName); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $cloudRedisClusterClient->updateCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Cluster $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample 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, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $clusterName = '[NAME]'; + + update_cluster_sample($clusterName); +} +// [END redis_v1_generated_CloudRedisCluster_UpdateCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php b/owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php new file mode 100644 index 000000000000..8f07c540f6bf --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php @@ -0,0 +1,1041 @@ + backupClusterAsync(BackupClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportBackupAsync(ExportBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupCollectionAsync(GetBackupCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSharedRegionalCertificateAuthorityAsync(GetSharedRegionalCertificateAuthorityRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupCollectionsAsync(ListBackupCollectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface rescheduleClusterMaintenanceAsync(RescheduleClusterMaintenanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class CloudRedisClusterClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.redis.cluster.v1.CloudRedisCluster'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'redis.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'redis.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/cloud_redis_cluster_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_redis_cluster_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_redis_cluster_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/cloud_redis_cluster_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backupCollection + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName(string $project, string $location, string $backupCollection, string $backup): string + { + return self::getPathTemplate('backup')->render([ + 'project' => $project, + 'location' => $location, + 'backup_collection' => $backupCollection, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backup_collection resource. + * + * @param string $project + * @param string $location + * @param string $backupCollection + * + * @return string The formatted backup_collection resource. + */ + public static function backupCollectionName(string $project, string $location, string $backupCollection): string + { + return self::getPathTemplate('backupCollection')->render([ + 'project' => $project, + 'location' => $location, + 'backup_collection' => $backupCollection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + */ + public static function caPoolName(string $project, string $location, string $caPool): string + { + return self::getPathTemplate('caPool')->render([ + 'project' => $project, + 'location' => $location, + 'ca_pool' => $caPool, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * certificate_authority resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * + * @return string The formatted certificate_authority resource. + */ + public static function certificateAuthorityName(string $project, string $location, string $cluster): string + { + return self::getPathTemplate('certificateAuthority')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * crypto_key_version resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * @param string $cryptoKeyVersion + * + * @return string The formatted crypto_key_version resource. + */ + public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string + { + return self::getPathTemplate('cryptoKeyVersion')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + 'crypto_key_version' => $cryptoKeyVersion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * forwarding_rule resource. + * + * @param string $project + * @param string $region + * @param string $forwardingRule + * + * @return string The formatted forwarding_rule resource. + */ + public static function forwardingRuleName(string $project, string $region, string $forwardingRule): string + { + return self::getPathTemplate('forwardingRule')->render([ + 'project' => $project, + 'region' => $region, + 'forwarding_rule' => $forwardingRule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a network + * resource. + * + * @param string $project + * @param string $network + * + * @return string The formatted network resource. + */ + public static function networkName(string $project, string $network): string + { + return self::getPathTemplate('network')->render([ + 'project' => $project, + 'network' => $network, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * service_attachment resource. + * + * @param string $project + * @param string $region + * @param string $serviceAttachment + * + * @return string The formatted service_attachment resource. + */ + public static function serviceAttachmentName(string $project, string $region, string $serviceAttachment): string + { + return self::getPathTemplate('serviceAttachment')->render([ + 'project' => $project, + 'region' => $region, + 'service_attachment' => $serviceAttachment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * shared_regional_certificate_authority resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted shared_regional_certificate_authority resource. + */ + public static function sharedRegionalCertificateAuthorityName(string $project, string $location): string + { + return self::getPathTemplate('sharedRegionalCertificateAuthority')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - backup: projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup} + * - backupCollection: projects/{project}/locations/{location}/backupCollections/{backup_collection} + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} + * - certificateAuthority: projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority + * - cluster: projects/{project}/locations/{location}/clusters/{cluster} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} + * - forwardingRule: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * - location: projects/{project}/locations/{location} + * - network: projects/{project}/global/networks/{network} + * - serviceAttachment: projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + * - sharedRegionalCertificateAuthority: projects/{project}/locations/{location}/sharedRegionalCertificateAuthority + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'redis.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Redis\Cluster\V1\CloudRedisClusterClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CloudRedisClusterClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Backup Redis Cluster. + * If this is the first time a backup is being created, a backup collection + * will be created at the backend, and this backup belongs to this collection. + * Both collection and backup will have a resource name. Backup will be + * executed for each shard. A replica (primary if nonHA) will be selected to + * perform the execution. Backup call will be rejected if there is an ongoing + * backup or update operation. Be aware that during preview, if the cluster's + * internal software version is too old, critical update will be performed + * before actual backup. Once the internal software version is updated to the + * minimum version required by the backup feature, subsequent backups will not + * require critical update. After preview, there will be no critical update + * needed for backup. + * + * The async variant is {@see CloudRedisClusterClient::backupClusterAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/backup_cluster.php + * + * @param BackupClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function backupCluster(BackupClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BackupCluster', $request, $callOptions)->wait(); + } + + /** + * Creates a Redis cluster based on the specified properties. + * The creation is executed asynchronously and callers may check the returned + * operation to track its progress. Once the operation is completed the Redis + * cluster will be fully functional. The completed longrunning.Operation will + * contain the new cluster object in the response field. + * + * The returned operation is automatically deleted after a few hours, so there + * is no need to call DeleteOperation. + * + * The async variant is {@see CloudRedisClusterClient::createClusterAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/create_cluster.php + * + * @param CreateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific backup. + * + * The async variant is {@see CloudRedisClusterClient::deleteBackupAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/delete_backup.php + * + * @param DeleteBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific Redis cluster. Cluster stops serving and data is + * deleted. + * + * The async variant is {@see CloudRedisClusterClient::deleteClusterAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/delete_cluster.php + * + * @param DeleteClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); + } + + /** + * Exports a specific backup to a customer target Cloud Storage URI. + * + * The async variant is {@see CloudRedisClusterClient::exportBackupAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/export_backup.php + * + * @param ExportBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportBackup(ExportBackupRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportBackup', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a specific backup. + * + * The async variant is {@see CloudRedisClusterClient::getBackupAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/get_backup.php + * + * @param GetBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); + } + + /** + * Get a backup collection. + * + * The async variant is {@see CloudRedisClusterClient::getBackupCollectionAsync()} + * . + * + * @example samples/V1/CloudRedisClusterClient/get_backup_collection.php + * + * @param GetBackupCollectionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupCollection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupCollection(GetBackupCollectionRequest $request, array $callOptions = []): BackupCollection + { + return $this->startApiCall('GetBackupCollection', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a specific Redis cluster. + * + * The async variant is {@see CloudRedisClusterClient::getClusterAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/get_cluster.php + * + * @param GetClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Cluster + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster + { + return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); + } + + /** + * Gets the details of certificate authority information for Redis cluster. + * + * The async variant is + * {@see CloudRedisClusterClient::getClusterCertificateAuthorityAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php + * + * @param GetClusterCertificateAuthorityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CertificateAuthority + * + * @throws ApiException Thrown if the API call fails. + */ + public function getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest $request, array $callOptions = []): CertificateAuthority + { + return $this->startApiCall('GetClusterCertificateAuthority', $request, $callOptions)->wait(); + } + + /** + * Gets the details of regional certificate authority information for Redis + * cluster. + * + * The async variant is + * {@see CloudRedisClusterClient::getSharedRegionalCertificateAuthorityAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php + * + * @param GetSharedRegionalCertificateAuthorityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SharedRegionalCertificateAuthority + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest $request, array $callOptions = []): SharedRegionalCertificateAuthority + { + return $this->startApiCall('GetSharedRegionalCertificateAuthority', $request, $callOptions)->wait(); + } + + /** + * Lists all backup collections owned by a consumer project in either the + * specified location (region) or all locations. + * + * If `location_id` is specified as `-` (wildcard), then all regions + * available to the project are queried, and the results are aggregated. + * + * The async variant is + * {@see CloudRedisClusterClient::listBackupCollectionsAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/list_backup_collections.php + * + * @param ListBackupCollectionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupCollections(ListBackupCollectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackupCollections', $request, $callOptions); + } + + /** + * Lists all backups owned by a backup collection. + * + * The async variant is {@see CloudRedisClusterClient::listBackupsAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/list_backups.php + * + * @param ListBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBackups', $request, $callOptions); + } + + /** + * Lists all Redis clusters owned by a project in either the specified + * location (region) or all locations. + * + * The location should have the following format: + * + * * `projects/{project_id}/locations/{location_id}` + * + * If `location_id` is specified as `-` (wildcard), then all regions + * available to the project are queried, and the results are aggregated. + * + * The async variant is {@see CloudRedisClusterClient::listClustersAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/list_clusters.php + * + * @param ListClustersRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClusters', $request, $callOptions); + } + + /** + * Reschedules upcoming maintenance event. + * + * The async variant is + * {@see CloudRedisClusterClient::rescheduleClusterMaintenanceAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php + * + * @param RescheduleClusterMaintenanceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function rescheduleClusterMaintenance(RescheduleClusterMaintenanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RescheduleClusterMaintenance', $request, $callOptions)->wait(); + } + + /** + * Updates the metadata and configuration of a specific Redis cluster. + * + * Completed longrunning.Operation will contain the new cluster object + * in the response field. The returned operation is automatically deleted + * after a few hours, so there is no need to call DeleteOperation. + * + * The async variant is {@see CloudRedisClusterClient::updateClusterAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/update_cluster.php + * + * @param UpdateClusterRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see CloudRedisClusterClient::getLocationAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/get_location.php + * + * @param GetLocationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see CloudRedisClusterClient::listLocationsAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/list_locations.php + * + * @param ListLocationsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json b/owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..65ed596cdf6c --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.redis.cluster.v1", + "libraryPackage": "Google\\Cloud\\Redis\\Cluster\\V1", + "services": { + "CloudRedisCluster": { + "clients": { + "grpc": { + "libraryClient": "CloudRedisClusterGapicClient", + "rpcs": { + "BackupCluster": { + "methods": [ + "backupCluster" + ] + }, + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "ExportBackup": { + "methods": [ + "exportBackup" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupCollection": { + "methods": [ + "getBackupCollection" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "GetClusterCertificateAuthority": { + "methods": [ + "getClusterCertificateAuthority" + ] + }, + "GetSharedRegionalCertificateAuthority": { + "methods": [ + "getSharedRegionalCertificateAuthority" + ] + }, + "ListBackupCollections": { + "methods": [ + "listBackupCollections" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "RescheduleClusterMaintenance": { + "methods": [ + "rescheduleClusterMaintenance" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json new file mode 100644 index 000000000000..2d8fb483a6fa --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json @@ -0,0 +1,117 @@ +{ + "interfaces": { + "google.cloud.redis.cluster.v1.CloudRedisCluster": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "BackupCluster": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCluster": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackup": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteCluster": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ExportBackup": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackup": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackupCollection": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCluster": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetClusterCertificateAuthority": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSharedRegionalCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBackupCollections": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListBackups": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListClusters": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "RescheduleClusterMaintenance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "UpdateCluster": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php new file mode 100644 index 000000000000..2e10ab9c589b --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php @@ -0,0 +1,330 @@ + [ + 'google.cloud.redis.cluster.v1.CloudRedisCluster' => [ + 'BackupCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportBackup' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Backup', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RescheduleClusterMaintenance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', + 'metadataReturnType' => '\Google\Protobuf\Any', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cluster.name', + 'fieldAccessors' => [ + 'getCluster', + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupCollection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\BackupCollection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\Cluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetClusterCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\CertificateAuthority', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSharedRegionalCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupCollections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackupCollections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBackups', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\ListClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'backup' => 'projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}', + 'backupCollection' => 'projects/{project}/locations/{location}/backupCollections/{backup_collection}', + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', + 'certificateAuthority' => 'projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority', + 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', + 'forwardingRule' => 'projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}', + 'location' => 'projects/{project}/locations/{location}', + 'network' => 'projects/{project}/global/networks/{network}', + 'serviceAttachment' => 'projects/{project}/regions/{region}/serviceAttachments/{service_attachment}', + 'sharedRegionalCertificateAuthority' => 'projects/{project}/locations/{location}/sharedRegionalCertificateAuthority', + ], + ], + ], +]; diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php new file mode 100644 index 000000000000..31e5b8e45278 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php @@ -0,0 +1,276 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.redis.cluster.v1.CloudRedisCluster' => [ + 'BackupCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}:backup', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', + 'body' => 'cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cluster_id', + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportBackup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupCollection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetClusterCertificateAuthority' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSharedRegionalCertificateAuthority' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupCollections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupCollections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupCollections/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RescheduleClusterMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}:rescheduleClusterMaintenance', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/clusters/*}', + 'body' => 'cluster', + 'placeholders' => [ + 'cluster.name' => [ + 'getters' => [ + 'getCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php b/owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php new file mode 100644 index 000000000000..81da6dcafdf6 --- /dev/null +++ b/owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php @@ -0,0 +1,1865 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CloudRedisClusterClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CloudRedisClusterClient($options); + } + + /** @test */ + public function backupClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/backupClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $sizeGb = 2105542105; + $shardCount = 495377042; + $preciseSizeGb = 1.3422684E8; + $deletionProtectionEnabled = true; + $backupCollection = 'backupCollection-1182285509'; + $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setPreciseSizeGb($preciseSizeGb); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/backupClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new BackupClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->backupCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/BackupCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/backupClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function backupClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/backupClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new BackupClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->backupCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/backupClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $sizeGb = 2105542105; + $shardCount = 495377042; + $preciseSizeGb = 1.3422684E8; + $deletionProtectionEnabled = true; + $backupCollection = 'backupCollection-1182285509'; + $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setPreciseSizeGb($preciseSizeGb); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/CreateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getClusterId(); + $this->assertProtobufEquals($clusterId, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/DeleteBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/DeleteCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportBackupTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $cluster = 'cluster872092154'; + $clusterUid = 'clusterUid-1141213045'; + $totalSizeBytes = 115423608; + $engineVersion = 'engineVersion-618177573'; + $replicaCount = 564075208; + $shardCount = 495377042; + $uid = 'uid115792'; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setCluster($cluster); + $expectedResponse->setClusterUid($clusterUid); + $expectedResponse->setTotalSizeBytes($totalSizeBytes); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setUid($uid); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportBackupTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); + $request = (new ExportBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->exportBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ExportBackup', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportBackupTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportBackupExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportBackupTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); + $request = (new ExportBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->exportBackup($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportBackupTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $cluster = 'cluster872092154'; + $clusterUid = 'clusterUid-1141213045'; + $totalSizeBytes = 115423608; + $engineVersion = 'engineVersion-618177573'; + $replicaCount = 564075208; + $shardCount = 495377042; + $uid = 'uid115792'; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setCluster($cluster); + $expectedResponse->setClusterUid($clusterUid); + $expectedResponse->setTotalSizeBytes($totalSizeBytes); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupCollectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $clusterUid = 'clusterUid-1141213045'; + $cluster = 'cluster872092154'; + $kmsKey = 'kmsKey-591635343'; + $uid = 'uid115792'; + $expectedResponse = new BackupCollection(); + $expectedResponse->setName($name2); + $expectedResponse->setClusterUid($clusterUid); + $expectedResponse->setCluster($cluster); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setUid($uid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); + $request = (new GetBackupCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupCollection($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetBackupCollection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupCollectionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); + $request = (new GetBackupCollectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupCollection($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $sizeGb = 2105542105; + $shardCount = 495377042; + $preciseSizeGb = 1.3422684E8; + $deletionProtectionEnabled = true; + $backupCollection = 'backupCollection-1182285509'; + $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setPreciseSizeGb($preciseSizeGb); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->getCluster($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetCluster', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new GetClusterRequest()) + ->setName($formattedName); + try { + $gapicClient->getCluster($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterCertificateAuthorityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new CertificateAuthority(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->certificateAuthorityName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new GetClusterCertificateAuthorityRequest()) + ->setName($formattedName); + $response = $gapicClient->getClusterCertificateAuthority($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetClusterCertificateAuthority', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getClusterCertificateAuthorityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->certificateAuthorityName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new GetClusterCertificateAuthorityRequest()) + ->setName($formattedName); + try { + $gapicClient->getClusterCertificateAuthority($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSharedRegionalCertificateAuthorityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SharedRegionalCertificateAuthority(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sharedRegionalCertificateAuthorityName('[PROJECT]', '[LOCATION]'); + $request = (new GetSharedRegionalCertificateAuthorityRequest()) + ->setName($formattedName); + $response = $gapicClient->getSharedRegionalCertificateAuthority($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetSharedRegionalCertificateAuthority', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSharedRegionalCertificateAuthorityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sharedRegionalCertificateAuthorityName('[PROJECT]', '[LOCATION]'); + $request = (new GetSharedRegionalCertificateAuthorityRequest()) + ->setName($formattedName); + try { + $gapicClient->getSharedRegionalCertificateAuthority($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupCollectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupCollectionsElement = new BackupCollection(); + $backupCollections = [ + $backupCollectionsElement, + ]; + $expectedResponse = new ListBackupCollectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackupCollections($backupCollections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupCollectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupCollections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackupCollections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ListBackupCollections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupCollectionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupCollectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupCollections($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $backupsElement = new Backup(); + $backups = [ + $backupsElement, + ]; + $expectedResponse = new ListBackupsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBackups($backups); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackups($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ListBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clustersElement = new Cluster(); + $clusters = [ + $clustersElement, + ]; + $expectedResponse = new ListClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClusters($clusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ListClusters', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listClustersExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listClusters($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rescheduleClusterMaintenanceTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rescheduleClusterMaintenanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $sizeGb = 2105542105; + $shardCount = 495377042; + $preciseSizeGb = 1.3422684E8; + $deletionProtectionEnabled = true; + $backupCollection = 'backupCollection-1182285509'; + $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setPreciseSizeGb($preciseSizeGb); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rescheduleClusterMaintenanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + $request = (new RescheduleClusterMaintenanceRequest()) + ->setName($formattedName) + ->setRescheduleType($rescheduleType); + $response = $gapicClient->rescheduleClusterMaintenance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/RescheduleClusterMaintenance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getRescheduleType(); + $this->assertProtobufEquals($rescheduleType, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rescheduleClusterMaintenanceTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function rescheduleClusterMaintenanceExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/rescheduleClusterMaintenanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + $request = (new RescheduleClusterMaintenanceRequest()) + ->setName($formattedName) + ->setRescheduleType($rescheduleType); + $response = $gapicClient->rescheduleClusterMaintenance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rescheduleClusterMaintenanceTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $sizeGb = 2105542105; + $shardCount = 495377042; + $preciseSizeGb = 1.3422684E8; + $deletionProtectionEnabled = true; + $backupCollection = 'backupCollection-1182285509'; + $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setPreciseSizeGb($preciseSizeGb); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/UpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateClusterExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $clusterName = 'clusterName-1141738587'; + $cluster->setName($clusterName); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $response = $gapicClient->updateCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateClusterTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function backupClusterAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/backupClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $sizeGb = 2105542105; + $shardCount = 495377042; + $preciseSizeGb = 1.3422684E8; + $deletionProtectionEnabled = true; + $backupCollection = 'backupCollection-1182285509'; + $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setSizeGb($sizeGb); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setPreciseSizeGb($preciseSizeGb); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/backupClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new BackupClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->backupClusterAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/BackupCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/backupClusterTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} From 9b7d787830b13cd48acefd63568e19ecdaf666a8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 31 Mar 2026 00:27:28 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/V1/CloudRedisCluster.php | 2 +- ..._shared_regional_certificate_authority.php | 0 .../src/V1/Client/CloudRedisClusterClient.php | 71 + RedisCluster/src/V1/Cluster.php | 140 ++ ...redRegionalCertificateAuthorityRequest.php | 0 .../src}/V1/ServerCaMode.php | 0 .../V1/SharedRegionalCertificateAuthority.php | 0 .../RegionalManagedCertificateAuthority.php | 0 .../RegionalCertChain.php | 0 RedisCluster/src/V1/gapic_metadata.json | 5 + .../cloud_redis_cluster_client_config.json | 5 + .../cloud_redis_cluster_descriptor_config.php | 14 + ...cloud_redis_cluster_rest_client_config.php | 11 + .../V1/Client/CloudRedisClusterClientTest.php | 94 + .../Redis/Cluster/V1/CloudRedisCluster.php | 37 - .../Redis/Cluster/V1/AuthorizationMode.php | 61 - .../Cluster/V1/AutomatedBackupConfig.php | 165 -- .../AutomatedBackupMode.php | 61 - .../FixedFrequencySchedule.php | 82 - .../Google/Cloud/Redis/Cluster/V1/Backup.php | 585 ------ .../Redis/Cluster/V1/Backup/BackupType.php | 61 - .../Cloud/Redis/Cluster/V1/Backup/State.php | 76 - .../Redis/Cluster/V1/BackupClusterRequest.php | 187 -- .../Redis/Cluster/V1/BackupCollection.php | 215 -- .../Cloud/Redis/Cluster/V1/BackupFile.php | 145 -- .../Redis/Cluster/V1/CertificateAuthority.php | 112 - .../ManagedCertificateAuthority.php | 69 - .../ManagedCertificateAuthority/CertChain.php | 65 - .../Google/Cloud/Redis/Cluster/V1/Cluster.php | 1433 ------------- .../Cluster/V1/Cluster/GcsBackupSource.php | 72 - .../V1/Cluster/ManagedBackupSource.php | 87 - .../Cloud/Redis/Cluster/V1/Cluster/State.php | 75 - .../Redis/Cluster/V1/Cluster/StateInfo.php | 75 - .../V1/Cluster/StateInfo/UpdateInfo.php | 121 -- .../Redis/Cluster/V1/ClusterEndpoint.php | 73 - .../Cluster/V1/ClusterMaintenancePolicy.php | 171 -- .../Cluster/V1/ClusterMaintenanceSchedule.php | 129 -- .../Cluster/V1/ClusterPersistenceConfig.php | 155 -- .../V1/ClusterPersistenceConfig/AOFConfig.php | 67 - .../AOFConfig/AppendFsync.php | 71 - .../PersistenceMode.php | 68 - .../V1/ClusterPersistenceConfig/RDBConfig.php | 119 -- .../RDBConfig/SnapshotPeriod.php | 75 - .../V1/ClusterWeeklyMaintenanceWindow.php | 111 - .../Redis/Cluster/V1/ConnectionDetail.php | 114 - .../Cloud/Redis/Cluster/V1/ConnectionType.php | 68 - .../Redis/Cluster/V1/CreateClusterRequest.php | 238 --- .../V1/CrossClusterReplicationConfig.php | 277 --- .../ClusterRole.php | 72 - .../Membership.php | 120 -- .../RemoteCluster.php | 106 - .../Redis/Cluster/V1/DeleteBackupRequest.php | 120 -- .../Redis/Cluster/V1/DeleteClusterRequest.php | 125 -- .../Redis/Cluster/V1/DiscoveryEndpoint.php | 153 -- .../Cloud/Redis/Cluster/V1/EncryptionInfo.php | 187 -- .../Cluster/V1/EncryptionInfo/KmsKeyState.php | 104 - .../Redis/Cluster/V1/EncryptionInfo/Type.php | 63 - .../Redis/Cluster/V1/ExportBackupRequest.php | 113 - .../Cluster/V1/GetBackupCollectionRequest.php | 91 - .../Redis/Cluster/V1/GetBackupRequest.php | 86 - .../GetClusterCertificateAuthorityRequest.php | 92 - .../Redis/Cluster/V1/GetClusterRequest.php | 91 - .../V1/ListBackupCollectionsRequest.php | 188 -- .../V1/ListBackupCollectionsResponse.php | 171 -- .../Redis/Cluster/V1/ListBackupsRequest.php | 178 -- .../Redis/Cluster/V1/ListBackupsResponse.php | 139 -- .../Redis/Cluster/V1/ListClustersRequest.php | 183 -- .../Redis/Cluster/V1/ListClustersResponse.php | 175 -- .../Cloud/Redis/Cluster/V1/NodeType.php | 75 - .../Redis/Cluster/V1/OperationMetadata.php | 307 --- .../Redis/Cluster/V1/PscAutoConnection.php | 346 --- .../Cloud/Redis/Cluster/V1/PscConfig.php | 73 - .../Cloud/Redis/Cluster/V1/PscConnection.php | 349 --- .../Redis/Cluster/V1/PscConnectionStatus.php | 61 - .../Redis/Cluster/V1/PscServiceAttachment.php | 106 - .../RescheduleClusterMaintenanceRequest.php | 189 -- .../RescheduleType.php | 61 - .../Cluster/V1/TransitEncryptionMode.php | 61 - .../Redis/Cluster/V1/UpdateClusterRequest.php | 196 -- .../Cluster/V1/ZoneDistributionConfig.php | 113 - .../ZoneDistributionMode.php | 63 - .../backup_cluster.php | 96 - .../create_cluster.php | 112 - .../CloudRedisClusterClient/delete_backup.php | 86 - .../delete_cluster.php | 83 - .../CloudRedisClusterClient/export_backup.php | 89 - .../V1/CloudRedisClusterClient/get_backup.php | 77 - .../get_backup_collection.php | 77 - .../CloudRedisClusterClient/get_cluster.php | 73 - .../get_cluster_certificate_authority.php | 77 - .../CloudRedisClusterClient/get_location.php | 57 - .../list_backup_collections.php | 83 - .../CloudRedisClusterClient/list_backups.php | 81 - .../CloudRedisClusterClient/list_clusters.php | 86 - .../list_locations.php | 62 - .../reschedule_cluster_maintenance.php | 90 - .../update_cluster.php | 93 - .../src/V1/Client/CloudRedisClusterClient.php | 1041 --------- .../v1/src/V1/gapic_metadata.json | 103 - .../cloud_redis_cluster_client_config.json | 117 -- .../cloud_redis_cluster_descriptor_config.php | 330 --- ...cloud_redis_cluster_rest_client_config.php | 276 --- .../V1/Client/CloudRedisClusterClientTest.php | 1865 ----------------- 103 files changed, 341 insertions(+), 15132 deletions(-) rename {owl-bot-staging/RedisCluster/v1 => RedisCluster}/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php (100%) rename {owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster => RedisCluster/src}/V1/GetSharedRegionalCertificateAuthorityRequest.php (100%) rename {owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster => RedisCluster/src}/V1/ServerCaMode.php (100%) rename {owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster => RedisCluster/src}/V1/SharedRegionalCertificateAuthority.php (100%) rename {owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster => RedisCluster/src}/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php (100%) rename {owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster => RedisCluster/src}/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php (100%) delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php delete mode 100644 owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php delete mode 100644 owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php delete mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php delete mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json delete mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php delete mode 100644 owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php delete mode 100644 owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php diff --git a/RedisCluster/metadata/V1/CloudRedisCluster.php b/RedisCluster/metadata/V1/CloudRedisCluster.php index 87ff9a32a738..84028f522715 100644 --- a/RedisCluster/metadata/V1/CloudRedisCluster.php +++ b/RedisCluster/metadata/V1/CloudRedisCluster.php @@ -28,7 +28,7 @@ public static function initOnce() { \GPBMetadata\Google\Type\Dayofweek::initOnce(); \GPBMetadata\Google\Type\Timeofday::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xBA\x8A\x01\x0A7google/cloud/redis/cluster/v1/cloud_redis_cluster.proto\x12\x1Dgoogle.cloud.redis.cluster.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x19google/protobuf/any.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\x1A\x1Bgoogle/type/timeofday.proto\"\xBC\x01\x0A\x14CreateClusterRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x17\x0A\x0Acluster_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x03 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x04 \x01(\x09\"w\x0A\x13ListClustersRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"~\x0A\x14ListClustersResponse\x128\x0A\x08clusters\x18\x01 \x03(\x0B2&.google.cloud.redis.cluster.v1.Cluster\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"\x9E\x01\x0A\x14UpdateClusterRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x02 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\"G\x0A\x11GetClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\"^\x0A\x14DeleteClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x12\x0A\x0Arequest_id\x18\x02 \x01(\x09\"h\x0A%GetClusterCertificateAuthorityRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)redis.googleapis.com/CertificateAuthority\"\x8E\x01\x0A\x1CListBackupCollectionsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%redis.googleapis.com/BackupCollection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x9A\x01\x0A\x1DListBackupCollectionsResponse\x12K\x0A\x12backup_collections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.BackupCollection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Y\x0A\x1AGetBackupCollectionRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%redis.googleapis.com/BackupCollection\"z\x0A\x12ListBackupsRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Bredis.googleapis.com/Backup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"{\x0A\x13ListBackupsResponse\x126\x0A\x07backups\x18\x01 \x03(\x0B2%.google.cloud.redis.cluster.v1.Backup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"E\x0A\x10GetBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\"i\x0A\x13DeleteBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"m\x0A\x13ExportBackupRequest\x12\x14\x0A\x0Agcs_bucket\x18\x03 \x01(\x09H\x00\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/BackupB\x0D\x0A\x0Bdestination\"\xA2\x01\x0A\x14BackupClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12+\x0A\x03ttl\x18\x02 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x12\x1B\x0A\x09backup_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x0C\x0A\x0A_backup_id\"\xD0\x16\x0A\x07Cluster\x12Q\x0A\x0Agcs_source\x18\" \x01(\x0B26.google.cloud.redis.cluster.v1.Cluster.GcsBackupSourceB\x03\xE0A\x01H\x00\x12`\x0A\x15managed_backup_source\x18# \x01(\x0B2:.google.cloud.redis.cluster.v1.Cluster.ManagedBackupSourceB\x03\xE0A\x01H\x00\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x02\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12@\x0A\x05state\x18\x04 \x01(\x0E2,.google.cloud.redis.cluster.v1.Cluster.StateB\x03\xE0A\x03\x12\x10\x0A\x03uid\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12Q\x0A\x12authorization_mode\x18\x0B \x01(\x0E20.google.cloud.redis.cluster.v1.AuthorizationModeB\x03\xE0A\x01\x12Z\x0A\x17transit_encryption_mode\x18\x0C \x01(\x0E24.google.cloud.redis.cluster.v1.TransitEncryptionModeB\x03\xE0A\x01\x12\x19\x0A\x07size_gb\x18\x0D \x01(\x05B\x03\xE0A\x03H\x02\x88\x01\x01\x12\x1D\x0A\x0Bshard_count\x18\x0E \x01(\x05B\x03\xE0A\x01H\x03\x88\x01\x01\x12B\x0A\x0Bpsc_configs\x18\x0F \x03(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x01\x12R\x0A\x13discovery_endpoints\x18\x10 \x03(\x0B20.google.cloud.redis.cluster.v1.DiscoveryEndpointB\x03\xE0A\x03\x12J\x0A\x0Fpsc_connections\x18\x11 \x03(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionB\x03\xE0A\x03\x12I\x0A\x0Astate_info\x18\x12 \x01(\x0B20.google.cloud.redis.cluster.v1.Cluster.StateInfoB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x13 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x01\x12X\x0A\x12persistence_config\x18\x14 \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterPersistenceConfigB\x03\xE0A\x01\x12T\x0A\x0Dredis_configs\x18\x15 \x03(\x0B28.google.cloud.redis.cluster.v1.Cluster.RedisConfigsEntryB\x03\xE0A\x01\x12!\x0A\x0Fprecise_size_gb\x18\x16 \x01(\x01B\x03\xE0A\x03H\x04\x88\x01\x01\x12\\\x0A\x18zone_distribution_config\x18\x17 \x01(\x0B25.google.cloud.redis.cluster.v1.ZoneDistributionConfigB\x03\xE0A\x01\x12k\x0A cross_cluster_replication_config\x18\x18 \x01(\x0B2<.google.cloud.redis.cluster.v1.CrossClusterReplicationConfigB\x03\xE0A\x01\x12-\x0A\x1Bdeletion_protection_enabled\x18\x19 \x01(\x08B\x03\xE0A\x01H\x05\x88\x01\x01\x12]\x0A\x12maintenance_policy\x18\x1A \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterMaintenancePolicyB\x03\xE0A\x01H\x06\x88\x01\x01\x12a\x0A\x14maintenance_schedule\x18\x1B \x01(\x0B29.google.cloud.redis.cluster.v1.ClusterMaintenanceScheduleB\x03\xE0A\x03H\x07\x88\x01\x01\x12Y\x0A\x17psc_service_attachments\x18\x1E \x03(\x0B23.google.cloud.redis.cluster.v1.PscServiceAttachmentB\x03\xE0A\x03\x12N\x0A\x11cluster_endpoints\x18\$ \x03(\x0B2..google.cloud.redis.cluster.v1.ClusterEndpointB\x03\xE0A\x01\x12P\x0A\x11backup_collection\x18' \x01(\x09B0\xE0A\x01\xE0A\x03\xFAA'\x0A%redis.googleapis.com/BackupCollectionH\x08\x88\x01\x01\x12?\x0A\x07kms_key\x18( \x01(\x09B)\xE0A\x01\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyH\x09\x88\x01\x01\x12Z\x0A\x17automated_backup_config\x18* \x01(\x0B24.google.cloud.redis.cluster.v1.AutomatedBackupConfigB\x03\xE0A\x01\x12K\x0A\x0Fencryption_info\x18+ \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x1A\xEA\x01\x0A\x09StateInfo\x12R\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2;.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoH\x00\x1A\x80\x01\x0A\x0AUpdateInfo\x12\x1F\x0A\x12target_shard_count\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12!\x0A\x14target_replica_count\x18\x02 \x01(\x05H\x01\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x06\x0A\x04info\x1A\$\x0A\x0FGcsBackupSource\x12\x11\x0A\x04uris\x18\x01 \x03(\x09B\x03\xE0A\x01\x1A*\x0A\x13ManagedBackupSource\x12\x13\x0A\x06backup\x18\x01 \x01(\x09B\x03\xE0A\x01\x1A3\x0A\x11RedisConfigsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"T\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04:p\xEAAm\x0A\x1Credis.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08clusters2\x07clusterB\x10\x0A\x0Eimport_sourcesB\x10\x0A\x0E_replica_countB\x0A\x0A\x08_size_gbB\x0E\x0A\x0C_shard_countB\x12\x0A\x10_precise_size_gbB\x1E\x0A\x1C_deletion_protection_enabledB\x15\x0A\x13_maintenance_policyB\x17\x0A\x15_maintenance_scheduleB\x14\x0A\x12_backup_collectionB\x0A\x0A\x08_kms_key\"\x85\x04\x0A\x15AutomatedBackupConfig\x12t\x0A\x18fixed_frequency_schedule\x18\x02 \x01(\x0B2K.google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencyScheduleB\x03\xE0A\x01H\x00\x12l\x0A\x15automated_backup_mode\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupModeB\x03\xE0A\x01\x126\x0A\x09retention\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01H\x01\x88\x01\x01\x1A]\x0A\x16FixedFrequencySchedule\x124\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDayB\x03\xE0A\x02H\x00\x88\x01\x01B\x0D\x0A\x0B_start_time\"W\x0A\x13AutomatedBackupMode\x12%\x0A!AUTOMATED_BACKUP_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x0B\x0A\x07ENABLED\x10\x02B\x0A\x0A\x08scheduleB\x0C\x0A\x0A_retention\"\xF6\x02\x0A\x10BackupCollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12 \x0A\x0Bcluster_uid\x18\x03 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x125\x0A\x07cluster\x18\x04 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12:\x0A\x07kms_key\x18\x05 \x01(\x09B)\xE0A\x03\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12\x18\x0A\x03uid\x18\x06 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01:\x9F\x01\xEAA\x9B\x01\x0A%redis.googleapis.com/BackupCollection\x12Mprojects/{project}/locations/{location}/backupCollections/{backup_collection}*\x11backupCollections2\x10backupCollection\"\x82\x08\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x125\x0A\x07cluster\x18\x03 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12 \x0A\x0Bcluster_uid\x18\x04 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1D\x0A\x10total_size_bytes\x18\x05 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1B\x0A\x0Eengine_version\x18\x07 \x01(\x09B\x03\xE0A\x03\x12D\x0A\x0Cbackup_files\x18\x08 \x03(\x0B2).google.cloud.redis.cluster.v1.BackupFileB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x09 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x03\x12\x1A\x0A\x0Dreplica_count\x18\x0A \x01(\x05B\x03\xE0A\x03\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x03\x12J\x0A\x0Bbackup_type\x18\x0C \x01(\x0E20.google.cloud.redis.cluster.v1.Backup.BackupTypeB\x03\xE0A\x03\x12?\x0A\x05state\x18\x0D \x01(\x0E2+.google.cloud.redis.cluster.v1.Backup.StateB\x03\xE0A\x03\x12K\x0A\x0Fencryption_info\x18\x0E \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x0F \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"G\x0A\x0ABackupType\x12\x1B\x0A\x17BACKUP_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ON_DEMAND\x10\x01\x12\x0D\x0A\x09AUTOMATED\x10\x02\"U\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0D\x0A\x09SUSPENDED\x10\x04:\x92\x01\xEAA\x8E\x01\x0A\x1Bredis.googleapis.com/Backup\x12^projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}*\x07backups2\x06backup\"s\x0A\x0ABackupFile\x12\x16\x0A\x09file_name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x02 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x84\x01\x0A\x14PscServiceAttachment\x12\x1F\x0A\x12service_attachment\x18\x01 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x03 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xF4\x06\x0A\x1DCrossClusterReplicationConfig\x12^\x0A\x0Ccluster_role\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole\x12c\x0A\x0Fprimary_cluster\x18\x02 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x12f\x0A\x12secondary_clusters\x18\x03 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x0Amembership\x18\x05 \x01(\x0B2G.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.MembershipB\x03\xE0A\x03\x1AU\x0A\x0DRemoteCluster\x122\x0A\x07cluster\x18\x01 \x01(\x09B!\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x10\x0A\x03uid\x18\x02 \x01(\x09B\x03\xE0A\x03\x1A\xE3\x01\x0A\x0AMembership\x12h\x0A\x0Fprimary_cluster\x18\x01 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\x12k\x0A\x12secondary_clusters\x18\x02 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\"Q\x0A\x0BClusterRole\x12\x1C\x0A\x18CLUSTER_ROLE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x0B\x0A\x07PRIMARY\x10\x02\x12\x0D\x0A\x09SECONDARY\x10\x03\"\xE8\x01\x0A\x18ClusterMaintenancePolicy\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x19weekly_maintenance_window\x18\x03 \x03(\x0B2=.google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow\"q\x0A\x1EClusterWeeklyMaintenanceWindow\x12#\x0A\x03day\x18\x01 \x01(\x0E2\x16.google.type.DayOfWeek\x12*\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDay\"\x84\x01\x0A\x1AClusterMaintenanceSchedule\x123\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"!\x0A\x09PscConfig\x12\x14\x0A\x07network\x18\x02 \x01(\x09B\x03\xE0A\x02\"\x7F\x0A\x11DiscoveryEndpoint\x12\x14\x0A\x07address\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04port\x18\x02 \x01(\x05B\x03\xE0A\x03\x12A\x0A\x0Apsc_config\x18\x03 \x01(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x03\"\xDA\x03\x0A\x0DPscConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x02\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x02\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x02\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x0A \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"W\x0A\x0FClusterEndpoint\x12D\x0A\x0Bconnections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.ConnectionDetail\"\xB9\x01\x0A\x10ConnectionDetail\x12O\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B20.google.cloud.redis.cluster.v1.PscAutoConnectionH\x00\x12F\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionH\x00B\x0C\x0A\x0Aconnection\"\xDE\x03\x0A\x11PscAutoConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x03\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x09 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x85\x04\x0A\x14CertificateAuthority\x12l\x0A\x11managed_server_ca\x18\x01 \x01(\x0B2O.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08\x1A\xAD\x01\x0A\x1BManagedCertificateAuthority\x12k\x0A\x08ca_certs\x18\x01 \x03(\x0B2Y.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1A!\x0A\x09CertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xAE\x01\xEAA\xAA\x01\x0A)redis.googleapis.com/CertificateAuthority\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority*\x16certificateAuthorities2\x14certificateAuthorityB\x0B\x0A\x09server_ca\"\x87\x07\x0A\x18ClusterPersistenceConfig\x12Z\x0A\x04mode\x18\x01 \x01(\x0E2G.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceModeB\x03\xE0A\x01\x12Z\x0A\x0Ardb_config\x18\x02 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigB\x03\xE0A\x01\x12Z\x0A\x0Aaof_config\x18\x03 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigB\x03\xE0A\x01\x1A\xBA\x02\x0A\x09RDBConfig\x12r\x0A\x13rdb_snapshot_period\x18\x01 \x01(\x0E2P.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xE0A\x01\x12@\x0A\x17rdb_snapshot_start_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"w\x0A\x0ESnapshotPeriod\x12\x1F\x0A\x1BSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08ONE_HOUR\x10\x01\x12\x0D\x0A\x09SIX_HOURS\x10\x02\x12\x10\x0A\x0CTWELVE_HOURS\x10\x03\x12\x15\x0A\x11TWENTY_FOUR_HOURS\x10\x04\x1A\xC4\x01\x0A\x09AOFConfig\x12h\x0A\x0Cappend_fsync\x18\x01 \x01(\x0E2M.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsyncB\x03\xE0A\x01\"M\x0A\x0BAppendFsync\x12\x1C\x0A\x18APPEND_FSYNC_UNSPECIFIED\x10\x00\x12\x06\x0A\x02NO\x10\x01\x12\x0C\x0A\x08EVERYSEC\x10\x02\x12\x0A\x0A\x06ALWAYS\x10\x03\"S\x0A\x0FPersistenceMode\x12 \x0A\x1CPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x07\x0A\x03RDB\x10\x02\x12\x07\x0A\x03AOF\x10\x03\"\xEB\x01\x0A\x16ZoneDistributionConfig\x12]\x0A\x04mode\x18\x01 \x01(\x0E2J.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xE0A\x01\x12\x11\x0A\x04zone\x18\x02 \x01(\x09B\x03\xE0A\x01\"_\x0A\x14ZoneDistributionMode\x12&\x0A\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AMULTI_ZONE\x10\x01\x12\x0F\x0A\x0BSINGLE_ZONE\x10\x02\"\xD7\x02\x0A#RescheduleClusterMaintenanceRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12o\x0A\x0Freschedule_type\x18\x02 \x01(\x0E2Q.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleTypeB\x03\xE0A\x02\x126\x0A\x0Dschedule_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"S\x0A\x0ERescheduleType\x12\x1F\x0A\x1BRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09IMMEDIATE\x10\x01\x12\x11\x0A\x0DSPECIFIC_TIME\x10\x03\"\xFA\x04\x0A\x0EEncryptionInfo\x12P\x0A\x0Fencryption_type\x18\x01 \x01(\x0E22.google.cloud.redis.cluster.v1.EncryptionInfo.TypeB\x03\xE0A\x03\x12J\x0A\x10kms_key_versions\x18\x02 \x03(\x09B0\xE0A\x03\xFAA*\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12]\x0A\x15kms_key_primary_state\x18\x03 \x01(\x0E29.google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyStateB\x03\xE0A\x03\x129\x0A\x10last_update_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\\\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1F\x0A\x1BCUSTOMER_MANAGED_ENCRYPTION\x10\x02\"\xD1\x01\x0A\x0BKmsKeyState\x12\x1D\x0A\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x15\x0A\x11PERMISSION_DENIED\x10\x02\x12\x0C\x0A\x08DISABLED\x10\x03\x12\x0D\x0A\x09DESTROYED\x10\x04\x12\x15\x0A\x11DESTROY_SCHEDULED\x10\x05\x12 \x0A\x1CEKM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\x0A\x10BILLING_DISABLED\x10\x07\x12\x13\x0A\x0FUNKNOWN_FAILURE\x10\x08*\x83\x01\x0A\x13PscConnectionStatus\x12%\x0A!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12 \x0A\x1CPSC_CONNECTION_STATUS_ACTIVE\x10\x01\x12#\x0A\x1FPSC_CONNECTION_STATUS_NOT_FOUND\x10\x02*^\x0A\x11AuthorizationMode\x12\x19\x0A\x15AUTH_MODE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12AUTH_MODE_IAM_AUTH\x10\x01\x12\x16\x0A\x12AUTH_MODE_DISABLED\x10\x02*\x8F\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x1A\x0A\x16REDIS_SHARED_CORE_NANO\x10\x01\x12\x18\x0A\x14REDIS_HIGHMEM_MEDIUM\x10\x02\x12\x18\x0A\x14REDIS_HIGHMEM_XLARGE\x10\x03\x12\x18\x0A\x14REDIS_STANDARD_SMALL\x10\x04*\x99\x01\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\$\x0A TRANSIT_ENCRYPTION_MODE_DISABLED\x10\x01\x121\x0A-TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION\x10\x02*\x89\x01\x0A\x0EConnectionType\x12\x1F\x0A\x1BCONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19CONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1B\x0A\x17CONNECTION_TYPE_PRIMARY\x10\x02\x12\x1A\x0A\x16CONNECTION_TYPE_READER\x10\x032\x93\x18\x0A\x11CloudRedisCluster\x12\xB6\x01\x0A\x0CListClusters\x122.google.cloud.redis.cluster.v1.ListClustersRequest\x1A3.google.cloud.redis.cluster.v1.ListClustersResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xA3\x01\x0A\x0AGetCluster\x120.google.cloud.redis.cluster.v1.GetClusterRequest\x1A&.google.cloud.redis.cluster.v1.Cluster\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xE1\x01\x0A\x0DUpdateCluster\x123.google.cloud.redis.cluster.v1.UpdateClusterRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x13cluster,update_mask\x82\xD3\xE4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07cluster\x12\xCF\x01\x0A\x0DDeleteCluster\x123.google.cloud.redis.cluster.v1.DeleteClusterRequest\x1A\x1D.google.longrunning.Operation\"j\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xDF\x01\x0A\x0DCreateCluster\x123.google.cloud.redis.cluster.v1.CreateClusterRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x19parent,cluster,cluster_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/clusters:\x07cluster\x12\xED\x01\x0A\x1EGetClusterCertificateAuthority\x12D.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest\x1A3.google.cloud.redis.cluster.v1.CertificateAuthority\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\x12A/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}\x12\x9E\x02\x0A\x1CRescheduleClusterMaintenance\x12B.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest\x1A\x1D.google.longrunning.Operation\"\x9A\x01\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\"name,reschedule_type,schedule_time\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/clusters/*}:rescheduleClusterMaintenance:\x01*\x12\xDA\x01\x0A\x15ListBackupCollections\x12;.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest\x1A<.google.cloud.redis.cluster.v1.ListBackupCollectionsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/backupCollections\x12\xC7\x01\x0A\x13GetBackupCollection\x129.google.cloud.redis.cluster.v1.GetBackupCollectionRequest\x1A/.google.cloud.redis.cluster.v1.BackupCollection\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xC6\x01\x0A\x0BListBackups\x121.google.cloud.redis.cluster.v1.ListBackupsRequest\x1A2.google.cloud.redis.cluster.v1.ListBackupsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xB3\x01\x0A\x09GetBackup\x12/.google.cloud.redis.cluster.v1.GetBackupRequest\x1A%.google.cloud.redis.cluster.v1.Backup\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xE0\x01\x0A\x0CDeleteBackup\x122.google.cloud.redis.cluster.v1.DeleteBackupRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02A*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xD4\x01\x0A\x0CExportBackup\x122.google.cloud.redis.cluster.v1.ExportBackupRequest\x1A\x1D.google.longrunning.Operation\"q\xCAA\x1D\x0A\x06Backup\x12\x13google.protobuf.Any\x82\xD3\xE4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xCB\x01\x0A\x0DBackupCluster\x123.google.cloud.redis.cluster.v1.BackupClusterRequest\x1A\x1D.google.longrunning.Operation\"f\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/locations/*/clusters/*}:backup:\x01*\x1AH\xCAA\x14redis.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xFF\x05\x0A!com.google.cloud.redis.cluster.v1B\x16CloudRedisClusterProtoP\x01Z;cloud.google.com/go/redis/cluster/apiv1/clusterpb;clusterpb\xEA\x02!Google::Cloud::Redis::Cluster::V1\xEAAn\x0A%compute.googleapis.com/ForwardingRule\x12Eprojects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xEAAN\x0A\x1Ecompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\xA6\x01\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}b\x06proto3" + "\x0A\xEE\x96\x01\x0A7google/cloud/redis/cluster/v1/cloud_redis_cluster.proto\x12\x1Dgoogle.cloud.redis.cluster.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x19google/protobuf/any.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\x1A\x1Bgoogle/type/timeofday.proto\"\xBC\x01\x0A\x14CreateClusterRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x17\x0A\x0Acluster_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x03 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x04 \x01(\x09\"w\x0A\x13ListClustersRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"~\x0A\x14ListClustersResponse\x128\x0A\x08clusters\x18\x01 \x03(\x0B2&.google.cloud.redis.cluster.v1.Cluster\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"\x9E\x01\x0A\x14UpdateClusterRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x02 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\"G\x0A\x11GetClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\"^\x0A\x14DeleteClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x12\x0A\x0Arequest_id\x18\x02 \x01(\x09\"h\x0A%GetClusterCertificateAuthorityRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)redis.googleapis.com/CertificateAuthority\"\x8E\x01\x0A\x1CListBackupCollectionsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%redis.googleapis.com/BackupCollection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x9A\x01\x0A\x1DListBackupCollectionsResponse\x12K\x0A\x12backup_collections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.BackupCollection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Y\x0A\x1AGetBackupCollectionRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%redis.googleapis.com/BackupCollection\"z\x0A\x12ListBackupsRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Bredis.googleapis.com/Backup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"{\x0A\x13ListBackupsResponse\x126\x0A\x07backups\x18\x01 \x03(\x0B2%.google.cloud.redis.cluster.v1.Backup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"E\x0A\x10GetBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\"i\x0A\x13DeleteBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"m\x0A\x13ExportBackupRequest\x12\x14\x0A\x0Agcs_bucket\x18\x03 \x01(\x09H\x00\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/BackupB\x0D\x0A\x0Bdestination\"\xA2\x01\x0A\x14BackupClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12+\x0A\x03ttl\x18\x02 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x12\x1B\x0A\x09backup_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x0C\x0A\x0A_backup_id\"\xD9\x18\x0A\x07Cluster\x12Q\x0A\x0Agcs_source\x18\" \x01(\x0B26.google.cloud.redis.cluster.v1.Cluster.GcsBackupSourceB\x03\xE0A\x01H\x00\x12`\x0A\x15managed_backup_source\x18# \x01(\x0B2:.google.cloud.redis.cluster.v1.Cluster.ManagedBackupSourceB\x03\xE0A\x01H\x00\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x02\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12@\x0A\x05state\x18\x04 \x01(\x0E2,.google.cloud.redis.cluster.v1.Cluster.StateB\x03\xE0A\x03\x12\x10\x0A\x03uid\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12Q\x0A\x12authorization_mode\x18\x0B \x01(\x0E20.google.cloud.redis.cluster.v1.AuthorizationModeB\x03\xE0A\x01\x12Z\x0A\x17transit_encryption_mode\x18\x0C \x01(\x0E24.google.cloud.redis.cluster.v1.TransitEncryptionModeB\x03\xE0A\x01\x12\x19\x0A\x07size_gb\x18\x0D \x01(\x05B\x03\xE0A\x03H\x02\x88\x01\x01\x12\x1D\x0A\x0Bshard_count\x18\x0E \x01(\x05B\x03\xE0A\x01H\x03\x88\x01\x01\x12B\x0A\x0Bpsc_configs\x18\x0F \x03(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x01\x12R\x0A\x13discovery_endpoints\x18\x10 \x03(\x0B20.google.cloud.redis.cluster.v1.DiscoveryEndpointB\x03\xE0A\x03\x12J\x0A\x0Fpsc_connections\x18\x11 \x03(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionB\x03\xE0A\x03\x12I\x0A\x0Astate_info\x18\x12 \x01(\x0B20.google.cloud.redis.cluster.v1.Cluster.StateInfoB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x13 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x01\x12X\x0A\x12persistence_config\x18\x14 \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterPersistenceConfigB\x03\xE0A\x01\x12T\x0A\x0Dredis_configs\x18\x15 \x03(\x0B28.google.cloud.redis.cluster.v1.Cluster.RedisConfigsEntryB\x03\xE0A\x01\x12!\x0A\x0Fprecise_size_gb\x18\x16 \x01(\x01B\x03\xE0A\x03H\x04\x88\x01\x01\x12\\\x0A\x18zone_distribution_config\x18\x17 \x01(\x0B25.google.cloud.redis.cluster.v1.ZoneDistributionConfigB\x03\xE0A\x01\x12k\x0A cross_cluster_replication_config\x18\x18 \x01(\x0B2<.google.cloud.redis.cluster.v1.CrossClusterReplicationConfigB\x03\xE0A\x01\x12-\x0A\x1Bdeletion_protection_enabled\x18\x19 \x01(\x08B\x03\xE0A\x01H\x05\x88\x01\x01\x12]\x0A\x12maintenance_policy\x18\x1A \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterMaintenancePolicyB\x03\xE0A\x01H\x06\x88\x01\x01\x12a\x0A\x14maintenance_schedule\x18\x1B \x01(\x0B29.google.cloud.redis.cluster.v1.ClusterMaintenanceScheduleB\x03\xE0A\x03H\x07\x88\x01\x01\x12Y\x0A\x17psc_service_attachments\x18\x1E \x03(\x0B23.google.cloud.redis.cluster.v1.PscServiceAttachmentB\x03\xE0A\x03\x12N\x0A\x11cluster_endpoints\x18\$ \x03(\x0B2..google.cloud.redis.cluster.v1.ClusterEndpointB\x03\xE0A\x01\x12P\x0A\x11backup_collection\x18' \x01(\x09B0\xE0A\x01\xE0A\x03\xFAA'\x0A%redis.googleapis.com/BackupCollectionH\x08\x88\x01\x01\x12?\x0A\x07kms_key\x18( \x01(\x09B)\xE0A\x01\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyH\x09\x88\x01\x01\x12Z\x0A\x17automated_backup_config\x18* \x01(\x0B24.google.cloud.redis.cluster.v1.AutomatedBackupConfigB\x03\xE0A\x01\x12K\x0A\x0Fencryption_info\x18+ \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12M\x0A\x0Eserver_ca_mode\x185 \x01(\x0E2+.google.cloud.redis.cluster.v1.ServerCaModeB\x03\xE0A\x01H\x0A\x88\x01\x01\x12D\x0A\x0Eserver_ca_pool\x186 \x01(\x09B'\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x0B\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x187 \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x0C\x88\x01\x01\x1A\xEA\x01\x0A\x09StateInfo\x12R\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2;.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoH\x00\x1A\x80\x01\x0A\x0AUpdateInfo\x12\x1F\x0A\x12target_shard_count\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12!\x0A\x14target_replica_count\x18\x02 \x01(\x05H\x01\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x06\x0A\x04info\x1A\$\x0A\x0FGcsBackupSource\x12\x11\x0A\x04uris\x18\x01 \x03(\x09B\x03\xE0A\x01\x1A*\x0A\x13ManagedBackupSource\x12\x13\x0A\x06backup\x18\x01 \x01(\x09B\x03\xE0A\x01\x1A3\x0A\x11RedisConfigsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"T\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04:p\xEAAm\x0A\x1Credis.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08clusters2\x07clusterB\x10\x0A\x0Eimport_sourcesB\x10\x0A\x0E_replica_countB\x0A\x0A\x08_size_gbB\x0E\x0A\x0C_shard_countB\x12\x0A\x10_precise_size_gbB\x1E\x0A\x1C_deletion_protection_enabledB\x15\x0A\x13_maintenance_policyB\x17\x0A\x15_maintenance_scheduleB\x14\x0A\x12_backup_collectionB\x0A\x0A\x08_kms_keyB\x11\x0A\x0F_server_ca_modeB\x11\x0A\x0F_server_ca_poolB\x1C\x0A\x1A_rotate_server_certificate\"\x85\x04\x0A\x15AutomatedBackupConfig\x12t\x0A\x18fixed_frequency_schedule\x18\x02 \x01(\x0B2K.google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencyScheduleB\x03\xE0A\x01H\x00\x12l\x0A\x15automated_backup_mode\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupModeB\x03\xE0A\x01\x126\x0A\x09retention\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01H\x01\x88\x01\x01\x1A]\x0A\x16FixedFrequencySchedule\x124\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDayB\x03\xE0A\x02H\x00\x88\x01\x01B\x0D\x0A\x0B_start_time\"W\x0A\x13AutomatedBackupMode\x12%\x0A!AUTOMATED_BACKUP_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x0B\x0A\x07ENABLED\x10\x02B\x0A\x0A\x08scheduleB\x0C\x0A\x0A_retention\"\xF6\x02\x0A\x10BackupCollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12 \x0A\x0Bcluster_uid\x18\x03 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x125\x0A\x07cluster\x18\x04 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12:\x0A\x07kms_key\x18\x05 \x01(\x09B)\xE0A\x03\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12\x18\x0A\x03uid\x18\x06 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01:\x9F\x01\xEAA\x9B\x01\x0A%redis.googleapis.com/BackupCollection\x12Mprojects/{project}/locations/{location}/backupCollections/{backup_collection}*\x11backupCollections2\x10backupCollection\"\x82\x08\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x125\x0A\x07cluster\x18\x03 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12 \x0A\x0Bcluster_uid\x18\x04 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1D\x0A\x10total_size_bytes\x18\x05 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1B\x0A\x0Eengine_version\x18\x07 \x01(\x09B\x03\xE0A\x03\x12D\x0A\x0Cbackup_files\x18\x08 \x03(\x0B2).google.cloud.redis.cluster.v1.BackupFileB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x09 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x03\x12\x1A\x0A\x0Dreplica_count\x18\x0A \x01(\x05B\x03\xE0A\x03\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x03\x12J\x0A\x0Bbackup_type\x18\x0C \x01(\x0E20.google.cloud.redis.cluster.v1.Backup.BackupTypeB\x03\xE0A\x03\x12?\x0A\x05state\x18\x0D \x01(\x0E2+.google.cloud.redis.cluster.v1.Backup.StateB\x03\xE0A\x03\x12K\x0A\x0Fencryption_info\x18\x0E \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x0F \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"G\x0A\x0ABackupType\x12\x1B\x0A\x17BACKUP_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ON_DEMAND\x10\x01\x12\x0D\x0A\x09AUTOMATED\x10\x02\"U\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0D\x0A\x09SUSPENDED\x10\x04:\x92\x01\xEAA\x8E\x01\x0A\x1Bredis.googleapis.com/Backup\x12^projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}*\x07backups2\x06backup\"s\x0A\x0ABackupFile\x12\x16\x0A\x09file_name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x02 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x84\x01\x0A\x14PscServiceAttachment\x12\x1F\x0A\x12service_attachment\x18\x01 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x03 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xF4\x06\x0A\x1DCrossClusterReplicationConfig\x12^\x0A\x0Ccluster_role\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole\x12c\x0A\x0Fprimary_cluster\x18\x02 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x12f\x0A\x12secondary_clusters\x18\x03 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x0Amembership\x18\x05 \x01(\x0B2G.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.MembershipB\x03\xE0A\x03\x1AU\x0A\x0DRemoteCluster\x122\x0A\x07cluster\x18\x01 \x01(\x09B!\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x10\x0A\x03uid\x18\x02 \x01(\x09B\x03\xE0A\x03\x1A\xE3\x01\x0A\x0AMembership\x12h\x0A\x0Fprimary_cluster\x18\x01 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\x12k\x0A\x12secondary_clusters\x18\x02 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\"Q\x0A\x0BClusterRole\x12\x1C\x0A\x18CLUSTER_ROLE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x0B\x0A\x07PRIMARY\x10\x02\x12\x0D\x0A\x09SECONDARY\x10\x03\"\xE8\x01\x0A\x18ClusterMaintenancePolicy\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x19weekly_maintenance_window\x18\x03 \x03(\x0B2=.google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow\"q\x0A\x1EClusterWeeklyMaintenanceWindow\x12#\x0A\x03day\x18\x01 \x01(\x0E2\x16.google.type.DayOfWeek\x12*\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDay\"\x84\x01\x0A\x1AClusterMaintenanceSchedule\x123\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"!\x0A\x09PscConfig\x12\x14\x0A\x07network\x18\x02 \x01(\x09B\x03\xE0A\x02\"\x7F\x0A\x11DiscoveryEndpoint\x12\x14\x0A\x07address\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04port\x18\x02 \x01(\x05B\x03\xE0A\x03\x12A\x0A\x0Apsc_config\x18\x03 \x01(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x03\"\xDA\x03\x0A\x0DPscConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x02\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x02\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x02\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x0A \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"W\x0A\x0FClusterEndpoint\x12D\x0A\x0Bconnections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.ConnectionDetail\"\xB9\x01\x0A\x10ConnectionDetail\x12O\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B20.google.cloud.redis.cluster.v1.PscAutoConnectionH\x00\x12F\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionH\x00B\x0C\x0A\x0Aconnection\"\xDE\x03\x0A\x11PscAutoConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x03\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x09 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xFE\x04\x0A\"SharedRegionalCertificateAuthority\x12\x82\x01\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2e.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xDC\x01\x0A#RegionalManagedCertificateAuthority\x12\x89\x01\x0A\x08ca_certs\x18\x01 \x03(\x0B2w.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1A)\x0A\x11RegionalCertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xD3\x01\xEAA\xCF\x01\x0A7redis.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*\$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0B\x0A\x09server_ca\"}\x0A,GetSharedRegionalCertificateAuthorityRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7redis.googleapis.com/SharedRegionalCertificateAuthority\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x85\x04\x0A\x14CertificateAuthority\x12l\x0A\x11managed_server_ca\x18\x01 \x01(\x0B2O.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08\x1A\xAD\x01\x0A\x1BManagedCertificateAuthority\x12k\x0A\x08ca_certs\x18\x01 \x03(\x0B2Y.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1A!\x0A\x09CertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xAE\x01\xEAA\xAA\x01\x0A)redis.googleapis.com/CertificateAuthority\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority*\x16certificateAuthorities2\x14certificateAuthorityB\x0B\x0A\x09server_ca\"\x87\x07\x0A\x18ClusterPersistenceConfig\x12Z\x0A\x04mode\x18\x01 \x01(\x0E2G.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceModeB\x03\xE0A\x01\x12Z\x0A\x0Ardb_config\x18\x02 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigB\x03\xE0A\x01\x12Z\x0A\x0Aaof_config\x18\x03 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigB\x03\xE0A\x01\x1A\xBA\x02\x0A\x09RDBConfig\x12r\x0A\x13rdb_snapshot_period\x18\x01 \x01(\x0E2P.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xE0A\x01\x12@\x0A\x17rdb_snapshot_start_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"w\x0A\x0ESnapshotPeriod\x12\x1F\x0A\x1BSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08ONE_HOUR\x10\x01\x12\x0D\x0A\x09SIX_HOURS\x10\x02\x12\x10\x0A\x0CTWELVE_HOURS\x10\x03\x12\x15\x0A\x11TWENTY_FOUR_HOURS\x10\x04\x1A\xC4\x01\x0A\x09AOFConfig\x12h\x0A\x0Cappend_fsync\x18\x01 \x01(\x0E2M.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsyncB\x03\xE0A\x01\"M\x0A\x0BAppendFsync\x12\x1C\x0A\x18APPEND_FSYNC_UNSPECIFIED\x10\x00\x12\x06\x0A\x02NO\x10\x01\x12\x0C\x0A\x08EVERYSEC\x10\x02\x12\x0A\x0A\x06ALWAYS\x10\x03\"S\x0A\x0FPersistenceMode\x12 \x0A\x1CPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x07\x0A\x03RDB\x10\x02\x12\x07\x0A\x03AOF\x10\x03\"\xEB\x01\x0A\x16ZoneDistributionConfig\x12]\x0A\x04mode\x18\x01 \x01(\x0E2J.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xE0A\x01\x12\x11\x0A\x04zone\x18\x02 \x01(\x09B\x03\xE0A\x01\"_\x0A\x14ZoneDistributionMode\x12&\x0A\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AMULTI_ZONE\x10\x01\x12\x0F\x0A\x0BSINGLE_ZONE\x10\x02\"\xD7\x02\x0A#RescheduleClusterMaintenanceRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12o\x0A\x0Freschedule_type\x18\x02 \x01(\x0E2Q.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleTypeB\x03\xE0A\x02\x126\x0A\x0Dschedule_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"S\x0A\x0ERescheduleType\x12\x1F\x0A\x1BRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09IMMEDIATE\x10\x01\x12\x11\x0A\x0DSPECIFIC_TIME\x10\x03\"\xFA\x04\x0A\x0EEncryptionInfo\x12P\x0A\x0Fencryption_type\x18\x01 \x01(\x0E22.google.cloud.redis.cluster.v1.EncryptionInfo.TypeB\x03\xE0A\x03\x12J\x0A\x10kms_key_versions\x18\x02 \x03(\x09B0\xE0A\x03\xFAA*\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12]\x0A\x15kms_key_primary_state\x18\x03 \x01(\x0E29.google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyStateB\x03\xE0A\x03\x129\x0A\x10last_update_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\\\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1F\x0A\x1BCUSTOMER_MANAGED_ENCRYPTION\x10\x02\"\xD1\x01\x0A\x0BKmsKeyState\x12\x1D\x0A\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x15\x0A\x11PERMISSION_DENIED\x10\x02\x12\x0C\x0A\x08DISABLED\x10\x03\x12\x0D\x0A\x09DESTROYED\x10\x04\x12\x15\x0A\x11DESTROY_SCHEDULED\x10\x05\x12 \x0A\x1CEKM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\x0A\x10BILLING_DISABLED\x10\x07\x12\x13\x0A\x0FUNKNOWN_FAILURE\x10\x08*\x83\x01\x0A\x13PscConnectionStatus\x12%\x0A!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12 \x0A\x1CPSC_CONNECTION_STATUS_ACTIVE\x10\x01\x12#\x0A\x1FPSC_CONNECTION_STATUS_NOT_FOUND\x10\x02*^\x0A\x11AuthorizationMode\x12\x19\x0A\x15AUTH_MODE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12AUTH_MODE_IAM_AUTH\x10\x01\x12\x16\x0A\x12AUTH_MODE_DISABLED\x10\x02*\x8F\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x1A\x0A\x16REDIS_SHARED_CORE_NANO\x10\x01\x12\x18\x0A\x14REDIS_HIGHMEM_MEDIUM\x10\x02\x12\x18\x0A\x14REDIS_HIGHMEM_XLARGE\x10\x03\x12\x18\x0A\x14REDIS_STANDARD_SMALL\x10\x04*\x99\x01\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\$\x0A TRANSIT_ENCRYPTION_MODE_DISABLED\x10\x01\x121\x0A-TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION\x10\x02*\xBA\x01\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x121\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12+\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x12*\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03*\x89\x01\x0A\x0EConnectionType\x12\x1F\x0A\x1BCONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19CONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1B\x0A\x17CONNECTION_TYPE_PRIMARY\x10\x02\x12\x1A\x0A\x16CONNECTION_TYPE_READER\x10\x032\xA2\x1A\x0A\x11CloudRedisCluster\x12\xB6\x01\x0A\x0CListClusters\x122.google.cloud.redis.cluster.v1.ListClustersRequest\x1A3.google.cloud.redis.cluster.v1.ListClustersResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xA3\x01\x0A\x0AGetCluster\x120.google.cloud.redis.cluster.v1.GetClusterRequest\x1A&.google.cloud.redis.cluster.v1.Cluster\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xE1\x01\x0A\x0DUpdateCluster\x123.google.cloud.redis.cluster.v1.UpdateClusterRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x13cluster,update_mask\x82\xD3\xE4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07cluster\x12\xCF\x01\x0A\x0DDeleteCluster\x123.google.cloud.redis.cluster.v1.DeleteClusterRequest\x1A\x1D.google.longrunning.Operation\"j\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xDF\x01\x0A\x0DCreateCluster\x123.google.cloud.redis.cluster.v1.CreateClusterRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x19parent,cluster,cluster_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/clusters:\x07cluster\x12\xED\x01\x0A\x1EGetClusterCertificateAuthority\x12D.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest\x1A3.google.cloud.redis.cluster.v1.CertificateAuthority\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\x12A/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}\x12\x8C\x02\x0A%GetSharedRegionalCertificateAuthority\x12K.google.cloud.redis.cluster.v1.GetSharedRegionalCertificateAuthorityRequest\x1AA.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority\"S\xDAA\x04name\x82\xD3\xE4\x93\x02F\x12D/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x9E\x02\x0A\x1CRescheduleClusterMaintenance\x12B.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest\x1A\x1D.google.longrunning.Operation\"\x9A\x01\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\"name,reschedule_type,schedule_time\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/clusters/*}:rescheduleClusterMaintenance:\x01*\x12\xDA\x01\x0A\x15ListBackupCollections\x12;.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest\x1A<.google.cloud.redis.cluster.v1.ListBackupCollectionsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/backupCollections\x12\xC7\x01\x0A\x13GetBackupCollection\x129.google.cloud.redis.cluster.v1.GetBackupCollectionRequest\x1A/.google.cloud.redis.cluster.v1.BackupCollection\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xC6\x01\x0A\x0BListBackups\x121.google.cloud.redis.cluster.v1.ListBackupsRequest\x1A2.google.cloud.redis.cluster.v1.ListBackupsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xB3\x01\x0A\x09GetBackup\x12/.google.cloud.redis.cluster.v1.GetBackupRequest\x1A%.google.cloud.redis.cluster.v1.Backup\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xE0\x01\x0A\x0CDeleteBackup\x122.google.cloud.redis.cluster.v1.DeleteBackupRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02A*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xD4\x01\x0A\x0CExportBackup\x122.google.cloud.redis.cluster.v1.ExportBackupRequest\x1A\x1D.google.longrunning.Operation\"q\xCAA\x1D\x0A\x06Backup\x12\x13google.protobuf.Any\x82\xD3\xE4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xCB\x01\x0A\x0DBackupCluster\x123.google.cloud.redis.cluster.v1.BackupClusterRequest\x1A\x1D.google.longrunning.Operation\"f\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/locations/*/clusters/*}:backup:\x01*\x1AH\xCAA\x14redis.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDE\x06\x0A!com.google.cloud.redis.cluster.v1B\x16CloudRedisClusterProtoP\x01Z;cloud.google.com/go/redis/cluster/apiv1/clusterpb;clusterpb\xEA\x02!Google::Cloud::Redis::Cluster::V1\xEAAn\x0A%compute.googleapis.com/ForwardingRule\x12Eprojects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xEAAN\x0A\x1Ecompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\xA6\x01\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" , true); static::$is_initialized = true; diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php b/RedisCluster/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php similarity index 100% rename from owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php rename to RedisCluster/samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php diff --git a/RedisCluster/src/V1/Client/CloudRedisClusterClient.php b/RedisCluster/src/V1/Client/CloudRedisClusterClient.php index 0e8bfd1e16b4..9f178fb2ce11 100644 --- a/RedisCluster/src/V1/Client/CloudRedisClusterClient.php +++ b/RedisCluster/src/V1/Client/CloudRedisClusterClient.php @@ -51,10 +51,12 @@ use Google\Cloud\Redis\Cluster\V1\GetBackupRequest; use Google\Cloud\Redis\Cluster\V1\GetClusterCertificateAuthorityRequest; use Google\Cloud\Redis\Cluster\V1\GetClusterRequest; +use Google\Cloud\Redis\Cluster\V1\GetSharedRegionalCertificateAuthorityRequest; use Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsRequest; use Google\Cloud\Redis\Cluster\V1\ListBackupsRequest; use Google\Cloud\Redis\Cluster\V1\ListClustersRequest; use Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest; +use Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority; use Google\Cloud\Redis\Cluster\V1\UpdateClusterRequest; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\Operation; @@ -96,6 +98,7 @@ * @method PromiseInterface getBackupCollectionAsync(GetBackupCollectionRequest $request, array $optionalArgs = []) * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) * @method PromiseInterface getClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSharedRegionalCertificateAuthorityAsync(GetSharedRegionalCertificateAuthorityRequest $request, array $optionalArgs = []) * @method PromiseInterface listBackupCollectionsAsync(ListBackupCollectionsRequest $request, array $optionalArgs = []) * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) @@ -244,6 +247,25 @@ public static function backupCollectionName(string $project, string $location, s ]); } + /** + * Formats a string containing the fully-qualified path to represent a ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + */ + public static function caPoolName(string $project, string $location, string $caPool): string + { + return self::getPathTemplate('caPool')->render([ + 'project' => $project, + 'location' => $location, + 'ca_pool' => $caPool, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a * certificate_authority resource. @@ -403,12 +425,30 @@ public static function serviceAttachmentName(string $project, string $region, st ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * shared_regional_certificate_authority resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted shared_regional_certificate_authority resource. + */ + public static function sharedRegionalCertificateAuthorityName(string $project, string $location): string + { + return self::getPathTemplate('sharedRegionalCertificateAuthority')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + /** * Parses a formatted name string and returns an associative array of the components in the name. * The following name formats are supported: * Template: Pattern * - backup: projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup} * - backupCollection: projects/{project}/locations/{location}/backupCollections/{backup_collection} + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} * - certificateAuthority: projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority * - cluster: projects/{project}/locations/{location}/clusters/{cluster} * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} @@ -417,6 +457,7 @@ public static function serviceAttachmentName(string $project, string $region, st * - location: projects/{project}/locations/{location} * - network: projects/{project}/global/networks/{network} * - serviceAttachment: projects/{project}/regions/{region}/serviceAttachments/{service_attachment} + * - sharedRegionalCertificateAuthority: projects/{project}/locations/{location}/sharedRegionalCertificateAuthority * * The optional $template argument can be supplied to specify a particular pattern, * and must match one of the templates listed above. If no $template argument is @@ -779,6 +820,36 @@ public function getClusterCertificateAuthority( return $this->startApiCall('GetClusterCertificateAuthority', $request, $callOptions)->wait(); } + /** + * Gets the details of regional certificate authority information for Redis + * cluster. + * + * The async variant is + * {@see CloudRedisClusterClient::getSharedRegionalCertificateAuthorityAsync()} . + * + * @example samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php + * + * @param GetSharedRegionalCertificateAuthorityRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SharedRegionalCertificateAuthority + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSharedRegionalCertificateAuthority( + GetSharedRegionalCertificateAuthorityRequest $request, + array $callOptions = [] + ): SharedRegionalCertificateAuthority { + return $this->startApiCall('GetSharedRegionalCertificateAuthority', $request, $callOptions)->wait(); + } + /** * Lists all backup collections owned by a consumer project in either the * specified location (region) or all locations. diff --git a/RedisCluster/src/V1/Cluster.php b/RedisCluster/src/V1/Cluster.php index 5cb69bda2b90..e1f7f1ec77fa 100644 --- a/RedisCluster/src/V1/Cluster.php +++ b/RedisCluster/src/V1/Cluster.php @@ -199,6 +199,26 @@ class Cluster extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $encryption_info = null; + /** + * Optional. Server CA mode for the cluster. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $server_ca_mode = null; + /** + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $server_ca_pool = null; + /** + * Optional. Input only. Rotate the server certificates. + * + * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $rotate_server_certificate = null; protected $import_sources; /** @@ -286,6 +306,14 @@ class Cluster extends \Google\Protobuf\Internal\Message * Optional. The automated backup config for the cluster. * @type \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $encryption_info * Output only. Encryption information of the data at rest of the cluster. + * @type int $server_ca_mode + * Optional. Server CA mode for the cluster. + * @type string $server_ca_pool + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * @type bool $rotate_server_certificate + * Optional. Input only. Rotate the server certificates. * } */ public function __construct($data = NULL) { @@ -1281,6 +1309,118 @@ public function setEncryptionInfo($var) return $this; } + /** + * Optional. Server CA mode for the cluster. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getServerCaMode() + { + return isset($this->server_ca_mode) ? $this->server_ca_mode : 0; + } + + public function hasServerCaMode() + { + return isset($this->server_ca_mode); + } + + public function clearServerCaMode() + { + unset($this->server_ca_mode); + } + + /** + * Optional. Server CA mode for the cluster. + * + * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setServerCaMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ServerCaMode::class); + $this->server_ca_mode = $var; + + return $this; + } + + /** + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getServerCaPool() + { + return isset($this->server_ca_pool) ? $this->server_ca_pool : ''; + } + + public function hasServerCaPool() + { + return isset($this->server_ca_pool); + } + + public function clearServerCaPool() + { + unset($this->server_ca_pool); + } + + /** + * Optional. Customer-managed CA pool for the cluster. Only applicable for + * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. + * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setServerCaPool($var) + { + GPBUtil::checkString($var, True); + $this->server_ca_pool = $var; + + return $this; + } + + /** + * Optional. Input only. Rotate the server certificates. + * + * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getRotateServerCertificate() + { + return isset($this->rotate_server_certificate) ? $this->rotate_server_certificate : false; + } + + public function hasRotateServerCertificate() + { + return isset($this->rotate_server_certificate); + } + + public function clearRotateServerCertificate() + { + unset($this->rotate_server_certificate); + } + + /** + * Optional. Input only. Rotate the server certificates. + * + * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRotateServerCertificate($var) + { + GPBUtil::checkBool($var); + $this->rotate_server_certificate = $var; + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetSharedRegionalCertificateAuthorityRequest.php b/RedisCluster/src/V1/GetSharedRegionalCertificateAuthorityRequest.php similarity index 100% rename from owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetSharedRegionalCertificateAuthorityRequest.php rename to RedisCluster/src/V1/GetSharedRegionalCertificateAuthorityRequest.php diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ServerCaMode.php b/RedisCluster/src/V1/ServerCaMode.php similarity index 100% rename from owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ServerCaMode.php rename to RedisCluster/src/V1/ServerCaMode.php diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority.php b/RedisCluster/src/V1/SharedRegionalCertificateAuthority.php similarity index 100% rename from owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority.php rename to RedisCluster/src/V1/SharedRegionalCertificateAuthority.php diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php b/RedisCluster/src/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php similarity index 100% rename from owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php rename to RedisCluster/src/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php b/RedisCluster/src/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php similarity index 100% rename from owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php rename to RedisCluster/src/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php diff --git a/RedisCluster/src/V1/gapic_metadata.json b/RedisCluster/src/V1/gapic_metadata.json index 2355c3e653e6..65ed596cdf6c 100644 --- a/RedisCluster/src/V1/gapic_metadata.json +++ b/RedisCluster/src/V1/gapic_metadata.json @@ -55,6 +55,11 @@ "getClusterCertificateAuthority" ] }, + "GetSharedRegionalCertificateAuthority": { + "methods": [ + "getSharedRegionalCertificateAuthority" + ] + }, "ListBackupCollections": { "methods": [ "listBackupCollections" diff --git a/RedisCluster/src/V1/resources/cloud_redis_cluster_client_config.json b/RedisCluster/src/V1/resources/cloud_redis_cluster_client_config.json index b3279089858b..2d8fb483a6fa 100644 --- a/RedisCluster/src/V1/resources/cloud_redis_cluster_client_config.json +++ b/RedisCluster/src/V1/resources/cloud_redis_cluster_client_config.json @@ -71,6 +71,11 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "GetSharedRegionalCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "ListBackupCollections": { "timeout_millis": 600000, "retry_codes_name": "no_retry_1_codes", diff --git a/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php b/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php index 5d0c7e584deb..69c03c592c3f 100644 --- a/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php +++ b/RedisCluster/src/V1/resources/cloud_redis_cluster_descriptor_config.php @@ -205,6 +205,18 @@ ], ], ], + 'GetSharedRegionalCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'ListBackupCollections' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -302,6 +314,7 @@ 'templateMap' => [ 'backup' => 'projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}', 'backupCollection' => 'projects/{project}/locations/{location}/backupCollections/{backup_collection}', + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', 'certificateAuthority' => 'projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority', 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', @@ -310,6 +323,7 @@ 'location' => 'projects/{project}/locations/{location}', 'network' => 'projects/{project}/global/networks/{network}', 'serviceAttachment' => 'projects/{project}/regions/{region}/serviceAttachments/{service_attachment}', + 'sharedRegionalCertificateAuthority' => 'projects/{project}/locations/{location}/sharedRegionalCertificateAuthority', ], ], ], diff --git a/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php b/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php index a52d77019dc6..a1357991ea7c 100644 --- a/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php +++ b/RedisCluster/src/V1/resources/cloud_redis_cluster_rest_client_config.php @@ -152,6 +152,17 @@ ], ], ], + 'GetSharedRegionalCertificateAuthority' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'ListBackupCollections' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupCollections', diff --git a/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php b/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php index 5a9ecee39e1b..974fe75ee078 100644 --- a/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php +++ b/RedisCluster/tests/Unit/V1/Client/CloudRedisClusterClientTest.php @@ -44,6 +44,7 @@ use Google\Cloud\Redis\Cluster\V1\GetBackupRequest; use Google\Cloud\Redis\Cluster\V1\GetClusterCertificateAuthorityRequest; use Google\Cloud\Redis\Cluster\V1\GetClusterRequest; +use Google\Cloud\Redis\Cluster\V1\GetSharedRegionalCertificateAuthorityRequest; use Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsRequest; use Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsResponse; use Google\Cloud\Redis\Cluster\V1\ListBackupsRequest; @@ -52,6 +53,7 @@ use Google\Cloud\Redis\Cluster\V1\ListClustersResponse; use Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest; use Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest\RescheduleType; +use Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority; use Google\Cloud\Redis\Cluster\V1\UpdateClusterRequest; use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\GetOperationRequest; @@ -122,6 +124,8 @@ public function backupClusterTest() $deletionProtectionEnabled = true; $backupCollection = 'backupCollection-1182285509'; $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; $expectedResponse = new Cluster(); $expectedResponse->setName($name2); $expectedResponse->setUid($uid); @@ -132,6 +136,8 @@ public function backupClusterTest() $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); $expectedResponse->setBackupCollection($backupCollection); $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -262,6 +268,8 @@ public function createClusterTest() $deletionProtectionEnabled = true; $backupCollection = 'backupCollection-1182285509'; $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; $expectedResponse = new Cluster(); $expectedResponse->setName($name); $expectedResponse->setUid($uid); @@ -272,6 +280,8 @@ public function createClusterTest() $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); $expectedResponse->setBackupCollection($backupCollection); $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -942,6 +952,8 @@ public function getClusterTest() $deletionProtectionEnabled = true; $backupCollection = 'backupCollection-1182285509'; $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; $expectedResponse = new Cluster(); $expectedResponse->setName($name2); $expectedResponse->setUid($uid); @@ -952,6 +964,8 @@ public function getClusterTest() $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); $expectedResponse->setBackupCollection($backupCollection); $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); $transport->addResponse($expectedResponse); // Mock request $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); @@ -1073,6 +1087,74 @@ public function getClusterCertificateAuthorityExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function getSharedRegionalCertificateAuthorityTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SharedRegionalCertificateAuthority(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->sharedRegionalCertificateAuthorityName('[PROJECT]', '[LOCATION]'); + $request = (new GetSharedRegionalCertificateAuthorityRequest())->setName($formattedName); + $response = $gapicClient->getSharedRegionalCertificateAuthority($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.redis.cluster.v1.CloudRedisCluster/GetSharedRegionalCertificateAuthority', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSharedRegionalCertificateAuthorityExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->sharedRegionalCertificateAuthorityName('[PROJECT]', '[LOCATION]'); + $request = (new GetSharedRegionalCertificateAuthorityRequest())->setName($formattedName); + try { + $gapicClient->getSharedRegionalCertificateAuthority($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + /** @test */ public function listBackupCollectionsTest() { @@ -1316,6 +1398,8 @@ public function rescheduleClusterMaintenanceTest() $deletionProtectionEnabled = true; $backupCollection = 'backupCollection-1182285509'; $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; $expectedResponse = new Cluster(); $expectedResponse->setName($name2); $expectedResponse->setUid($uid); @@ -1326,6 +1410,8 @@ public function rescheduleClusterMaintenanceTest() $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); $expectedResponse->setBackupCollection($backupCollection); $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1467,6 +1553,8 @@ public function updateClusterTest() $deletionProtectionEnabled = true; $backupCollection = 'backupCollection-1182285509'; $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; $expectedResponse = new Cluster(); $expectedResponse->setName($name); $expectedResponse->setUid($uid); @@ -1477,6 +1565,8 @@ public function updateClusterTest() $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); $expectedResponse->setBackupCollection($backupCollection); $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); @@ -1743,6 +1833,8 @@ public function backupClusterAsyncTest() $deletionProtectionEnabled = true; $backupCollection = 'backupCollection-1182285509'; $kmsKey = 'kmsKey-591635343'; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; $expectedResponse = new Cluster(); $expectedResponse->setName($name2); $expectedResponse->setUid($uid); @@ -1753,6 +1845,8 @@ public function backupClusterAsyncTest() $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); $expectedResponse->setBackupCollection($backupCollection); $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php b/owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php deleted file mode 100644 index 84028f522715..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/GPBMetadata/Google/Cloud/Redis/Cluster/V1/CloudRedisCluster.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEE\x96\x01\x0A7google/cloud/redis/cluster/v1/cloud_redis_cluster.proto\x12\x1Dgoogle.cloud.redis.cluster.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/api/field_info.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x19google/protobuf/any.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\x1A\x1Bgoogle/type/timeofday.proto\"\xBC\x01\x0A\x14CreateClusterRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x17\x0A\x0Acluster_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x03 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x04 \x01(\x09\"w\x0A\x13ListClustersRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"~\x0A\x14ListClustersResponse\x128\x0A\x08clusters\x18\x01 \x03(\x0B2&.google.cloud.redis.cluster.v1.Cluster\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"\x9E\x01\x0A\x14UpdateClusterRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12<\x0A\x07cluster\x18\x02 \x01(\x0B2&.google.cloud.redis.cluster.v1.ClusterB\x03\xE0A\x02\x12\x12\x0A\x0Arequest_id\x18\x03 \x01(\x09\"G\x0A\x11GetClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\"^\x0A\x14DeleteClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x12\x0A\x0Arequest_id\x18\x02 \x01(\x09\"h\x0A%GetClusterCertificateAuthorityRequest\x12?\x0A\x04name\x18\x01 \x01(\x09B1\xE0A\x02\xFAA+\x0A)redis.googleapis.com/CertificateAuthority\"\x8E\x01\x0A\x1CListBackupCollectionsRequest\x12=\x0A\x06parent\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x12%redis.googleapis.com/BackupCollection\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x9A\x01\x0A\x1DListBackupCollectionsResponse\x12K\x0A\x12backup_collections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.BackupCollection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Y\x0A\x1AGetBackupCollectionRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%redis.googleapis.com/BackupCollection\"z\x0A\x12ListBackupsRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Bredis.googleapis.com/Backup\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\"{\x0A\x13ListBackupsResponse\x126\x0A\x07backups\x18\x01 \x03(\x0B2%.google.cloud.redis.cluster.v1.Backup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"E\x0A\x10GetBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\"i\x0A\x13DeleteBackupRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/Backup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"m\x0A\x13ExportBackupRequest\x12\x14\x0A\x0Agcs_bucket\x18\x03 \x01(\x09H\x00\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Bredis.googleapis.com/BackupB\x0D\x0A\x0Bdestination\"\xA2\x01\x0A\x14BackupClusterRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12+\x0A\x03ttl\x18\x02 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x12\x1B\x0A\x09backup_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x0C\x0A\x0A_backup_id\"\xD9\x18\x0A\x07Cluster\x12Q\x0A\x0Agcs_source\x18\" \x01(\x0B26.google.cloud.redis.cluster.v1.Cluster.GcsBackupSourceB\x03\xE0A\x01H\x00\x12`\x0A\x15managed_backup_source\x18# \x01(\x0B2:.google.cloud.redis.cluster.v1.Cluster.ManagedBackupSourceB\x03\xE0A\x01H\x00\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x02\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12@\x0A\x05state\x18\x04 \x01(\x0E2,.google.cloud.redis.cluster.v1.Cluster.StateB\x03\xE0A\x03\x12\x10\x0A\x03uid\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12Q\x0A\x12authorization_mode\x18\x0B \x01(\x0E20.google.cloud.redis.cluster.v1.AuthorizationModeB\x03\xE0A\x01\x12Z\x0A\x17transit_encryption_mode\x18\x0C \x01(\x0E24.google.cloud.redis.cluster.v1.TransitEncryptionModeB\x03\xE0A\x01\x12\x19\x0A\x07size_gb\x18\x0D \x01(\x05B\x03\xE0A\x03H\x02\x88\x01\x01\x12\x1D\x0A\x0Bshard_count\x18\x0E \x01(\x05B\x03\xE0A\x01H\x03\x88\x01\x01\x12B\x0A\x0Bpsc_configs\x18\x0F \x03(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x01\x12R\x0A\x13discovery_endpoints\x18\x10 \x03(\x0B20.google.cloud.redis.cluster.v1.DiscoveryEndpointB\x03\xE0A\x03\x12J\x0A\x0Fpsc_connections\x18\x11 \x03(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionB\x03\xE0A\x03\x12I\x0A\x0Astate_info\x18\x12 \x01(\x0B20.google.cloud.redis.cluster.v1.Cluster.StateInfoB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x13 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x01\x12X\x0A\x12persistence_config\x18\x14 \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterPersistenceConfigB\x03\xE0A\x01\x12T\x0A\x0Dredis_configs\x18\x15 \x03(\x0B28.google.cloud.redis.cluster.v1.Cluster.RedisConfigsEntryB\x03\xE0A\x01\x12!\x0A\x0Fprecise_size_gb\x18\x16 \x01(\x01B\x03\xE0A\x03H\x04\x88\x01\x01\x12\\\x0A\x18zone_distribution_config\x18\x17 \x01(\x0B25.google.cloud.redis.cluster.v1.ZoneDistributionConfigB\x03\xE0A\x01\x12k\x0A cross_cluster_replication_config\x18\x18 \x01(\x0B2<.google.cloud.redis.cluster.v1.CrossClusterReplicationConfigB\x03\xE0A\x01\x12-\x0A\x1Bdeletion_protection_enabled\x18\x19 \x01(\x08B\x03\xE0A\x01H\x05\x88\x01\x01\x12]\x0A\x12maintenance_policy\x18\x1A \x01(\x0B27.google.cloud.redis.cluster.v1.ClusterMaintenancePolicyB\x03\xE0A\x01H\x06\x88\x01\x01\x12a\x0A\x14maintenance_schedule\x18\x1B \x01(\x0B29.google.cloud.redis.cluster.v1.ClusterMaintenanceScheduleB\x03\xE0A\x03H\x07\x88\x01\x01\x12Y\x0A\x17psc_service_attachments\x18\x1E \x03(\x0B23.google.cloud.redis.cluster.v1.PscServiceAttachmentB\x03\xE0A\x03\x12N\x0A\x11cluster_endpoints\x18\$ \x03(\x0B2..google.cloud.redis.cluster.v1.ClusterEndpointB\x03\xE0A\x01\x12P\x0A\x11backup_collection\x18' \x01(\x09B0\xE0A\x01\xE0A\x03\xFAA'\x0A%redis.googleapis.com/BackupCollectionH\x08\x88\x01\x01\x12?\x0A\x07kms_key\x18( \x01(\x09B)\xE0A\x01\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyH\x09\x88\x01\x01\x12Z\x0A\x17automated_backup_config\x18* \x01(\x0B24.google.cloud.redis.cluster.v1.AutomatedBackupConfigB\x03\xE0A\x01\x12K\x0A\x0Fencryption_info\x18+ \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12M\x0A\x0Eserver_ca_mode\x185 \x01(\x0E2+.google.cloud.redis.cluster.v1.ServerCaModeB\x03\xE0A\x01H\x0A\x88\x01\x01\x12D\x0A\x0Eserver_ca_pool\x186 \x01(\x09B'\xE0A\x01\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x0B\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x187 \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x0C\x88\x01\x01\x1A\xEA\x01\x0A\x09StateInfo\x12R\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2;.google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfoH\x00\x1A\x80\x01\x0A\x0AUpdateInfo\x12\x1F\x0A\x12target_shard_count\x18\x01 \x01(\x05H\x00\x88\x01\x01\x12!\x0A\x14target_replica_count\x18\x02 \x01(\x05H\x01\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x06\x0A\x04info\x1A\$\x0A\x0FGcsBackupSource\x12\x11\x0A\x04uris\x18\x01 \x03(\x09B\x03\xE0A\x01\x1A*\x0A\x13ManagedBackupSource\x12\x13\x0A\x06backup\x18\x01 \x01(\x09B\x03\xE0A\x01\x1A3\x0A\x11RedisConfigsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"T\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0C\x0A\x08DELETING\x10\x04:p\xEAAm\x0A\x1Credis.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08clusters2\x07clusterB\x10\x0A\x0Eimport_sourcesB\x10\x0A\x0E_replica_countB\x0A\x0A\x08_size_gbB\x0E\x0A\x0C_shard_countB\x12\x0A\x10_precise_size_gbB\x1E\x0A\x1C_deletion_protection_enabledB\x15\x0A\x13_maintenance_policyB\x17\x0A\x15_maintenance_scheduleB\x14\x0A\x12_backup_collectionB\x0A\x0A\x08_kms_keyB\x11\x0A\x0F_server_ca_modeB\x11\x0A\x0F_server_ca_poolB\x1C\x0A\x1A_rotate_server_certificate\"\x85\x04\x0A\x15AutomatedBackupConfig\x12t\x0A\x18fixed_frequency_schedule\x18\x02 \x01(\x0B2K.google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencyScheduleB\x03\xE0A\x01H\x00\x12l\x0A\x15automated_backup_mode\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupModeB\x03\xE0A\x01\x126\x0A\x09retention\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01H\x01\x88\x01\x01\x1A]\x0A\x16FixedFrequencySchedule\x124\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDayB\x03\xE0A\x02H\x00\x88\x01\x01B\x0D\x0A\x0B_start_time\"W\x0A\x13AutomatedBackupMode\x12%\x0A!AUTOMATED_BACKUP_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x0B\x0A\x07ENABLED\x10\x02B\x0A\x0A\x08scheduleB\x0C\x0A\x0A_retention\"\xF6\x02\x0A\x10BackupCollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12 \x0A\x0Bcluster_uid\x18\x03 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x125\x0A\x07cluster\x18\x04 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12:\x0A\x07kms_key\x18\x05 \x01(\x09B)\xE0A\x03\xFAA#\x0A!cloudkms.googleapis.com/CryptoKey\x12\x18\x0A\x03uid\x18\x06 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01:\x9F\x01\xEAA\x9B\x01\x0A%redis.googleapis.com/BackupCollection\x12Mprojects/{project}/locations/{location}/backupCollections/{backup_collection}*\x11backupCollections2\x10backupCollection\"\x82\x08\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x125\x0A\x07cluster\x18\x03 \x01(\x09B\$\xE0A\x03\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12 \x0A\x0Bcluster_uid\x18\x04 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1D\x0A\x10total_size_bytes\x18\x05 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1B\x0A\x0Eengine_version\x18\x07 \x01(\x09B\x03\xE0A\x03\x12D\x0A\x0Cbackup_files\x18\x08 \x03(\x0B2).google.cloud.redis.cluster.v1.BackupFileB\x03\xE0A\x03\x12?\x0A\x09node_type\x18\x09 \x01(\x0E2'.google.cloud.redis.cluster.v1.NodeTypeB\x03\xE0A\x03\x12\x1A\x0A\x0Dreplica_count\x18\x0A \x01(\x05B\x03\xE0A\x03\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x03\x12J\x0A\x0Bbackup_type\x18\x0C \x01(\x0E20.google.cloud.redis.cluster.v1.Backup.BackupTypeB\x03\xE0A\x03\x12?\x0A\x05state\x18\x0D \x01(\x0E2+.google.cloud.redis.cluster.v1.Backup.StateB\x03\xE0A\x03\x12K\x0A\x0Fencryption_info\x18\x0E \x01(\x0B2-.google.cloud.redis.cluster.v1.EncryptionInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x0F \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"G\x0A\x0ABackupType\x12\x1B\x0A\x17BACKUP_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ON_DEMAND\x10\x01\x12\x0D\x0A\x09AUTOMATED\x10\x02\"U\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0D\x0A\x09SUSPENDED\x10\x04:\x92\x01\xEAA\x8E\x01\x0A\x1Bredis.googleapis.com/Backup\x12^projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}*\x07backups2\x06backup\"s\x0A\x0ABackupFile\x12\x16\x0A\x09file_name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x02 \x01(\x03B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x84\x01\x0A\x14PscServiceAttachment\x12\x1F\x0A\x12service_attachment\x18\x01 \x01(\x09B\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x03 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xF4\x06\x0A\x1DCrossClusterReplicationConfig\x12^\x0A\x0Ccluster_role\x18\x01 \x01(\x0E2H.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole\x12c\x0A\x0Fprimary_cluster\x18\x02 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x12f\x0A\x12secondary_clusters\x18\x03 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x0Amembership\x18\x05 \x01(\x0B2G.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.MembershipB\x03\xE0A\x03\x1AU\x0A\x0DRemoteCluster\x122\x0A\x07cluster\x18\x01 \x01(\x09B!\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12\x10\x0A\x03uid\x18\x02 \x01(\x09B\x03\xE0A\x03\x1A\xE3\x01\x0A\x0AMembership\x12h\x0A\x0Fprimary_cluster\x18\x01 \x01(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\x12k\x0A\x12secondary_clusters\x18\x02 \x03(\x0B2J.google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteClusterB\x03\xE0A\x03\"Q\x0A\x0BClusterRole\x12\x1C\x0A\x18CLUSTER_ROLE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04NONE\x10\x01\x12\x0B\x0A\x07PRIMARY\x10\x02\x12\x0D\x0A\x09SECONDARY\x10\x03\"\xE8\x01\x0A\x18ClusterMaintenancePolicy\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12`\x0A\x19weekly_maintenance_window\x18\x03 \x03(\x0B2=.google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow\"q\x0A\x1EClusterWeeklyMaintenanceWindow\x12#\x0A\x03day\x18\x01 \x01(\x0E2\x16.google.type.DayOfWeek\x12*\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x16.google.type.TimeOfDay\"\x84\x01\x0A\x1AClusterMaintenanceSchedule\x123\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"!\x0A\x09PscConfig\x12\x14\x0A\x07network\x18\x02 \x01(\x09B\x03\xE0A\x02\"\x7F\x0A\x11DiscoveryEndpoint\x12\x14\x0A\x07address\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04port\x18\x02 \x01(\x05B\x03\xE0A\x03\x12A\x0A\x0Apsc_config\x18\x03 \x01(\x0B2(.google.cloud.redis.cluster.v1.PscConfigB\x03\xE0A\x03\"\xDA\x03\x0A\x0DPscConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x02\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x02\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x02\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x0A \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"W\x0A\x0FClusterEndpoint\x12D\x0A\x0Bconnections\x18\x01 \x03(\x0B2/.google.cloud.redis.cluster.v1.ConnectionDetail\"\xB9\x01\x0A\x10ConnectionDetail\x12O\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B20.google.cloud.redis.cluster.v1.PscAutoConnectionH\x00\x12F\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2,.google.cloud.redis.cluster.v1.PscConnectionH\x00B\x0C\x0A\x0Aconnection\"\xDE\x03\x0A\x11PscAutoConnection\x12\x1E\x0A\x11psc_connection_id\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x1C\x0A\x07address\x18\x02 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x02\x12F\x0A\x0Fforwarding_rule\x18\x03 \x01(\x09B-\xE0A\x03\xFAA'\x0A%compute.googleapis.com/ForwardingRule\x12\x17\x0A\x0Aproject_id\x18\x04 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07network\x18\x05 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Ecompute.googleapis.com/Network\x12L\x0A\x12service_attachment\x18\x06 \x01(\x09B0\xE0A\x03\xFAA*\x0A(compute.googleapis.com/ServiceAttachment\x12V\x0A\x15psc_connection_status\x18\x08 \x01(\x0E22.google.cloud.redis.cluster.v1.PscConnectionStatusB\x03\xE0A\x03\x12K\x0A\x0Fconnection_type\x18\x09 \x01(\x0E2-.google.cloud.redis.cluster.v1.ConnectionTypeB\x03\xE0A\x03\"\xFE\x04\x0A\"SharedRegionalCertificateAuthority\x12\x82\x01\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2e.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xDC\x01\x0A#RegionalManagedCertificateAuthority\x12\x89\x01\x0A\x08ca_certs\x18\x01 \x03(\x0B2w.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1A)\x0A\x11RegionalCertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xD3\x01\xEAA\xCF\x01\x0A7redis.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*\$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0B\x0A\x09server_ca\"}\x0A,GetSharedRegionalCertificateAuthorityRequest\x12M\x0A\x04name\x18\x01 \x01(\x09B?\xE0A\x02\xFAA9\x0A7redis.googleapis.com/SharedRegionalCertificateAuthority\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x85\x04\x0A\x14CertificateAuthority\x12l\x0A\x11managed_server_ca\x18\x01 \x01(\x0B2O.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x02 \x01(\x09B\x03\xE0A\x08\x1A\xAD\x01\x0A\x1BManagedCertificateAuthority\x12k\x0A\x08ca_certs\x18\x01 \x03(\x0B2Y.google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1A!\x0A\x09CertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xAE\x01\xEAA\xAA\x01\x0A)redis.googleapis.com/CertificateAuthority\x12Oprojects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority*\x16certificateAuthorities2\x14certificateAuthorityB\x0B\x0A\x09server_ca\"\x87\x07\x0A\x18ClusterPersistenceConfig\x12Z\x0A\x04mode\x18\x01 \x01(\x0E2G.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceModeB\x03\xE0A\x01\x12Z\x0A\x0Ardb_config\x18\x02 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfigB\x03\xE0A\x01\x12Z\x0A\x0Aaof_config\x18\x03 \x01(\x0B2A.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfigB\x03\xE0A\x01\x1A\xBA\x02\x0A\x09RDBConfig\x12r\x0A\x13rdb_snapshot_period\x18\x01 \x01(\x0E2P.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriodB\x03\xE0A\x01\x12@\x0A\x17rdb_snapshot_start_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"w\x0A\x0ESnapshotPeriod\x12\x1F\x0A\x1BSNAPSHOT_PERIOD_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08ONE_HOUR\x10\x01\x12\x0D\x0A\x09SIX_HOURS\x10\x02\x12\x10\x0A\x0CTWELVE_HOURS\x10\x03\x12\x15\x0A\x11TWENTY_FOUR_HOURS\x10\x04\x1A\xC4\x01\x0A\x09AOFConfig\x12h\x0A\x0Cappend_fsync\x18\x01 \x01(\x0E2M.google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsyncB\x03\xE0A\x01\"M\x0A\x0BAppendFsync\x12\x1C\x0A\x18APPEND_FSYNC_UNSPECIFIED\x10\x00\x12\x06\x0A\x02NO\x10\x01\x12\x0C\x0A\x08EVERYSEC\x10\x02\x12\x0A\x0A\x06ALWAYS\x10\x03\"S\x0A\x0FPersistenceMode\x12 \x0A\x1CPERSISTENCE_MODE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08DISABLED\x10\x01\x12\x07\x0A\x03RDB\x10\x02\x12\x07\x0A\x03AOF\x10\x03\"\xEB\x01\x0A\x16ZoneDistributionConfig\x12]\x0A\x04mode\x18\x01 \x01(\x0E2J.google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionModeB\x03\xE0A\x01\x12\x11\x0A\x04zone\x18\x02 \x01(\x09B\x03\xE0A\x01\"_\x0A\x14ZoneDistributionMode\x12&\x0A\"ZONE_DISTRIBUTION_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AMULTI_ZONE\x10\x01\x12\x0F\x0A\x0BSINGLE_ZONE\x10\x02\"\xD7\x02\x0A#RescheduleClusterMaintenanceRequest\x122\x0A\x04name\x18\x01 \x01(\x09B\$\xE0A\x02\xFAA\x1E\x0A\x1Credis.googleapis.com/Cluster\x12o\x0A\x0Freschedule_type\x18\x02 \x01(\x0E2Q.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleTypeB\x03\xE0A\x02\x126\x0A\x0Dschedule_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\"S\x0A\x0ERescheduleType\x12\x1F\x0A\x1BRESCHEDULE_TYPE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09IMMEDIATE\x10\x01\x12\x11\x0A\x0DSPECIFIC_TIME\x10\x03\"\xFA\x04\x0A\x0EEncryptionInfo\x12P\x0A\x0Fencryption_type\x18\x01 \x01(\x0E22.google.cloud.redis.cluster.v1.EncryptionInfo.TypeB\x03\xE0A\x03\x12J\x0A\x10kms_key_versions\x18\x02 \x03(\x09B0\xE0A\x03\xFAA*\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12]\x0A\x15kms_key_primary_state\x18\x03 \x01(\x0E29.google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyStateB\x03\xE0A\x03\x129\x0A\x10last_update_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\\\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19GOOGLE_DEFAULT_ENCRYPTION\x10\x01\x12\x1F\x0A\x1BCUSTOMER_MANAGED_ENCRYPTION\x10\x02\"\xD1\x01\x0A\x0BKmsKeyState\x12\x1D\x0A\x19KMS_KEY_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x15\x0A\x11PERMISSION_DENIED\x10\x02\x12\x0C\x0A\x08DISABLED\x10\x03\x12\x0D\x0A\x09DESTROYED\x10\x04\x12\x15\x0A\x11DESTROY_SCHEDULED\x10\x05\x12 \x0A\x1CEKM_KEY_UNREACHABLE_DETECTED\x10\x06\x12\x14\x0A\x10BILLING_DISABLED\x10\x07\x12\x13\x0A\x0FUNKNOWN_FAILURE\x10\x08*\x83\x01\x0A\x13PscConnectionStatus\x12%\x0A!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12 \x0A\x1CPSC_CONNECTION_STATUS_ACTIVE\x10\x01\x12#\x0A\x1FPSC_CONNECTION_STATUS_NOT_FOUND\x10\x02*^\x0A\x11AuthorizationMode\x12\x19\x0A\x15AUTH_MODE_UNSPECIFIED\x10\x00\x12\x16\x0A\x12AUTH_MODE_IAM_AUTH\x10\x01\x12\x16\x0A\x12AUTH_MODE_DISABLED\x10\x02*\x8F\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x1A\x0A\x16REDIS_SHARED_CORE_NANO\x10\x01\x12\x18\x0A\x14REDIS_HIGHMEM_MEDIUM\x10\x02\x12\x18\x0A\x14REDIS_HIGHMEM_XLARGE\x10\x03\x12\x18\x0A\x14REDIS_STANDARD_SMALL\x10\x04*\x99\x01\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\$\x0A TRANSIT_ENCRYPTION_MODE_DISABLED\x10\x01\x121\x0A-TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION\x10\x02*\xBA\x01\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x121\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12+\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x12*\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03*\x89\x01\x0A\x0EConnectionType\x12\x1F\x0A\x1BCONNECTION_TYPE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19CONNECTION_TYPE_DISCOVERY\x10\x01\x12\x1B\x0A\x17CONNECTION_TYPE_PRIMARY\x10\x02\x12\x1A\x0A\x16CONNECTION_TYPE_READER\x10\x032\xA2\x1A\x0A\x11CloudRedisCluster\x12\xB6\x01\x0A\x0CListClusters\x122.google.cloud.redis.cluster.v1.ListClustersRequest\x1A3.google.cloud.redis.cluster.v1.ListClustersResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\xA3\x01\x0A\x0AGetCluster\x120.google.cloud.redis.cluster.v1.GetClusterRequest\x1A&.google.cloud.redis.cluster.v1.Cluster\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xE1\x01\x0A\x0DUpdateCluster\x123.google.cloud.redis.cluster.v1.UpdateClusterRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x13cluster,update_mask\x82\xD3\xE4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07cluster\x12\xCF\x01\x0A\x0DDeleteCluster\x123.google.cloud.redis.cluster.v1.DeleteClusterRequest\x1A\x1D.google.longrunning.Operation\"j\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xDF\x01\x0A\x0DCreateCluster\x123.google.cloud.redis.cluster.v1.CreateClusterRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x19parent,cluster,cluster_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/clusters:\x07cluster\x12\xED\x01\x0A\x1EGetClusterCertificateAuthority\x12D.google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest\x1A3.google.cloud.redis.cluster.v1.CertificateAuthority\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\x12A/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}\x12\x8C\x02\x0A%GetSharedRegionalCertificateAuthority\x12K.google.cloud.redis.cluster.v1.GetSharedRegionalCertificateAuthorityRequest\x1AA.google.cloud.redis.cluster.v1.SharedRegionalCertificateAuthority\"S\xDAA\x04name\x82\xD3\xE4\x93\x02F\x12D/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x9E\x02\x0A\x1CRescheduleClusterMaintenance\x12B.google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest\x1A\x1D.google.longrunning.Operation\"\x9A\x01\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\"name,reschedule_type,schedule_time\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/clusters/*}:rescheduleClusterMaintenance:\x01*\x12\xDA\x01\x0A\x15ListBackupCollections\x12;.google.cloud.redis.cluster.v1.ListBackupCollectionsRequest\x1A<.google.cloud.redis.cluster.v1.ListBackupCollectionsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/backupCollections\x12\xC7\x01\x0A\x13GetBackupCollection\x129.google.cloud.redis.cluster.v1.GetBackupCollectionRequest\x1A/.google.cloud.redis.cluster.v1.BackupCollection\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xC6\x01\x0A\x0BListBackups\x121.google.cloud.redis.cluster.v1.ListBackupsRequest\x1A2.google.cloud.redis.cluster.v1.ListBackupsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xB3\x01\x0A\x09GetBackup\x12/.google.cloud.redis.cluster.v1.GetBackupRequest\x1A%.google.cloud.redis.cluster.v1.Backup\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xE0\x01\x0A\x0CDeleteBackup\x122.google.cloud.redis.cluster.v1.DeleteBackupRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA,\x0A\x15google.protobuf.Empty\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x02A*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xD4\x01\x0A\x0CExportBackup\x122.google.cloud.redis.cluster.v1.ExportBackupRequest\x1A\x1D.google.longrunning.Operation\"q\xCAA\x1D\x0A\x06Backup\x12\x13google.protobuf.Any\x82\xD3\xE4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xCB\x01\x0A\x0DBackupCluster\x123.google.cloud.redis.cluster.v1.BackupClusterRequest\x1A\x1D.google.longrunning.Operation\"f\xCAA\x1E\x0A\x07Cluster\x12\x13google.protobuf.Any\xDAA\x04name\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/locations/*/clusters/*}:backup:\x01*\x1AH\xCAA\x14redis.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xDE\x06\x0A!com.google.cloud.redis.cluster.v1B\x16CloudRedisClusterProtoP\x01Z;cloud.google.com/go/redis/cluster/apiv1/clusterpb;clusterpb\xEA\x02!Google::Cloud::Redis::Cluster::V1\xEAAn\x0A%compute.googleapis.com/ForwardingRule\x12Eprojects/{project}/regions/{region}/forwardingRules/{forwarding_rule}\xEAAN\x0A\x1Ecompute.googleapis.com/Network\x12,projects/{project}/global/networks/{network}\xEAAw\x0A(compute.googleapis.com/ServiceAttachment\x12Kprojects/{project}/regions/{region}/serviceAttachments/{service_attachment}\xEAAx\x0A!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xEAA\xA6\x01\x0A(cloudkms.googleapis.com/CryptoKeyVersion\x12zprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}\xEAA\\\x0A\x1Fprivateca.googleapis.com/CaPool\x129projects/{project}/locations/{location}/caPools/{ca_pool}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php deleted file mode 100644 index ff6184311f1f..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AuthorizationMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.redis.cluster.v1.AuthorizationMode - */ -class AuthorizationMode -{ - /** - * Not set. - * - * Generated from protobuf enum AUTH_MODE_UNSPECIFIED = 0; - */ - const AUTH_MODE_UNSPECIFIED = 0; - /** - * IAM basic authorization mode - * - * Generated from protobuf enum AUTH_MODE_IAM_AUTH = 1; - */ - const AUTH_MODE_IAM_AUTH = 1; - /** - * Authorization disabled mode - * - * Generated from protobuf enum AUTH_MODE_DISABLED = 2; - */ - const AUTH_MODE_DISABLED = 2; - - private static $valueToName = [ - self::AUTH_MODE_UNSPECIFIED => 'AUTH_MODE_UNSPECIFIED', - self::AUTH_MODE_IAM_AUTH => 'AUTH_MODE_IAM_AUTH', - self::AUTH_MODE_DISABLED => 'AUTH_MODE_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php deleted file mode 100644 index e638085eaa44..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.redis.cluster.v1.AutomatedBackupConfig - */ -class AutomatedBackupConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The automated backup mode. If the mode is disabled, the other - * fields will be ignored. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode automated_backup_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $automated_backup_mode = 0; - /** - * Optional. How long to keep automated backups before the backups are - * deleted. The value should be between 1 day and 365 days. If not specified, - * the default value is 35 days. - * - * Generated from protobuf field optional .google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retention = null; - protected $schedule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule $fixed_frequency_schedule - * Optional. Trigger automated backups at a fixed frequency. - * @type int $automated_backup_mode - * Optional. The automated backup mode. If the mode is disabled, the other - * fields will be ignored. - * @type \Google\Protobuf\Duration $retention - * Optional. How long to keep automated backups before the backups are - * deleted. The value should be between 1 day and 365 days. If not specified, - * the default value is 35 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Trigger automated backups at a fixed frequency. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule|null - */ - public function getFixedFrequencySchedule() - { - return $this->readOneof(2); - } - - public function hasFixedFrequencySchedule() - { - return $this->hasOneof(2); - } - - /** - * Optional. Trigger automated backups at a fixed frequency. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule $var - * @return $this - */ - public function setFixedFrequencySchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\FixedFrequencySchedule::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Optional. The automated backup mode. If the mode is disabled, the other - * fields will be ignored. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode automated_backup_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAutomatedBackupMode() - { - return $this->automated_backup_mode; - } - - /** - * Optional. The automated backup mode. If the mode is disabled, the other - * fields will be ignored. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode automated_backup_mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAutomatedBackupMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig\AutomatedBackupMode::class); - $this->automated_backup_mode = $var; - - return $this; - } - - /** - * Optional. How long to keep automated backups before the backups are - * deleted. The value should be between 1 day and 365 days. If not specified, - * the default value is 35 days. - * - * Generated from protobuf field optional .google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getRetention() - { - return $this->retention; - } - - public function hasRetention() - { - return isset($this->retention); - } - - public function clearRetention() - { - unset($this->retention); - } - - /** - * Optional. How long to keep automated backups before the backups are - * deleted. The value should be between 1 day and 365 days. If not specified, - * the default value is 35 days. - * - * Generated from protobuf field optional .google.protobuf.Duration retention = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetention($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention = $var; - - return $this; - } - - /** - * @return string - */ - public function getSchedule() - { - return $this->whichOneof("schedule"); - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php deleted file mode 100644 index abf8501fa4c4..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/AutomatedBackupMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.redis.cluster.v1.AutomatedBackupConfig.AutomatedBackupMode - */ -class AutomatedBackupMode -{ - /** - * Default value. Automated backup config is not specified. - * - * Generated from protobuf enum AUTOMATED_BACKUP_MODE_UNSPECIFIED = 0; - */ - const AUTOMATED_BACKUP_MODE_UNSPECIFIED = 0; - /** - * Automated backup config disabled. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * Automated backup config enabled. - * - * Generated from protobuf enum ENABLED = 2; - */ - const ENABLED = 2; - - private static $valueToName = [ - self::AUTOMATED_BACKUP_MODE_UNSPECIFIED => 'AUTOMATED_BACKUP_MODE_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::ENABLED => 'ENABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php deleted file mode 100644 index e17635096397..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/AutomatedBackupConfig/FixedFrequencySchedule.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.redis.cluster.v1.AutomatedBackupConfig.FixedFrequencySchedule - */ -class FixedFrequencySchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The start time of every automated backup in UTC. It must be set - * to the start of an hour. This field is required. - * - * Generated from protobuf field optional .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\TimeOfDay $start_time - * Required. The start time of every automated backup in UTC. It must be set - * to the start of an hour. This field is required. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The start time of every automated backup in UTC. It must be set - * to the start of an hour. This field is required. - * - * Generated from protobuf field optional .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Type\TimeOfDay|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Required. The start time of every automated backup in UTC. It must be set - * to the start of an hour. This field is required. - * - * Generated from protobuf field optional .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php deleted file mode 100644 index 4fe2ec3fed63..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup.php +++ /dev/null @@ -1,585 +0,0 @@ -google.cloud.redis.cluster.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Full resource path of the backup. the last part of the name is - * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster - * UID] OR customer specified while backup cluster. Example: - * 20240515123000_1234 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Cluster resource path of this backup. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Output only. Cluster uid of this backup. - * - * Generated from protobuf field string cluster_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $cluster_uid = ''; - /** - * Output only. Total size of the backup in bytes. - * - * Generated from protobuf field int64 total_size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_size_bytes = 0; - /** - * Output only. The time when the backup will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. redis-7.2, valkey-7.5 - * - * Generated from protobuf field string engine_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $engine_version = ''; - /** - * Output only. List of backup files of the backup. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $backup_files; - /** - * Output only. Node type of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_type = 0; - /** - * Output only. Number of replicas for the cluster. - * - * Generated from protobuf field int32 replica_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $replica_count = 0; - /** - * Output only. Number of shards for the cluster. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $shard_count = 0; - /** - * Output only. Type of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.BackupType backup_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $backup_type = 0; - /** - * Output only. State of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Encryption information of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_info = null; - /** - * Output only. System assigned unique identifier of the backup. - * - * Generated from protobuf field string uid = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Full resource path of the backup. the last part of the name is - * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster - * UID] OR customer specified while backup cluster. Example: - * 20240515123000_1234 - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup was created. - * @type string $cluster - * Output only. Cluster resource path of this backup. - * @type string $cluster_uid - * Output only. Cluster uid of this backup. - * @type int|string $total_size_bytes - * Output only. Total size of the backup in bytes. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The time when the backup will expire. - * @type string $engine_version - * Output only. redis-7.2, valkey-7.5 - * @type \Google\Cloud\Redis\Cluster\V1\BackupFile[] $backup_files - * Output only. List of backup files of the backup. - * @type int $node_type - * Output only. Node type of the cluster. - * @type int $replica_count - * Output only. Number of replicas for the cluster. - * @type int $shard_count - * Output only. Number of shards for the cluster. - * @type int $backup_type - * Output only. Type of the backup. - * @type int $state - * Output only. State of the backup. - * @type \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $encryption_info - * Output only. Encryption information of the backup. - * @type string $uid - * Output only. System assigned unique identifier of the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Full resource path of the backup. the last part of the name is - * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster - * UID] OR customer specified while backup cluster. Example: - * 20240515123000_1234 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Full resource path of the backup. the last part of the name is - * the backup id with the following format: [YYYYMMDDHHMMSS]_[Shorted Cluster - * UID] OR customer specified while backup cluster. Example: - * 20240515123000_1234 - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the backup was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. Cluster resource path of this backup. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Output only. Cluster resource path of this backup. - * - * Generated from protobuf field string cluster = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Output only. Cluster uid of this backup. - * - * Generated from protobuf field string cluster_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getClusterUid() - { - return $this->cluster_uid; - } - - /** - * Output only. Cluster uid of this backup. - * - * Generated from protobuf field string cluster_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setClusterUid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uid = $var; - - return $this; - } - - /** - * Output only. Total size of the backup in bytes. - * - * Generated from protobuf field int64 total_size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTotalSizeBytes() - { - return $this->total_size_bytes; - } - - /** - * Output only. Total size of the backup in bytes. - * - * Generated from protobuf field int64 total_size_bytes = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTotalSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_size_bytes = $var; - - return $this; - } - - /** - * Output only. The time when the backup will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. The time when the backup will expire. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. redis-7.2, valkey-7.5 - * - * Generated from protobuf field string engine_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEngineVersion() - { - return $this->engine_version; - } - - /** - * Output only. redis-7.2, valkey-7.5 - * - * Generated from protobuf field string engine_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEngineVersion($var) - { - GPBUtil::checkString($var, True); - $this->engine_version = $var; - - return $this; - } - - /** - * Output only. List of backup files of the backup. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\BackupFile> - */ - public function getBackupFiles() - { - return $this->backup_files; - } - - /** - * Output only. List of backup files of the backup. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\BackupFile[] $var - * @return $this - */ - public function setBackupFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\BackupFile::class); - $this->backup_files = $arr; - - return $this; - } - - /** - * Output only. Node type of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getNodeType() - { - return $this->node_type; - } - - /** - * Output only. Node type of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setNodeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\NodeType::class); - $this->node_type = $var; - - return $this; - } - - /** - * Output only. Number of replicas for the cluster. - * - * Generated from protobuf field int32 replica_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReplicaCount() - { - return $this->replica_count; - } - - /** - * Output only. Number of replicas for the cluster. - * - * Generated from protobuf field int32 replica_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->replica_count = $var; - - return $this; - } - - /** - * Output only. Number of shards for the cluster. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Output only. Number of shards for the cluster. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt32($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Output only. Type of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.BackupType backup_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getBackupType() - { - return $this->backup_type; - } - - /** - * Output only. Type of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.BackupType backup_type = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setBackupType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\Backup\BackupType::class); - $this->backup_type = $var; - - return $this; - } - - /** - * Output only. State of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Backup.State state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Encryption information of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\EncryptionInfo|null - */ - public function getEncryptionInfo() - { - return $this->encryption_info; - } - - public function hasEncryptionInfo() - { - return isset($this->encryption_info); - } - - public function clearEncryptionInfo() - { - unset($this->encryption_info); - } - - /** - * Output only. Encryption information of the backup. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $var - * @return $this - */ - public function setEncryptionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo::class); - $this->encryption_info = $var; - - return $this; - } - - /** - * Output only. System assigned unique identifier of the backup. - * - * Generated from protobuf field string uid = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System assigned unique identifier of the backup. - * - * Generated from protobuf field string uid = 15 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php deleted file mode 100644 index b6fd235a0783..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/BackupType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.redis.cluster.v1.Backup.BackupType - */ -class BackupType -{ - /** - * The default value, not set. - * - * Generated from protobuf enum BACKUP_TYPE_UNSPECIFIED = 0; - */ - const BACKUP_TYPE_UNSPECIFIED = 0; - /** - * On-demand backup. - * - * Generated from protobuf enum ON_DEMAND = 1; - */ - const ON_DEMAND = 1; - /** - * Automated backup. - * - * Generated from protobuf enum AUTOMATED = 2; - */ - const AUTOMATED = 2; - - private static $valueToName = [ - self::BACKUP_TYPE_UNSPECIFIED => 'BACKUP_TYPE_UNSPECIFIED', - self::ON_DEMAND => 'ON_DEMAND', - self::AUTOMATED => 'AUTOMATED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php deleted file mode 100644 index d5a5f714e085..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Backup/State.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.redis.cluster.v1.Backup.State - */ -class State -{ - /** - * The default value, not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The backup is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The backup is active to be used. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The backup is being deleted. - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * The backup is currently suspended due to reasons like project deletion, - * billing account closure, etc. - * - * Generated from protobuf enum SUSPENDED = 4; - */ - const SUSPENDED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::SUSPENDED => 'SUSPENDED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php deleted file mode 100644 index c454345ba439..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupClusterRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.redis.cluster.v1.BackupClusterRequest - */ -class BackupClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. - * If not specified, the default value is 100 years. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ttl = null; - /** - * Optional. The id of the backup to be created. If not specified, the - * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. - * - * Generated from protobuf field optional string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup_id = null; - - /** - * @param string $name Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\BackupClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * @type \Google\Protobuf\Duration $ttl - * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. - * If not specified, the default value is 100 years. - * @type string $backup_id - * Optional. The id of the backup to be created. If not specified, the - * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. - * If not specified, the default value is 100 years. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * Optional. TTL for the backup to expire. Value range is 1 day to 100 years. - * If not specified, the default value is 100 years. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Optional. The id of the backup to be created. If not specified, the - * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. - * - * Generated from protobuf field optional string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBackupId() - { - return isset($this->backup_id) ? $this->backup_id : ''; - } - - public function hasBackupId() - { - return isset($this->backup_id); - } - - public function clearBackupId() - { - unset($this->backup_id); - } - - /** - * Optional. The id of the backup to be created. If not specified, the - * default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used. - * - * Generated from protobuf field optional string backup_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php deleted file mode 100644 index 91af3016374f..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupCollection.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.redis.cluster.v1.BackupCollection - */ -class BackupCollection extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Full resource path of the backup collection. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The cluster uid of the backup collection. - * - * Generated from protobuf field string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $cluster_uid = ''; - /** - * Output only. The full resource path of the cluster the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/clusters/{cluster} - * - * Generated from protobuf field string cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Output only. The KMS key used to encrypt the backups under this backup - * collection. - * - * Generated from protobuf field string kms_key = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $kms_key = ''; - /** - * Output only. System assigned unique identifier of the backup collection. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Full resource path of the backup collection. - * @type string $cluster_uid - * Output only. The cluster uid of the backup collection. - * @type string $cluster - * Output only. The full resource path of the cluster the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/clusters/{cluster} - * @type string $kms_key - * Output only. The KMS key used to encrypt the backups under this backup - * collection. - * @type string $uid - * Output only. System assigned unique identifier of the backup collection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Full resource path of the backup collection. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Full resource path of the backup collection. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The cluster uid of the backup collection. - * - * Generated from protobuf field string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getClusterUid() - { - return $this->cluster_uid; - } - - /** - * Output only. The cluster uid of the backup collection. - * - * Generated from protobuf field string cluster_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setClusterUid($var) - { - GPBUtil::checkString($var, True); - $this->cluster_uid = $var; - - return $this; - } - - /** - * Output only. The full resource path of the cluster the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/clusters/{cluster} - * - * Generated from protobuf field string cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Output only. The full resource path of the cluster the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/clusters/{cluster} - * - * Generated from protobuf field string cluster = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Output only. The KMS key used to encrypt the backups under this backup - * collection. - * - * Generated from protobuf field string kms_key = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return $this->kms_key; - } - - /** - * Output only. The KMS key used to encrypt the backups under this backup - * collection. - * - * Generated from protobuf field string kms_key = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Output only. System assigned unique identifier of the backup collection. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System assigned unique identifier of the backup collection. - * - * Generated from protobuf field string uid = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php deleted file mode 100644 index 41f1b7343ccf..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/BackupFile.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.redis.cluster.v1.BackupFile - */ -class BackupFile extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. e.g: .rdb - * - * Generated from protobuf field string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $file_name = ''; - /** - * Output only. Size of the backup file in bytes. - * - * Generated from protobuf field int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. The time when the backup file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_name - * Output only. e.g: .rdb - * @type int|string $size_bytes - * Output only. Size of the backup file in bytes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup file was created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. e.g: .rdb - * - * Generated from protobuf field string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFileName() - { - return $this->file_name; - } - - /** - * Output only. e.g: .rdb - * - * Generated from protobuf field string file_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkString($var, True); - $this->file_name = $var; - - return $this; - } - - /** - * Output only. Size of the backup file in bytes. - * - * Generated from protobuf field int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. Size of the backup file in bytes. - * - * Generated from protobuf field int64 size_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. The time when the backup file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the backup file was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php deleted file mode 100644 index 13f865d5b272..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.redis.cluster.v1.CertificateAuthority - */ -class CertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique name of the resource in this scope including project, - * location and cluster using the form: - * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - protected $server_ca; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority $managed_server_ca - * @type string $name - * Identifier. Unique name of the resource in this scope including project, - * location and cluster using the form: - * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; - * @return \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority|null - */ - public function getManagedServerCa() - { - return $this->readOneof(1); - } - - public function hasManagedServerCa() - { - return $this->hasOneof(1); - } - - /** - * Generated from protobuf field .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 1; - * @param \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority $var - * @return $this - */ - public function setManagedServerCa($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Identifier. Unique name of the resource in this scope including project, - * location and cluster using the form: - * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Unique name of the resource in this scope including project, - * location and cluster using the form: - * `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority` - * - * Generated from protobuf field string name = 2 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getServerCa() - { - return $this->whichOneof("server_ca"); - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php deleted file mode 100644 index 59407cbc0cb8..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority - */ -class ManagedCertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * The PEM encoded CA certificate chains for redis managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - */ - private $ca_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $ca_certs - * The PEM encoded CA certificate chains for redis managed - * server authentication - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * The PEM encoded CA certificate chains for redis managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain> - */ - public function getCaCerts() - { - return $this->ca_certs; - } - - /** - * The PEM encoded CA certificate chains for redis managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - * @param \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $var - * @return $this - */ - public function setCaCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain::class); - $this->ca_certs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php deleted file mode 100644 index 59b88b8bc643..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.redis.cluster.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain - */ -class CertChain extends \Google\Protobuf\Internal\Message -{ - /** - * The certificates that form the CA chain, from leaf to root order. - * - * Generated from protobuf field repeated string certificates = 1; - */ - private $certificates; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $certificates - * The certificates that form the CA chain, from leaf to root order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * The certificates that form the CA chain, from leaf to root order. - * - * Generated from protobuf field repeated string certificates = 1; - * @return RepeatedField - */ - public function getCertificates() - { - return $this->certificates; - } - - /** - * The certificates that form the CA chain, from leaf to root order. - * - * Generated from protobuf field repeated string certificates = 1; - * @param string[] $var - * @return $this - */ - public function setCertificates($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->certificates = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php deleted file mode 100644 index e1f7f1ec77fa..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster.php +++ /dev/null @@ -1,1433 +0,0 @@ -google.cloud.redis.cluster.v1.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Identifier. Unique name of the resource in this scope including - * project and location using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The timestamp associated with the cluster creation request. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The current state of this cluster. - * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. System assigned, unique identifier for the cluster. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Optional. The number of replica nodes per shard. - * - * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $replica_count = null; - /** - * Optional. The authorization mode of the Redis cluster. - * If not provided, auth feature is disabled for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $authorization_mode = 0; - /** - * Optional. The in-transit encryption for the Redis cluster. - * If not provided, encryption is disabled for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $transit_encryption_mode = 0; - /** - * Output only. Redis memory size in GB for the entire cluster rounded up to - * the next integer. - * - * Generated from protobuf field optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_gb = null; - /** - * Optional. Number of shards for the Redis cluster. - * - * Generated from protobuf field optional int32 shard_count = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shard_count = null; - /** - * Optional. Each PscConfig configures the consumer network where IPs will - * be designated to the cluster for client access through Private Service - * Connect Automation. Currently, only one PscConfig is supported. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $psc_configs; - /** - * Output only. Endpoints created on each given network, for Redis clients to - * connect to the cluster. Currently only one discovery endpoint is supported. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $discovery_endpoints; - /** - * Output only. The list of PSC connections that are auto-created through - * service connectivity automation. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $psc_connections; - /** - * Output only. Additional information about the current state of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_info = null; - /** - * Optional. The type of a redis node in the cluster. NodeType determines the - * underlying machine-type of a redis node. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_type = 0; - /** - * Optional. Persistence config (RDB, AOF) for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $persistence_config = null; - /** - * Optional. Key/Value pairs of customer overrides for mutable Redis Configs - * - * Generated from protobuf field map redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $redis_configs; - /** - * Output only. Precise value of redis memory size in GB for the entire - * cluster. - * - * Generated from protobuf field optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $precise_size_gb = null; - /** - * Optional. This config will be used to determine how the customer wants us - * to distribute cluster resources within the region. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone_distribution_config = null; - /** - * Optional. Cross cluster replication config. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig cross_cluster_replication_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cross_cluster_replication_config = null; - /** - * Optional. The delete operation will fail when the value is set to true. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deletion_protection_enabled = null; - /** - * Optional. ClusterMaintenancePolicy determines when to allow or deny - * updates. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenancePolicy maintenance_policy = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $maintenance_policy = null; - /** - * Output only. ClusterMaintenanceSchedule Output only Published maintenance - * schedule. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule maintenance_schedule = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $maintenance_schedule = null; - /** - * Output only. Service attachment details to configure Psc connections - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscServiceAttachment psc_service_attachments = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $psc_service_attachments; - /** - * Optional. A list of cluster enpoints. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterEndpoint cluster_endpoints = 36 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $cluster_endpoints; - /** - * Optional. Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * - * Generated from protobuf field optional string backup_collection = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $backup_collection = null; - /** - * Optional. The KMS key used to encrypt the at-rest data of the cluster. - * - * Generated from protobuf field optional string kms_key = 40 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $kms_key = null; - /** - * Optional. The automated backup config for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig automated_backup_config = 42 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $automated_backup_config = null; - /** - * Output only. Encryption information of the data at rest of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_info = null; - /** - * Optional. Server CA mode for the cluster. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $server_ca_mode = null; - /** - * Optional. Customer-managed CA pool for the cluster. Only applicable for - * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. - * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $server_ca_pool = null; - /** - * Optional. Input only. Rotate the server certificates. - * - * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $rotate_server_certificate = null; - protected $import_sources; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource $gcs_source - * Optional. Backups stored in Cloud Storage buckets. - * The Cloud Storage buckets need to be the same region as the clusters. - * Read permission is required to import from the provided Cloud Storage - * objects. - * @type \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource $managed_backup_source - * Optional. Backups generated and managed by memorystore service. - * @type string $name - * Required. Identifier. Unique name of the resource in this scope including - * project and location using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp associated with the cluster creation request. - * @type int $state - * Output only. The current state of this cluster. - * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED - * @type string $uid - * Output only. System assigned, unique identifier for the cluster. - * @type int $replica_count - * Optional. The number of replica nodes per shard. - * @type int $authorization_mode - * Optional. The authorization mode of the Redis cluster. - * If not provided, auth feature is disabled for the cluster. - * @type int $transit_encryption_mode - * Optional. The in-transit encryption for the Redis cluster. - * If not provided, encryption is disabled for the cluster. - * @type int $size_gb - * Output only. Redis memory size in GB for the entire cluster rounded up to - * the next integer. - * @type int $shard_count - * Optional. Number of shards for the Redis cluster. - * @type \Google\Cloud\Redis\Cluster\V1\PscConfig[] $psc_configs - * Optional. Each PscConfig configures the consumer network where IPs will - * be designated to the cluster for client access through Private Service - * Connect Automation. Currently, only one PscConfig is supported. - * @type \Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint[] $discovery_endpoints - * Output only. Endpoints created on each given network, for Redis clients to - * connect to the cluster. Currently only one discovery endpoint is supported. - * @type \Google\Cloud\Redis\Cluster\V1\PscConnection[] $psc_connections - * Output only. The list of PSC connections that are auto-created through - * service connectivity automation. - * @type \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo $state_info - * Output only. Additional information about the current state of the cluster. - * @type int $node_type - * Optional. The type of a redis node in the cluster. NodeType determines the - * underlying machine-type of a redis node. - * @type \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig $persistence_config - * Optional. Persistence config (RDB, AOF) for the cluster. - * @type array|\Google\Protobuf\Internal\MapField $redis_configs - * Optional. Key/Value pairs of customer overrides for mutable Redis Configs - * @type float $precise_size_gb - * Output only. Precise value of redis memory size in GB for the entire - * cluster. - * @type \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig $zone_distribution_config - * Optional. This config will be used to determine how the customer wants us - * to distribute cluster resources within the region. - * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig $cross_cluster_replication_config - * Optional. Cross cluster replication config. - * @type bool $deletion_protection_enabled - * Optional. The delete operation will fail when the value is set to true. - * @type \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy $maintenance_policy - * Optional. ClusterMaintenancePolicy determines when to allow or deny - * updates. - * @type \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule $maintenance_schedule - * Output only. ClusterMaintenanceSchedule Output only Published maintenance - * schedule. - * @type \Google\Cloud\Redis\Cluster\V1\PscServiceAttachment[] $psc_service_attachments - * Output only. Service attachment details to configure Psc connections - * @type \Google\Cloud\Redis\Cluster\V1\ClusterEndpoint[] $cluster_endpoints - * Optional. A list of cluster enpoints. - * @type string $backup_collection - * Optional. Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * @type string $kms_key - * Optional. The KMS key used to encrypt the at-rest data of the cluster. - * @type \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig $automated_backup_config - * Optional. The automated backup config for the cluster. - * @type \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $encryption_info - * Output only. Encryption information of the data at rest of the cluster. - * @type int $server_ca_mode - * Optional. Server CA mode for the cluster. - * @type string $server_ca_pool - * Optional. Customer-managed CA pool for the cluster. Only applicable for - * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. - * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". - * @type bool $rotate_server_certificate - * Optional. Input only. Rotate the server certificates. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Backups stored in Cloud Storage buckets. - * The Cloud Storage buckets need to be the same region as the clusters. - * Read permission is required to import from the provided Cloud Storage - * objects. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.GcsBackupSource gcs_source = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource|null - */ - public function getGcsSource() - { - return $this->readOneof(34); - } - - public function hasGcsSource() - { - return $this->hasOneof(34); - } - - /** - * Optional. Backups stored in Cloud Storage buckets. - * The Cloud Storage buckets need to be the same region as the clusters. - * Read permission is required to import from the provided Cloud Storage - * objects. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.GcsBackupSource gcs_source = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\GcsBackupSource::class); - $this->writeOneof(34, $var); - - return $this; - } - - /** - * Optional. Backups generated and managed by memorystore service. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.ManagedBackupSource managed_backup_source = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource|null - */ - public function getManagedBackupSource() - { - return $this->readOneof(35); - } - - public function hasManagedBackupSource() - { - return $this->hasOneof(35); - } - - /** - * Optional. Backups generated and managed by memorystore service. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.ManagedBackupSource managed_backup_source = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource $var - * @return $this - */ - public function setManagedBackupSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\ManagedBackupSource::class); - $this->writeOneof(35, $var); - - return $this; - } - - /** - * Required. Identifier. Unique name of the resource in this scope including - * project and location using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Identifier. Unique name of the resource in this scope including - * project and location using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp associated with the cluster creation request. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp associated with the cluster creation request. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The current state of this cluster. - * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of this cluster. - * Can be CREATING, READY, UPDATING, DELETING and SUSPENDED - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. System assigned, unique identifier for the cluster. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System assigned, unique identifier for the cluster. - * - * Generated from protobuf field string uid = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Optional. The number of replica nodes per shard. - * - * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getReplicaCount() - { - return isset($this->replica_count) ? $this->replica_count : 0; - } - - public function hasReplicaCount() - { - return isset($this->replica_count); - } - - public function clearReplicaCount() - { - unset($this->replica_count); - } - - /** - * Optional. The number of replica nodes per shard. - * - * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->replica_count = $var; - - return $this; - } - - /** - * Optional. The authorization mode of the Redis cluster. - * If not provided, auth feature is disabled for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAuthorizationMode() - { - return $this->authorization_mode; - } - - /** - * Optional. The authorization mode of the Redis cluster. - * If not provided, auth feature is disabled for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AuthorizationMode authorization_mode = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAuthorizationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\AuthorizationMode::class); - $this->authorization_mode = $var; - - return $this; - } - - /** - * Optional. The in-transit encryption for the Redis cluster. - * If not provided, encryption is disabled for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getTransitEncryptionMode() - { - return $this->transit_encryption_mode; - } - - /** - * Optional. The in-transit encryption for the Redis cluster. - * If not provided, encryption is disabled for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.TransitEncryptionMode transit_encryption_mode = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setTransitEncryptionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\TransitEncryptionMode::class); - $this->transit_encryption_mode = $var; - - return $this; - } - - /** - * Output only. Redis memory size in GB for the entire cluster rounded up to - * the next integer. - * - * Generated from protobuf field optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSizeGb() - { - return isset($this->size_gb) ? $this->size_gb : 0; - } - - public function hasSizeGb() - { - return isset($this->size_gb); - } - - public function clearSizeGb() - { - unset($this->size_gb); - } - - /** - * Output only. Redis memory size in GB for the entire cluster rounded up to - * the next integer. - * - * Generated from protobuf field optional int32 size_gb = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkInt32($var); - $this->size_gb = $var; - - return $this; - } - - /** - * Optional. Number of shards for the Redis cluster. - * - * Generated from protobuf field optional int32 shard_count = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getShardCount() - { - return isset($this->shard_count) ? $this->shard_count : 0; - } - - public function hasShardCount() - { - return isset($this->shard_count); - } - - public function clearShardCount() - { - unset($this->shard_count); - } - - /** - * Optional. Number of shards for the Redis cluster. - * - * Generated from protobuf field optional int32 shard_count = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt32($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Optional. Each PscConfig configures the consumer network where IPs will - * be designated to the cluster for client access through Private Service - * Connect Automation. Currently, only one PscConfig is supported. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\PscConfig> - */ - public function getPscConfigs() - { - return $this->psc_configs; - } - - /** - * Optional. Each PscConfig configures the consumer network where IPs will - * be designated to the cluster for client access through Private Service - * Connect Automation. Currently, only one PscConfig is supported. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConfig psc_configs = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\PscConfig[] $var - * @return $this - */ - public function setPscConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\PscConfig::class); - $this->psc_configs = $arr; - - return $this; - } - - /** - * Output only. Endpoints created on each given network, for Redis clients to - * connect to the cluster. Currently only one discovery endpoint is supported. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint> - */ - public function getDiscoveryEndpoints() - { - return $this->discovery_endpoints; - } - - /** - * Output only. Endpoints created on each given network, for Redis clients to - * connect to the cluster. Currently only one discovery endpoint is supported. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.DiscoveryEndpoint discovery_endpoints = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint[] $var - * @return $this - */ - public function setDiscoveryEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\DiscoveryEndpoint::class); - $this->discovery_endpoints = $arr; - - return $this; - } - - /** - * Output only. The list of PSC connections that are auto-created through - * service connectivity automation. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\PscConnection> - */ - public function getPscConnections() - { - return $this->psc_connections; - } - - /** - * Output only. The list of PSC connections that are auto-created through - * service connectivity automation. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscConnection psc_connections = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\PscConnection[] $var - * @return $this - */ - public function setPscConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\PscConnection::class); - $this->psc_connections = $arr; - - return $this; - } - - /** - * Output only. Additional information about the current state of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo|null - */ - public function getStateInfo() - { - return $this->state_info; - } - - public function hasStateInfo() - { - return isset($this->state_info); - } - - public function clearStateInfo() - { - unset($this->state_info); - } - - /** - * Output only. Additional information about the current state of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo state_info = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo $var - * @return $this - */ - public function setStateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo::class); - $this->state_info = $var; - - return $this; - } - - /** - * Optional. The type of a redis node in the cluster. NodeType determines the - * underlying machine-type of a redis node. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNodeType() - { - return $this->node_type; - } - - /** - * Optional. The type of a redis node in the cluster. NodeType determines the - * underlying machine-type of a redis node. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.NodeType node_type = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNodeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\NodeType::class); - $this->node_type = $var; - - return $this; - } - - /** - * Optional. Persistence config (RDB, AOF) for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig|null - */ - public function getPersistenceConfig() - { - return $this->persistence_config; - } - - public function hasPersistenceConfig() - { - return isset($this->persistence_config); - } - - public function clearPersistenceConfig() - { - unset($this->persistence_config); - } - - /** - * Optional. Persistence config (RDB, AOF) for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig persistence_config = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig $var - * @return $this - */ - public function setPersistenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig::class); - $this->persistence_config = $var; - - return $this; - } - - /** - * Optional. Key/Value pairs of customer overrides for mutable Redis Configs - * - * Generated from protobuf field map redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getRedisConfigs() - { - return $this->redis_configs; - } - - /** - * Optional. Key/Value pairs of customer overrides for mutable Redis Configs - * - * Generated from protobuf field map redis_configs = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setRedisConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->redis_configs = $arr; - - return $this; - } - - /** - * Output only. Precise value of redis memory size in GB for the entire - * cluster. - * - * Generated from protobuf field optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getPreciseSizeGb() - { - return isset($this->precise_size_gb) ? $this->precise_size_gb : 0.0; - } - - public function hasPreciseSizeGb() - { - return isset($this->precise_size_gb); - } - - public function clearPreciseSizeGb() - { - unset($this->precise_size_gb); - } - - /** - * Output only. Precise value of redis memory size in GB for the entire - * cluster. - * - * Generated from protobuf field optional double precise_size_gb = 22 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setPreciseSizeGb($var) - { - GPBUtil::checkDouble($var); - $this->precise_size_gb = $var; - - return $this; - } - - /** - * Optional. This config will be used to determine how the customer wants us - * to distribute cluster resources within the region. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig|null - */ - public function getZoneDistributionConfig() - { - return $this->zone_distribution_config; - } - - public function hasZoneDistributionConfig() - { - return isset($this->zone_distribution_config); - } - - public function clearZoneDistributionConfig() - { - unset($this->zone_distribution_config); - } - - /** - * Optional. This config will be used to determine how the customer wants us - * to distribute cluster resources within the region. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig zone_distribution_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig $var - * @return $this - */ - public function setZoneDistributionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig::class); - $this->zone_distribution_config = $var; - - return $this; - } - - /** - * Optional. Cross cluster replication config. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig cross_cluster_replication_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig|null - */ - public function getCrossClusterReplicationConfig() - { - return $this->cross_cluster_replication_config; - } - - public function hasCrossClusterReplicationConfig() - { - return isset($this->cross_cluster_replication_config); - } - - public function clearCrossClusterReplicationConfig() - { - unset($this->cross_cluster_replication_config); - } - - /** - * Optional. Cross cluster replication config. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig cross_cluster_replication_config = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig $var - * @return $this - */ - public function setCrossClusterReplicationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig::class); - $this->cross_cluster_replication_config = $var; - - return $this; - } - - /** - * Optional. The delete operation will fail when the value is set to true. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDeletionProtectionEnabled() - { - return isset($this->deletion_protection_enabled) ? $this->deletion_protection_enabled : false; - } - - public function hasDeletionProtectionEnabled() - { - return isset($this->deletion_protection_enabled); - } - - public function clearDeletionProtectionEnabled() - { - unset($this->deletion_protection_enabled); - } - - /** - * Optional. The delete operation will fail when the value is set to true. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDeletionProtectionEnabled($var) - { - GPBUtil::checkBool($var); - $this->deletion_protection_enabled = $var; - - return $this; - } - - /** - * Optional. ClusterMaintenancePolicy determines when to allow or deny - * updates. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenancePolicy maintenance_policy = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy|null - */ - public function getMaintenancePolicy() - { - return $this->maintenance_policy; - } - - public function hasMaintenancePolicy() - { - return isset($this->maintenance_policy); - } - - public function clearMaintenancePolicy() - { - unset($this->maintenance_policy); - } - - /** - * Optional. ClusterMaintenancePolicy determines when to allow or deny - * updates. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenancePolicy maintenance_policy = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy $var - * @return $this - */ - public function setMaintenancePolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterMaintenancePolicy::class); - $this->maintenance_policy = $var; - - return $this; - } - - /** - * Output only. ClusterMaintenanceSchedule Output only Published maintenance - * schedule. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule maintenance_schedule = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule|null - */ - public function getMaintenanceSchedule() - { - return $this->maintenance_schedule; - } - - public function hasMaintenanceSchedule() - { - return isset($this->maintenance_schedule); - } - - public function clearMaintenanceSchedule() - { - unset($this->maintenance_schedule); - } - - /** - * Output only. ClusterMaintenanceSchedule Output only Published maintenance - * schedule. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule maintenance_schedule = 27 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule $var - * @return $this - */ - public function setMaintenanceSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterMaintenanceSchedule::class); - $this->maintenance_schedule = $var; - - return $this; - } - - /** - * Output only. Service attachment details to configure Psc connections - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscServiceAttachment psc_service_attachments = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\PscServiceAttachment> - */ - public function getPscServiceAttachments() - { - return $this->psc_service_attachments; - } - - /** - * Output only. Service attachment details to configure Psc connections - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.PscServiceAttachment psc_service_attachments = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\PscServiceAttachment[] $var - * @return $this - */ - public function setPscServiceAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\PscServiceAttachment::class); - $this->psc_service_attachments = $arr; - - return $this; - } - - /** - * Optional. A list of cluster enpoints. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterEndpoint cluster_endpoints = 36 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\ClusterEndpoint> - */ - public function getClusterEndpoints() - { - return $this->cluster_endpoints; - } - - /** - * Optional. A list of cluster enpoints. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterEndpoint cluster_endpoints = 36 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterEndpoint[] $var - * @return $this - */ - public function setClusterEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\ClusterEndpoint::class); - $this->cluster_endpoints = $arr; - - return $this; - } - - /** - * Optional. Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * - * Generated from protobuf field optional string backup_collection = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getBackupCollection() - { - return isset($this->backup_collection) ? $this->backup_collection : ''; - } - - public function hasBackupCollection() - { - return isset($this->backup_collection); - } - - public function clearBackupCollection() - { - unset($this->backup_collection); - } - - /** - * Optional. Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * - * Generated from protobuf field optional string backup_collection = 39 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackupCollection($var) - { - GPBUtil::checkString($var, True); - $this->backup_collection = $var; - - return $this; - } - - /** - * Optional. The KMS key used to encrypt the at-rest data of the cluster. - * - * Generated from protobuf field optional string kms_key = 40 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKey() - { - return isset($this->kms_key) ? $this->kms_key : ''; - } - - public function hasKmsKey() - { - return isset($this->kms_key); - } - - public function clearKmsKey() - { - unset($this->kms_key); - } - - /** - * Optional. The KMS key used to encrypt the at-rest data of the cluster. - * - * Generated from protobuf field optional string kms_key = 40 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKey($var) - { - GPBUtil::checkString($var, True); - $this->kms_key = $var; - - return $this; - } - - /** - * Optional. The automated backup config for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig automated_backup_config = 42 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig|null - */ - public function getAutomatedBackupConfig() - { - return $this->automated_backup_config; - } - - public function hasAutomatedBackupConfig() - { - return isset($this->automated_backup_config); - } - - public function clearAutomatedBackupConfig() - { - unset($this->automated_backup_config); - } - - /** - * Optional. The automated backup config for the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.AutomatedBackupConfig automated_backup_config = 42 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig $var - * @return $this - */ - public function setAutomatedBackupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\AutomatedBackupConfig::class); - $this->automated_backup_config = $var; - - return $this; - } - - /** - * Output only. Encryption information of the data at rest of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\EncryptionInfo|null - */ - public function getEncryptionInfo() - { - return $this->encryption_info; - } - - public function hasEncryptionInfo() - { - return isset($this->encryption_info); - } - - public function clearEncryptionInfo() - { - unset($this->encryption_info); - } - - /** - * Output only. Encryption information of the data at rest of the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo encryption_info = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\EncryptionInfo $var - * @return $this - */ - public function setEncryptionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo::class); - $this->encryption_info = $var; - - return $this; - } - - /** - * Optional. Server CA mode for the cluster. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getServerCaMode() - { - return isset($this->server_ca_mode) ? $this->server_ca_mode : 0; - } - - public function hasServerCaMode() - { - return isset($this->server_ca_mode); - } - - public function clearServerCaMode() - { - unset($this->server_ca_mode); - } - - /** - * Optional. Server CA mode for the cluster. - * - * Generated from protobuf field optional .google.cloud.redis.cluster.v1.ServerCaMode server_ca_mode = 53 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setServerCaMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ServerCaMode::class); - $this->server_ca_mode = $var; - - return $this; - } - - /** - * Optional. Customer-managed CA pool for the cluster. Only applicable for - * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. - * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getServerCaPool() - { - return isset($this->server_ca_pool) ? $this->server_ca_pool : ''; - } - - public function hasServerCaPool() - { - return isset($this->server_ca_pool); - } - - public function clearServerCaPool() - { - unset($this->server_ca_pool); - } - - /** - * Optional. Customer-managed CA pool for the cluster. Only applicable for - * BYOCA i.e. if server_ca_mode is SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA. - * Format: "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 54 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServerCaPool($var) - { - GPBUtil::checkString($var, True); - $this->server_ca_pool = $var; - - return $this; - } - - /** - * Optional. Input only. Rotate the server certificates. - * - * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @return bool - */ - public function getRotateServerCertificate() - { - return isset($this->rotate_server_certificate) ? $this->rotate_server_certificate : false; - } - - public function hasRotateServerCertificate() - { - return isset($this->rotate_server_certificate); - } - - public function clearRotateServerCertificate() - { - unset($this->rotate_server_certificate); - } - - /** - * Optional. Input only. Rotate the server certificates. - * - * Generated from protobuf field optional bool rotate_server_certificate = 55 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRotateServerCertificate($var) - { - GPBUtil::checkBool($var); - $this->rotate_server_certificate = $var; - - return $this; - } - - /** - * @return string - */ - public function getImportSources() - { - return $this->whichOneof("import_sources"); - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php deleted file mode 100644 index 53420b002a11..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/GcsBackupSource.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.redis.cluster.v1.Cluster.GcsBackupSource - */ -class GcsBackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. URIs of the GCS objects to import. - * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $uris - * Optional. URIs of the GCS objects to import. - * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. URIs of the GCS objects to import. - * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * Optional. URIs of the GCS objects to import. - * Example: gs://bucket1/object1, gs://bucket2/folder2/object2 - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php deleted file mode 100644 index 9a7992aec735..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/ManagedBackupSource.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.redis.cluster.v1.Cluster.ManagedBackupSource - */ -class ManagedBackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Example: - * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} - * A shorter version (without the prefix) of the backup name is also - * supported, like - * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} - * In this case, it assumes the backup is under redis.googleapis.com. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $backup = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * Optional. Example: - * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} - * A shorter version (without the prefix) of the backup name is also - * supported, like - * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} - * In this case, it assumes the backup is under redis.googleapis.com. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Example: - * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} - * A shorter version (without the prefix) of the backup name is also - * supported, like - * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} - * In this case, it assumes the backup is under redis.googleapis.com. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Optional. Example: - * //redis.googleapis.com/projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup} - * A shorter version (without the prefix) of the backup name is also - * supported, like - * projects/{project}/locations/{location}/backupCollections/{collection}/backups/{backup_id} - * In this case, it assumes the backup is under redis.googleapis.com. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php deleted file mode 100644 index d0b8109af356..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.redis.cluster.v1.Cluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Redis cluster is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Redis cluster has been created and is fully usable. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Redis cluster configuration is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Redis cluster is being deleted. - * - * Generated from protobuf enum DELETING = 4; - */ - const DELETING = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php deleted file mode 100644 index 9b1ffce60fbb..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.redis.cluster.v1.Cluster.StateInfo - */ -class StateInfo extends \Google\Protobuf\Internal\Message -{ - protected $info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo $update_info - * Describes ongoing update on the cluster when cluster state is UPDATING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Describes ongoing update on the cluster when cluster state is UPDATING. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; - * @return \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo|null - */ - public function getUpdateInfo() - { - return $this->readOneof(1); - } - - public function hasUpdateInfo() - { - return $this->hasOneof(1); - } - - /** - * Describes ongoing update on the cluster when cluster state is UPDATING. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo update_info = 1; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo $var - * @return $this - */ - public function setUpdateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster\StateInfo\UpdateInfo::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getInfo() - { - return $this->whichOneof("info"); - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php deleted file mode 100644 index 0eea1fbdaff9..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/Cluster/StateInfo/UpdateInfo.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.redis.cluster.v1.Cluster.StateInfo.UpdateInfo - */ -class UpdateInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Target number of shards for redis cluster - * - * Generated from protobuf field optional int32 target_shard_count = 1; - */ - protected $target_shard_count = null; - /** - * Target number of replica nodes per shard. - * - * Generated from protobuf field optional int32 target_replica_count = 2; - */ - protected $target_replica_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_shard_count - * Target number of shards for redis cluster - * @type int $target_replica_count - * Target number of replica nodes per shard. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Target number of shards for redis cluster - * - * Generated from protobuf field optional int32 target_shard_count = 1; - * @return int - */ - public function getTargetShardCount() - { - return isset($this->target_shard_count) ? $this->target_shard_count : 0; - } - - public function hasTargetShardCount() - { - return isset($this->target_shard_count); - } - - public function clearTargetShardCount() - { - unset($this->target_shard_count); - } - - /** - * Target number of shards for redis cluster - * - * Generated from protobuf field optional int32 target_shard_count = 1; - * @param int $var - * @return $this - */ - public function setTargetShardCount($var) - { - GPBUtil::checkInt32($var); - $this->target_shard_count = $var; - - return $this; - } - - /** - * Target number of replica nodes per shard. - * - * Generated from protobuf field optional int32 target_replica_count = 2; - * @return int - */ - public function getTargetReplicaCount() - { - return isset($this->target_replica_count) ? $this->target_replica_count : 0; - } - - public function hasTargetReplicaCount() - { - return isset($this->target_replica_count); - } - - public function clearTargetReplicaCount() - { - unset($this->target_replica_count); - } - - /** - * Target number of replica nodes per shard. - * - * Generated from protobuf field optional int32 target_replica_count = 2; - * @param int $var - * @return $this - */ - public function setTargetReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->target_replica_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php deleted file mode 100644 index 007124ee0639..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterEndpoint.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterEndpoint - */ -class ClusterEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * A group of PSC connections. They are created in the same VPC network, one - * for each service attachment in the cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ConnectionDetail connections = 1; - */ - private $connections; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\ConnectionDetail[] $connections - * A group of PSC connections. They are created in the same VPC network, one - * for each service attachment in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * A group of PSC connections. They are created in the same VPC network, one - * for each service attachment in the cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ConnectionDetail connections = 1; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\ConnectionDetail> - */ - public function getConnections() - { - return $this->connections; - } - - /** - * A group of PSC connections. They are created in the same VPC network, one - * for each service attachment in the cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ConnectionDetail connections = 1; - * @param \Google\Cloud\Redis\Cluster\V1\ConnectionDetail[] $var - * @return $this - */ - public function setConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\ConnectionDetail::class); - $this->connections = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php deleted file mode 100644 index 3538c5e6049a..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenancePolicy.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterMaintenancePolicy - */ -class ClusterMaintenancePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time when the policy was created i.e. Maintenance Window - * or Deny Period was assigned. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time when the policy was updated i.e. Maintenance Window - * or Deny Period was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_window is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow weekly_maintenance_window = 3; - */ - private $weekly_maintenance_window; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the policy was created i.e. Maintenance Window - * or Deny Period was assigned. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the policy was updated i.e. Maintenance Window - * or Deny Period was updated. - * @type \Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow[] $weekly_maintenance_window - * Optional. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_window is expected to be one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time when the policy was created i.e. Maintenance Window - * or Deny Period was assigned. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time when the policy was created i.e. Maintenance Window - * or Deny Period was assigned. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time when the policy was updated i.e. Maintenance Window - * or Deny Period was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time when the policy was updated i.e. Maintenance Window - * or Deny Period was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Optional. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_window is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow weekly_maintenance_window = 3; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow> - */ - public function getWeeklyMaintenanceWindow() - { - return $this->weekly_maintenance_window; - } - - /** - * Optional. Maintenance window that is applied to resources covered by this - * policy. Minimum 1. For the current version, the maximum number of - * weekly_maintenance_window is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow weekly_maintenance_window = 3; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow[] $var - * @return $this - */ - public function setWeeklyMaintenanceWindow($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\ClusterWeeklyMaintenanceWindow::class); - $this->weekly_maintenance_window = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php deleted file mode 100644 index 8133740daee1..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterMaintenanceSchedule.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterMaintenanceSchedule - */ -class ClusterMaintenanceSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The start time of any upcoming scheduled maintenance for this - * instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The end time of any upcoming scheduled maintenance for this - * instance. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The start time of any upcoming scheduled maintenance for this - * instance. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The end time of any upcoming scheduled maintenance for this - * instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The start time of any upcoming scheduled maintenance for this - * instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The start time of any upcoming scheduled maintenance for this - * instance. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The end time of any upcoming scheduled maintenance for this - * instance. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The end time of any upcoming scheduled maintenance for this - * instance. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php deleted file mode 100644 index ec087c2aeeff..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterPersistenceConfig - */ -class ClusterPersistenceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The mode of persistence. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - /** - * Optional. RDB configuration. This field will be ignored if mode is not RDB. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rdb_config = null; - /** - * Optional. AOF configuration. This field will be ignored if mode is not AOF. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $aof_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Optional. The mode of persistence. - * @type \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig $rdb_config - * Optional. RDB configuration. This field will be ignored if mode is not RDB. - * @type \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig $aof_config - * Optional. AOF configuration. This field will be ignored if mode is not AOF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The mode of persistence. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The mode of persistence. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\PersistenceMode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. RDB configuration. This field will be ignored if mode is not RDB. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig|null - */ - public function getRdbConfig() - { - return $this->rdb_config; - } - - public function hasRdbConfig() - { - return isset($this->rdb_config); - } - - public function clearRdbConfig() - { - unset($this->rdb_config); - } - - /** - * Optional. RDB configuration. This field will be ignored if mode is not RDB. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig $var - * @return $this - */ - public function setRdbConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig::class); - $this->rdb_config = $var; - - return $this; - } - - /** - * Optional. AOF configuration. This field will be ignored if mode is not AOF. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig|null - */ - public function getAofConfig() - { - return $this->aof_config; - } - - public function hasAofConfig() - { - return isset($this->aof_config); - } - - public function clearAofConfig() - { - unset($this->aof_config); - } - - /** - * Optional. AOF configuration. This field will be ignored if mode is not AOF. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig $var - * @return $this - */ - public function setAofConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig::class); - $this->aof_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php deleted file mode 100644 index 5b9b1650d94f..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig - */ -class AOFConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. fsync configuration. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $append_fsync = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $append_fsync - * Optional. fsync configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. fsync configuration. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAppendFsync() - { - return $this->append_fsync; - } - - /** - * Optional. fsync configuration. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAppendFsync($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\AOFConfig\AppendFsync::class); - $this->append_fsync = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php deleted file mode 100644 index ce6a56156b24..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/AOFConfig/AppendFsync.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterPersistenceConfig.AOFConfig.AppendFsync - */ -class AppendFsync -{ - /** - * Not set. Default: EVERYSEC - * - * Generated from protobuf enum APPEND_FSYNC_UNSPECIFIED = 0; - */ - const APPEND_FSYNC_UNSPECIFIED = 0; - /** - * Never fsync. Normally Linux will flush data every 30 seconds with this - * configuration, but it's up to the kernel's exact tuning. - * - * Generated from protobuf enum NO = 1; - */ - const NO = 1; - /** - * fsync every second. Fast enough, and you may lose 1 second of data if - * there is a disaster - * - * Generated from protobuf enum EVERYSEC = 2; - */ - const EVERYSEC = 2; - /** - * fsync every time new write commands are appended to the AOF. It has the - * best data loss protection at the cost of performance - * - * Generated from protobuf enum ALWAYS = 3; - */ - const ALWAYS = 3; - - private static $valueToName = [ - self::APPEND_FSYNC_UNSPECIFIED => 'APPEND_FSYNC_UNSPECIFIED', - self::NO => 'NO', - self::EVERYSEC => 'EVERYSEC', - self::ALWAYS => 'ALWAYS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php deleted file mode 100644 index b1648921fa93..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/PersistenceMode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterPersistenceConfig.PersistenceMode - */ -class PersistenceMode -{ - /** - * Not set. - * - * Generated from protobuf enum PERSISTENCE_MODE_UNSPECIFIED = 0; - */ - const PERSISTENCE_MODE_UNSPECIFIED = 0; - /** - * Persistence is disabled, and any snapshot data is deleted. - * - * Generated from protobuf enum DISABLED = 1; - */ - const DISABLED = 1; - /** - * RDB based persistence is enabled. - * - * Generated from protobuf enum RDB = 2; - */ - const RDB = 2; - /** - * AOF based persistence is enabled. - * - * Generated from protobuf enum AOF = 3; - */ - const AOF = 3; - - private static $valueToName = [ - self::PERSISTENCE_MODE_UNSPECIFIED => 'PERSISTENCE_MODE_UNSPECIFIED', - self::DISABLED => 'DISABLED', - self::RDB => 'RDB', - self::AOF => 'AOF', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php deleted file mode 100644 index e7a6dafbd26c..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig - */ -class RDBConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rdb_snapshot_period = 0; - /** - * Optional. The time that the first snapshot was/will be attempted, and to - * which future snapshots will be aligned. If not provided, the current time - * will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rdb_snapshot_start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $rdb_snapshot_period - * Optional. Period between RDB snapshots. - * @type \Google\Protobuf\Timestamp $rdb_snapshot_start_time - * Optional. The time that the first snapshot was/will be attempted, and to - * which future snapshots will be aligned. If not provided, the current time - * will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRdbSnapshotPeriod() - { - return $this->rdb_snapshot_period; - } - - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRdbSnapshotPeriod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ClusterPersistenceConfig\RDBConfig\SnapshotPeriod::class); - $this->rdb_snapshot_period = $var; - - return $this; - } - - /** - * Optional. The time that the first snapshot was/will be attempted, and to - * which future snapshots will be aligned. If not provided, the current time - * will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRdbSnapshotStartTime() - { - return $this->rdb_snapshot_start_time; - } - - public function hasRdbSnapshotStartTime() - { - return isset($this->rdb_snapshot_start_time); - } - - public function clearRdbSnapshotStartTime() - { - unset($this->rdb_snapshot_start_time); - } - - /** - * Optional. The time that the first snapshot was/will be attempted, and to - * which future snapshots will be aligned. If not provided, the current time - * will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp rdb_snapshot_start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRdbSnapshotStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->rdb_snapshot_start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php deleted file mode 100644 index 51c678d4686b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterPersistenceConfig/RDBConfig/SnapshotPeriod.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterPersistenceConfig.RDBConfig.SnapshotPeriod - */ -class SnapshotPeriod -{ - /** - * Not set. - * - * Generated from protobuf enum SNAPSHOT_PERIOD_UNSPECIFIED = 0; - */ - const SNAPSHOT_PERIOD_UNSPECIFIED = 0; - /** - * One hour. - * - * Generated from protobuf enum ONE_HOUR = 1; - */ - const ONE_HOUR = 1; - /** - * Six hours. - * - * Generated from protobuf enum SIX_HOURS = 2; - */ - const SIX_HOURS = 2; - /** - * Twelve hours. - * - * Generated from protobuf enum TWELVE_HOURS = 3; - */ - const TWELVE_HOURS = 3; - /** - * Twenty four hours. - * - * Generated from protobuf enum TWENTY_FOUR_HOURS = 4; - */ - const TWENTY_FOUR_HOURS = 4; - - private static $valueToName = [ - self::SNAPSHOT_PERIOD_UNSPECIFIED => 'SNAPSHOT_PERIOD_UNSPECIFIED', - self::ONE_HOUR => 'ONE_HOUR', - self::SIX_HOURS => 'SIX_HOURS', - self::TWELVE_HOURS => 'TWELVE_HOURS', - self::TWENTY_FOUR_HOURS => 'TWENTY_FOUR_HOURS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php deleted file mode 100644 index 05cec117b73b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ClusterWeeklyMaintenanceWindow.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.redis.cluster.v1.ClusterWeeklyMaintenanceWindow - */ -class ClusterWeeklyMaintenanceWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1; - */ - protected $day = 0; - /** - * Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day - * Allows to define schedule that runs specified day of the week. - * @type \Google\Type\TimeOfDay $start_time - * Start time of the window in UTC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1; - * @return int - */ - public function getDay() - { - return $this->day; - } - - /** - * Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1; - * @param int $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day = $var; - - return $this; - } - - /** - * Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2; - * @return \Google\Type\TimeOfDay|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2; - * @param \Google\Type\TimeOfDay $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Type\TimeOfDay::class); - $this->start_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php deleted file mode 100644 index b4616367fe22..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionDetail.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.redis.cluster.v1.ConnectionDetail - */ -class ConnectionDetail extends \Google\Protobuf\Internal\Message -{ - protected $connection; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\PscAutoConnection $psc_auto_connection - * Detailed information of a PSC connection that is created through - * service connectivity automation. - * @type \Google\Cloud\Redis\Cluster\V1\PscConnection $psc_connection - * Detailed information of a PSC connection that is created by the customer - * who owns the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Detailed information of a PSC connection that is created through - * service connectivity automation. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscAutoConnection psc_auto_connection = 1; - * @return \Google\Cloud\Redis\Cluster\V1\PscAutoConnection|null - */ - public function getPscAutoConnection() - { - return $this->readOneof(1); - } - - public function hasPscAutoConnection() - { - return $this->hasOneof(1); - } - - /** - * Detailed information of a PSC connection that is created through - * service connectivity automation. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscAutoConnection psc_auto_connection = 1; - * @param \Google\Cloud\Redis\Cluster\V1\PscAutoConnection $var - * @return $this - */ - public function setPscAutoConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\PscAutoConnection::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Detailed information of a PSC connection that is created by the customer - * who owns the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnection psc_connection = 2; - * @return \Google\Cloud\Redis\Cluster\V1\PscConnection|null - */ - public function getPscConnection() - { - return $this->readOneof(2); - } - - public function hasPscConnection() - { - return $this->hasOneof(2); - } - - /** - * Detailed information of a PSC connection that is created by the customer - * who owns the cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnection psc_connection = 2; - * @param \Google\Cloud\Redis\Cluster\V1\PscConnection $var - * @return $this - */ - public function setPscConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\PscConnection::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConnection() - { - return $this->whichOneof("connection"); - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php deleted file mode 100644 index 1c83655e40bd..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ConnectionType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.redis.cluster.v1.ConnectionType - */ -class ConnectionType -{ - /** - * Cluster endpoint Type is not set - * - * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; - */ - const CONNECTION_TYPE_UNSPECIFIED = 0; - /** - * Cluster endpoint that will be used as for cluster topology discovery. - * - * Generated from protobuf enum CONNECTION_TYPE_DISCOVERY = 1; - */ - const CONNECTION_TYPE_DISCOVERY = 1; - /** - * Cluster endpoint that will be used as primary endpoint to access primary. - * - * Generated from protobuf enum CONNECTION_TYPE_PRIMARY = 2; - */ - const CONNECTION_TYPE_PRIMARY = 2; - /** - * Cluster endpoint that will be used as reader endpoint to access replicas. - * - * Generated from protobuf enum CONNECTION_TYPE_READER = 3; - */ - const CONNECTION_TYPE_READER = 3; - - private static $valueToName = [ - self::CONNECTION_TYPE_UNSPECIFIED => 'CONNECTION_TYPE_UNSPECIFIED', - self::CONNECTION_TYPE_DISCOVERY => 'CONNECTION_TYPE_DISCOVERY', - self::CONNECTION_TYPE_PRIMARY => 'CONNECTION_TYPE_PRIMARY', - self::CONNECTION_TYPE_READER => 'CONNECTION_TYPE_READER', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php deleted file mode 100644 index 3ff48ed88beb..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CreateClusterRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.cloud.redis.cluster.v1.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The logical name of the Redis cluster in the customer project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The cluster that is to be created. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Redis\Cluster\V1\Cluster $cluster Required. The cluster that is to be created. - * @param string $clusterId Required. The logical name of the Redis cluster in the customer project - * with the following restrictions: - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * @return \Google\Cloud\Redis\Cluster\V1\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Redis\Cluster\V1\Cluster $cluster, string $clusterId): self - { - return (new self()) - ->setParent($parent) - ->setCluster($cluster) - ->setClusterId($clusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type string $cluster_id - * Required. The logical name of the Redis cluster in the customer project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * @type \Google\Cloud\Redis\Cluster\V1\Cluster $cluster - * Required. The cluster that is to be created. - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The logical name of the Redis cluster in the customer project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The logical name of the Redis cluster in the customer project - * with the following restrictions: - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * * Must be unique within the customer project / location - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Required. The cluster that is to be created. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Redis\Cluster\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The cluster that is to be created. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 4; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php deleted file mode 100644 index 2c0e0e5e42fe..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig.php +++ /dev/null @@ -1,277 +0,0 @@ -google.cloud.redis.cluster.v1.CrossClusterReplicationConfig - */ -class CrossClusterReplicationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The role of the cluster in cross cluster replication. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole cluster_role = 1; - */ - protected $cluster_role = 0; - /** - * Details of the primary cluster that is used as the replication source for - * this secondary cluster. - * This field is only set for a secondary cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 2; - */ - protected $primary_cluster = null; - /** - * List of secondary clusters that are replicating from this primary cluster. - * This field is only set for a primary cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 3; - */ - private $secondary_clusters; - /** - * Output only. The last time cross cluster replication config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. An output only view of all the member clusters participating - * in the cross cluster replication. This view will be provided by every - * member cluster irrespective of its cluster role(primary or secondary). - * A primary cluster can provide information about all the secondary clusters - * replicating from it. However, a secondary cluster only knows about the - * primary cluster from which it is replicating. However, for scenarios, where - * the primary cluster is unavailable(e.g. regional outage), a GetCluster - * request can be sent to any other member cluster and this field will list - * all the member clusters participating in cross cluster replication. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $membership = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cluster_role - * The role of the cluster in cross cluster replication. - * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $primary_cluster - * Details of the primary cluster that is used as the replication source for - * this secondary cluster. - * This field is only set for a secondary cluster. - * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $secondary_clusters - * List of secondary clusters that are replicating from this primary cluster. - * This field is only set for a primary cluster. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time cross cluster replication config was updated. - * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership $membership - * Output only. An output only view of all the member clusters participating - * in the cross cluster replication. This view will be provided by every - * member cluster irrespective of its cluster role(primary or secondary). - * A primary cluster can provide information about all the secondary clusters - * replicating from it. However, a secondary cluster only knows about the - * primary cluster from which it is replicating. However, for scenarios, where - * the primary cluster is unavailable(e.g. regional outage), a GetCluster - * request can be sent to any other member cluster and this field will list - * all the member clusters participating in cross cluster replication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * The role of the cluster in cross cluster replication. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole cluster_role = 1; - * @return int - */ - public function getClusterRole() - { - return $this->cluster_role; - } - - /** - * The role of the cluster in cross cluster replication. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole cluster_role = 1; - * @param int $var - * @return $this - */ - public function setClusterRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\ClusterRole::class); - $this->cluster_role = $var; - - return $this; - } - - /** - * Details of the primary cluster that is used as the replication source for - * this secondary cluster. - * This field is only set for a secondary cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 2; - * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster|null - */ - public function getPrimaryCluster() - { - return $this->primary_cluster; - } - - public function hasPrimaryCluster() - { - return isset($this->primary_cluster); - } - - public function clearPrimaryCluster() - { - unset($this->primary_cluster); - } - - /** - * Details of the primary cluster that is used as the replication source for - * this secondary cluster. - * This field is only set for a secondary cluster. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 2; - * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $var - * @return $this - */ - public function setPrimaryCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); - $this->primary_cluster = $var; - - return $this; - } - - /** - * List of secondary clusters that are replicating from this primary cluster. - * This field is only set for a primary cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 3; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster> - */ - public function getSecondaryClusters() - { - return $this->secondary_clusters; - } - - /** - * List of secondary clusters that are replicating from this primary cluster. - * This field is only set for a primary cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 3; - * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $var - * @return $this - */ - public function setSecondaryClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); - $this->secondary_clusters = $arr; - - return $this; - } - - /** - * Output only. The last time cross cluster replication config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last time cross cluster replication config was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. An output only view of all the member clusters participating - * in the cross cluster replication. This view will be provided by every - * member cluster irrespective of its cluster role(primary or secondary). - * A primary cluster can provide information about all the secondary clusters - * replicating from it. However, a secondary cluster only knows about the - * primary cluster from which it is replicating. However, for scenarios, where - * the primary cluster is unavailable(e.g. regional outage), a GetCluster - * request can be sent to any other member cluster and this field will list - * all the member clusters participating in cross cluster replication. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership|null - */ - public function getMembership() - { - return $this->membership; - } - - public function hasMembership() - { - return isset($this->membership); - } - - public function clearMembership() - { - unset($this->membership); - } - - /** - * Output only. An output only view of all the member clusters participating - * in the cross cluster replication. This view will be provided by every - * member cluster irrespective of its cluster role(primary or secondary). - * A primary cluster can provide information about all the secondary clusters - * replicating from it. However, a secondary cluster only knows about the - * primary cluster from which it is replicating. However, for scenarios, where - * the primary cluster is unavailable(e.g. regional outage), a GetCluster - * request can be sent to any other member cluster and this field will list - * all the member clusters participating in cross cluster replication. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\Membership::class); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php deleted file mode 100644 index c38ca6bf024b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/ClusterRole.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.ClusterRole - */ -class ClusterRole -{ - /** - * Cluster role is not set. - * The behavior is equivalent to NONE. - * - * Generated from protobuf enum CLUSTER_ROLE_UNSPECIFIED = 0; - */ - const CLUSTER_ROLE_UNSPECIFIED = 0; - /** - * This cluster does not participate in cross cluster replication. It is an - * independent cluster and does not replicate to or from any other clusters. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * A cluster that allows both reads and writes. Any data written to this - * cluster is also replicated to the attached secondary clusters. - * - * Generated from protobuf enum PRIMARY = 2; - */ - const PRIMARY = 2; - /** - * A cluster that allows only reads and replicates data from a primary - * cluster. - * - * Generated from protobuf enum SECONDARY = 3; - */ - const SECONDARY = 3; - - private static $valueToName = [ - self::CLUSTER_ROLE_UNSPECIFIED => 'CLUSTER_ROLE_UNSPECIFIED', - self::NONE => 'NONE', - self::PRIMARY => 'PRIMARY', - self::SECONDARY => 'SECONDARY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php deleted file mode 100644 index 58134f4dc3f2..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/Membership.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.Membership - */ -class Membership extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The primary cluster that acts as the source of replication - * for the secondary clusters. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $primary_cluster = null; - /** - * Output only. The list of secondary clusters replicating from the primary - * cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $secondary_clusters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $primary_cluster - * Output only. The primary cluster that acts as the source of replication - * for the secondary clusters. - * @type \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $secondary_clusters - * Output only. The list of secondary clusters replicating from the primary - * cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The primary cluster that acts as the source of replication - * for the secondary clusters. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster|null - */ - public function getPrimaryCluster() - { - return $this->primary_cluster; - } - - public function hasPrimaryCluster() - { - return isset($this->primary_cluster); - } - - public function clearPrimaryCluster() - { - unset($this->primary_cluster); - } - - /** - * Output only. The primary cluster that acts as the source of replication - * for the secondary clusters. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster primary_cluster = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster $var - * @return $this - */ - public function setPrimaryCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); - $this->primary_cluster = $var; - - return $this; - } - - /** - * Output only. The list of secondary clusters replicating from the primary - * cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster> - */ - public function getSecondaryClusters() - { - return $this->secondary_clusters; - } - - /** - * Output only. The list of secondary clusters replicating from the primary - * cluster. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster secondary_clusters = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster[] $var - * @return $this - */ - public function setSecondaryClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\CrossClusterReplicationConfig\RemoteCluster::class); - $this->secondary_clusters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php deleted file mode 100644 index 4e84767fb1df..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/CrossClusterReplicationConfig/RemoteCluster.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.redis.cluster.v1.CrossClusterReplicationConfig.RemoteCluster - */ -class RemoteCluster extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource path of the remote cluster in - * the format: projects//locations//clusters/ - * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Output only. The unique identifier of the remote cluster. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * The full resource path of the remote cluster in - * the format: projects//locations//clusters/ - * @type string $uid - * Output only. The unique identifier of the remote cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * The full resource path of the remote cluster in - * the format: projects//locations//clusters/ - * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The full resource path of the remote cluster in - * the format: projects//locations//clusters/ - * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Output only. The unique identifier of the remote cluster. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The unique identifier of the remote cluster. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php deleted file mode 100644 index a3a0206982a5..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.redis.cluster.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * Please see {@see CloudRedisClusterClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\DeleteBackupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * @type string $request_id - * Optional. Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php deleted file mode 100644 index 4552fa1b6335..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DeleteClusterRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.redis.cluster.v1.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\DeleteClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 2; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php deleted file mode 100644 index 5610a9f4fea3..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/DiscoveryEndpoint.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.redis.cluster.v1.DiscoveryEndpoint - */ -class DiscoveryEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Address of the exposed Redis endpoint used by clients to - * connect to the service. The address could be either IP or hostname. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $address = ''; - /** - * Output only. The port number of the exposed Redis endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $port = 0; - /** - * Output only. Customer configuration for where the endpoint is created and - * accessed from. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * Output only. Address of the exposed Redis endpoint used by clients to - * connect to the service. The address could be either IP or hostname. - * @type int $port - * Output only. The port number of the exposed Redis endpoint. - * @type \Google\Cloud\Redis\Cluster\V1\PscConfig $psc_config - * Output only. Customer configuration for where the endpoint is created and - * accessed from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Address of the exposed Redis endpoint used by clients to - * connect to the service. The address could be either IP or hostname. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Output only. Address of the exposed Redis endpoint used by clients to - * connect to the service. The address could be either IP or hostname. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Output only. The port number of the exposed Redis endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPort() - { - return $this->port; - } - - /** - * Output only. The port number of the exposed Redis endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->port = $var; - - return $this; - } - - /** - * Output only. Customer configuration for where the endpoint is created and - * accessed from. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Redis\Cluster\V1\PscConfig|null - */ - public function getPscConfig() - { - return $this->psc_config; - } - - public function hasPscConfig() - { - return isset($this->psc_config); - } - - public function clearPscConfig() - { - unset($this->psc_config); - } - - /** - * Output only. Customer configuration for where the endpoint is created and - * accessed from. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConfig psc_config = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Redis\Cluster\V1\PscConfig $var - * @return $this - */ - public function setPscConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\PscConfig::class); - $this->psc_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php deleted file mode 100644 index 34d6ff002e2d..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.redis.cluster.v1.EncryptionInfo - */ -class EncryptionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Type of encryption. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.Type encryption_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_type = 0; - /** - * Output only. KMS key versions that are being used to protect the data - * at-rest. - * - * Generated from protobuf field repeated string kms_key_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - private $kms_key_versions; - /** - * Output only. The state of the primary version of the KMS key perceived by - * the system. This field is not populated in backups. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState kms_key_primary_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kms_key_primary_state = 0; - /** - * Output only. The most recent time when the encryption info was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $encryption_type - * Output only. Type of encryption. - * @type string[] $kms_key_versions - * Output only. KMS key versions that are being used to protect the data - * at-rest. - * @type int $kms_key_primary_state - * Output only. The state of the primary version of the KMS key perceived by - * the system. This field is not populated in backups. - * @type \Google\Protobuf\Timestamp $last_update_time - * Output only. The most recent time when the encryption info was updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Type of encryption. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.Type encryption_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEncryptionType() - { - return $this->encryption_type; - } - - /** - * Output only. Type of encryption. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.Type encryption_type = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEncryptionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo\Type::class); - $this->encryption_type = $var; - - return $this; - } - - /** - * Output only. KMS key versions that are being used to protect the data - * at-rest. - * - * Generated from protobuf field repeated string kms_key_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getKmsKeyVersions() - { - return $this->kms_key_versions; - } - - /** - * Output only. KMS key versions that are being used to protect the data - * at-rest. - * - * Generated from protobuf field repeated string kms_key_versions = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setKmsKeyVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->kms_key_versions = $arr; - - return $this; - } - - /** - * Output only. The state of the primary version of the KMS key perceived by - * the system. This field is not populated in backups. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState kms_key_primary_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getKmsKeyPrimaryState() - { - return $this->kms_key_primary_state; - } - - /** - * Output only. The state of the primary version of the KMS key perceived by - * the system. This field is not populated in backups. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState kms_key_primary_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setKmsKeyPrimaryState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\EncryptionInfo\KmsKeyState::class); - $this->kms_key_primary_state = $var; - - return $this; - } - - /** - * Output only. The most recent time when the encryption info was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Output only. The most recent time when the encryption info was updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php deleted file mode 100644 index 3682440ad78e..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/KmsKeyState.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.redis.cluster.v1.EncryptionInfo.KmsKeyState - */ -class KmsKeyState -{ - /** - * The default value. This value is unused. - * - * Generated from protobuf enum KMS_KEY_STATE_UNSPECIFIED = 0; - */ - const KMS_KEY_STATE_UNSPECIFIED = 0; - /** - * The KMS key is enabled and correctly configured. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * Permission denied on the KMS key. - * - * Generated from protobuf enum PERMISSION_DENIED = 2; - */ - const PERMISSION_DENIED = 2; - /** - * The KMS key is disabled. - * - * Generated from protobuf enum DISABLED = 3; - */ - const DISABLED = 3; - /** - * The KMS key is destroyed. - * - * Generated from protobuf enum DESTROYED = 4; - */ - const DESTROYED = 4; - /** - * The KMS key is scheduled to be destroyed. - * - * Generated from protobuf enum DESTROY_SCHEDULED = 5; - */ - const DESTROY_SCHEDULED = 5; - /** - * The EKM key is unreachable. - * - * Generated from protobuf enum EKM_KEY_UNREACHABLE_DETECTED = 6; - */ - const EKM_KEY_UNREACHABLE_DETECTED = 6; - /** - * Billing is disabled for the project. - * - * Generated from protobuf enum BILLING_DISABLED = 7; - */ - const BILLING_DISABLED = 7; - /** - * All other unknown failures. - * - * Generated from protobuf enum UNKNOWN_FAILURE = 8; - */ - const UNKNOWN_FAILURE = 8; - - private static $valueToName = [ - self::KMS_KEY_STATE_UNSPECIFIED => 'KMS_KEY_STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::DISABLED => 'DISABLED', - self::DESTROYED => 'DESTROYED', - self::DESTROY_SCHEDULED => 'DESTROY_SCHEDULED', - self::EKM_KEY_UNREACHABLE_DETECTED => 'EKM_KEY_UNREACHABLE_DETECTED', - self::BILLING_DISABLED => 'BILLING_DISABLED', - self::UNKNOWN_FAILURE => 'UNKNOWN_FAILURE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php deleted file mode 100644 index 550151bb958b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/EncryptionInfo/Type.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.redis.cluster.v1.EncryptionInfo.Type - */ -class Type -{ - /** - * Encryption type not specified. Defaults to GOOGLE_DEFAULT_ENCRYPTION. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The data is encrypted at rest with a key that is fully managed by Google. - * No key version will be populated. This is the default state. - * - * Generated from protobuf enum GOOGLE_DEFAULT_ENCRYPTION = 1; - */ - const GOOGLE_DEFAULT_ENCRYPTION = 1; - /** - * The data is encrypted at rest with a key that is managed by the customer. - * KMS key versions will be populated. - * - * Generated from protobuf enum CUSTOMER_MANAGED_ENCRYPTION = 2; - */ - const CUSTOMER_MANAGED_ENCRYPTION = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::GOOGLE_DEFAULT_ENCRYPTION => 'GOOGLE_DEFAULT_ENCRYPTION', - self::CUSTOMER_MANAGED_ENCRYPTION => 'CUSTOMER_MANAGED_ENCRYPTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php deleted file mode 100644 index 42c93ee16d1b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ExportBackupRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.redis.cluster.v1.ExportBackupRequest - */ -class ExportBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $destination; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_bucket - * Google Cloud Storage bucket, like "my-bucket". - * @type string $name - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage bucket, like "my-bucket". - * - * Generated from protobuf field string gcs_bucket = 3; - * @return string - */ - public function getGcsBucket() - { - return $this->readOneof(3); - } - - public function hasGcsBucket() - { - return $this->hasOneof(3); - } - - /** - * Google Cloud Storage bucket, like "my-bucket". - * - * Generated from protobuf field string gcs_bucket = 3; - * @param string $var - * @return $this - */ - public function setGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getDestination() - { - return $this->whichOneof("destination"); - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php deleted file mode 100644 index 748793294ac4..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupCollectionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.redis.cluster.v1.GetBackupCollectionRequest - */ -class GetBackupCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Redis backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::backupCollectionName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\GetBackupCollectionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a GCP region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php deleted file mode 100644 index b75c5690e12c..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.redis.cluster.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * Please see {@see CloudRedisClusterClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\GetBackupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php deleted file mode 100644 index 43114cc06304..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterCertificateAuthorityRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.redis.cluster.v1.GetClusterCertificateAuthorityRequest - */ -class GetClusterCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis cluster certificate authority resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Redis cluster certificate authority resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::certificateAuthorityName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\GetClusterCertificateAuthorityRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis cluster certificate authority resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` - * where `location_id` refers to a GCP region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis cluster certificate authority resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis cluster certificate authority resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php deleted file mode 100644 index 832cadbab3d5..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/GetClusterRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.redis.cluster.v1.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\GetClusterRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis cluster resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php deleted file mode 100644 index b9fd5cac61ff..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.redis.cluster.v1.ListBackupCollectionsRequest - */ -class ListBackupCollectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the backupCollection location using the - * form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the backupCollection location using the - * form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the backupCollection location using the - * form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * @type string $page_token - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the backupCollection location using the - * form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the backupCollection location using the - * form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupCollectionsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php deleted file mode 100644 index 180a17efe9e6..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupCollectionsResponse.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.redis.cluster.v1.ListBackupCollectionsResponse - */ -class ListBackupCollectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backupCollections in the project. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * backupCollection entry is included in the response with the `name` field - * set to a value of the form - * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListBackupCollections". - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupCollection backup_collections = 1; - */ - private $backup_collections; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\BackupCollection[] $backup_collections - * A list of backupCollections in the project. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * backupCollection entry is included in the response with the `name` field - * set to a value of the form - * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListBackupCollections". - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * A list of backupCollections in the project. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * backupCollection entry is included in the response with the `name` field - * set to a value of the form - * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListBackupCollections". - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupCollection backup_collections = 1; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\BackupCollection> - */ - public function getBackupCollections() - { - return $this->backup_collections; - } - - /** - * A list of backupCollections in the project. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * backupCollection entry is included in the response with the `name` field - * set to a value of the form - * `projects/{project_id}/locations/{location_id}/backupCollections/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListBackupCollections". - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.BackupCollection backup_collections = 1; - * @param \Google\Cloud\Redis\Cluster\V1\BackupCollection[] $var - * @return $this - */ - public function setBackupCollections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\BackupCollection::class); - $this->backup_collections = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php deleted file mode 100644 index 7186b9daf83a..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.redis.cluster.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the backupCollection using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the backupCollection using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * Please see {@see CloudRedisClusterClient::backupCollectionName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\ListBackupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the backupCollection using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * @type int $page_size - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * @type string $page_token - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the backupCollection using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the backupCollection using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListBackupsResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. The `next_page_token` value returned from a previous - * [ListBackupCollections] request, if any. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php deleted file mode 100644 index 860b3fe48698..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListBackupsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.redis.cluster.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Backup backups = 1; - */ - private $backups; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Backups that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\Backup[] $backups - * A list of backups in the project. - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type string[] $unreachable - * Backups that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Backup backups = 1; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\Backup> - */ - public function getBackups() - { - return $this->backups; - } - - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Backup backups = 1; - * @param \Google\Cloud\Redis\Cluster\V1\Backup[] $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Backups that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Backups that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php deleted file mode 100644 index 7ae9f3595c93..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.redis.cluster.v1.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The `next_page_token` value returned from a previous - * [ListClusters][CloudRedis.ListClusters] request, if any. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Redis\Cluster\V1\ListClustersRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * @type int $page_size - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * @type string $page_token - * The `next_page_token` value returned from a previous - * [ListClusters][CloudRedis.ListClusters] request, if any. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the cluster location using the form: - * `projects/{project_id}/locations/{location_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of items to return. - * If not specified, a default value of 1000 will be used by the service. - * Regardless of the page_size value, the response may include a partial list - * and a caller should only rely on response's - * [`next_page_token`][google.cloud.redis.cluster.v1.ListClustersResponse.next_page_token] - * to determine if there are more clusters left to be queried. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous - * [ListClusters][CloudRedis.ListClusters] request, if any. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous - * [ListClusters][CloudRedis.ListClusters] request, if any. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php deleted file mode 100644 index 34f8e14aa2b0..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ListClustersResponse.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.redis.cluster.v1.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of Redis clusters in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * Redis entry is included in the response with the `name` field set to a - * value of the form - * `projects/{project_id}/locations/{location_id}/clusters/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListClusters". - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; - */ - private $clusters; - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Redis\Cluster\V1\Cluster[] $clusters - * A list of Redis clusters in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * Redis entry is included in the response with the `name` field set to a - * value of the form - * `projects/{project_id}/locations/{location_id}/clusters/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListClusters". - * @type string $next_page_token - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * A list of Redis clusters in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * Redis entry is included in the response with the `name` field set to a - * value of the form - * `projects/{project_id}/locations/{location_id}/clusters/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListClusters". - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; - * @return RepeatedField<\Google\Cloud\Redis\Cluster\V1\Cluster> - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * A list of Redis clusters in the project in the specified location, - * or across all locations. - * If the `location_id` in the parent field of the request is "-", all regions - * available to the project are queried, and the results aggregated. - * If in such an aggregated query a location is unavailable, a placeholder - * Redis entry is included in the response with the `name` field set to a - * value of the form - * `projects/{project_id}/locations/{location_id}/clusters/`- and the - * `status` field set to ERROR and `status_message` field set to "location not - * available for ListClusters". - * - * Generated from protobuf field repeated .google.cloud.redis.cluster.v1.Cluster clusters = 1; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster[] $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Redis\Cluster\V1\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Token to retrieve the next page of results, or empty if there are no more - * results in the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php deleted file mode 100644 index 777833d4e42e..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/NodeType.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.redis.cluster.v1.NodeType - */ -class NodeType -{ - /** - * Node type unspecified - * - * Generated from protobuf enum NODE_TYPE_UNSPECIFIED = 0; - */ - const NODE_TYPE_UNSPECIFIED = 0; - /** - * Redis shared core nano node_type. - * - * Generated from protobuf enum REDIS_SHARED_CORE_NANO = 1; - */ - const REDIS_SHARED_CORE_NANO = 1; - /** - * Redis highmem medium node_type. - * - * Generated from protobuf enum REDIS_HIGHMEM_MEDIUM = 2; - */ - const REDIS_HIGHMEM_MEDIUM = 2; - /** - * Redis highmem xlarge node_type. - * - * Generated from protobuf enum REDIS_HIGHMEM_XLARGE = 3; - */ - const REDIS_HIGHMEM_XLARGE = 3; - /** - * Redis standard small node_type. - * - * Generated from protobuf enum REDIS_STANDARD_SMALL = 4; - */ - const REDIS_STANDARD_SMALL = 4; - - private static $valueToName = [ - self::NODE_TYPE_UNSPECIFIED => 'NODE_TYPE_UNSPECIFIED', - self::REDIS_SHARED_CORE_NANO => 'REDIS_SHARED_CORE_NANO', - self::REDIS_HIGHMEM_MEDIUM => 'REDIS_HIGHMEM_MEDIUM', - self::REDIS_HIGHMEM_XLARGE => 'REDIS_HIGHMEM_XLARGE', - self::REDIS_STANDARD_SMALL => 'REDIS_STANDARD_SMALL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php deleted file mode 100644 index 76be7cd32a45..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.redis.cluster.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php deleted file mode 100644 index 531147ea136f..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscAutoConnection.php +++ /dev/null @@ -1,346 +0,0 @@ -google.cloud.redis.cluster.v1.PscAutoConnection - */ -class PscAutoConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The PSC connection id of the forwarding rule connected to the - * service attachment. - * - * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_id = ''; - /** - * Output only. The IP allocated on the consumer network for the PSC - * forwarding rule. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $address = ''; - /** - * Output only. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $forwarding_rule = ''; - /** - * Required. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Output only. The service attachment which is the target of the PSC - * connection, in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * - * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $service_attachment = ''; - /** - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * Please use Private Service Connect APIs for the latest status. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_status = 0; - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $psc_connection_id - * Output only. The PSC connection id of the forwarding rule connected to the - * service attachment. - * @type string $address - * Output only. The IP allocated on the consumer network for the PSC - * forwarding rule. - * @type string $forwarding_rule - * Output only. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * @type string $project_id - * Required. The consumer project_id where the forwarding rule is created - * from. - * @type string $network - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * @type string $service_attachment - * Output only. The service attachment which is the target of the PSC - * connection, in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * @type int $psc_connection_status - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * Please use Private Service Connect APIs for the latest status. - * @type int $connection_type - * Output only. Type of the PSC connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The PSC connection id of the forwarding rule connected to the - * service attachment. - * - * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPscConnectionId() - { - return $this->psc_connection_id; - } - - /** - * Output only. The PSC connection id of the forwarding rule connected to the - * service attachment. - * - * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPscConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->psc_connection_id = $var; - - return $this; - } - - /** - * Output only. The IP allocated on the consumer network for the PSC - * forwarding rule. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Output only. The IP allocated on the consumer network for the PSC - * forwarding rule. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Output only. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getForwardingRule() - { - return $this->forwarding_rule; - } - - /** - * Output only. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->forwarding_rule = $var; - - return $this; - } - - /** - * Required. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Output only. The service attachment which is the target of the PSC - * connection, in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * - * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAttachment() - { - return $this->service_attachment; - } - - /** - * Output only. The service attachment which is the target of the PSC - * connection, in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * - * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceAttachment($var) - { - GPBUtil::checkString($var, True); - $this->service_attachment = $var; - - return $this; - } - - /** - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * Please use Private Service Connect APIs for the latest status. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPscConnectionStatus() - { - return $this->psc_connection_status; - } - - /** - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * Please use Private Service Connect APIs for the latest status. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPscConnectionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\PscConnectionStatus::class); - $this->psc_connection_status = $var; - - return $this; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getConnectionType() - { - return $this->connection_type; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php deleted file mode 100644 index b727fe1f2dca..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConfig.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.redis.cluster.v1.PscConfig - */ -class PscConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The network where the IP address of the discovery endpoint will - * be reserved, in the form of - * projects/{network_project}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Required. The network where the IP address of the discovery endpoint will - * be reserved, in the form of - * projects/{network_project}/global/networks/{network_id}. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The network where the IP address of the discovery endpoint will - * be reserved, in the form of - * projects/{network_project}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The network where the IP address of the discovery endpoint will - * be reserved, in the form of - * projects/{network_project}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php deleted file mode 100644 index afda810affb7..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnection.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.redis.cluster.v1.PscConnection - */ -class PscConnection extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The PSC connection id of the forwarding rule connected to the - * service attachment. - * - * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $psc_connection_id = ''; - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - */ - protected $address = ''; - /** - * Required. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $forwarding_rule = ''; - /** - * Optional. Project ID of the consumer project where the forwarding rule is - * created in. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $project_id = ''; - /** - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $network = ''; - /** - * Required. The service attachment which is the target of the PSC connection, - * in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * - * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $service_attachment = ''; - /** - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * To get the latest status of a PSC connection, follow - * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_status = 0; - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $psc_connection_id - * Required. The PSC connection id of the forwarding rule connected to the - * service attachment. - * @type string $address - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * @type string $forwarding_rule - * Required. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * @type string $project_id - * Optional. Project ID of the consumer project where the forwarding rule is - * created in. - * @type string $network - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * @type string $service_attachment - * Required. The service attachment which is the target of the PSC connection, - * in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * @type int $psc_connection_status - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * To get the latest status of a PSC connection, follow - * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. - * @type int $connection_type - * Output only. Type of the PSC connection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. The PSC connection id of the forwarding rule connected to the - * service attachment. - * - * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPscConnectionId() - { - return $this->psc_connection_id; - } - - /** - * Required. The PSC connection id of the forwarding rule connected to the - * service attachment. - * - * Generated from protobuf field string psc_connection_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPscConnectionId($var) - { - GPBUtil::checkString($var, True); - $this->psc_connection_id = $var; - - return $this; - } - - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setAddress($var) - { - GPBUtil::checkString($var, True); - $this->address = $var; - - return $this; - } - - /** - * Required. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getForwardingRule() - { - return $this->forwarding_rule; - } - - /** - * Required. The URI of the consumer side forwarding rule. - * Example: - * projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setForwardingRule($var) - { - GPBUtil::checkString($var, True); - $this->forwarding_rule = $var; - - return $this; - } - - /** - * Optional. Project ID of the consumer project where the forwarding rule is - * created in. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Optional. Project ID of the consumer project where the forwarding rule is - * created in. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Required. The consumer network where the IP address resides, in the form of - * projects/{project_id}/global/networks/{network_id}. - * - * Generated from protobuf field string network = 5 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - - /** - * Required. The service attachment which is the target of the PSC connection, - * in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * - * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getServiceAttachment() - { - return $this->service_attachment; - } - - /** - * Required. The service attachment which is the target of the PSC connection, - * in the form of - * projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}. - * - * Generated from protobuf field string service_attachment = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setServiceAttachment($var) - { - GPBUtil::checkString($var, True); - $this->service_attachment = $var; - - return $this; - } - - /** - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * To get the latest status of a PSC connection, follow - * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPscConnectionStatus() - { - return $this->psc_connection_status; - } - - /** - * Output only. The status of the PSC connection. - * Please note that this value is updated periodically. - * To get the latest status of a PSC connection, follow - * https://cloud.google.com/vpc/docs/configure-private-service-connect-services#endpoint-details. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.PscConnectionStatus psc_connection_status = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPscConnectionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\PscConnectionStatus::class); - $this->psc_connection_status = $var; - - return $this; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getConnectionType() - { - return $this->connection_type; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php deleted file mode 100644 index 952a818b60c9..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscConnectionStatus.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.redis.cluster.v1.PscConnectionStatus - */ -class PscConnectionStatus -{ - /** - * PSC connection status is not specified. - * - * Generated from protobuf enum PSC_CONNECTION_STATUS_UNSPECIFIED = 0; - */ - const PSC_CONNECTION_STATUS_UNSPECIFIED = 0; - /** - * The connection is active - * - * Generated from protobuf enum PSC_CONNECTION_STATUS_ACTIVE = 1; - */ - const PSC_CONNECTION_STATUS_ACTIVE = 1; - /** - * Connection not found - * - * Generated from protobuf enum PSC_CONNECTION_STATUS_NOT_FOUND = 2; - */ - const PSC_CONNECTION_STATUS_NOT_FOUND = 2; - - private static $valueToName = [ - self::PSC_CONNECTION_STATUS_UNSPECIFIED => 'PSC_CONNECTION_STATUS_UNSPECIFIED', - self::PSC_CONNECTION_STATUS_ACTIVE => 'PSC_CONNECTION_STATUS_ACTIVE', - self::PSC_CONNECTION_STATUS_NOT_FOUND => 'PSC_CONNECTION_STATUS_NOT_FOUND', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php deleted file mode 100644 index f3941aae4b7f..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/PscServiceAttachment.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.redis.cluster.v1.PscServiceAttachment - */ -class PscServiceAttachment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Service attachment URI which your self-created PscConnection - * should use as target - * - * Generated from protobuf field string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_attachment = ''; - /** - * Output only. Type of a PSC connection targeting this service attachment. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service_attachment - * Output only. Service attachment URI which your self-created PscConnection - * should use as target - * @type int $connection_type - * Output only. Type of a PSC connection targeting this service attachment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Service attachment URI which your self-created PscConnection - * should use as target - * - * Generated from protobuf field string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAttachment() - { - return $this->service_attachment; - } - - /** - * Output only. Service attachment URI which your self-created PscConnection - * should use as target - * - * Generated from protobuf field string service_attachment = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAttachment($var) - { - GPBUtil::checkString($var, True); - $this->service_attachment = $var; - - return $this; - } - - /** - * Output only. Type of a PSC connection targeting this service attachment. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getConnectionType() - { - return $this->connection_type; - } - - /** - * Output only. Type of a PSC connection targeting this service attachment. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ConnectionType connection_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php deleted file mode 100644 index 367052fd9c76..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest - */ -class RescheduleClusterMaintenanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Redis Cluster instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as - * well. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reschedule_type = 0; - /** - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $schedule_time = null; - - /** - * @param string $name Required. Redis Cluster instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. Please see - * {@see CloudRedisClusterClient::clusterName()} for help formatting this field. - * @param int $rescheduleType Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as - * well. - * For allowed values, use constants defined on {@see \Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest\RescheduleType} - * @param \Google\Protobuf\Timestamp $scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * @return \Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest - * - * @experimental - */ - public static function build(string $name, int $rescheduleType, \Google\Protobuf\Timestamp $scheduleTime): self - { - return (new self()) - ->setName($name) - ->setRescheduleType($rescheduleType) - ->setScheduleTime($scheduleTime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Redis Cluster instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * @type int $reschedule_type - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as - * well. - * @type \Google\Protobuf\Timestamp $schedule_time - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Redis Cluster instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Redis Cluster instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` - * where `location_id` refers to a GCP region. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as - * well. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getRescheduleType() - { - return $this->reschedule_type; - } - - /** - * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as - * well. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setRescheduleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\RescheduleClusterMaintenanceRequest\RescheduleType::class); - $this->reschedule_type = $var; - - return $this; - } - - /** - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getScheduleTime() - { - return $this->schedule_time; - } - - public function hasScheduleTime() - { - return isset($this->schedule_time); - } - - public function clearScheduleTime() - { - unset($this->schedule_time); - } - - /** - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for - * example `2012-11-15T16:19:00.094Z`. - * - * Generated from protobuf field .google.protobuf.Timestamp schedule_time = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setScheduleTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->schedule_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php deleted file mode 100644 index d9f768cc749f..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/RescheduleClusterMaintenanceRequest/RescheduleType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.redis.cluster.v1.RescheduleClusterMaintenanceRequest.RescheduleType - */ -class RescheduleType -{ - /** - * Not set. - * - * Generated from protobuf enum RESCHEDULE_TYPE_UNSPECIFIED = 0; - */ - const RESCHEDULE_TYPE_UNSPECIFIED = 0; - /** - * If the user wants to schedule the maintenance to happen now. - * - * Generated from protobuf enum IMMEDIATE = 1; - */ - const IMMEDIATE = 1; - /** - * If the user wants to reschedule the maintenance to a specific time. - * - * Generated from protobuf enum SPECIFIC_TIME = 3; - */ - const SPECIFIC_TIME = 3; - - private static $valueToName = [ - self::RESCHEDULE_TYPE_UNSPECIFIED => 'RESCHEDULE_TYPE_UNSPECIFIED', - self::IMMEDIATE => 'IMMEDIATE', - self::SPECIFIC_TIME => 'SPECIFIC_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php deleted file mode 100644 index 70baeb4693b6..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/TransitEncryptionMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.redis.cluster.v1.TransitEncryptionMode - */ -class TransitEncryptionMode -{ - /** - * In-transit encryption not set. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; - */ - const TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; - /** - * In-transit encryption disabled. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_DISABLED = 1; - */ - const TRANSIT_ENCRYPTION_MODE_DISABLED = 1; - /** - * Use server managed encryption for in-transit encryption. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; - */ - const TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION = 2; - - private static $valueToName = [ - self::TRANSIT_ENCRYPTION_MODE_UNSPECIFIED => 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', - self::TRANSIT_ENCRYPTION_MODE_DISABLED => 'TRANSIT_ENCRYPTION_MODE_DISABLED', - self::TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION => 'TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php deleted file mode 100644 index 810f3910d81c..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/UpdateClusterRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.cloud.redis.cluster.v1.UpdateClusterRequest - */ -class UpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: - * * `size_gb` - * * `replica_count` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. Update description. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Redis\Cluster\V1\Cluster $cluster Required. Update description. - * Only fields specified in update_mask are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: - * - * * `size_gb` - * * `replica_count` - * - * @return \Google\Cloud\Redis\Cluster\V1\UpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Redis\Cluster\V1\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: - * * `size_gb` - * * `replica_count` - * @type \Google\Cloud\Redis\Cluster\V1\Cluster $cluster - * Required. Update description. - * Only fields specified in update_mask are updated. - * @type string $request_id - * Idempotent request UUID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: - * * `size_gb` - * * `replica_count` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * Required. Mask of fields to update. At least one path must be supplied in - * this field. The elements of the repeated paths field may only include these - * fields from [Cluster][google.cloud.redis.cluster.v1.Cluster]: - * * `size_gb` - * * `replica_count` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. Update description. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Redis\Cluster\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. Update description. - * Only fields specified in update_mask are updated. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Redis\Cluster\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Redis\Cluster\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Idempotent request UUID. - * - * Generated from protobuf field string request_id = 3; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php deleted file mode 100644 index 12ea86e5b523..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.redis.cluster.v1.ZoneDistributionConfig - */ -class ZoneDistributionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not - * specified. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - /** - * Optional. When SINGLE ZONE distribution is selected, zone field would be - * used to allocate all resources in that zone. This is not applicable to - * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $mode - * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not - * specified. - * @type string $zone - * Optional. When SINGLE ZONE distribution is selected, zone field would be - * used to allocate all resources in that zone. This is not applicable to - * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Redis\Cluster\V1\CloudRedisCluster::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not - * specified. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The mode of zone distribution. Defaults to MULTI_ZONE, when not - * specified. - * - * Generated from protobuf field .google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Redis\Cluster\V1\ZoneDistributionConfig\ZoneDistributionMode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. When SINGLE ZONE distribution is selected, zone field would be - * used to allocate all resources in that zone. This is not applicable to - * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Optional. When SINGLE ZONE distribution is selected, zone field would be - * used to allocate all resources in that zone. This is not applicable to - * MULTI_ZONE, and would be ignored for MULTI_ZONE clusters. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setZone($var) - { - GPBUtil::checkString($var, True); - $this->zone = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php b/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php deleted file mode 100644 index a96e509c6139..000000000000 --- a/owl-bot-staging/RedisCluster/v1/proto/src/Google/Cloud/Redis/Cluster/V1/ZoneDistributionConfig/ZoneDistributionMode.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.redis.cluster.v1.ZoneDistributionConfig.ZoneDistributionMode - */ -class ZoneDistributionMode -{ - /** - * Not Set. Default: MULTI_ZONE - * - * Generated from protobuf enum ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; - */ - const ZONE_DISTRIBUTION_MODE_UNSPECIFIED = 0; - /** - * Distribute all resources across 3 zones picked at random, within the - * region. - * - * Generated from protobuf enum MULTI_ZONE = 1; - */ - const MULTI_ZONE = 1; - /** - * Distribute all resources in a single zone. The zone field must be - * specified, when this mode is selected. - * - * Generated from protobuf enum SINGLE_ZONE = 2; - */ - const SINGLE_ZONE = 2; - - private static $valueToName = [ - self::ZONE_DISTRIBUTION_MODE_UNSPECIFIED => 'ZONE_DISTRIBUTION_MODE_UNSPECIFIED', - self::MULTI_ZONE => 'MULTI_ZONE', - self::SINGLE_ZONE => 'SINGLE_ZONE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php deleted file mode 100644 index 309a591825ce..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/backup_cluster.php +++ /dev/null @@ -1,96 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->backupCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - backup_cluster_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_BackupCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php deleted file mode 100644 index 31900d9bac8b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/create_cluster.php +++ /dev/null @@ -1,112 +0,0 @@ -setName($clusterName); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->createCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CloudRedisClusterClient::locationName('[PROJECT]', '[LOCATION]'); - $clusterId = '[CLUSTER_ID]'; - $clusterName = '[NAME]'; - - create_cluster_sample($formattedParent, $clusterId, $clusterName); -} -// [END redis_v1_generated_CloudRedisCluster_CreateCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php deleted file mode 100644 index e472a25c4045..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_backup.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->deleteBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]', - '[BACKUP]' - ); - - delete_backup_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_DeleteBackup_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php deleted file mode 100644 index b7c300c9a618..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/delete_cluster.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->deleteCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - delete_cluster_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_DeleteCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php deleted file mode 100644 index d25b00363646..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/export_backup.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->exportBackup($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]', - '[BACKUP]' - ); - - export_backup_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_ExportBackup_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php deleted file mode 100644 index 84998ce916bd..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $cloudRedisClusterClient->getBackup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]', - '[BACKUP]' - ); - - get_backup_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_GetBackup_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php deleted file mode 100644 index fe5956c888c7..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_backup_collection.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupCollection $response */ - $response = $cloudRedisClusterClient->getBackupCollection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::backupCollectionName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]' - ); - - get_backup_collection_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_GetBackupCollection_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php deleted file mode 100644 index b451cd7de969..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $cloudRedisClusterClient->getCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - get_cluster_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_GetCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php deleted file mode 100644 index bd2bf8b2fccf..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CertificateAuthority $response */ - $response = $cloudRedisClusterClient->getClusterCertificateAuthority($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::certificateAuthorityName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - - get_cluster_certificate_authority_sample($formattedName); -} -// [END redis_v1_generated_CloudRedisCluster_GetClusterCertificateAuthority_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php deleted file mode 100644 index fda219326345..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END redis_v1_generated_CloudRedisCluster_GetLocation_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php deleted file mode 100644 index cd3982954baf..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backup_collections.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudRedisClusterClient->listBackupCollections($request); - - /** @var BackupCollection $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CloudRedisClusterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backup_collections_sample($formattedParent); -} -// [END redis_v1_generated_CloudRedisCluster_ListBackupCollections_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php deleted file mode 100644 index fcce6e5a4588..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_backups.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudRedisClusterClient->listBackups($request); - - /** @var Backup $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CloudRedisClusterClient::backupCollectionName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]' - ); - - list_backups_sample($formattedParent); -} -// [END redis_v1_generated_CloudRedisCluster_ListBackups_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php deleted file mode 100644 index 225f59223d37..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_clusters.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $cloudRedisClusterClient->listClusters($request); - - /** @var Cluster $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = CloudRedisClusterClient::locationName('[PROJECT]', '[LOCATION]'); - - list_clusters_sample($formattedParent); -} -// [END redis_v1_generated_CloudRedisCluster_ListClusters_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php deleted file mode 100644 index 63fcb648cf0e..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END redis_v1_generated_CloudRedisCluster_ListLocations_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php deleted file mode 100644 index 926269be4fd8..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setRescheduleType($rescheduleType); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->rescheduleClusterMaintenance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = CloudRedisClusterClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - - reschedule_cluster_maintenance_sample($formattedName, $rescheduleType); -} -// [END redis_v1_generated_CloudRedisCluster_RescheduleClusterMaintenance_sync] diff --git a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php b/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php deleted file mode 100644 index 1c8eb29f1c3a..000000000000 --- a/owl-bot-staging/RedisCluster/v1/samples/V1/CloudRedisClusterClient/update_cluster.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($clusterName); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $cloudRedisClusterClient->updateCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample 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, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $clusterName = '[NAME]'; - - update_cluster_sample($clusterName); -} -// [END redis_v1_generated_CloudRedisCluster_UpdateCluster_sync] diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php b/owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php deleted file mode 100644 index 8f07c540f6bf..000000000000 --- a/owl-bot-staging/RedisCluster/v1/src/V1/Client/CloudRedisClusterClient.php +++ /dev/null @@ -1,1041 +0,0 @@ - backupClusterAsync(BackupClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportBackupAsync(ExportBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupCollectionAsync(GetBackupCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterCertificateAuthorityAsync(GetClusterCertificateAuthorityRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSharedRegionalCertificateAuthorityAsync(GetSharedRegionalCertificateAuthorityRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupCollectionsAsync(ListBackupCollectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface rescheduleClusterMaintenanceAsync(RescheduleClusterMaintenanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class CloudRedisClusterClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.redis.cluster.v1.CloudRedisCluster'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'redis.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'redis.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/cloud_redis_cluster_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/cloud_redis_cluster_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/cloud_redis_cluster_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/cloud_redis_cluster_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backupCollection - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backupCollection, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup_collection' => $backupCollection, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backup_collection resource. - * - * @param string $project - * @param string $location - * @param string $backupCollection - * - * @return string The formatted backup_collection resource. - */ - public static function backupCollectionName(string $project, string $location, string $backupCollection): string - { - return self::getPathTemplate('backupCollection')->render([ - 'project' => $project, - 'location' => $location, - 'backup_collection' => $backupCollection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a ca_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $caPool - * - * @return string The formatted ca_pool resource. - */ - public static function caPoolName(string $project, string $location, string $caPool): string - { - return self::getPathTemplate('caPool')->render([ - 'project' => $project, - 'location' => $location, - 'ca_pool' => $caPool, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * certificate_authority resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted certificate_authority resource. - */ - public static function certificateAuthorityName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('certificateAuthority')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * crypto_key_version resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted crypto_key_version resource. - */ - public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string - { - return self::getPathTemplate('cryptoKeyVersion')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - 'crypto_key_version' => $cryptoKeyVersion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * forwarding_rule resource. - * - * @param string $project - * @param string $region - * @param string $forwardingRule - * - * @return string The formatted forwarding_rule resource. - */ - public static function forwardingRuleName(string $project, string $region, string $forwardingRule): string - { - return self::getPathTemplate('forwardingRule')->render([ - 'project' => $project, - 'region' => $region, - 'forwarding_rule' => $forwardingRule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a network - * resource. - * - * @param string $project - * @param string $network - * - * @return string The formatted network resource. - */ - public static function networkName(string $project, string $network): string - { - return self::getPathTemplate('network')->render([ - 'project' => $project, - 'network' => $network, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * service_attachment resource. - * - * @param string $project - * @param string $region - * @param string $serviceAttachment - * - * @return string The formatted service_attachment resource. - */ - public static function serviceAttachmentName(string $project, string $region, string $serviceAttachment): string - { - return self::getPathTemplate('serviceAttachment')->render([ - 'project' => $project, - 'region' => $region, - 'service_attachment' => $serviceAttachment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * shared_regional_certificate_authority resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted shared_regional_certificate_authority resource. - */ - public static function sharedRegionalCertificateAuthorityName(string $project, string $location): string - { - return self::getPathTemplate('sharedRegionalCertificateAuthority')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup} - * - backupCollection: projects/{project}/locations/{location}/backupCollections/{backup_collection} - * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} - * - certificateAuthority: projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} - * - forwardingRule: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - location: projects/{project}/locations/{location} - * - network: projects/{project}/global/networks/{network} - * - serviceAttachment: projects/{project}/regions/{region}/serviceAttachments/{service_attachment} - * - sharedRegionalCertificateAuthority: projects/{project}/locations/{location}/sharedRegionalCertificateAuthority - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'redis.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Redis\Cluster\V1\CloudRedisClusterClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CloudRedisClusterClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Backup Redis Cluster. - * If this is the first time a backup is being created, a backup collection - * will be created at the backend, and this backup belongs to this collection. - * Both collection and backup will have a resource name. Backup will be - * executed for each shard. A replica (primary if nonHA) will be selected to - * perform the execution. Backup call will be rejected if there is an ongoing - * backup or update operation. Be aware that during preview, if the cluster's - * internal software version is too old, critical update will be performed - * before actual backup. Once the internal software version is updated to the - * minimum version required by the backup feature, subsequent backups will not - * require critical update. After preview, there will be no critical update - * needed for backup. - * - * The async variant is {@see CloudRedisClusterClient::backupClusterAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/backup_cluster.php - * - * @param BackupClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function backupCluster(BackupClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BackupCluster', $request, $callOptions)->wait(); - } - - /** - * Creates a Redis cluster based on the specified properties. - * The creation is executed asynchronously and callers may check the returned - * operation to track its progress. Once the operation is completed the Redis - * cluster will be fully functional. The completed longrunning.Operation will - * contain the new cluster object in the response field. - * - * The returned operation is automatically deleted after a few hours, so there - * is no need to call DeleteOperation. - * - * The async variant is {@see CloudRedisClusterClient::createClusterAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/create_cluster.php - * - * @param CreateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific backup. - * - * The async variant is {@see CloudRedisClusterClient::deleteBackupAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/delete_backup.php - * - * @param DeleteBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific Redis cluster. Cluster stops serving and data is - * deleted. - * - * The async variant is {@see CloudRedisClusterClient::deleteClusterAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/delete_cluster.php - * - * @param DeleteClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Exports a specific backup to a customer target Cloud Storage URI. - * - * The async variant is {@see CloudRedisClusterClient::exportBackupAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/export_backup.php - * - * @param ExportBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportBackup(ExportBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportBackup', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific backup. - * - * The async variant is {@see CloudRedisClusterClient::getBackupAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/get_backup.php - * - * @param GetBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Get a backup collection. - * - * The async variant is {@see CloudRedisClusterClient::getBackupCollectionAsync()} - * . - * - * @example samples/V1/CloudRedisClusterClient/get_backup_collection.php - * - * @param GetBackupCollectionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupCollection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupCollection(GetBackupCollectionRequest $request, array $callOptions = []): BackupCollection - { - return $this->startApiCall('GetBackupCollection', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a specific Redis cluster. - * - * The async variant is {@see CloudRedisClusterClient::getClusterAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/get_cluster.php - * - * @param GetClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Cluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster - { - return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the details of certificate authority information for Redis cluster. - * - * The async variant is - * {@see CloudRedisClusterClient::getClusterCertificateAuthorityAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/get_cluster_certificate_authority.php - * - * @param GetClusterCertificateAuthorityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CertificateAuthority - * - * @throws ApiException Thrown if the API call fails. - */ - public function getClusterCertificateAuthority(GetClusterCertificateAuthorityRequest $request, array $callOptions = []): CertificateAuthority - { - return $this->startApiCall('GetClusterCertificateAuthority', $request, $callOptions)->wait(); - } - - /** - * Gets the details of regional certificate authority information for Redis - * cluster. - * - * The async variant is - * {@see CloudRedisClusterClient::getSharedRegionalCertificateAuthorityAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/get_shared_regional_certificate_authority.php - * - * @param GetSharedRegionalCertificateAuthorityRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SharedRegionalCertificateAuthority - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest $request, array $callOptions = []): SharedRegionalCertificateAuthority - { - return $this->startApiCall('GetSharedRegionalCertificateAuthority', $request, $callOptions)->wait(); - } - - /** - * Lists all backup collections owned by a consumer project in either the - * specified location (region) or all locations. - * - * If `location_id` is specified as `-` (wildcard), then all regions - * available to the project are queried, and the results are aggregated. - * - * The async variant is - * {@see CloudRedisClusterClient::listBackupCollectionsAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/list_backup_collections.php - * - * @param ListBackupCollectionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackupCollections(ListBackupCollectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackupCollections', $request, $callOptions); - } - - /** - * Lists all backups owned by a backup collection. - * - * The async variant is {@see CloudRedisClusterClient::listBackupsAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/list_backups.php - * - * @param ListBackupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions); - } - - /** - * Lists all Redis clusters owned by a project in either the specified - * location (region) or all locations. - * - * The location should have the following format: - * - * * `projects/{project_id}/locations/{location_id}` - * - * If `location_id` is specified as `-` (wildcard), then all regions - * available to the project are queried, and the results are aggregated. - * - * The async variant is {@see CloudRedisClusterClient::listClustersAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/list_clusters.php - * - * @param ListClustersRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions); - } - - /** - * Reschedules upcoming maintenance event. - * - * The async variant is - * {@see CloudRedisClusterClient::rescheduleClusterMaintenanceAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/reschedule_cluster_maintenance.php - * - * @param RescheduleClusterMaintenanceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function rescheduleClusterMaintenance(RescheduleClusterMaintenanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RescheduleClusterMaintenance', $request, $callOptions)->wait(); - } - - /** - * Updates the metadata and configuration of a specific Redis cluster. - * - * Completed longrunning.Operation will contain the new cluster object - * in the response field. The returned operation is automatically deleted - * after a few hours, so there is no need to call DeleteOperation. - * - * The async variant is {@see CloudRedisClusterClient::updateClusterAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/update_cluster.php - * - * @param UpdateClusterRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCluster(UpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see CloudRedisClusterClient::getLocationAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/get_location.php - * - * @param GetLocationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see CloudRedisClusterClient::listLocationsAsync()} . - * - * @example samples/V1/CloudRedisClusterClient/list_locations.php - * - * @param ListLocationsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json b/owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 65ed596cdf6c..000000000000 --- a/owl-bot-staging/RedisCluster/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.redis.cluster.v1", - "libraryPackage": "Google\\Cloud\\Redis\\Cluster\\V1", - "services": { - "CloudRedisCluster": { - "clients": { - "grpc": { - "libraryClient": "CloudRedisClusterGapicClient", - "rpcs": { - "BackupCluster": { - "methods": [ - "backupCluster" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "ExportBackup": { - "methods": [ - "exportBackup" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupCollection": { - "methods": [ - "getBackupCollection" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "GetClusterCertificateAuthority": { - "methods": [ - "getClusterCertificateAuthority" - ] - }, - "GetSharedRegionalCertificateAuthority": { - "methods": [ - "getSharedRegionalCertificateAuthority" - ] - }, - "ListBackupCollections": { - "methods": [ - "listBackupCollections" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "RescheduleClusterMaintenance": { - "methods": [ - "rescheduleClusterMaintenance" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json deleted file mode 100644 index 2d8fb483a6fa..000000000000 --- a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_client_config.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "interfaces": { - "google.cloud.redis.cluster.v1.CloudRedisCluster": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "BackupCluster": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCluster": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteCluster": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ExportBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackup": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackupCollection": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCluster": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetClusterCertificateAuthority": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetSharedRegionalCertificateAuthority": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackupCollections": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBackups": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListClusters": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "RescheduleClusterMaintenance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "UpdateCluster": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php deleted file mode 100644 index 2e10ab9c589b..000000000000 --- a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_descriptor_config.php +++ /dev/null @@ -1,330 +0,0 @@ - [ - 'google.cloud.redis.cluster.v1.CloudRedisCluster' => [ - 'BackupCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Backup', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RescheduleClusterMaintenance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Redis\Cluster\V1\Cluster', - 'metadataReturnType' => '\Google\Protobuf\Any', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupCollection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\BackupCollection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetClusterCertificateAuthority' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\CertificateAuthority', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSharedRegionalCertificateAuthority' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\SharedRegionalCertificateAuthority', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupCollections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackupCollections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\ListBackupCollectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Redis\Cluster\V1\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'backup' => 'projects/{project}/locations/{location}/backupCollections/{backup_collection}/backups/{backup}', - 'backupCollection' => 'projects/{project}/locations/{location}/backupCollections/{backup_collection}', - 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', - 'certificateAuthority' => 'projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority', - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', - 'forwardingRule' => 'projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}', - 'location' => 'projects/{project}/locations/{location}', - 'network' => 'projects/{project}/global/networks/{network}', - 'serviceAttachment' => 'projects/{project}/regions/{region}/serviceAttachments/{service_attachment}', - 'sharedRegionalCertificateAuthority' => 'projects/{project}/locations/{location}/sharedRegionalCertificateAuthority', - ], - ], - ], -]; diff --git a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php b/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php deleted file mode 100644 index 31e5b8e45278..000000000000 --- a/owl-bot-staging/RedisCluster/v1/src/V1/resources/cloud_redis_cluster_rest_client_config.php +++ /dev/null @@ -1,276 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.redis.cluster.v1.CloudRedisCluster' => [ - 'BackupCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}:backup', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupCollection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetClusterCertificateAuthority' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/certificateAuthority}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSharedRegionalCertificateAuthority' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupCollections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backupCollections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/backupCollections/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RescheduleClusterMaintenance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}:rescheduleClusterMaintenance', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php b/owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php deleted file mode 100644 index 81da6dcafdf6..000000000000 --- a/owl-bot-staging/RedisCluster/v1/tests/Unit/V1/Client/CloudRedisClusterClientTest.php +++ /dev/null @@ -1,1865 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CloudRedisClusterClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CloudRedisClusterClient($options); - } - - /** @test */ - public function backupClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/backupClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $sizeGb = 2105542105; - $shardCount = 495377042; - $preciseSizeGb = 1.3422684E8; - $deletionProtectionEnabled = true; - $backupCollection = 'backupCollection-1182285509'; - $kmsKey = 'kmsKey-591635343'; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setPreciseSizeGb($preciseSizeGb); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/backupClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new BackupClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->backupCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/BackupCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/backupClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function backupClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/backupClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new BackupClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->backupCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/backupClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $sizeGb = 2105542105; - $shardCount = 495377042; - $preciseSizeGb = 1.3422684E8; - $deletionProtectionEnabled = true; - $backupCollection = 'backupCollection-1182285509'; - $kmsKey = 'kmsKey-591635343'; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setPreciseSizeGb($preciseSizeGb); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/DeleteBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteBackupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportBackupTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $cluster = 'cluster872092154'; - $clusterUid = 'clusterUid-1141213045'; - $totalSizeBytes = 115423608; - $engineVersion = 'engineVersion-618177573'; - $replicaCount = 564075208; - $shardCount = 495377042; - $uid = 'uid115792'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setCluster($cluster); - $expectedResponse->setClusterUid($clusterUid); - $expectedResponse->setTotalSizeBytes($totalSizeBytes); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setUid($uid); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); - $request = (new ExportBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->exportBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ExportBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportBackupTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportBackupExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); - $request = (new ExportBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->exportBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportBackupTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $cluster = 'cluster872092154'; - $clusterUid = 'clusterUid-1141213045'; - $totalSizeBytes = 115423608; - $engineVersion = 'engineVersion-618177573'; - $replicaCount = 564075208; - $shardCount = 495377042; - $uid = 'uid115792'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setCluster($cluster); - $expectedResponse->setClusterUid($clusterUid); - $expectedResponse->setTotalSizeBytes($totalSizeBytes); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupCollectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $clusterUid = 'clusterUid-1141213045'; - $cluster = 'cluster872092154'; - $kmsKey = 'kmsKey-591635343'; - $uid = 'uid115792'; - $expectedResponse = new BackupCollection(); - $expectedResponse->setName($name2); - $expectedResponse->setClusterUid($clusterUid); - $expectedResponse->setCluster($cluster); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setUid($uid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); - $request = (new GetBackupCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupCollection($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetBackupCollection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupCollectionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); - $request = (new GetBackupCollectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupCollection($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $sizeGb = 2105542105; - $shardCount = 495377042; - $preciseSizeGb = 1.3422684E8; - $deletionProtectionEnabled = true; - $backupCollection = 'backupCollection-1182285509'; - $kmsKey = 'kmsKey-591635343'; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setPreciseSizeGb($preciseSizeGb); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getCluster($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterCertificateAuthorityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new CertificateAuthority(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->certificateAuthorityName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterCertificateAuthorityRequest()) - ->setName($formattedName); - $response = $gapicClient->getClusterCertificateAuthority($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetClusterCertificateAuthority', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterCertificateAuthorityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->certificateAuthorityName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new GetClusterCertificateAuthorityRequest()) - ->setName($formattedName); - try { - $gapicClient->getClusterCertificateAuthority($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSharedRegionalCertificateAuthorityTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new SharedRegionalCertificateAuthority(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->sharedRegionalCertificateAuthorityName('[PROJECT]', '[LOCATION]'); - $request = (new GetSharedRegionalCertificateAuthorityRequest()) - ->setName($formattedName); - $response = $gapicClient->getSharedRegionalCertificateAuthority($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/GetSharedRegionalCertificateAuthority', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSharedRegionalCertificateAuthorityExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->sharedRegionalCertificateAuthorityName('[PROJECT]', '[LOCATION]'); - $request = (new GetSharedRegionalCertificateAuthorityRequest()) - ->setName($formattedName); - try { - $gapicClient->getSharedRegionalCertificateAuthority($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupCollectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupCollectionsElement = new BackupCollection(); - $backupCollections = [ - $backupCollectionsElement, - ]; - $expectedResponse = new ListBackupCollectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackupCollections($backupCollections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupCollectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupCollections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackupCollections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ListBackupCollections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupCollectionsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupCollectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupCollections($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->backupCollectionName('[PROJECT]', '[LOCATION]', '[BACKUP_COLLECTION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClusters($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rescheduleClusterMaintenanceTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rescheduleClusterMaintenanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $sizeGb = 2105542105; - $shardCount = 495377042; - $preciseSizeGb = 1.3422684E8; - $deletionProtectionEnabled = true; - $backupCollection = 'backupCollection-1182285509'; - $kmsKey = 'kmsKey-591635343'; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setPreciseSizeGb($preciseSizeGb); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rescheduleClusterMaintenanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - $request = (new RescheduleClusterMaintenanceRequest()) - ->setName($formattedName) - ->setRescheduleType($rescheduleType); - $response = $gapicClient->rescheduleClusterMaintenance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/RescheduleClusterMaintenance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getRescheduleType(); - $this->assertProtobufEquals($rescheduleType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rescheduleClusterMaintenanceTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function rescheduleClusterMaintenanceExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/rescheduleClusterMaintenanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - $request = (new RescheduleClusterMaintenanceRequest()) - ->setName($formattedName) - ->setRescheduleType($rescheduleType); - $response = $gapicClient->rescheduleClusterMaintenance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rescheduleClusterMaintenanceTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $sizeGb = 2105542105; - $shardCount = 495377042; - $preciseSizeGb = 1.3422684E8; - $deletionProtectionEnabled = true; - $backupCollection = 'backupCollection-1182285509'; - $kmsKey = 'kmsKey-591635343'; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setPreciseSizeGb($preciseSizeGb); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateClusterExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function backupClusterAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/backupClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $sizeGb = 2105542105; - $shardCount = 495377042; - $preciseSizeGb = 1.3422684E8; - $deletionProtectionEnabled = true; - $backupCollection = 'backupCollection-1182285509'; - $kmsKey = 'kmsKey-591635343'; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setSizeGb($sizeGb); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setPreciseSizeGb($preciseSizeGb); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/backupClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new BackupClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->backupClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.redis.cluster.v1.CloudRedisCluster/BackupCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/backupClusterTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -}