From 6d40be4c2dfb8f8d2e96fb5dd45fd55f4d98743c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 1 May 2026 21:46:32 +0000 Subject: [PATCH 1/2] Synchronize new proto/yaml changes. PiperOrigin-RevId: 908269410 Source-Link: https://github.com/googleapis/googleapis/commit/01f11278724be1d0dc6220e3e263f344fc0e259c Source-Link: https://github.com/googleapis/googleapis-gen/commit/132672dd36d9b33b5ec4d3f09b29761928480fda Copy-Tag: eyJwIjoiTWVtb3J5c3RvcmUvLk93bEJvdC55YW1sIiwiaCI6IjEzMjY3MmRkMzZkOWIzM2I1ZWM0ZDNmMDliMjk3NjE5Mjg0ODBmZGEifQ== --- .../Cloud/Memorystore/V1/Memorystore.php | 36 + .../Memorystore/V1/AutomatedBackupConfig.php | 165 ++ .../AutomatedBackupMode.php | 61 + .../FixedFrequencySchedule.php | 82 + .../Google/Cloud/Memorystore/V1/Backup.php | 585 +++++ .../Memorystore/V1/Backup/BackupType.php | 61 + .../Cloud/Memorystore/V1/Backup/State.php | 76 + .../Cloud/Memorystore/V1/BackupCollection.php | 371 ++++ .../Cloud/Memorystore/V1/BackupFile.php | 145 ++ .../Memorystore/V1/BackupInstanceRequest.php | 187 ++ .../Memorystore/V1/CertificateAuthority.php | 117 + .../ManagedCertificateAuthority.php | 67 + .../ManagedCertificateAuthority/CertChain.php | 67 + .../Cloud/Memorystore/V1/ConnectionType.php | 68 + .../Memorystore/V1/CreateInstanceRequest.php | 279 +++ .../V1/CrossInstanceReplicationConfig.php | 285 +++ .../InstanceRole.php | 73 + .../Membership.php | 120 + .../RemoteInstance.php | 106 + .../Memorystore/V1/DeleteBackupRequest.php | 120 + .../Memorystore/V1/DeleteInstanceRequest.php | 160 ++ .../Memorystore/V1/DiscoveryEndpoint.php | 143 ++ .../Cloud/Memorystore/V1/EncryptionInfo.php | 187 ++ .../V1/EncryptionInfo/KmsKeyState.php | 104 + .../Memorystore/V1/EncryptionInfo/Type.php | 63 + .../Memorystore/V1/ExportBackupRequest.php | 113 + .../V1/GetBackupCollectionRequest.php | 91 + .../Cloud/Memorystore/V1/GetBackupRequest.php | 86 + .../V1/GetCertificateAuthorityRequest.php | 91 + .../Memorystore/V1/GetInstanceRequest.php | 86 + ...redRegionalCertificateAuthorityRequest.php | 92 + .../Google/Cloud/Memorystore/V1/Instance.php | 1918 ++++++++++++++++ .../V1/Instance/AuthorizationMode.php | 61 + .../V1/Instance/ConnectionDetail.php | 111 + .../V1/Instance/GcsBackupSource.php | 68 + .../V1/Instance/InstanceEndpoint.php | 73 + .../V1/Instance/ManagedBackupSource.php | 87 + .../Cloud/Memorystore/V1/Instance/Mode.php | 68 + .../Memorystore/V1/Instance/NodeType.php | 119 + .../Memorystore/V1/Instance/ServerCaMode.php | 89 + .../Cloud/Memorystore/V1/Instance/State.php | 75 + .../Memorystore/V1/Instance/StateInfo.php | 75 + .../V1/Instance/StateInfo/UpdateInfo.php | 209 ++ .../V1/Instance/TransitEncryptionMode.php | 61 + .../V1/ListBackupCollectionsRequest.php | 188 ++ .../V1/ListBackupCollectionsResponse.php | 171 ++ .../Memorystore/V1/ListBackupsRequest.php | 178 ++ .../Memorystore/V1/ListBackupsResponse.php | 139 ++ .../Memorystore/V1/ListInstancesRequest.php | 230 ++ .../Memorystore/V1/ListInstancesResponse.php | 147 ++ .../Memorystore/V1/MaintenancePolicy.php | 163 ++ .../Memorystore/V1/MaintenanceSchedule.php | 129 ++ .../Cloud/Memorystore/V1/NodeConfig.php | 67 + .../Memorystore/V1/OperationMetadata.php | 307 +++ .../Memorystore/V1/PersistenceConfig.php | 155 ++ .../V1/PersistenceConfig/AOFConfig.php | 67 + .../AOFConfig/AppendFsync.php | 71 + .../V1/PersistenceConfig/PersistenceMode.php | 68 + .../V1/PersistenceConfig/RDBConfig.php | 119 + .../RDBConfig/SnapshotPeriod.php | 75 + .../Memorystore/V1/PscAttachmentDetail.php | 106 + .../Memorystore/V1/PscAutoConnection.php | 391 ++++ .../Cloud/Memorystore/V1/PscConnection.php | 391 ++++ .../Memorystore/V1/PscConnectionStatus.php | 61 + .../V1/RescheduleMaintenanceRequest.php | 179 ++ .../RescheduleType.php | 61 + .../V1/SharedRegionalCertificateAuthority.php | 117 + .../RegionalManagedCertificateAuthority.php | 71 + .../RegionalCertChain.php | 67 + .../Memorystore/V1/UpdateInstanceRequest.php | 215 ++ .../V1/WeeklyMaintenanceWindow.php | 111 + .../Memorystore/V1/ZoneDistributionConfig.php | 105 + .../ZoneDistributionMode.php | 62 + .../V1/MemorystoreClient/backup_instance.php | 96 + .../V1/MemorystoreClient/create_instance.php | 98 + .../V1/MemorystoreClient/delete_backup.php | 86 + .../V1/MemorystoreClient/delete_instance.php | 81 + .../V1/MemorystoreClient/export_backup.php | 89 + .../V1/MemorystoreClient/get_backup.php | 77 + .../get_backup_collection.php | 77 + .../get_certificate_authority.php | 73 + .../V1/MemorystoreClient/get_instance.php | 72 + .../V1/MemorystoreClient/get_location.php | 57 + ..._shared_regional_certificate_authority.php | 77 + .../list_backup_collections.php | 83 + .../V1/MemorystoreClient/list_backups.php | 81 + .../V1/MemorystoreClient/list_instances.php | 77 + .../V1/MemorystoreClient/list_locations.php | 62 + .../reschedule_maintenance.php | 88 + .../V1/MemorystoreClient/update_instance.php | 71 + .../v1/src/V1/Client/MemorystoreClient.php | 982 +++++++++ .../Memorystore/v1/src/V1/gapic_metadata.json | 103 + .../resources/memorystore_client_config.json | 129 ++ .../memorystore_descriptor_config.php | 329 +++ .../memorystore_rest_client_config.php | 273 +++ .../Unit/V1/Client/MemorystoreClientTest.php | 1938 +++++++++++++++++ .../Cloud/Memorystore/V1Beta/Memorystore.php | 33 + .../V1beta/CertificateAuthority.php | 117 + .../ManagedCertificateAuthority.php | 67 + .../ManagedCertificateAuthority/CertChain.php | 67 + .../Memorystore/V1beta/ConnectionType.php | 68 + .../V1beta/CreateInstanceRequest.php | 279 +++ .../V1beta/DeleteInstanceRequest.php | 160 ++ .../Memorystore/V1beta/DiscoveryEndpoint.php | 143 ++ .../V1beta/GetCertificateAuthorityRequest.php | 91 + .../Memorystore/V1beta/GetInstanceRequest.php | 86 + ...redRegionalCertificateAuthorityRequest.php | 92 + .../Cloud/Memorystore/V1beta/Instance.php | 1021 +++++++++ .../V1beta/Instance/AuthorizationMode.php | 61 + .../V1beta/Instance/ConnectionDetail.php | 111 + .../V1beta/Instance/InstanceEndpoint.php | 73 + .../Memorystore/V1beta/Instance/Mode.php | 68 + .../Memorystore/V1beta/Instance/NodeType.php | 119 + .../V1beta/Instance/ServerCaMode.php | 89 + .../Memorystore/V1beta/Instance/State.php | 75 + .../Memorystore/V1beta/Instance/StateInfo.php | 75 + .../V1beta/Instance/StateInfo/UpdateInfo.php | 121 + .../V1beta/Instance/TransitEncryptionMode.php | 61 + .../V1beta/ListInstancesRequest.php | 230 ++ .../V1beta/ListInstancesResponse.php | 147 ++ .../Cloud/Memorystore/V1beta/NodeConfig.php | 67 + .../Memorystore/V1beta/OperationMetadata.php | 307 +++ .../Memorystore/V1beta/PersistenceConfig.php | 155 ++ .../V1beta/PersistenceConfig/AOFConfig.php | 67 + .../AOFConfig/AppendFsync.php | 71 + .../PersistenceConfig/PersistenceMode.php | 68 + .../V1beta/PersistenceConfig/RDBConfig.php | 119 + .../RDBConfig/SnapshotPeriod.php | 75 + .../Memorystore/V1beta/PscAutoConnection.php | 394 ++++ .../Memorystore/V1beta/PscConnection.php | 349 +++ .../V1beta/PscConnectionStatus.php | 61 + .../SharedRegionalCertificateAuthority.php | 117 + .../RegionalManagedCertificateAuthority.php | 71 + .../RegionalCertChain.php | 67 + .../V1beta/UpdateInstanceRequest.php | 215 ++ .../V1beta/ZoneDistributionConfig.php | 105 + .../ZoneDistributionMode.php | 62 + .../MemorystoreClient/create_instance.php | 123 ++ .../MemorystoreClient/delete_instance.php | 81 + .../get_certificate_authority.php | 73 + .../V1beta/MemorystoreClient/get_instance.php | 72 + .../V1beta/MemorystoreClient/get_location.php | 57 + ..._shared_regional_certificate_authority.php | 77 + .../MemorystoreClient/list_instances.php | 77 + .../MemorystoreClient/list_locations.php | 62 + .../MemorystoreClient/update_instance.php | 102 + .../src/V1beta/Client/MemorystoreClient.php | 697 ++++++ .../v1beta/src/V1beta/gapic_metadata.json | 63 + .../resources/memorystore_client_config.json | 89 + .../memorystore_descriptor_config.php | 185 ++ .../memorystore_rest_client_config.php | 182 ++ .../V1beta/Client/MemorystoreClientTest.php | 987 +++++++++ 152 files changed, 25362 insertions(+) create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php create mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_location.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_locations.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php create mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php create mode 100644 owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php create mode 100644 owl-bot-staging/Memorystore/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json create mode 100644 owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php create mode 100644 owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php create mode 100644 owl-bot-staging/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php create mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_location.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_locations.php create mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php create mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php create mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json create mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json create mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php create mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php create mode 100644 owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php diff --git a/owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php b/owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php new file mode 100644 index 000000000000..b82ab78b451b --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + "\x0A\xAF\xA2\x01\x0A-google/cloud/memorystore/v1/memorystore.proto\x12\x1Bgoogle.cloud.memorystore.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\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\"\xDB(\x0A\x08Instance\x12S\x0A\x0Agcs_source\x18\x17 \x01(\x0B25.google.cloud.memorystore.v1.Instance.GcsBackupSourceB\x06\xE0A\x01\xE0A\x05H\x00\x12b\x0A\x15managed_backup_source\x18\x18 \x01(\x0B29.google.cloud.memorystore.v1.Instance.ManagedBackupSourceB\x06\xE0A\x01\xE0A\x05H\x00\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\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12F\x0A\x06labels\x18\x04 \x03(\x0B21.google.cloud.memorystore.v1.Instance.LabelsEntryB\x03\xE0A\x01\x12?\x0A\x05state\x18\x05 \x01(\x0E2+.google.cloud.memorystore.v1.Instance.StateB\x03\xE0A\x03\x12H\x0A\x0Astate_info\x18\x06 \x01(\x0B2/.google.cloud.memorystore.v1.Instance.StateInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x07 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12[\x0A\x12authorization_mode\x18\x09 \x01(\x0E27.google.cloud.memorystore.v1.Instance.AuthorizationModeB\x06\xE0A\x01\xE0A\x05\x12d\x0A\x17transit_encryption_mode\x18\x0A \x01(\x0E2;.google.cloud.memorystore.v1.Instance.TransitEncryptionModeB\x06\xE0A\x01\xE0A\x05\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x01\x12R\x0A\x13discovery_endpoints\x18\x0C \x03(\x0B2..google.cloud.memorystore.v1.DiscoveryEndpointB\x05\x18\x01\xE0A\x03\x12F\x0A\x09node_type\x18\x0D \x01(\x0E2..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xE0A\x01\x12O\x0A\x12persistence_config\x18\x0E \x01(\x0B2..google.cloud.memorystore.v1.PersistenceConfigB\x03\xE0A\x01\x12\x1B\x0A\x0Eengine_version\x18\x0F \x01(\x09B\x03\xE0A\x01\x12U\x0A\x0Eengine_configs\x18\x10 \x03(\x0B28.google.cloud.memorystore.v1.Instance.EngineConfigsEntryB\x03\xE0A\x01\x12A\x0A\x0Bnode_config\x18\x11 \x01(\x0B2'.google.cloud.memorystore.v1.NodeConfigB\x03\xE0A\x03\x12]\x0A\x18zone_distribution_config\x18\x12 \x01(\x0B23.google.cloud.memorystore.v1.ZoneDistributionConfigB\x06\xE0A\x01\xE0A\x05\x12-\x0A\x1Bdeletion_protection_enabled\x18\x13 \x01(\x08B\x03\xE0A\x01H\x02\x88\x01\x01\x12V\x0A\x14psc_auto_connections\x18\x14 \x03(\x0B2..google.cloud.memorystore.v1.PscAutoConnectionB\x08\x18\x01\xE0A\x01\xE0A\x05\x12U\x0A\x16psc_attachment_details\x18\x15 \x03(\x0B20.google.cloud.memorystore.v1.PscAttachmentDetailB\x03\xE0A\x03\x12N\x0A\x09endpoints\x18\x19 \x03(\x0B26.google.cloud.memorystore.v1.Instance.InstanceEndpointB\x03\xE0A\x01\x12=\x0A\x04mode\x18\x1A \x01(\x0E2*.google.cloud.memorystore.v1.Instance.ModeB\x03\xE0A\x01\x12/\x0A\x1Asimulate_maintenance_event\x18\x1B \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x03\x88\x01\x01\x12+\x0A\x14ondemand_maintenance\x18\x1C \x01(\x08B\x08\x18\x01\xE0A\x01\xE0A\x04H\x04\x88\x01\x01\x12\"\x0A\x0Dsatisfies_pzs\x18\x1D \x01(\x08B\x06\xE0A\x03\xE0A\x01H\x05\x88\x01\x01\x12\"\x0A\x0Dsatisfies_pzi\x18\x1E \x01(\x08B\x06\xE0A\x03\xE0A\x01H\x06\x88\x01\x01\x12O\x0A\x12maintenance_policy\x18\x1F \x01(\x0B2..google.cloud.memorystore.v1.MaintenancePolicyB\x03\xE0A\x01\x12S\x0A\x14maintenance_schedule\x18 \x01(\x0B20.google.cloud.memorystore.v1.MaintenanceScheduleB\x03\xE0A\x03\x12k\x0A!cross_instance_replication_config\x18! \x01(\x0B2;.google.cloud.memorystore.v1.CrossInstanceReplicationConfigB\x03\xE0A\x01\x12;\x0A)async_instance_endpoints_deletion_enabled\x18, \x01(\x08B\x03\xE0A\x01H\x07\x88\x01\x01\x12?\x0A\x07kms_key\x18- \x01(\x09B)\xE0A\x01\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyH\x08\x88\x01\x01\x12I\x0A\x0Fencryption_info\x18. \x01(\x0B2+.google.cloud.memorystore.v1.EncryptionInfoB\x03\xE0A\x03\x12S\x0A\x11backup_collection\x18/ \x01(\x09B3\xE0A\x03\xFAA-\x0A+memorystore.googleapis.com/BackupCollectionH\x09\x88\x01\x01\x12X\x0A\x17automated_backup_config\x180 \x01(\x0B22.google.cloud.memorystore.v1.AutomatedBackupConfigB\x03\xE0A\x01\x12%\x0A\x13maintenance_version\x181 \x01(\x09B\x03\xE0A\x01H\x0A\x88\x01\x01\x12/\x0A\x1Deffective_maintenance_version\x182 \x01(\x09B\x03\xE0A\x03H\x0B\x88\x01\x01\x12+\x0A\x1Eavailable_maintenance_versions\x183 \x03(\x09B\x03\xE0A\x03\x12.\x0A\x1Callow_fewer_zones_deployment\x186 \x01(\x08B\x08\x18\x01\xE0A\x01\xE0A\x05\x12W\x0A\x0Eserver_ca_mode\x188 \x01(\x0E22.google.cloud.memorystore.v1.Instance.ServerCaModeB\x06\xE0A\x01\xE0A\x05H\x0C\x88\x01\x01\x12G\x0A\x0Eserver_ca_pool\x189 \x01(\x09B*\xE0A\x01\xE0A\x05\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x0D\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x18: \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x0E\x88\x01\x01\x1A\xA4\x03\x0A\x09StateInfo\x12V\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2:.google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfoB\x03\xE0A\x03H\x00\x1A\xB6\x02\x0A\x0AUpdateInfo\x12\$\x0A\x12target_shard_count\x18\x01 \x01(\x05B\x03\xE0A\x03H\x00\x88\x01\x01\x12&\x0A\x14target_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x03H\x01\x88\x01\x01\x12'\x0A\x15target_engine_version\x18\x03 \x01(\x09B\x03\xE0A\x03H\x02\x88\x01\x01\x12R\x0A\x10target_node_type\x18\x04 \x01(\x0E2..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xE0A\x03H\x03\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x18\x0A\x16_target_engine_versionB\x13\x0A\x11_target_node_typeB\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\x1Ad\x0A\x10InstanceEndpoint\x12P\x0A\x0Bconnections\x18\x01 \x03(\x0B26.google.cloud.memorystore.v1.Instance.ConnectionDetailB\x03\xE0A\x01\x1A\xBA\x01\x0A\x10ConnectionDetail\x12R\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B2..google.cloud.memorystore.v1.PscAutoConnectionB\x03\xE0A\x05H\x00\x12D\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2*.google.cloud.memorystore.v1.PscConnectionH\x00B\x0C\x0A\x0Aconnection\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A4\x0A\x12EngineConfigsEntry\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\"X\x0A\x11AuthorizationMode\x12\"\x0A\x1EAUTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DAUTH_DISABLED\x10\x01\x12\x0C\x0A\x08IAM_AUTH\x10\x02\"|\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\x0A\x15SERVER_AUTHENTICATION\x10\x02\"\xE8\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10SHARED_CORE_NANO\x10\x01\x12\x12\x0A\x0EHIGHMEM_MEDIUM\x10\x02\x12\x12\x0A\x0EHIGHMEM_XLARGE\x10\x03\x12\x12\x0A\x0ESTANDARD_SMALL\x10\x04\x12\x10\x0A\x0CCUSTOM_MICRO\x10\x05\x12\x0F\x0A\x0BCUSTOM_MINI\x10\x06\x12\x12\x0A\x0EHIGHCPU_MEDIUM\x10\x07\x12\x12\x0A\x0ESTANDARD_LARGE\x10\x08\x12\x13\x0A\x0FHIGHMEM_2XLARGE\x10\x09\x12\x0F\x0A\x0BCUSTOM_PICO\x10\x0A\"S\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ASTANDALONE\x10\x01\x1A\x02\x08\x01\x12\x0B\x0A\x07CLUSTER\x10\x02\x12\x14\x0A\x10CLUSTER_DISABLED\x10\x04\"\xA9\x02\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\x0A\x1EGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1C\x0A\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1B\x0A\x17CUSTOMER_MANAGED_CAS_CA\x10\x03\x125\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1A\x02\x08\x01\x12/\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1A\x02\x08\x01\x12.\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1A\x02\x08\x01\x1A\x02\x10\x01:{\xEAAx\x0A#memorystore.googleapis.com/Instance\x12.google.cloud.memorystore.v1.PersistenceConfig.PersistenceModeB\x03\xE0A\x01\x12Q\x0A\x0Ardb_config\x18\x02 \x01(\x0B28.google.cloud.memorystore.v1.PersistenceConfig.RDBConfigB\x03\xE0A\x01\x12Q\x0A\x0Aaof_config\x18\x03 \x01(\x0B28.google.cloud.memorystore.v1.PersistenceConfig.AOFConfigB\x03\xE0A\x01\x1A\xB1\x02\x0A\x09RDBConfig\x12i\x0A\x13rdb_snapshot_period\x18\x01 \x01(\x0E2G.google.cloud.memorystore.v1.PersistenceConfig.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\xBF\x01\x0A\x09AOFConfig\x12_\x0A\x0Cappend_fsync\x18\x01 \x01(\x0E2D.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsyncB\x03\xE0A\x01\"Q\x0A\x0BAppendFsync\x12\x1C\x0A\x18APPEND_FSYNC_UNSPECIFIED\x10\x00\x12\x09\x0A\x05NEVER\x10\x01\x12\x0D\x0A\x09EVERY_SEC\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\"\"\x0A\x0ANodeConfig\x12\x14\x0A\x07size_gb\x18\x01 \x01(\x01B\x03\xE0A\x03\"\xE9\x01\x0A\x16ZoneDistributionConfig\x12\x11\x0A\x04zone\x18\x02 \x01(\x09B\x03\xE0A\x01\x12[\x0A\x04mode\x18\x01 \x01(\x0E2H.google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionModeB\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\"\xCE\x02\x0A\x1CRescheduleMaintenanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\x12f\x0A\x0Freschedule_type\x18\x02 \x01(\x0E2H.google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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\"\xB0\x01\x0A\x14ListInstancesRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#memorystore.googleapis.com/Instance\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x15ListInstancesResponse\x128\x0A\x09instances\x18\x01 \x03(\x0B2%.google.cloud.memorystore.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"O\x0A\x12GetInstanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\"\xCD\x01\x0A\x15CreateInstanceRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#memorystore.googleapis.com/Instance\x12\x18\x0A\x0Binstance_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12<\x0A\x08instance\x18\x03 \x01(\x0B2%.google.cloud.memorystore.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xAC\x01\x0A\x15UpdateInstanceRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12<\x0A\x08instance\x18\x02 \x01(\x0B2%.google.cloud.memorystore.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"s\x0A\x15DeleteInstanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x94\x01\x0A\x1CListBackupCollectionsRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+memorystore.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\"\x98\x01\x0A\x1DListBackupCollectionsResponse\x12I\x0A\x12backup_collections\x18\x01 \x03(\x0B2-.google.cloud.memorystore.v1.BackupCollection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"_\x0A\x1AGetBackupCollectionRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+memorystore.googleapis.com/BackupCollection\"\x80\x01\x0A\x12ListBackupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!memorystore.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\"y\x0A\x13ListBackupsResponse\x124\x0A\x07backups\x18\x01 \x03(\x0B2#.google.cloud.memorystore.v1.Backup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"K\x0A\x10GetBackupRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!memorystore.googleapis.com/Backup\"o\x0A\x13DeleteBackupRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!memorystore.googleapis.com/Backup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"s\x0A\x13ExportBackupRequest\x12\x14\x0A\x0Agcs_bucket\x18\x02 \x01(\x09H\x00\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!memorystore.googleapis.com/BackupB\x0D\x0A\x0Bdestination\"\xAA\x01\x0A\x15BackupInstanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\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\"[\x0A\x1EGetCertificateAuthorityRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\"\x89\x04\x0A\x14CertificateAuthority\x12j\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2M.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xAB\x01\x0A\x1BManagedCertificateAuthority\x12i\x0A\x08ca_certs\x18\x01 \x03(\x0B2W.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1A!\x0A\x09CertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xB6\x01\xEAA\xB2\x01\x0A/memorystore.googleapis.com/CertificateAuthority\x12Qprojects/{project}/locations/{location}/instances/{instance}/certificateAuthority*\x16certificateAuthorities2\x14certificateAuthorityB\x0B\x0A\x09server_ca\"\x80\x05\x0A\"SharedRegionalCertificateAuthority\x12\x80\x01\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2c.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xDA\x01\x0A#RegionalManagedCertificateAuthority\x12\x87\x01\x0A\x08ca_certs\x18\x01 \x03(\x0B2u.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1A)\x0A\x11RegionalCertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xD9\x01\xEAA\xD5\x01\x0A=memorystore.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*\$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0B\x0A\x09server_ca\"\x83\x01\x0A,GetSharedRegionalCertificateAuthorityRequest\x12S\x0A\x04name\x18\x01 \x01(\x09BE\xE0A\x02\xFAA?\x0A=memorystore.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\"\xF6\x04\x0A\x0EEncryptionInfo\x12N\x0A\x0Fencryption_type\x18\x01 \x01(\x0E20.google.cloud.memorystore.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(\x0E27.google.cloud.memorystore.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*W\x0A\x13PscConnectionStatus\x12%\x0A!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0D\x0A\x09NOT_FOUND\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\xE3\x19\x0A\x0BMemorystore\x12\xB6\x01\x0A\x0DListInstances\x121.google.cloud.memorystore.v1.ListInstancesRequest\x1A2.google.cloud.memorystore.v1.ListInstancesResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xA3\x01\x0A\x0BGetInstance\x12/.google.cloud.memorystore.v1.GetInstanceRequest\x1A%.google.cloud.memorystore.v1.Instance\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xE2\x01\x0A\x0ECreateInstance\x122.google.cloud.memorystore.v1.CreateInstanceRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x1Bparent,instance,instance_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xE4\x01\x0A\x0EUpdateInstance\x122.google.cloud.memorystore.v1.UpdateInstanceRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x14instance,update_mask\x82\xD3\xE4\x93\x02B26/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xCE\x01\x0A\x0EDeleteInstance\x122.google.cloud.memorystore.v1.DeleteInstanceRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xDC\x01\x0A\x17GetCertificateAuthority\x12;.google.cloud.memorystore.v1.GetCertificateAuthorityRequest\x1A1.google.cloud.memorystore.v1.CertificateAuthority\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority\x12\x88\x02\x0A%GetSharedRegionalCertificateAuthority\x12I.google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest\x1A?.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority\"S\xDAA\x04name\x82\xD3\xE4\x93\x02F\x12D/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x87\x02\x0A\x15RescheduleMaintenance\x129.google.cloud.memorystore.v1.RescheduleMaintenanceRequest\x1A\x1D.google.longrunning.Operation\"\x93\x01\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\"name,reschedule_type,schedule_time\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance:\x01*\x12\xD6\x01\x0A\x15ListBackupCollections\x129.google.cloud.memorystore.v1.ListBackupCollectionsRequest\x1A:.google.cloud.memorystore.v1.ListBackupCollectionsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/backupCollections\x12\xC3\x01\x0A\x13GetBackupCollection\x127.google.cloud.memorystore.v1.GetBackupCollectionRequest\x1A-.google.cloud.memorystore.v1.BackupCollection\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xC2\x01\x0A\x0BListBackups\x12/.google.cloud.memorystore.v1.ListBackupsRequest\x1A0.google.cloud.memorystore.v1.ListBackupsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xAF\x01\x0A\x09GetBackup\x12-.google.cloud.memorystore.v1.GetBackupRequest\x1A#.google.cloud.memorystore.v1.Backup\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xDC\x01\x0A\x0CDeleteBackup\x120.google.cloud.memorystore.v1.DeleteBackupRequest\x1A\x1D.google.longrunning.Operation\"{\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02A*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xD0\x01\x0A\x0CExportBackup\x120.google.cloud.memorystore.v1.ExportBackupRequest\x1A\x1D.google.longrunning.Operation\"o\xCAA\x1B\x0A\x06Backup\x12\x11OperationMetadata\x82\xD3\xE4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xCB\x01\x0A\x0EBackupInstance\x122.google.cloud.memorystore.v1.BackupInstanceRequest\x1A\x1D.google.longrunning.Operation\"f\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x029\"4/v1/{name=projects/*/locations/*/instances/*}:backup:\x01*\x1AN\xCAA\x1Amemorystore.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x90\x07\x0A\x1Fcom.google.cloud.memorystore.v1B\x0BV1mainProtoP\x01ZAcloud.google.com/go/memorystore/apiv1/memorystorepb;memorystorepb\xAA\x02\x1BGoogle.Cloud.Memorystore.V1\xCA\x02\x1BGoogle\\Cloud\\Memorystore\\V1\xEA\x02\x1EGoogle::Cloud::Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php new file mode 100644 index 000000000000..8b96cfc1b4da --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php @@ -0,0 +1,165 @@ +google.cloud.memorystore.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.memorystore.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 .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\Memorystore\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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Trigger automated backups at a fixed frequency. + * + * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\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.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\AutomatedBackupConfig\FixedFrequencySchedule $var + * @return $this + */ + public function setFixedFrequencySchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\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.memorystore.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.memorystore.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\Memorystore\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 .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 .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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php new file mode 100644 index 000000000000..d916286078c4 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php new file mode 100644 index 000000000000..dc5d8690a63e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php @@ -0,0 +1,82 @@ +google.cloud.memorystore.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 .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\Memorystore\V1\Memorystore::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 .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 .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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php new file mode 100644 index 000000000000..1d09ea1856cc --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php @@ -0,0 +1,585 @@ +google.cloud.memorystore.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 Instance + * UID] OR customer specified while backup instance. 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. Instance resource path of this backup. + * + * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * Output only. Instance uid of this backup. + * + * Generated from protobuf field string instance_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $instance_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. valkey-7.5/valkey-8.0, etc. + * + * 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.memorystore.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $backup_files; + /** + * Output only. Node type of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_type = 0; + /** + * Output only. Number of replicas for the instance. + * + * 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 instance. + * + * 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.memorystore.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.memorystore.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.memorystore.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 Instance + * UID] OR customer specified while backup instance. Example: + * 20240515123000_1234 + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup was created. + * @type string $instance + * Output only. Instance resource path of this backup. + * @type string $instance_uid + * Output only. Instance 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. valkey-7.5/valkey-8.0, etc. + * @type \Google\Cloud\Memorystore\V1\BackupFile[] $backup_files + * Output only. List of backup files of the backup. + * @type int $node_type + * Output only. Node type of the instance. + * @type int $replica_count + * Output only. Number of replicas for the instance. + * @type int $shard_count + * Output only. Number of shards for the instance. + * @type int $backup_type + * Output only. Type of the backup. + * @type int $state + * Output only. State of the backup. + * @type \Google\Cloud\Memorystore\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\Memorystore\V1\Memorystore::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 Instance + * UID] OR customer specified while backup instance. 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 Instance + * UID] OR customer specified while backup instance. 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. Instance resource path of this backup. + * + * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Output only. Instance resource path of this backup. + * + * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Output only. Instance uid of this backup. + * + * Generated from protobuf field string instance_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getInstanceUid() + { + return $this->instance_uid; + } + + /** + * Output only. Instance uid of this backup. + * + * Generated from protobuf field string instance_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setInstanceUid($var) + { + GPBUtil::checkString($var, True); + $this->instance_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. valkey-7.5/valkey-8.0, etc. + * + * 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. valkey-7.5/valkey-8.0, etc. + * + * 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.memorystore.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Memorystore\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.memorystore.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\BackupFile[] $var + * @return $this + */ + public function setBackupFiles($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\BackupFile::class); + $this->backup_files = $arr; + + return $this; + } + + /** + * Output only. Node type of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.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 instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setNodeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\NodeType::class); + $this->node_type = $var; + + return $this; + } + + /** + * Output only. Number of replicas for the instance. + * + * 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 instance. + * + * 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 instance. + * + * 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 instance. + * + * 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.memorystore.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.memorystore.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\Memorystore\V1\Backup\BackupType::class); + $this->backup_type = $var; + + return $this; + } + + /** + * Output only. State of the backup. + * + * Generated from protobuf field .google.cloud.memorystore.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.memorystore.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\Memorystore\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Encryption information of the backup. + * + * Generated from protobuf field .google.cloud.memorystore.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\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.memorystore.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\EncryptionInfo $var + * @return $this + */ + public function setEncryptionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php new file mode 100644 index 000000000000..580d320c0689 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php new file mode 100644 index 000000000000..508e35abe74a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php @@ -0,0 +1,76 @@ +google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php new file mode 100644 index 000000000000..e58b229dafcc --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php @@ -0,0 +1,371 @@ +google.cloud.memorystore.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 instance uid of the backup collection. + * + * Generated from protobuf field string instance_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $instance_uid = ''; + /** + * Output only. The full resource path of the instance the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * 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 = ''; + /** + * Output only. The time when the backup collection was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Total size of all backups in the backup collection. + * + * Generated from protobuf field int64 total_backup_size_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_backup_size_bytes = 0; + /** + * Output only. Total number of backups in the backup collection. + * + * Generated from protobuf field int64 total_backup_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $total_backup_count = 0; + /** + * Output only. The last time a backup was created in the backup collection. + * + * Generated from protobuf field .google.protobuf.Timestamp last_backup_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_backup_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Full resource path of the backup collection. + * @type string $instance_uid + * Output only. The instance uid of the backup collection. + * @type string $instance + * Output only. The full resource path of the instance the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/instances/{instance} + * @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. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the backup collection was created. + * @type int|string $total_backup_size_bytes + * Output only. Total size of all backups in the backup collection. + * @type int|string $total_backup_count + * Output only. Total number of backups in the backup collection. + * @type \Google\Protobuf\Timestamp $last_backup_time + * Output only. The last time a backup was created in the backup collection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::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 instance uid of the backup collection. + * + * Generated from protobuf field string instance_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getInstanceUid() + { + return $this->instance_uid; + } + + /** + * Output only. The instance uid of the backup collection. + * + * Generated from protobuf field string instance_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setInstanceUid($var) + { + GPBUtil::checkString($var, True); + $this->instance_uid = $var; + + return $this; + } + + /** + * Output only. The full resource path of the instance the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Output only. The full resource path of the instance the backup collection + * belongs to. Example: + * projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $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; + } + + /** + * Output only. The time when the backup collection was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 collection was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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. Total size of all backups in the backup collection. + * + * Generated from protobuf field int64 total_backup_size_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalBackupSizeBytes() + { + return $this->total_backup_size_bytes; + } + + /** + * Output only. Total size of all backups in the backup collection. + * + * Generated from protobuf field int64 total_backup_size_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalBackupSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->total_backup_size_bytes = $var; + + return $this; + } + + /** + * Output only. Total number of backups in the backup collection. + * + * Generated from protobuf field int64 total_backup_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getTotalBackupCount() + { + return $this->total_backup_count; + } + + /** + * Output only. Total number of backups in the backup collection. + * + * Generated from protobuf field int64 total_backup_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setTotalBackupCount($var) + { + GPBUtil::checkInt64($var); + $this->total_backup_count = $var; + + return $this; + } + + /** + * Output only. The last time a backup was created in the backup collection. + * + * Generated from protobuf field .google.protobuf.Timestamp last_backup_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastBackupTime() + { + return $this->last_backup_time; + } + + public function hasLastBackupTime() + { + return isset($this->last_backup_time); + } + + public function clearLastBackupTime() + { + unset($this->last_backup_time); + } + + /** + * Output only. The last time a backup was created in the backup collection. + * + * Generated from protobuf field .google.protobuf.Timestamp last_backup_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastBackupTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_backup_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php new file mode 100644 index 000000000000..eb1c7ef6f4d9 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php @@ -0,0 +1,145 @@ +google.cloud.memorystore.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\Memorystore\V1\Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php new file mode 100644 index 000000000000..2b259029c3bc --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php @@ -0,0 +1,187 @@ +google.cloud.memorystore.v1.BackupInstanceRequest + */ +class BackupInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * 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 = ''; + /** + * 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 Instance 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. Instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a Google Cloud region. Please see + * {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1\BackupInstanceRequest + * + * @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. Instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * where `location_id` refers to a Google Cloud 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 Instance UID] is used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * 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. Instance resource name using the form: + * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` + * 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; + } + + /** + * 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 Instance 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 Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php new file mode 100644 index 000000000000..09b458ecd2ea --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php @@ -0,0 +1,117 @@ +google.cloud.memorystore.v1.CertificateAuthority + */ +class CertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * + * 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\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority $managed_server_ca + * A managed server certificate authority. + * @type string $name + * Identifier. Unique name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * A managed server certificate authority. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; + * @return \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority|null + */ + public function getManagedServerCa() + { + return $this->readOneof(2); + } + + public function hasManagedServerCa() + { + return $this->hasOneof(2); + } + + /** + * A managed server certificate authority. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; + * @param \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority $var + * @return $this + */ + public function setManagedServerCa($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Identifier. Unique name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * + * 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 certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php new file mode 100644 index 000000000000..272d095f6b6e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority + */ +class ManagedCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * PEM encoded CA certificate chains for managed server authentication. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $ca_certs + * PEM encoded CA certificate chains for managed server authentication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * PEM encoded CA certificate chains for managed server authentication. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain> + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * PEM encoded CA certificate chains for managed server authentication. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * @param \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain::class); + $this->ca_certs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php new file mode 100644 index 000000000000..23088d04e0ac --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain + */ +class CertChain extends \Google\Protobuf\Internal\Message +{ + /** + * The certificates that form the CA chain in order of leaf to root. + * + * 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 in order of leaf to root. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * The certificates that form the CA chain in order of leaf to root. + * + * Generated from protobuf field repeated string certificates = 1; + * @return RepeatedField + */ + public function getCertificates() + { + return $this->certificates; + } + + /** + * The certificates that form the CA chain in order of leaf to root. + * + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php new file mode 100644 index 000000000000..64a1b5bfe162 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1.ConnectionType + */ +class ConnectionType +{ + /** + * Connection Type is not set + * + * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; + */ + const CONNECTION_TYPE_UNSPECIFIED = 0; + /** + * Connection that will be used for topology discovery. + * + * Generated from protobuf enum CONNECTION_TYPE_DISCOVERY = 1; + */ + const CONNECTION_TYPE_DISCOVERY = 1; + /** + * Connection that will be used as primary endpoint to access primary. + * + * Generated from protobuf enum CONNECTION_TYPE_PRIMARY = 2; + */ + const CONNECTION_TYPE_PRIMARY = 2; + /** + * Connection 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php new file mode 100644 index 000000000000..fe9396611a54 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php @@ -0,0 +1,279 @@ +google.cloud.memorystore.v1.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see MemorystoreClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Memorystore\V1\Instance $instance Required. The instance to create. + * @param string $instanceId Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * + * This value is subject to the following restrictions: + * + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * @return \Google\Cloud\Memorystore\V1\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Memorystore\V1\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * @type string $instance_id + * Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * @type \Google\Cloud\Memorystore\V1\Instance $instance + * Required. The instance to create. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * + * 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 parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * + * 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 ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memorystore\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memorystore\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php new file mode 100644 index 000000000000..0871270c1dfa --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php @@ -0,0 +1,285 @@ +google.cloud.memorystore.v1.CrossInstanceReplicationConfig + */ +class CrossInstanceReplicationConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The role of the instance in cross instance replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole instance_role = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_role = 0; + /** + * Optional. Details of the primary instance that is used as the replication + * source for this secondary instance. + * This field is only set for a secondary instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $primary_instance = null; + /** + * Optional. List of secondary instances that are replicating from this + * primary instance. + * This field is only set for a primary instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $secondary_instances; + /** + * Output only. The last time cross instance 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 instances participating + * in the cross instance replication. This view will be provided by every + * member instance irrespective of its instance role(primary or secondary). + * A primary instance can provide information about all the secondary + * instances replicating from it. However, a secondary instance only knows + * about the primary instance from which it is replicating. However, for + * scenarios, where the primary instance is unavailable(e.g. regional outage), + * a Getinstance request can be sent to any other member instance and this + * field will list all the member instances participating in cross instance + * replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.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 $instance_role + * Required. The role of the instance in cross instance replication. + * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $primary_instance + * Optional. Details of the primary instance that is used as the replication + * source for this secondary instance. + * This field is only set for a secondary instance. + * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $secondary_instances + * Optional. List of secondary instances that are replicating from this + * primary instance. + * This field is only set for a primary instance. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time cross instance replication config was updated. + * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\Membership $membership + * Output only. An output only view of all the member instances participating + * in the cross instance replication. This view will be provided by every + * member instance irrespective of its instance role(primary or secondary). + * A primary instance can provide information about all the secondary + * instances replicating from it. However, a secondary instance only knows + * about the primary instance from which it is replicating. However, for + * scenarios, where the primary instance is unavailable(e.g. regional outage), + * a Getinstance request can be sent to any other member instance and this + * field will list all the member instances participating in cross instance + * replication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The role of the instance in cross instance replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole instance_role = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getInstanceRole() + { + return $this->instance_role; + } + + /** + * Required. The role of the instance in cross instance replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole instance_role = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setInstanceRole($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\InstanceRole::class); + $this->instance_role = $var; + + return $this; + } + + /** + * Optional. Details of the primary instance that is used as the replication + * source for this secondary instance. + * This field is only set for a secondary instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance|null + */ + public function getPrimaryInstance() + { + return $this->primary_instance; + } + + public function hasPrimaryInstance() + { + return isset($this->primary_instance); + } + + public function clearPrimaryInstance() + { + unset($this->primary_instance); + } + + /** + * Optional. Details of the primary instance that is used as the replication + * source for this secondary instance. + * This field is only set for a secondary instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $var + * @return $this + */ + public function setPrimaryInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); + $this->primary_instance = $var; + + return $this; + } + + /** + * Optional. List of secondary instances that are replicating from this + * primary instance. + * This field is only set for a primary instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance> + */ + public function getSecondaryInstances() + { + return $this->secondary_instances; + } + + /** + * Optional. List of secondary instances that are replicating from this + * primary instance. + * This field is only set for a primary instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $var + * @return $this + */ + public function setSecondaryInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); + $this->secondary_instances = $arr; + + return $this; + } + + /** + * Output only. The last time cross instance 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 instance 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 instances participating + * in the cross instance replication. This view will be provided by every + * member instance irrespective of its instance role(primary or secondary). + * A primary instance can provide information about all the secondary + * instances replicating from it. However, a secondary instance only knows + * about the primary instance from which it is replicating. However, for + * scenarios, where the primary instance is unavailable(e.g. regional outage), + * a Getinstance request can be sent to any other member instance and this + * field will list all the member instances participating in cross instance + * replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\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 instances participating + * in the cross instance replication. This view will be provided by every + * member instance irrespective of its instance role(primary or secondary). + * A primary instance can provide information about all the secondary + * instances replicating from it. However, a secondary instance only knows + * about the primary instance from which it is replicating. However, for + * scenarios, where the primary instance is unavailable(e.g. regional outage), + * a Getinstance request can be sent to any other member instance and this + * field will list all the member instances participating in cross instance + * replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\Membership::class); + $this->membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php new file mode 100644 index 000000000000..2ec06fcd820c --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php @@ -0,0 +1,73 @@ +google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole + */ +class InstanceRole +{ + /** + * instance role is not set. + * The behavior is equivalent to NONE. + * + * Generated from protobuf enum INSTANCE_ROLE_UNSPECIFIED = 0; + */ + const INSTANCE_ROLE_UNSPECIFIED = 0; + /** + * This instance does not participate in cross instance replication. It is + * an independent instance and does not replicate to or from any other + * instances. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * A instance that allows both reads and writes. Any data written to this + * instance is also replicated to the attached secondary instances. + * + * Generated from protobuf enum PRIMARY = 2; + */ + const PRIMARY = 2; + /** + * A instance that allows only reads and replicates data from a primary + * instance. + * + * Generated from protobuf enum SECONDARY = 3; + */ + const SECONDARY = 3; + + private static $valueToName = [ + self::INSTANCE_ROLE_UNSPECIFIED => 'INSTANCE_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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php new file mode 100644 index 000000000000..c0c8e2d43d85 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php @@ -0,0 +1,120 @@ +google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership + */ +class Membership extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The primary instance that acts as the source of replication + * for the secondary instances. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $primary_instance = null; + /** + * Output only. The list of secondary instances replicating from the primary + * instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $secondary_instances; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $primary_instance + * Output only. The primary instance that acts as the source of replication + * for the secondary instances. + * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $secondary_instances + * Output only. The list of secondary instances replicating from the primary + * instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The primary instance that acts as the source of replication + * for the secondary instances. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance|null + */ + public function getPrimaryInstance() + { + return $this->primary_instance; + } + + public function hasPrimaryInstance() + { + return isset($this->primary_instance); + } + + public function clearPrimaryInstance() + { + unset($this->primary_instance); + } + + /** + * Output only. The primary instance that acts as the source of replication + * for the secondary instances. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $var + * @return $this + */ + public function setPrimaryInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); + $this->primary_instance = $var; + + return $this; + } + + /** + * Output only. The list of secondary instances replicating from the primary + * instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance> + */ + public function getSecondaryInstances() + { + return $this->secondary_instances; + } + + /** + * Output only. The list of secondary instances replicating from the primary + * instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $var + * @return $this + */ + public function setSecondaryInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); + $this->secondary_instances = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php new file mode 100644 index 000000000000..e87aa7674832 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php @@ -0,0 +1,106 @@ +google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance + */ +class RemoteInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The full resource path of the remote instance in + * the format: projects//locations//instances/ + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $instance = ''; + /** + * Output only. The unique identifier of the remote instance. + * + * Generated from protobuf field string uid = 2 [(.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 $instance + * Optional. The full resource path of the remote instance in + * the format: projects//locations//instances/ + * @type string $uid + * Output only. The unique identifier of the remote instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The full resource path of the remote instance in + * the format: projects//locations//instances/ + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getInstance() + { + return $this->instance; + } + + /** + * Optional. The full resource path of the remote instance in + * the format: projects//locations//instances/ + * + * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkString($var, True); + $this->instance = $var; + + return $this; + } + + /** + * Output only. The unique identifier of the remote instance. + * + * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The unique identifier of the remote instance. + * + * Generated from protobuf field string uid = 2 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..bb934821fa4d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php @@ -0,0 +1,120 @@ +google.cloud.memorystore.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Instance 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. Instance backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * Please see {@see MemorystoreClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\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. Instance 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Instance 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. Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php new file mode 100644 index 000000000000..73a414e222bf --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php @@ -0,0 +1,160 @@ +google.cloud.memorystore.v1.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1\DeleteInstanceRequest + * + * @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. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php new file mode 100644 index 000000000000..a429b20e773e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php @@ -0,0 +1,143 @@ +google.cloud.memorystore.v1.DiscoveryEndpoint + */ +class DiscoveryEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. IP address of the exposed endpoint clients connect to. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $address = ''; + /** + * Output only. The port number of the exposed endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $port = 0; + /** + * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address + * Output only. IP address of the exposed endpoint clients connect to. + * @type int $port + * Output only. The port number of the exposed endpoint. + * @type string $network + * Output only. 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. IP address of the exposed endpoint clients connect to. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Output only. IP address of the exposed endpoint clients connect to. + * + * 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 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 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. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php new file mode 100644 index 000000000000..c0cce3354968 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php @@ -0,0 +1,187 @@ +google.cloud.memorystore.v1.EncryptionInfo + */ +class EncryptionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Type of encryption. + * + * Generated from protobuf field .google.cloud.memorystore.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.memorystore.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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Type of encryption. + * + * Generated from protobuf field .google.cloud.memorystore.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.memorystore.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\Memorystore\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.memorystore.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.memorystore.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\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php new file mode 100644 index 000000000000..1dfa01c07bba --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php @@ -0,0 +1,104 @@ +google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php new file mode 100644 index 000000000000..91ff312f5edf --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php @@ -0,0 +1,63 @@ +google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php new file mode 100644 index 000000000000..c6cd8faafd5d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php @@ -0,0 +1,113 @@ +google.cloud.memorystore.v1.ExportBackupRequest + */ +class ExportBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Instance 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. Instance 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Google Cloud Storage bucket, like "my-bucket". + * + * Generated from protobuf field string gcs_bucket = 2; + * @return string + */ + public function getGcsBucket() + { + return $this->readOneof(2); + } + + public function hasGcsBucket() + { + return $this->hasOneof(2); + } + + /** + * Google Cloud Storage bucket, like "my-bucket". + * + * Generated from protobuf field string gcs_bucket = 2; + * @param string $var + * @return $this + */ + public function setGcsBucket($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. Instance 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. Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php new file mode 100644 index 000000000000..fd609e85ed19 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php @@ -0,0 +1,91 @@ +google.cloud.memorystore.v1.GetBackupCollectionRequest + */ +class GetBackupCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Instance backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * 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. Instance backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a Google Cloud region. Please see + * {@see MemorystoreClient::backupCollectionName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\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. Instance backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * where `location_id` refers to a Google Cloud region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Instance backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * 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. Instance backupCollection resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php new file mode 100644 index 000000000000..504718f3ca4f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php @@ -0,0 +1,86 @@ +google.cloud.memorystore.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Instance 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. Instance backup resource name using the form: + * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` + * Please see {@see MemorystoreClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\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. Instance 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Instance 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. Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php new file mode 100644 index 000000000000..54bf38e768fa --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php @@ -0,0 +1,91 @@ +google.cloud.memorystore.v1.GetCertificateAuthorityRequest + */ +class GetCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1\GetCertificateAuthorityRequest + * + * @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. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * + * 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. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..916c14b637ff --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php @@ -0,0 +1,86 @@ +google.cloud.memorystore.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1\GetInstanceRequest + * + * @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. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php new file mode 100644 index 000000000000..2246b8a965f5 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php @@ -0,0 +1,92 @@ +google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest + */ +class GetSharedRegionalCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project}/locations/{location}/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}/locations/{location}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. Please see + * {@see MemorystoreClient::sharedRegionalCertificateAuthorityName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\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}/locations/{location}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project}/locations/{location}/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}/locations/{location}/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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php new file mode 100644 index 000000000000..a6034e26f0a5 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php @@ -0,0 +1,1918 @@ +google.cloud.memorystore.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Creation timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Latest update timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_info = null; + /** + * Output only. System assigned, unique identifier for the instance. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Optional. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * + * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replica_count = null; + /** + * Optional. Immutable. Authorization mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $authorization_mode = 0; + /** + * Optional. Immutable. In-transit encryption mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $transit_encryption_mode = 0; + /** + * Optional. Number of shards for the instance. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shard_count = 0; + /** + * Output only. Deprecated: The discovery_endpoints parameter is deprecated. + * As a result, it will not be populated if the connections are created using + * endpoints parameter. Instead of this parameter, for discovery, use + * endpoints.connections.pscConnection and + * endpoints.connections.pscAutoConnection + * with connectionType CONNECTION_TYPE_DISCOVERY. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.DiscoveryEndpoint discovery_endpoints = 12 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + private $discovery_endpoints; + /** + * Optional. Machine type for individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $node_type = 0; + /** + * Optional. Persistence configuration of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $persistence_config = null; + /** + * Optional. Engine version of the instance. + * + * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $engine_version = ''; + /** + * Optional. User-provided engine configurations for the instance. + * + * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $engine_configs; + /** + * Output only. Configuration of individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_config = null; + /** + * Optional. Immutable. Zone distribution configuration of the instance for + * node allocation. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $zone_distribution_config = null; + /** + * Optional. If set to true deletion of the instance will fail. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deletion_protection_enabled = null; + /** + * Optional. Immutable. Deprecated: Use the + * endpoints.connections.psc_auto_connection value instead. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connections = 20 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @deprecated + */ + private $psc_auto_connections; + /** + * Output only. Service attachment details to configure PSC connections. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAttachmentDetail psc_attachment_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $psc_attachment_details; + /** + * Optional. Endpoints for the instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $endpoints; + /** + * Optional. The mode config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + /** + * Optional. Input only. Simulate a maintenance event. + * + * Generated from protobuf field optional bool simulate_maintenance_event = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $simulate_maintenance_event = null; + /** + * Optional. Input only. Ondemand maintenance for the instance. + * + * Generated from protobuf field optional bool ondemand_maintenance = 28 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @deprecated + */ + protected $ondemand_maintenance = null; + /** + * Optional. Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 29 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $satisfies_pzs = null; + /** + * Optional. Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $satisfies_pzi = null; + /** + * Optional. The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * + * Generated from protobuf field .google.cloud.memorystore.v1.MaintenancePolicy maintenance_policy = 31 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance_policy = null; + /** + * Output only. Published maintenance schedule. + * + * Generated from protobuf field .google.cloud.memorystore.v1.MaintenanceSchedule maintenance_schedule = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $maintenance_schedule = null; + /** + * Optional. The config for cross instance replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig cross_instance_replication_config = 33 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cross_instance_replication_config = null; + /** + * Optional. If true, instance endpoints that are created and registered by + * customers can be deleted asynchronously. That is, such an instance endpoint + * can be de-registered before the forwarding rules in the instance endpoint + * are deleted. + * + * Generated from protobuf field optional bool async_instance_endpoints_deletion_enabled = 44 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $async_instance_endpoints_deletion_enabled = null; + /** + * Optional. The KMS key used to encrypt the at-rest data of the cluster. + * + * Generated from protobuf field optional string kms_key = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $kms_key = null; + /** + * Output only. Encryption information of the data at rest of the cluster. + * + * Generated from protobuf field .google.cloud.memorystore.v1.EncryptionInfo encryption_info = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $encryption_info = null; + /** + * Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * + * Generated from protobuf field optional string backup_collection = 47 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $backup_collection = null; + /** + * Optional. The automated backup config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig automated_backup_config = 48 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $automated_backup_config = null; + /** + * Optional. This field can be used to trigger self service update to indicate + * the desired maintenance version. The input to this field can be determined + * by the available_maintenance_versions field. + * + * Generated from protobuf field optional string maintenance_version = 49 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $maintenance_version = null; + /** + * Output only. This field represents the actual maintenance version of the + * instance. + * + * Generated from protobuf field optional string effective_maintenance_version = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $effective_maintenance_version = null; + /** + * Output only. This field is used to determine the available maintenance + * versions for the self service update. + * + * Generated from protobuf field repeated string available_maintenance_versions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $available_maintenance_versions; + /** + * Optional. Immutable. Deprecated, do not use. + * + * Generated from protobuf field bool allow_fewer_zones_deployment = 54 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @deprecated + */ + protected $allow_fewer_zones_deployment = false; + /** + * Optional. Immutable. The Server CA mode for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $server_ca_mode = null; + /** + * Optional. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + * "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.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\Memorystore\V1\Instance\GcsBackupSource $gcs_source + * Optional. Immutable. Backups that stored in Cloud Storage buckets. + * The Cloud Storage buckets need to be the same region as the instances. + * Read permission is required to import from the provided Cloud Storage + * Objects. + * @type \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource $managed_backup_source + * Optional. Immutable. Backups that generated and managed by memorystore + * service. + * @type string $name + * Identifier. Unique name of the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp of the instance. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Latest update timestamp of the instance. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to represent user-provided metadata. + * @type int $state + * Output only. Current state of the instance. + * @type \Google\Cloud\Memorystore\V1\Instance\StateInfo $state_info + * Output only. Additional information about the state of the instance. + * @type string $uid + * Output only. System assigned, unique identifier for the instance. + * @type int $replica_count + * Optional. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * @type int $authorization_mode + * Optional. Immutable. Authorization mode of the instance. + * @type int $transit_encryption_mode + * Optional. Immutable. In-transit encryption mode of the instance. + * @type int $shard_count + * Optional. Number of shards for the instance. + * @type \Google\Cloud\Memorystore\V1\DiscoveryEndpoint[] $discovery_endpoints + * Output only. Deprecated: The discovery_endpoints parameter is deprecated. + * As a result, it will not be populated if the connections are created using + * endpoints parameter. Instead of this parameter, for discovery, use + * endpoints.connections.pscConnection and + * endpoints.connections.pscAutoConnection + * with connectionType CONNECTION_TYPE_DISCOVERY. + * @type int $node_type + * Optional. Machine type for individual nodes of the instance. + * @type \Google\Cloud\Memorystore\V1\PersistenceConfig $persistence_config + * Optional. Persistence configuration of the instance. + * @type string $engine_version + * Optional. Engine version of the instance. + * @type array|\Google\Protobuf\Internal\MapField $engine_configs + * Optional. User-provided engine configurations for the instance. + * @type \Google\Cloud\Memorystore\V1\NodeConfig $node_config + * Output only. Configuration of individual nodes of the instance. + * @type \Google\Cloud\Memorystore\V1\ZoneDistributionConfig $zone_distribution_config + * Optional. Immutable. Zone distribution configuration of the instance for + * node allocation. + * @type bool $deletion_protection_enabled + * Optional. If set to true deletion of the instance will fail. + * @type \Google\Cloud\Memorystore\V1\PscAutoConnection[] $psc_auto_connections + * Optional. Immutable. Deprecated: Use the + * endpoints.connections.psc_auto_connection value instead. + * @type \Google\Cloud\Memorystore\V1\PscAttachmentDetail[] $psc_attachment_details + * Output only. Service attachment details to configure PSC connections. + * @type \Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint[] $endpoints + * Optional. Endpoints for the instance. + * @type int $mode + * Optional. The mode config for the instance. + * @type bool $simulate_maintenance_event + * Optional. Input only. Simulate a maintenance event. + * @type bool $ondemand_maintenance + * Optional. Input only. Ondemand maintenance for the instance. + * @type bool $satisfies_pzs + * Optional. Output only. Reserved for future use. + * @type bool $satisfies_pzi + * Optional. Output only. Reserved for future use. + * @type \Google\Cloud\Memorystore\V1\MaintenancePolicy $maintenance_policy + * Optional. The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * @type \Google\Cloud\Memorystore\V1\MaintenanceSchedule $maintenance_schedule + * Output only. Published maintenance schedule. + * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig $cross_instance_replication_config + * Optional. The config for cross instance replication. + * @type bool $async_instance_endpoints_deletion_enabled + * Optional. If true, instance endpoints that are created and registered by + * customers can be deleted asynchronously. That is, such an instance endpoint + * can be de-registered before the forwarding rules in the instance endpoint + * are deleted. + * @type string $kms_key + * Optional. The KMS key used to encrypt the at-rest data of the cluster. + * @type \Google\Cloud\Memorystore\V1\EncryptionInfo $encryption_info + * Output only. Encryption information of the data at rest of the cluster. + * @type string $backup_collection + * Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * @type \Google\Cloud\Memorystore\V1\AutomatedBackupConfig $automated_backup_config + * Optional. The automated backup config for the instance. + * @type string $maintenance_version + * Optional. This field can be used to trigger self service update to indicate + * the desired maintenance version. The input to this field can be determined + * by the available_maintenance_versions field. + * @type string $effective_maintenance_version + * Output only. This field represents the actual maintenance version of the + * instance. + * @type string[] $available_maintenance_versions + * Output only. This field is used to determine the available maintenance + * versions for the self service update. + * @type bool $allow_fewer_zones_deployment + * Optional. Immutable. Deprecated, do not use. + * @type int $server_ca_mode + * Optional. Immutable. The Server CA mode for the instance. + * @type string $server_ca_pool + * Optional. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Immutable. Backups that stored in Cloud Storage buckets. + * The Cloud Storage buckets need to be the same region as the instances. + * Read permission is required to import from the provided Cloud Storage + * Objects. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.GcsBackupSource gcs_source = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Memorystore\V1\Instance\GcsBackupSource|null + */ + public function getGcsSource() + { + return $this->readOneof(23); + } + + public function hasGcsSource() + { + return $this->hasOneof(23); + } + + /** + * Optional. Immutable. Backups that stored in Cloud Storage buckets. + * The Cloud Storage buckets need to be the same region as the instances. + * Read permission is required to import from the provided Cloud Storage + * Objects. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.GcsBackupSource gcs_source = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1\Instance\GcsBackupSource $var + * @return $this + */ + public function setGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\GcsBackupSource::class); + $this->writeOneof(23, $var); + + return $this; + } + + /** + * Optional. Immutable. Backups that generated and managed by memorystore + * service. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.ManagedBackupSource managed_backup_source = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource|null + */ + public function getManagedBackupSource() + { + return $this->readOneof(24); + } + + public function hasManagedBackupSource() + { + return $this->hasOneof(24); + } + + /** + * Optional. Immutable. Backups that generated and managed by memorystore + * service. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.ManagedBackupSource managed_backup_source = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource $var + * @return $this + */ + public function setManagedBackupSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource::class); + $this->writeOneof(24, $var); + + return $this; + } + + /** + * Identifier. Unique name of the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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 instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. Creation timestamp of the instance. + * + * 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. Creation timestamp of the instance. + * + * 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. Latest update timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Latest update timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1\Instance\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 state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\Instance\StateInfo $var + * @return $this + */ + public function setStateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\StateInfo::class); + $this->state_info = $var; + + return $this; + } + + /** + * Output only. System assigned, unique identifier for the instance. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System assigned, unique identifier for the instance. + * + * Generated from protobuf field string uid = 7 [(.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; + } + + /** + * Optional. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * + * 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. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * + * 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. Immutable. Authorization mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getAuthorizationMode() + { + return $this->authorization_mode; + } + + /** + * Optional. Immutable. Authorization mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setAuthorizationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\AuthorizationMode::class); + $this->authorization_mode = $var; + + return $this; + } + + /** + * Optional. Immutable. In-transit encryption mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getTransitEncryptionMode() + { + return $this->transit_encryption_mode; + } + + /** + * Optional. Immutable. In-transit encryption mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setTransitEncryptionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\TransitEncryptionMode::class); + $this->transit_encryption_mode = $var; + + return $this; + } + + /** + * Optional. Number of shards for the instance. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Optional. Number of shards for the instance. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt32($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Output only. Deprecated: The discovery_endpoints parameter is deprecated. + * As a result, it will not be populated if the connections are created using + * endpoints parameter. Instead of this parameter, for discovery, use + * endpoints.connections.pscConnection and + * endpoints.connections.pscAutoConnection + * with connectionType CONNECTION_TYPE_DISCOVERY. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.DiscoveryEndpoint discovery_endpoints = 12 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\DiscoveryEndpoint> + * @deprecated + */ + public function getDiscoveryEndpoints() + { + if ($this->discovery_endpoints->count() !== 0) { + @trigger_error('discovery_endpoints is deprecated.', E_USER_DEPRECATED); + } + return $this->discovery_endpoints; + } + + /** + * Output only. Deprecated: The discovery_endpoints parameter is deprecated. + * As a result, it will not be populated if the connections are created using + * endpoints parameter. Instead of this parameter, for discovery, use + * endpoints.connections.pscConnection and + * endpoints.connections.pscAutoConnection + * with connectionType CONNECTION_TYPE_DISCOVERY. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.DiscoveryEndpoint discovery_endpoints = 12 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\DiscoveryEndpoint[] $var + * @return $this + * @deprecated + */ + public function setDiscoveryEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\DiscoveryEndpoint::class); + if ($arr->count() !== 0) { + @trigger_error('discovery_endpoints is deprecated.', E_USER_DEPRECATED); + } + $this->discovery_endpoints = $arr; + + return $this; + } + + /** + * Optional. Machine type for individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNodeType() + { + return $this->node_type; + } + + /** + * Optional. Machine type for individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNodeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\NodeType::class); + $this->node_type = $var; + + return $this; + } + + /** + * Optional. Persistence configuration of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1\PersistenceConfig|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 configuration of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\PersistenceConfig $var + * @return $this + */ + public function setPersistenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PersistenceConfig::class); + $this->persistence_config = $var; + + return $this; + } + + /** + * Optional. Engine version of the instance. + * + * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEngineVersion() + { + return $this->engine_version; + } + + /** + * Optional. Engine version of the instance. + * + * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEngineVersion($var) + { + GPBUtil::checkString($var, True); + $this->engine_version = $var; + + return $this; + } + + /** + * Optional. User-provided engine configurations for the instance. + * + * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEngineConfigs() + { + return $this->engine_configs; + } + + /** + * Optional. User-provided engine configurations for the instance. + * + * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEngineConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->engine_configs = $arr; + + return $this; + } + + /** + * Output only. Configuration of individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1\NodeConfig|null + */ + public function getNodeConfig() + { + return $this->node_config; + } + + public function hasNodeConfig() + { + return isset($this->node_config); + } + + public function clearNodeConfig() + { + unset($this->node_config); + } + + /** + * Output only. Configuration of individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\NodeConfig $var + * @return $this + */ + public function setNodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\NodeConfig::class); + $this->node_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Zone distribution configuration of the instance for + * node allocation. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Memorystore\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. Immutable. Zone distribution configuration of the instance for + * node allocation. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1\ZoneDistributionConfig $var + * @return $this + */ + public function setZoneDistributionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\ZoneDistributionConfig::class); + $this->zone_distribution_config = $var; + + return $this; + } + + /** + * Optional. If set to true deletion of the instance will fail. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.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. If set to true deletion of the instance will fail. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.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. Immutable. Deprecated: Use the + * endpoints.connections.psc_auto_connection value instead. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connections = 20 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\PscAutoConnection> + * @deprecated + */ + public function getPscAutoConnections() + { + if ($this->psc_auto_connections->count() !== 0) { + @trigger_error('psc_auto_connections is deprecated.', E_USER_DEPRECATED); + } + return $this->psc_auto_connections; + } + + /** + * Optional. Immutable. Deprecated: Use the + * endpoints.connections.psc_auto_connection value instead. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connections = 20 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1\PscAutoConnection[] $var + * @return $this + * @deprecated + */ + public function setPscAutoConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\PscAutoConnection::class); + if ($arr->count() !== 0) { + @trigger_error('psc_auto_connections is deprecated.', E_USER_DEPRECATED); + } + $this->psc_auto_connections = $arr; + + return $this; + } + + /** + * Output only. Service attachment details to configure PSC connections. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAttachmentDetail psc_attachment_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\PscAttachmentDetail> + */ + public function getPscAttachmentDetails() + { + return $this->psc_attachment_details; + } + + /** + * Output only. Service attachment details to configure PSC connections. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAttachmentDetail psc_attachment_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\PscAttachmentDetail[] $var + * @return $this + */ + public function setPscAttachmentDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\PscAttachmentDetail::class); + $this->psc_attachment_details = $arr; + + return $this; + } + + /** + * Optional. Endpoints for the instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint> + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * Optional. Endpoints for the instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint[] $var + * @return $this + */ + public function setEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint::class); + $this->endpoints = $arr; + + return $this; + } + + /** + * Optional. The mode config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The mode config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Input only. Simulate a maintenance event. + * + * Generated from protobuf field optional bool simulate_maintenance_event = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + */ + public function getSimulateMaintenanceEvent() + { + return isset($this->simulate_maintenance_event) ? $this->simulate_maintenance_event : false; + } + + public function hasSimulateMaintenanceEvent() + { + return isset($this->simulate_maintenance_event); + } + + public function clearSimulateMaintenanceEvent() + { + unset($this->simulate_maintenance_event); + } + + /** + * Optional. Input only. Simulate a maintenance event. + * + * Generated from protobuf field optional bool simulate_maintenance_event = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSimulateMaintenanceEvent($var) + { + GPBUtil::checkBool($var); + $this->simulate_maintenance_event = $var; + + return $this; + } + + /** + * Optional. Input only. Ondemand maintenance for the instance. + * + * Generated from protobuf field optional bool ondemand_maintenance = 28 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @return bool + * @deprecated + */ + public function getOndemandMaintenance() + { + if (isset($this->ondemand_maintenance)) { + @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->ondemand_maintenance) ? $this->ondemand_maintenance : false; + } + + public function hasOndemandMaintenance() + { + if (isset($this->ondemand_maintenance)) { + @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); + } + return isset($this->ondemand_maintenance); + } + + public function clearOndemandMaintenance() + { + @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); + unset($this->ondemand_maintenance); + } + + /** + * Optional. Input only. Ondemand maintenance for the instance. + * + * Generated from protobuf field optional bool ondemand_maintenance = 28 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setOndemandMaintenance($var) + { + @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->ondemand_maintenance = $var; + + return $this; + } + + /** + * Optional. Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 29 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSatisfiesPzs() + { + return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; + } + + public function hasSatisfiesPzs() + { + return isset($this->satisfies_pzs); + } + + public function clearSatisfiesPzs() + { + unset($this->satisfies_pzs); + } + + /** + * Optional. Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzs = 29 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Optional. Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Optional. Output only. Reserved for future use. + * + * Generated from protobuf field optional bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * Optional. The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * + * Generated from protobuf field .google.cloud.memorystore.v1.MaintenancePolicy maintenance_policy = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1\MaintenancePolicy|null + */ + public function getMaintenancePolicy() + { + return $this->maintenance_policy; + } + + public function hasMaintenancePolicy() + { + return isset($this->maintenance_policy); + } + + public function clearMaintenancePolicy() + { + unset($this->maintenance_policy); + } + + /** + * Optional. The maintenance policy for the instance. If not provided, + * the maintenance event will be performed based on Memorystore + * internal rollout schedule. + * + * Generated from protobuf field .google.cloud.memorystore.v1.MaintenancePolicy maintenance_policy = 31 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\MaintenancePolicy $var + * @return $this + */ + public function setMaintenancePolicy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\MaintenancePolicy::class); + $this->maintenance_policy = $var; + + return $this; + } + + /** + * Output only. Published maintenance schedule. + * + * Generated from protobuf field .google.cloud.memorystore.v1.MaintenanceSchedule maintenance_schedule = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1\MaintenanceSchedule|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. Published maintenance schedule. + * + * Generated from protobuf field .google.cloud.memorystore.v1.MaintenanceSchedule maintenance_schedule = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\MaintenanceSchedule $var + * @return $this + */ + public function setMaintenanceSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\MaintenanceSchedule::class); + $this->maintenance_schedule = $var; + + return $this; + } + + /** + * Optional. The config for cross instance replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig cross_instance_replication_config = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig|null + */ + public function getCrossInstanceReplicationConfig() + { + return $this->cross_instance_replication_config; + } + + public function hasCrossInstanceReplicationConfig() + { + return isset($this->cross_instance_replication_config); + } + + public function clearCrossInstanceReplicationConfig() + { + unset($this->cross_instance_replication_config); + } + + /** + * Optional. The config for cross instance replication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig cross_instance_replication_config = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig $var + * @return $this + */ + public function setCrossInstanceReplicationConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig::class); + $this->cross_instance_replication_config = $var; + + return $this; + } + + /** + * Optional. If true, instance endpoints that are created and registered by + * customers can be deleted asynchronously. That is, such an instance endpoint + * can be de-registered before the forwarding rules in the instance endpoint + * are deleted. + * + * Generated from protobuf field optional bool async_instance_endpoints_deletion_enabled = 44 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAsyncInstanceEndpointsDeletionEnabled() + { + return isset($this->async_instance_endpoints_deletion_enabled) ? $this->async_instance_endpoints_deletion_enabled : false; + } + + public function hasAsyncInstanceEndpointsDeletionEnabled() + { + return isset($this->async_instance_endpoints_deletion_enabled); + } + + public function clearAsyncInstanceEndpointsDeletionEnabled() + { + unset($this->async_instance_endpoints_deletion_enabled); + } + + /** + * Optional. If true, instance endpoints that are created and registered by + * customers can be deleted asynchronously. That is, such an instance endpoint + * can be de-registered before the forwarding rules in the instance endpoint + * are deleted. + * + * Generated from protobuf field optional bool async_instance_endpoints_deletion_enabled = 44 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAsyncInstanceEndpointsDeletionEnabled($var) + { + GPBUtil::checkBool($var); + $this->async_instance_endpoints_deletion_enabled = $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 = 45 [(.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 = 45 [(.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; + } + + /** + * Output only. Encryption information of the data at rest of the cluster. + * + * Generated from protobuf field .google.cloud.memorystore.v1.EncryptionInfo encryption_info = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\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.memorystore.v1.EncryptionInfo encryption_info = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\EncryptionInfo $var + * @return $this + */ + public function setEncryptionInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\EncryptionInfo::class); + $this->encryption_info = $var; + + return $this; + } + + /** + * Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * + * Generated from protobuf field optional string backup_collection = 47 [(.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); + } + + /** + * Output only. The backup collection full resource name. Example: + * projects/{project}/locations/{location}/backupCollections/{collection} + * + * Generated from protobuf field optional string backup_collection = 47 [(.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 automated backup config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig automated_backup_config = 48 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\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 instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig automated_backup_config = 48 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\AutomatedBackupConfig $var + * @return $this + */ + public function setAutomatedBackupConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\AutomatedBackupConfig::class); + $this->automated_backup_config = $var; + + return $this; + } + + /** + * Optional. This field can be used to trigger self service update to indicate + * the desired maintenance version. The input to this field can be determined + * by the available_maintenance_versions field. + * + * Generated from protobuf field optional string maintenance_version = 49 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMaintenanceVersion() + { + return isset($this->maintenance_version) ? $this->maintenance_version : ''; + } + + public function hasMaintenanceVersion() + { + return isset($this->maintenance_version); + } + + public function clearMaintenanceVersion() + { + unset($this->maintenance_version); + } + + /** + * Optional. This field can be used to trigger self service update to indicate + * the desired maintenance version. The input to this field can be determined + * by the available_maintenance_versions field. + * + * Generated from protobuf field optional string maintenance_version = 49 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMaintenanceVersion($var) + { + GPBUtil::checkString($var, True); + $this->maintenance_version = $var; + + return $this; + } + + /** + * Output only. This field represents the actual maintenance version of the + * instance. + * + * Generated from protobuf field optional string effective_maintenance_version = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getEffectiveMaintenanceVersion() + { + return isset($this->effective_maintenance_version) ? $this->effective_maintenance_version : ''; + } + + public function hasEffectiveMaintenanceVersion() + { + return isset($this->effective_maintenance_version); + } + + public function clearEffectiveMaintenanceVersion() + { + unset($this->effective_maintenance_version); + } + + /** + * Output only. This field represents the actual maintenance version of the + * instance. + * + * Generated from protobuf field optional string effective_maintenance_version = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setEffectiveMaintenanceVersion($var) + { + GPBUtil::checkString($var, True); + $this->effective_maintenance_version = $var; + + return $this; + } + + /** + * Output only. This field is used to determine the available maintenance + * versions for the self service update. + * + * Generated from protobuf field repeated string available_maintenance_versions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getAvailableMaintenanceVersions() + { + return $this->available_maintenance_versions; + } + + /** + * Output only. This field is used to determine the available maintenance + * versions for the self service update. + * + * Generated from protobuf field repeated string available_maintenance_versions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setAvailableMaintenanceVersions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->available_maintenance_versions = $arr; + + return $this; + } + + /** + * Optional. Immutable. Deprecated, do not use. + * + * Generated from protobuf field bool allow_fewer_zones_deployment = 54 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return bool + * @deprecated + */ + public function getAllowFewerZonesDeployment() + { + if ($this->allow_fewer_zones_deployment !== false) { + @trigger_error('allow_fewer_zones_deployment is deprecated.', E_USER_DEPRECATED); + } + return $this->allow_fewer_zones_deployment; + } + + /** + * Optional. Immutable. Deprecated, do not use. + * + * Generated from protobuf field bool allow_fewer_zones_deployment = 54 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setAllowFewerZonesDeployment($var) + { + @trigger_error('allow_fewer_zones_deployment is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->allow_fewer_zones_deployment = $var; + + return $this; + } + + /** + * Optional. Immutable. The Server CA mode for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @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. Immutable. The Server CA mode for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setServerCaMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\ServerCaMode::class); + $this->server_ca_mode = $var; + + return $this; + } + + /** + * Optional. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + * "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + * "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.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 = 58 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php new file mode 100644 index 000000000000..d697ecffc273 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.v1.Instance.AuthorizationMode + */ +class AuthorizationMode +{ + /** + * Not set. + * + * Generated from protobuf enum AUTHORIZATION_MODE_UNSPECIFIED = 0; + */ + const AUTHORIZATION_MODE_UNSPECIFIED = 0; + /** + * Authorization disabled. + * + * Generated from protobuf enum AUTH_DISABLED = 1; + */ + const AUTH_DISABLED = 1; + /** + * IAM basic authorization. + * + * Generated from protobuf enum IAM_AUTH = 2; + */ + const IAM_AUTH = 2; + + private static $valueToName = [ + self::AUTHORIZATION_MODE_UNSPECIFIED => 'AUTHORIZATION_MODE_UNSPECIFIED', + self::AUTH_DISABLED => 'AUTH_DISABLED', + self::IAM_AUTH => 'IAM_AUTH', + ]; + + 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php new file mode 100644 index 000000000000..002552c6b4ed --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php @@ -0,0 +1,111 @@ +google.cloud.memorystore.v1.Instance.ConnectionDetail + */ +class ConnectionDetail extends \Google\Protobuf\Internal\Message +{ + protected $connection; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1\PscAutoConnection $psc_auto_connection + * Immutable. Detailed information of a PSC connection that is created + * through service connectivity automation. + * @type \Google\Cloud\Memorystore\V1\PscConnection $psc_connection + * Detailed information of a PSC connection that is created by the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Detailed information of a PSC connection that is created + * through service connectivity automation. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connection = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Memorystore\V1\PscAutoConnection|null + */ + public function getPscAutoConnection() + { + return $this->readOneof(1); + } + + public function hasPscAutoConnection() + { + return $this->hasOneof(1); + } + + /** + * Immutable. Detailed information of a PSC connection that is created + * through service connectivity automation. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connection = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1\PscAutoConnection $var + * @return $this + */ + public function setPscAutoConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PscAutoConnection::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Detailed information of a PSC connection that is created by the user. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnection psc_connection = 2; + * @return \Google\Cloud\Memorystore\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 user. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnection psc_connection = 2; + * @param \Google\Cloud\Memorystore\V1\PscConnection $var + * @return $this + */ + public function setPscConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PscConnection::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConnection() + { + return $this->whichOneof("connection"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php new file mode 100644 index 000000000000..6f95c2ecc994 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1.Instance.GcsBackupSource + */ +class GcsBackupSource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. 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. Example: gs://bucket1/object1, gs://bucket2/folder2/object2 + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. 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. 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php new file mode 100644 index 000000000000..4a2d7f8ef725 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php @@ -0,0 +1,73 @@ +google.cloud.memorystore.v1.Instance.InstanceEndpoint + */ +class InstanceEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. 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.memorystore.v1.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $connections; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1\Instance\ConnectionDetail[] $connections + * Optional. 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. 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.memorystore.v1.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\Instance\ConnectionDetail> + */ + public function getConnections() + { + return $this->connections; + } + + /** + * Optional. 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.memorystore.v1.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\Instance\ConnectionDetail[] $var + * @return $this + */ + public function setConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\Instance\ConnectionDetail::class); + $this->connections = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php new file mode 100644 index 000000000000..f7998235807f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php @@ -0,0 +1,87 @@ +google.cloud.memorystore.v1.Instance.ManagedBackupSource + */ +class ManagedBackupSource extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Example: + * //memorystore.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 memorystore.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: + * //memorystore.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 memorystore.googleapis.com. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Example: + * //memorystore.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 memorystore.googleapis.com. + * + * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Optional. Example: + * //memorystore.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 memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php new file mode 100644 index 000000000000..5f2e2c41cd9d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1.Instance.Mode + */ +class Mode +{ + /** + * Mode is not specified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Deprecated: Use CLUSTER_DISABLED instead. + * + * Generated from protobuf enum STANDALONE = 1 [deprecated = true]; + */ + const STANDALONE = 1; + /** + * Instance is in cluster mode. + * + * Generated from protobuf enum CLUSTER = 2; + */ + const CLUSTER = 2; + /** + * Cluster mode is disabled for the instance. + * + * Generated from protobuf enum CLUSTER_DISABLED = 4; + */ + const CLUSTER_DISABLED = 4; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::STANDALONE => 'STANDALONE', + self::CLUSTER => 'CLUSTER', + self::CLUSTER_DISABLED => 'CLUSTER_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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php new file mode 100644 index 000000000000..3df9494ce796 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php @@ -0,0 +1,119 @@ +google.cloud.memorystore.v1.Instance.NodeType + */ +class NodeType +{ + /** + * Not set. + * + * Generated from protobuf enum NODE_TYPE_UNSPECIFIED = 0; + */ + const NODE_TYPE_UNSPECIFIED = 0; + /** + * Shared core nano. + * + * Generated from protobuf enum SHARED_CORE_NANO = 1; + */ + const SHARED_CORE_NANO = 1; + /** + * High memory medium. + * + * Generated from protobuf enum HIGHMEM_MEDIUM = 2; + */ + const HIGHMEM_MEDIUM = 2; + /** + * High memory extra large. + * + * Generated from protobuf enum HIGHMEM_XLARGE = 3; + */ + const HIGHMEM_XLARGE = 3; + /** + * Standard small. + * + * Generated from protobuf enum STANDARD_SMALL = 4; + */ + const STANDARD_SMALL = 4; + /** + * Custom micro. + * + * Generated from protobuf enum CUSTOM_MICRO = 5; + */ + const CUSTOM_MICRO = 5; + /** + * Custom mini. + * + * Generated from protobuf enum CUSTOM_MINI = 6; + */ + const CUSTOM_MINI = 6; + /** + * High cpu medium. + * + * Generated from protobuf enum HIGHCPU_MEDIUM = 7; + */ + const HIGHCPU_MEDIUM = 7; + /** + * Standard large. + * + * Generated from protobuf enum STANDARD_LARGE = 8; + */ + const STANDARD_LARGE = 8; + /** + * High memory 2x large. + * + * Generated from protobuf enum HIGHMEM_2XLARGE = 9; + */ + const HIGHMEM_2XLARGE = 9; + /** + * Custom pico. + * + * Generated from protobuf enum CUSTOM_PICO = 10; + */ + const CUSTOM_PICO = 10; + + private static $valueToName = [ + self::NODE_TYPE_UNSPECIFIED => 'NODE_TYPE_UNSPECIFIED', + self::SHARED_CORE_NANO => 'SHARED_CORE_NANO', + self::HIGHMEM_MEDIUM => 'HIGHMEM_MEDIUM', + self::HIGHMEM_XLARGE => 'HIGHMEM_XLARGE', + self::STANDARD_SMALL => 'STANDARD_SMALL', + self::CUSTOM_MICRO => 'CUSTOM_MICRO', + self::CUSTOM_MINI => 'CUSTOM_MINI', + self::HIGHCPU_MEDIUM => 'HIGHCPU_MEDIUM', + self::STANDARD_LARGE => 'STANDARD_LARGE', + self::HIGHMEM_2XLARGE => 'HIGHMEM_2XLARGE', + self::CUSTOM_PICO => 'CUSTOM_PICO', + ]; + + 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php new file mode 100644 index 000000000000..5f3fb269cc28 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php @@ -0,0 +1,89 @@ +google.cloud.memorystore.v1.Instance.ServerCaMode + */ +class ServerCaMode +{ + /** + * Server CA mode not specified. + * + * Generated from protobuf enum SERVER_CA_MODE_UNSPECIFIED = 0; + */ + const SERVER_CA_MODE_UNSPECIFIED = 0; + /** + * Each instance has its own Google-managed CA. + * + * Generated from protobuf enum GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + */ + const GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + /** + * The instance uses a Google-managed shared CA for the instance's region. + * + * Generated from protobuf enum GOOGLE_MANAGED_SHARED_CA = 2; + */ + const GOOGLE_MANAGED_SHARED_CA = 2; + /** + * The instance uses a customer-managed CA from CAS. + * + * Generated from protobuf enum CUSTOMER_MANAGED_CAS_CA = 3; + */ + const CUSTOMER_MANAGED_CAS_CA = 3; + /** + * Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. + * + * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 [deprecated = true]; + */ + const SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + /** + * Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. + * + * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 [deprecated = true]; + */ + const SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2; + /** + * Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. + * + * Generated from protobuf enum SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 [deprecated = true]; + */ + const SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3; + + private static $valueToName = [ + self::SERVER_CA_MODE_UNSPECIFIED => 'SERVER_CA_MODE_UNSPECIFIED', + self::GOOGLE_MANAGED_PER_INSTANCE_CA => 'GOOGLE_MANAGED_PER_INSTANCE_CA', + self::GOOGLE_MANAGED_SHARED_CA => 'GOOGLE_MANAGED_SHARED_CA', + self::CUSTOMER_MANAGED_CAS_CA => 'CUSTOMER_MANAGED_CAS_CA', + 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php new file mode 100644 index 000000000000..e39b52e6e858 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php @@ -0,0 +1,75 @@ +google.cloud.memorystore.v1.Instance.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Instance is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Instance has been created and is usable. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Instance is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php new file mode 100644 index 000000000000..54baa08f079f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php @@ -0,0 +1,75 @@ +google.cloud.memorystore.v1.Instance.StateInfo + */ +class StateInfo extends \Google\Protobuf\Internal\Message +{ + protected $info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo $update_info + * Output only. Describes ongoing update when instance state is UPDATING. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Describes ongoing update when instance state is UPDATING. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo|null + */ + public function getUpdateInfo() + { + return $this->readOneof(1); + } + + public function hasUpdateInfo() + { + return $this->hasOneof(1); + } + + /** + * Output only. Describes ongoing update when instance state is UPDATING. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo $var + * @return $this + */ + public function setUpdateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getInfo() + { + return $this->whichOneof("info"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php new file mode 100644 index 000000000000..55849fe67f8a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php @@ -0,0 +1,209 @@ +google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo + */ +class UpdateInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Target number of shards for the instance. + * + * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_shard_count = null; + /** + * Output only. Target number of replica nodes per shard for the instance. + * + * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_replica_count = null; + /** + * Output only. Target engine version for the instance. + * + * Generated from protobuf field optional string target_engine_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_engine_version = null; + /** + * Output only. Target node type for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.NodeType target_node_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_node_type = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_shard_count + * Output only. Target number of shards for the instance. + * @type int $target_replica_count + * Output only. Target number of replica nodes per shard for the instance. + * @type string $target_engine_version + * Output only. Target engine version for the instance. + * @type int $target_node_type + * Output only. Target node type for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Target number of shards for the instance. + * + * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Target number of shards for the instance. + * + * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTargetShardCount($var) + { + GPBUtil::checkInt32($var); + $this->target_shard_count = $var; + + return $this; + } + + /** + * Output only. Target number of replica nodes per shard for the instance. + * + * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Target number of replica nodes per shard for the instance. + * + * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTargetReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->target_replica_count = $var; + + return $this; + } + + /** + * Output only. Target engine version for the instance. + * + * Generated from protobuf field optional string target_engine_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTargetEngineVersion() + { + return isset($this->target_engine_version) ? $this->target_engine_version : ''; + } + + public function hasTargetEngineVersion() + { + return isset($this->target_engine_version); + } + + public function clearTargetEngineVersion() + { + unset($this->target_engine_version); + } + + /** + * Output only. Target engine version for the instance. + * + * Generated from protobuf field optional string target_engine_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTargetEngineVersion($var) + { + GPBUtil::checkString($var, True); + $this->target_engine_version = $var; + + return $this; + } + + /** + * Output only. Target node type for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.NodeType target_node_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getTargetNodeType() + { + return isset($this->target_node_type) ? $this->target_node_type : 0; + } + + public function hasTargetNodeType() + { + return isset($this->target_node_type); + } + + public function clearTargetNodeType() + { + unset($this->target_node_type); + } + + /** + * Output only. Target node type for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.NodeType target_node_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTargetNodeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\NodeType::class); + $this->target_node_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php new file mode 100644 index 000000000000..49b50b653c49 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.v1.Instance.TransitEncryptionMode + */ +class TransitEncryptionMode +{ + /** + * Not set. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + const TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + /** + * In-transit encryption is disabled. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_DISABLED = 1; + */ + const TRANSIT_ENCRYPTION_DISABLED = 1; + /** + * Server-managed encryption is used for in-transit encryption. + * + * Generated from protobuf enum SERVER_AUTHENTICATION = 2; + */ + const SERVER_AUTHENTICATION = 2; + + private static $valueToName = [ + self::TRANSIT_ENCRYPTION_MODE_UNSPECIFIED => 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', + self::TRANSIT_ENCRYPTION_DISABLED => 'TRANSIT_ENCRYPTION_DISABLED', + self::SERVER_AUTHENTICATION => '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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php new file mode 100644 index 000000000000..c4a5108dc7e9 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php @@ -0,0 +1,188 @@ +google.cloud.memorystore.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 Google Cloud 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.memorystore.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 Google Cloud region. Please see + * {@see MemorystoreClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\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 Google Cloud 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.memorystore.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\Memorystore\V1\Memorystore::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 Google Cloud 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 Google Cloud 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.memorystore.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.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php new file mode 100644 index 000000000000..6280a6c8f152 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php @@ -0,0 +1,171 @@ +google.cloud.memorystore.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.memorystore.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\Memorystore\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\Memorystore\V1\Memorystore::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.memorystore.v1.BackupCollection backup_collections = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\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.memorystore.v1.BackupCollection backup_collections = 1; + * @param \Google\Cloud\Memorystore\V1\BackupCollection[] $var + * @return $this + */ + public function setBackupCollections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..a4d5e9efa418 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php @@ -0,0 +1,178 @@ +google.cloud.memorystore.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.memorystore.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 MemorystoreClient::backupCollectionName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\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.memorystore.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\Memorystore\V1\Memorystore::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.memorystore.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.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..affa37699ac6 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php @@ -0,0 +1,139 @@ +google.cloud.memorystore.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.memorystore.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\Memorystore\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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Backup backups = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\Backup> + */ + public function getBackups() + { + return $this->backups; + } + + /** + * A list of backups in the project. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Backup backups = 1; + * @param \Google\Cloud\Memorystore\V1\Backup[] $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..72c0c06fb17c --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php @@ -0,0 +1,230 @@ +google.cloud.memorystore.v1.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent to list instances from. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent to list instances from. + * Format: projects/{project}/locations/{location} + * Please see {@see MemorystoreClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1\ListInstancesRequest + * + * @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 parent to list instances from. + * Format: projects/{project}/locations/{location} + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Expression for filtering results. + * @type string $order_by + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent to list instances from. + * Format: projects/{project}/locations/{location} + * + * 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 parent to list instances from. + * Format: projects/{project}/locations/{location} + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * 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. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Optional. Expression for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..5fcb221e5ec9 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php @@ -0,0 +1,147 @@ +google.cloud.memorystore.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance instances = 1; + */ + private $instances; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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\Memorystore\V1\Instance[] $instances + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance instances = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\Instance> + */ + public function getInstances() + { + return $this->instances; + } + + /** + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance instances = 1; + * @param \Google\Cloud\Memorystore\V1\Instance[] $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php new file mode 100644 index 000000000000..e7829c311621 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php @@ -0,0 +1,163 @@ +google.cloud.memorystore.v1.MaintenancePolicy + */ +class MaintenancePolicy extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time when the policy 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 when the policy 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_window is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time when the policy was updated. + * @type \Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow[] $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_window is expected to be one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time when the policy 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 when the policy 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 when the policy 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. + * + * 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_window is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow> + */ + 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_window is expected to be one. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow[] $var + * @return $this + */ + public function setWeeklyMaintenanceWindow($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow::class); + $this->weekly_maintenance_window = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php new file mode 100644 index 000000000000..3981c8b8b533 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php @@ -0,0 +1,129 @@ +google.cloud.memorystore.v1.MaintenanceSchedule + */ +class MaintenanceSchedule 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\Memorystore\V1\Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php new file mode 100644 index 000000000000..92d0a5c1b096 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1.NodeConfig + */ +class NodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Memory size in GB of the node. + * + * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gb = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $size_gb + * Output only. Memory size in GB of the node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Memory size in GB of the node. + * + * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Output only. Memory size in GB of the node. + * + * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkDouble($var); + $this->size_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php new file mode 100644 index 000000000000..772507c4b45a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.memorystore.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 been cancelled successfully + * 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 been cancelled successfully + * 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\Memorystore\V1\Memorystore::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 been cancelled successfully + * 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 been cancelled successfully + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php new file mode 100644 index 000000000000..dd2f39022e55 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php @@ -0,0 +1,155 @@ +google.cloud.memorystore.v1.PersistenceConfig + */ +class PersistenceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Current persistence mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.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.memorystore.v1.PersistenceConfig.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.memorystore.v1.PersistenceConfig.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. Current persistence mode. + * @type \Google\Cloud\Memorystore\V1\PersistenceConfig\RDBConfig $rdb_config + * Optional. RDB configuration. This field will be ignored if mode is not RDB. + * @type \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig $aof_config + * Optional. AOF configuration. This field will be ignored if mode is not AOF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Current persistence mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. Current persistence mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\PersistenceConfig\RDBConfig $var + * @return $this + */ + public function setRdbConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig $var + * @return $this + */ + public function setAofConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig::class); + $this->aof_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php new file mode 100644 index 000000000000..a12e75f50387 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1.PersistenceConfig.AOFConfig + */ +class AOFConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The fsync mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.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. The fsync mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The fsync mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAppendFsync() + { + return $this->append_fsync; + } + + /** + * Optional. The fsync mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAppendFsync($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig\AppendFsync::class); + $this->append_fsync = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php new file mode 100644 index 000000000000..28be57fb620f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php @@ -0,0 +1,71 @@ +google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync + */ +class AppendFsync +{ + /** + * Not set. Default: EVERY_SEC + * + * 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 NEVER = 1; + */ + const NEVER = 1; + /** + * Fsync every second. You may lose 1 second of data if there is a + * disaster. + * + * Generated from protobuf enum EVERY_SEC = 2; + */ + const EVERY_SEC = 2; + /** + * Fsync every time new write commands are appended to the AOF. 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::NEVER => 'NEVER', + self::EVERY_SEC => 'EVERY_SEC', + 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php new file mode 100644 index 000000000000..8fadb8e6ea7a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1.PersistenceConfig.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php new file mode 100644 index 000000000000..97581786fdac --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php @@ -0,0 +1,119 @@ +google.cloud.memorystore.v1.PersistenceConfig.RDBConfig + */ +class RDBConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rdb_snapshot_period = 0; + /** + * Optional. 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. 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.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.memorystore.v1.PersistenceConfig.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\Memorystore\V1\PersistenceConfig\RDBConfig\SnapshotPeriod::class); + $this->rdb_snapshot_period = $var; + + return $this; + } + + /** + * Optional. 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. 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php new file mode 100644 index 000000000000..4159b0d8ea5d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php @@ -0,0 +1,75 @@ +google.cloud.memorystore.v1.PersistenceConfig.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php new file mode 100644 index 000000000000..f4f98e33da93 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php @@ -0,0 +1,106 @@ +google.cloud.memorystore.v1.PscAttachmentDetail + */ +class PscAttachmentDetail 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, (.google.api.resource_reference) = { + */ + protected $service_attachment = ''; + /** + * Output only. Type of Psc endpoint. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 4 [(.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 Psc endpoint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::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, (.google.api.resource_reference) = { + * @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, (.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. Type of Psc endpoint. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getConnectionType() + { + return $this->connection_type; + } + + /** + * Output only. Type of Psc endpoint. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php new file mode 100644 index 000000000000..e2984dcb1718 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php @@ -0,0 +1,391 @@ +google.cloud.memorystore.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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $ip_address = ''; + /** + * Output only. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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 PSC connections are established. + * This should be the same project_id that the instance is being created in. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. The network where the PSC endpoints are created, 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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_status = 0; + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_type = 0; + protected $ports; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $port + * Optional. port will only be set for Primary/Reader or Discovery endpoint. + * @type string $psc_connection_id + * Output only. The PSC connection id of the forwarding rule connected to the + * service attachment. + * @type string $ip_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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * @type string $project_id + * Required. The consumer project_id where PSC connections are established. + * This should be the same project_id that the instance is being created in. + * @type string $network + * Required. The network where the PSC endpoints are created, 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: whether a connection exists + * and ACTIVE or it no longer exists. 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. port will only be set for Primary/Reader or Discovery endpoint. + * + * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPort() + { + return $this->readOneof(9); + } + + public function hasPort() + { + return $this->hasOneof(9); + } + + /** + * Optional. port will only be set for Primary/Reader or Discovery endpoint. + * + * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * 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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Output only. The IP allocated on the consumer network for the PSC + * forwarding rule. + * + * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Output only. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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 PSC connections are established. + * This should be the same project_id that the instance is being created in. + * + * 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 PSC connections are established. + * This should be the same project_id that the instance is being created in. + * + * 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 network where the PSC endpoints are created, 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 network where the PSC endpoints are created, 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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPscConnectionStatus() + { + return $this->psc_connection_status; + } + + /** + * Output only. The status of the PSC connection: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPscConnectionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PscConnectionStatus::class); + $this->psc_connection_status = $var; + + return $this; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.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.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getPorts() + { + return $this->whichOneof("ports"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php new file mode 100644 index 000000000000..2023a0defd6d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php @@ -0,0 +1,391 @@ +google.cloud.memorystore.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 ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + */ + protected $ip_address = ''; + /** + * Required. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $forwarding_rule = ''; + /** + * Output only. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + 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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_status = 0; + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_type = 0; + protected $ports; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $port + * Optional. port will only be set for Primary/Reader or Discovery endpoint. + * @type string $psc_connection_id + * Required. The PSC connection id of the forwarding rule connected to the + * service attachment. + * @type string $ip_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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * @type string $project_id + * Output only. 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 + * 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: whether a connection exists + * and ACTIVE or it no longer exists. 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. port will only be set for Primary/Reader or Discovery endpoint. + * + * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPort() + { + return $this->readOneof(9); + } + + public function hasPort() + { + return $this->hasOneof(9); + } + + /** + * Optional. port will only be set for Primary/Reader or Discovery endpoint. + * + * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * 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 ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Required. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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; + } + + /** + * Output only. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPscConnectionStatus() + { + return $this->psc_connection_status; + } + + /** + * Output only. The status of the PSC connection: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPscConnectionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PscConnectionStatus::class); + $this->psc_connection_status = $var; + + return $this; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.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.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getPorts() + { + return $this->whichOneof("ports"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php new file mode 100644 index 000000000000..f23a484d2065 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.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 ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Connection not found + * + * Generated from protobuf enum NOT_FOUND = 2; + */ + const NOT_FOUND = 2; + + private static $valueToName = [ + self::PSC_CONNECTION_STATUS_UNSPECIFIED => 'PSC_CONNECTION_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::NOT_FOUND => '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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php new file mode 100644 index 000000000000..8a4e17be3c7f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php @@ -0,0 +1,179 @@ +google.cloud.memorystore.v1.RescheduleMaintenanceRequest + */ +class RescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the instance to reschedule maintenance for: + * `projects/{project}/locations/{location_id}/instances/{instance}` + * + * 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, schedule_time must be set. + * + * Generated from protobuf field .google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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. + * 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. Name of the instance to reschedule maintenance for: + * `projects/{project}/locations/{location_id}/instances/{instance}` + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * @param int $rescheduleType Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. + * For allowed values, use constants defined on {@see \Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest\RescheduleType} + * @param \Google\Protobuf\Timestamp $scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format. + * Example: `2012-11-15T16:19:00.094Z`. + * + * @return \Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest + * + * @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. Name of the instance to reschedule maintenance for: + * `projects/{project}/locations/{location_id}/instances/{instance}` + * @type int $reschedule_type + * Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. + * @type \Google\Protobuf\Timestamp $schedule_time + * Optional. Timestamp when the maintenance shall be rescheduled to if + * reschedule_type=SPECIFIC_TIME, in RFC 3339 format. + * Example: `2012-11-15T16:19:00.094Z`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the instance to reschedule maintenance for: + * `projects/{project}/locations/{location_id}/instances/{instance}` + * + * 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. Name of the instance to reschedule maintenance for: + * `projects/{project}/locations/{location_id}/instances/{instance}` + * + * 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, schedule_time must be set. + * + * Generated from protobuf field .google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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, schedule_time must be set. + * + * Generated from protobuf field .google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setRescheduleType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest\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. + * 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. + * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php new file mode 100644 index 000000000000..bae3f3f8f4b7 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php new file mode 100644 index 000000000000..692201feb3b1 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php @@ -0,0 +1,117 @@ +google.cloud.memorystore.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\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $managed_server_ca + * CA certificate chains for memorystore 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\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * CA certificate chains for memorystore managed server authentication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * @return \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority|null + */ + public function getManagedServerCa() + { + return $this->readOneof(2); + } + + public function hasManagedServerCa() + { + return $this->hasOneof(2); + } + + /** + * CA certificate chains for memorystore managed server authentication. + * + * Generated from protobuf field .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * @param \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $var + * @return $this + */ + public function setManagedServerCa($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php new file mode 100644 index 000000000000..f3acb7621354 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php @@ -0,0 +1,71 @@ +google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority + */ +class RegionalManagedCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $ca_certs + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain> + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * @param \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain::class); + $this->ca_certs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php new file mode 100644 index 000000000000..63fc055f0169 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.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\Memorystore\V1\Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php new file mode 100644 index 000000000000..7e33c64befb8 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php @@ -0,0 +1,215 @@ +google.cloud.memorystore.v1.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Memorystore\V1\Instance $instance Required. The instance to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * @return \Google\Cloud\Memorystore\V1\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Memorystore\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * @type \Google\Cloud\Memorystore\V1\Instance $instance + * Required. The instance to update. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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. The instance to update. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memorystore\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memorystore\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php new file mode 100644 index 000000000000..d52a979d1c06 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php @@ -0,0 +1,111 @@ +google.cloud.memorystore.v1.WeeklyMaintenanceWindow + */ +class WeeklyMaintenanceWindow extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $day = 0; + /** + * Optional. Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day + * Optional. Allows to define schedule that runs specified day of the week. + * @type \Google\Type\TimeOfDay $start_time + * Optional. Start time of the window in UTC. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDay() + { + return $this->day; + } + + /** + * Optional. Allows to define schedule that runs specified day of the week. + * + * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day = $var; + + return $this; + } + + /** + * Optional. Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Start time of the window in UTC. + * + * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php new file mode 100644 index 000000000000..ac605c0cfae6 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php @@ -0,0 +1,105 @@ +google.cloud.memorystore.v1.ZoneDistributionConfig + */ +class ZoneDistributionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone = ''; + /** + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $zone + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * @type int $mode + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * + * 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; + } + + /** + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * + * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ZoneDistributionConfig\ZoneDistributionMode::class); + $this->mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php new file mode 100644 index 000000000000..868017e3436d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php @@ -0,0 +1,62 @@ +google.cloud.memorystore.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 resources across 3 zones picked at random within the + * region. + * + * Generated from protobuf enum MULTI_ZONE = 1; + */ + const MULTI_ZONE = 1; + /** + * Provision resources in a single zone. Zone field must be specified. + * + * 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/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php new file mode 100644 index 000000000000..175a5ea66f9a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php @@ -0,0 +1,96 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->backupInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + backup_instance_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_BackupInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php new file mode 100644 index 000000000000..67206ae89a72 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + + create_instance_sample($formattedParent, $instanceId); +} +// [END memorystore_v1_generated_Memorystore_CreateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php new file mode 100644 index 000000000000..5694ee621660 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->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 = MemorystoreClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]', + '[BACKUP]' + ); + + delete_backup_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_DeleteBackup_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php new file mode 100644 index 000000000000..ffc1d5ed5e23 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->deleteInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_DeleteInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php new file mode 100644 index 000000000000..56ae1d36d418 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->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 = MemorystoreClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]', + '[BACKUP]' + ); + + export_backup_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_ExportBackup_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php new file mode 100644 index 000000000000..8bb6d02959a9 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $memorystoreClient->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 = MemorystoreClient::backupName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]', + '[BACKUP]' + ); + + get_backup_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_GetBackup_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php new file mode 100644 index 000000000000..031b1df71a5a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupCollection $response */ + $response = $memorystoreClient->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 = MemorystoreClient::backupCollectionName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]' + ); + + get_backup_collection_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_GetBackupCollection_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php new file mode 100644 index 000000000000..cc1ad90d86ee --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CertificateAuthority $response */ + $response = $memorystoreClient->getCertificateAuthority($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_certificate_authority_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php new file mode 100644 index 000000000000..fb24db5221ca --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $memorystoreClient->getInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_GetInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_location.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_location.php new file mode 100644 index 000000000000..1ddecc2889fc --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 memorystore_v1_generated_Memorystore_GetLocation_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php new file mode 100644 index 000000000000..c51788ef4bda --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 = $memorystoreClient->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 = MemorystoreClient::sharedRegionalCertificateAuthorityName( + '[PROJECT]', + '[LOCATION]' + ); + + get_shared_regional_certificate_authority_sample($formattedName); +} +// [END memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php new file mode 100644 index 000000000000..9ca0805b32e1 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php @@ -0,0 +1,83 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $memorystoreClient->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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backup_collections_sample($formattedParent); +} +// [END memorystore_v1_generated_Memorystore_ListBackupCollections_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php new file mode 100644 index 000000000000..01e3569e2ad4 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $memorystoreClient->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 = MemorystoreClient::backupCollectionName( + '[PROJECT]', + '[LOCATION]', + '[BACKUP_COLLECTION]' + ); + + list_backups_sample($formattedParent); +} +// [END memorystore_v1_generated_Memorystore_ListBackups_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php new file mode 100644 index 000000000000..c45b6a6ffcd9 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $memorystoreClient->listInstances($request); + + /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END memorystore_v1_generated_Memorystore_ListInstances_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_locations.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_locations.php new file mode 100644 index 000000000000..94d43d1aacba --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 memorystore_v1_generated_Memorystore_ListLocations_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php new file mode 100644 index 000000000000..f798a47473de --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php @@ -0,0 +1,88 @@ +setName($formattedName) + ->setRescheduleType($rescheduleType); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->rescheduleMaintenance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + + reschedule_maintenance_sample($formattedName, $rescheduleType); +} +// [END memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php new file mode 100644 index 000000000000..4cd7b00a6604 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php @@ -0,0 +1,71 @@ +setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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()); + } +} +// [END memorystore_v1_generated_Memorystore_UpdateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php b/owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php new file mode 100644 index 000000000000..b3bfc7759a0b --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php @@ -0,0 +1,982 @@ + backupInstanceAsync(BackupInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $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 getCertificateAuthorityAsync(GetCertificateAuthorityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $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 listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface rescheduleMaintenanceAsync(RescheduleMaintenanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class MemorystoreClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.memorystore.v1.Memorystore'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'memorystore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'memorystore.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/memorystore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/memorystore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/memorystore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/memorystore_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 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 instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * 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} + * - 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} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - 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 'memorystore.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\Memorystore\V1\MemorystoreClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MemorystoreClient(['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 Instance. + * 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 instance'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 MemorystoreClient::backupInstanceAsync()} . + * + * @example samples/V1/MemorystoreClient/backup_instance.php + * + * @param BackupInstanceRequest $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 backupInstance(BackupInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BackupInstance', $request, $callOptions)->wait(); + } + + /** + * Creates a new Instance in a given project and location. + * + * The async variant is {@see MemorystoreClient::createInstanceAsync()} . + * + * @example samples/V1/MemorystoreClient/create_instance.php + * + * @param CreateInstanceRequest $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 createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a specific backup. + * + * The async variant is {@see MemorystoreClient::deleteBackupAsync()} . + * + * @example samples/V1/MemorystoreClient/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 single Instance. + * + * The async variant is {@see MemorystoreClient::deleteInstanceAsync()} . + * + * @example samples/V1/MemorystoreClient/delete_instance.php + * + * @param DeleteInstanceRequest $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 deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Exports a specific backup to a customer target Cloud Storage URI. + * + * The async variant is {@see MemorystoreClient::exportBackupAsync()} . + * + * @example samples/V1/MemorystoreClient/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 MemorystoreClient::getBackupAsync()} . + * + * @example samples/V1/MemorystoreClient/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 MemorystoreClient::getBackupCollectionAsync()} . + * + * @example samples/V1/MemorystoreClient/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 details about the certificate authority for an Instance. + * + * The async variant is {@see MemorystoreClient::getCertificateAuthorityAsync()} . + * + * @example samples/V1/MemorystoreClient/get_certificate_authority.php + * + * @param GetCertificateAuthorityRequest $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 getCertificateAuthority(GetCertificateAuthorityRequest $request, array $callOptions = []): CertificateAuthority + { + return $this->startApiCall('GetCertificateAuthority', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Instance. + * + * The async variant is {@see MemorystoreClient::getInstanceAsync()} . + * + * @example samples/V1/MemorystoreClient/get_instance.php + * + * @param GetInstanceRequest $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 Instance + * + * @throws ApiException Thrown if the API call fails. + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Gets the details of shared regional certificate authority information for + * Memorystore instance. + * + * The async variant is + * {@see MemorystoreClient::getSharedRegionalCertificateAuthorityAsync()} . + * + * @example samples/V1/MemorystoreClient/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 MemorystoreClient::listBackupCollectionsAsync()} . + * + * @example samples/V1/MemorystoreClient/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 MemorystoreClient::listBackupsAsync()} . + * + * @example samples/V1/MemorystoreClient/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 Instances in a given project and location. + * + * The async variant is {@see MemorystoreClient::listInstancesAsync()} . + * + * @example samples/V1/MemorystoreClient/list_instances.php + * + * @param ListInstancesRequest $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 listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Reschedules upcoming maintenance event. + * + * The async variant is {@see MemorystoreClient::rescheduleMaintenanceAsync()} . + * + * @example samples/V1/MemorystoreClient/reschedule_maintenance.php + * + * @param RescheduleMaintenanceRequest $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 rescheduleMaintenance(RescheduleMaintenanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Instance. + * + * The async variant is {@see MemorystoreClient::updateInstanceAsync()} . + * + * @example samples/V1/MemorystoreClient/update_instance.php + * + * @param UpdateInstanceRequest $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 updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see MemorystoreClient::getLocationAsync()} . + * + * @example samples/V1/MemorystoreClient/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 MemorystoreClient::listLocationsAsync()} . + * + * @example samples/V1/MemorystoreClient/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/Memorystore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Memorystore/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..f203e3b7f2d1 --- /dev/null +++ b/owl-bot-staging/Memorystore/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.memorystore.v1", + "libraryPackage": "Google\\Cloud\\Memorystore\\V1", + "services": { + "Memorystore": { + "clients": { + "grpc": { + "libraryClient": "MemorystoreGapicClient", + "rpcs": { + "BackupInstance": { + "methods": [ + "backupInstance" + ] + }, + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "ExportBackup": { + "methods": [ + "exportBackup" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupCollection": { + "methods": [ + "getBackupCollection" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "getCertificateAuthority" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "GetSharedRegionalCertificateAuthority": { + "methods": [ + "getSharedRegionalCertificateAuthority" + ] + }, + "ListBackupCollections": { + "methods": [ + "listBackupCollections" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "RescheduleMaintenance": { + "methods": [ + "rescheduleMaintenance" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json new file mode 100644 index 000000000000..d78b061c5ab7 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json @@ -0,0 +1,129 @@ +{ + "interfaces": { + "google.cloud.memorystore.v1.Memorystore": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "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": { + "BackupInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ExportBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBackupCollection": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSharedRegionalCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBackupCollections": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RescheduleMaintenance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateInstance": { + "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/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php new file mode 100644 index 000000000000..cf864fedcf4e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php @@ -0,0 +1,329 @@ + [ + 'google.cloud.memorystore.v1.Memorystore' => [ + 'BackupInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', + '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\Cloud\Memorystore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', + '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\Memorystore\V1\Backup', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupCollection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1\BackupCollection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1\CertificateAuthority', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSharedRegionalCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\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\Memorystore\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\Memorystore\V1\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1\ListInstancesResponse', + '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}', + '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}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + '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/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php new file mode 100644 index 000000000000..4466095dcb1e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php @@ -0,0 +1,273 @@ + [ + '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.memorystore.v1.Memorystore' => [ + 'BackupInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:backup', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + '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', + ], + ], + ], + ], + 'GetCertificateAuthority' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', + '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', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RescheduleMaintenance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + ], + '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/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php b/owl-bot-staging/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php new file mode 100644 index 000000000000..6f7bc4612c3c --- /dev/null +++ b/owl-bot-staging/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php @@ -0,0 +1,1938 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MemorystoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MemorystoreClient($options); + } + + /** @test */ + public function backupInstanceTest() + { + $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/backupInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $simulateMaintenanceEvent = false; + $ondemandMaintenance = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $asyncInstanceEndpointsDeletionEnabled = true; + $kmsKey = 'kmsKey-591635343'; + $backupCollection = 'backupCollection-1182285509'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; + $allowFewerZonesDeployment = false; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); + $expectedResponse->setOndemandMaintenance($ondemandMaintenance); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); + $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/backupInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new BackupInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->backupInstance($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.memorystore.v1.Memorystore/BackupInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/backupInstanceTest'); + $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 backupInstanceExceptionTest() + { + $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/backupInstanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new BackupInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->backupInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/backupInstanceTest'); + 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 createInstanceTest() + { + $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/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $simulateMaintenanceEvent = false; + $ondemandMaintenance = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $asyncInstanceEndpointsDeletionEnabled = true; + $kmsKey = 'kmsKey-591635343'; + $backupCollection = 'backupCollection-1182285509'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; + $allowFewerZonesDeployment = false; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); + $expectedResponse->setOndemandMaintenance($ondemandMaintenance); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); + $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($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.memorystore.v1.Memorystore/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $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 createInstanceExceptionTest() + { + $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/createInstanceTest'); + $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]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + 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.memorystore.v1.Memorystore/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 deleteInstanceTest() + { + $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/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($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.memorystore.v1.Memorystore/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $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 deleteInstanceExceptionTest() + { + $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/deleteInstanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + 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'; + $instance = 'instance555127957'; + $instanceUid = 'instanceUid-737331802'; + $totalSizeBytes = 115423608; + $engineVersion = 'engineVersion-618177573'; + $replicaCount = 564075208; + $shardCount = 495377042; + $uid = 'uid115792'; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setInstance($instance); + $expectedResponse->setInstanceUid($instanceUid); + $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.memorystore.v1.Memorystore/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'; + $instance = 'instance555127957'; + $instanceUid = 'instanceUid-737331802'; + $totalSizeBytes = 115423608; + $engineVersion = 'engineVersion-618177573'; + $replicaCount = 564075208; + $shardCount = 495377042; + $uid = 'uid115792'; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setInstance($instance); + $expectedResponse->setInstanceUid($instanceUid); + $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.memorystore.v1.Memorystore/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'; + $instanceUid = 'instanceUid-737331802'; + $instance = 'instance555127957'; + $kmsKey = 'kmsKey-591635343'; + $uid = 'uid115792'; + $totalBackupSizeBytes = 665105137; + $totalBackupCount = 775900525; + $expectedResponse = new BackupCollection(); + $expectedResponse->setName($name2); + $expectedResponse->setInstanceUid($instanceUid); + $expectedResponse->setInstance($instance); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setUid($uid); + $expectedResponse->setTotalBackupSizeBytes($totalBackupSizeBytes); + $expectedResponse->setTotalBackupCount($totalBackupCount); + $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.memorystore.v1.Memorystore/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 getCertificateAuthorityTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetCertificateAuthorityRequest()) + ->setName($formattedName); + $response = $gapicClient->getCertificateAuthority($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.memorystore.v1.Memorystore/GetCertificateAuthority', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateAuthorityExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetCertificateAuthorityRequest()) + ->setName($formattedName); + try { + $gapicClient->getCertificateAuthority($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 getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $simulateMaintenanceEvent = false; + $ondemandMaintenance = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $asyncInstanceEndpointsDeletionEnabled = true; + $kmsKey = 'kmsKey-591635343'; + $backupCollection = 'backupCollection-1182285509'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; + $allowFewerZonesDeployment = false; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); + $expectedResponse->setOndemandMaintenance($ondemandMaintenance); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); + $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($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.memorystore.v1.Memorystore/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($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.memorystore.v1.Memorystore/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.memorystore.v1.Memorystore/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.memorystore.v1.Memorystore/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 listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memorystore.v1.Memorystore/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $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 ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($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 rescheduleMaintenanceTest() + { + $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/rescheduleMaintenanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $simulateMaintenanceEvent = false; + $ondemandMaintenance = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $asyncInstanceEndpointsDeletionEnabled = true; + $kmsKey = 'kmsKey-591635343'; + $backupCollection = 'backupCollection-1182285509'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; + $allowFewerZonesDeployment = false; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); + $expectedResponse->setOndemandMaintenance($ondemandMaintenance); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); + $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/rescheduleMaintenanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + $request = (new RescheduleMaintenanceRequest()) + ->setName($formattedName) + ->setRescheduleType($rescheduleType); + $response = $gapicClient->rescheduleMaintenance($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.memorystore.v1.Memorystore/RescheduleMaintenance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getRescheduleType(); + $this->assertProtobufEquals($rescheduleType, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); + $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 rescheduleMaintenanceExceptionTest() + { + $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/rescheduleMaintenanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; + $request = (new RescheduleMaintenanceRequest()) + ->setName($formattedName) + ->setRescheduleType($rescheduleType); + $response = $gapicClient->rescheduleMaintenance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); + 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 updateInstanceTest() + { + $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/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $simulateMaintenanceEvent = false; + $ondemandMaintenance = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $asyncInstanceEndpointsDeletionEnabled = true; + $kmsKey = 'kmsKey-591635343'; + $backupCollection = 'backupCollection-1182285509'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; + $allowFewerZonesDeployment = false; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); + $expectedResponse->setOndemandMaintenance($ondemandMaintenance); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); + $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instance = new Instance(); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + $response = $gapicClient->updateInstance($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.memorystore.v1.Memorystore/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $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 updateInstanceExceptionTest() + { + $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/updateInstanceTest'); + $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 + $instance = new Instance(); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + 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 backupInstanceAsyncTest() + { + $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/backupInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $simulateMaintenanceEvent = false; + $ondemandMaintenance = true; + $satisfiesPzs = false; + $satisfiesPzi = false; + $asyncInstanceEndpointsDeletionEnabled = true; + $kmsKey = 'kmsKey-591635343'; + $backupCollection = 'backupCollection-1182285509'; + $maintenanceVersion = 'maintenanceVersion-588975188'; + $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; + $allowFewerZonesDeployment = false; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); + $expectedResponse->setOndemandMaintenance($ondemandMaintenance); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); + $expectedResponse->setKmsKey($kmsKey); + $expectedResponse->setBackupCollection($backupCollection); + $expectedResponse->setMaintenanceVersion($maintenanceVersion); + $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); + $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/backupInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new BackupInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->backupInstanceAsync($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.memorystore.v1.Memorystore/BackupInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/backupInstanceTest'); + $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()); + } +} diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php b/owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php new file mode 100644 index 000000000000..e7a96f51fe16 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\xF6W\x0A1google/cloud/memorystore/v1beta/memorystore.proto\x12\x1Fgoogle.cloud.memorystore.v1beta\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\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB8\x1B\x0A\x08Instance\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\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x06labels\x18\x04 \x03(\x0B25.google.cloud.memorystore.v1beta.Instance.LabelsEntryB\x03\xE0A\x01\x12C\x0A\x05state\x18\x05 \x01(\x0E2/.google.cloud.memorystore.v1beta.Instance.StateB\x03\xE0A\x03\x12L\x0A\x0Astate_info\x18\x06 \x01(\x0B23.google.cloud.memorystore.v1beta.Instance.StateInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x07 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x00\x88\x01\x01\x12_\x0A\x12authorization_mode\x18\x09 \x01(\x0E2;.google.cloud.memorystore.v1beta.Instance.AuthorizationModeB\x06\xE0A\x01\xE0A\x05\x12h\x0A\x17transit_encryption_mode\x18\x0A \x01(\x0E2?.google.cloud.memorystore.v1beta.Instance.TransitEncryptionModeB\x06\xE0A\x01\xE0A\x05\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x01\x12T\x0A\x13discovery_endpoints\x18\x0C \x03(\x0B22.google.cloud.memorystore.v1beta.DiscoveryEndpointB\x03\xE0A\x03\x12M\x0A\x09node_type\x18\x0D \x01(\x0E22.google.cloud.memorystore.v1beta.Instance.NodeTypeB\x06\xE0A\x01\xE0A\x05\x12S\x0A\x12persistence_config\x18\x0E \x01(\x0B22.google.cloud.memorystore.v1beta.PersistenceConfigB\x03\xE0A\x01\x12\x1E\x0A\x0Eengine_version\x18\x0F \x01(\x09B\x06\xE0A\x01\xE0A\x05\x12Y\x0A\x0Eengine_configs\x18\x10 \x03(\x0B2<.google.cloud.memorystore.v1beta.Instance.EngineConfigsEntryB\x03\xE0A\x01\x12E\x0A\x0Bnode_config\x18\x11 \x01(\x0B2+.google.cloud.memorystore.v1beta.NodeConfigB\x03\xE0A\x03\x12a\x0A\x18zone_distribution_config\x18\x12 \x01(\x0B27.google.cloud.memorystore.v1beta.ZoneDistributionConfigB\x06\xE0A\x01\xE0A\x05\x12-\x0A\x1Bdeletion_protection_enabled\x18\x13 \x01(\x08B\x03\xE0A\x01H\x01\x88\x01\x01\x12X\x0A\x14psc_auto_connections\x18\x14 \x03(\x0B22.google.cloud.memorystore.v1beta.PscAutoConnectionB\x06\xE0A\x02\xE0A\x05\x12R\x0A\x09endpoints\x18\x19 \x03(\x0B2:.google.cloud.memorystore.v1beta.Instance.InstanceEndpointB\x03\xE0A\x01\x12A\x0A\x04mode\x18\x1A \x01(\x0E2..google.cloud.memorystore.v1beta.Instance.ModeB\x03\xE0A\x01\x12[\x0A\x0Eserver_ca_mode\x188 \x01(\x0E26.google.cloud.memorystore.v1beta.Instance.ServerCaModeB\x06\xE0A\x01\xE0A\x05H\x02\x88\x01\x01\x12G\x0A\x0Eserver_ca_pool\x189 \x01(\x09B*\xE0A\x01\xE0A\x05\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x03\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x18: \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x04\x88\x01\x01\x1A\xFC\x01\x0A\x09StateInfo\x12Z\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2>.google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfoB\x03\xE0A\x03H\x00\x1A\x8A\x01\x0A\x0AUpdateInfo\x12\$\x0A\x12target_shard_count\x18\x01 \x01(\x05B\x03\xE0A\x03H\x00\x88\x01\x01\x12&\x0A\x14target_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x03H\x01\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x06\x0A\x04info\x1Ah\x0A\x10InstanceEndpoint\x12T\x0A\x0Bconnections\x18\x01 \x03(\x0B2:.google.cloud.memorystore.v1beta.Instance.ConnectionDetailB\x03\xE0A\x01\x1A\xBD\x01\x0A\x10ConnectionDetail\x12Q\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B22.google.cloud.memorystore.v1beta.PscAutoConnectionH\x00\x12H\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2..google.cloud.memorystore.v1beta.PscConnectionH\x00B\x0C\x0A\x0Aconnection\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A4\x0A\x12EngineConfigsEntry\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\"X\x0A\x11AuthorizationMode\x12\"\x0A\x1EAUTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DAUTH_DISABLED\x10\x01\x12\x0C\x0A\x08IAM_AUTH\x10\x02\"|\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\x0A\x15SERVER_AUTHENTICATION\x10\x02\"\xE8\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10SHARED_CORE_NANO\x10\x01\x12\x12\x0A\x0EHIGHMEM_MEDIUM\x10\x02\x12\x12\x0A\x0EHIGHMEM_XLARGE\x10\x03\x12\x12\x0A\x0ESTANDARD_SMALL\x10\x04\x12\x10\x0A\x0CCUSTOM_MICRO\x10\x05\x12\x0F\x0A\x0BCUSTOM_MINI\x10\x06\x12\x12\x0A\x0EHIGHCPU_MEDIUM\x10\x07\x12\x12\x0A\x0ESTANDARD_LARGE\x10\x08\x12\x13\x0A\x0FHIGHMEM_2XLARGE\x10\x09\x12\x0F\x0A\x0BCUSTOM_PICO\x10\x0A\"S\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ASTANDALONE\x10\x01\x1A\x02\x08\x01\x12\x0B\x0A\x07CLUSTER\x10\x02\x12\x14\x0A\x10CLUSTER_DISABLED\x10\x04\"\xA9\x02\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\x0A\x1EGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1C\x0A\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1B\x0A\x17CUSTOMER_MANAGED_CAS_CA\x10\x03\x125\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1A\x02\x08\x01\x12/\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1A\x02\x08\x01\x12.\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1A\x02\x08\x01\x1A\x02\x10\x01:{\xEAAx\x0A#memorystore.googleapis.com/Instance\x12google.cloud.memorystore.v1beta.CertificateAuthority + */ +class CertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * + * 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\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority $managed_server_ca + * A managed server certificate authority. + * @type string $name + * Identifier. Unique name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * A managed server certificate authority. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; + * @return \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority|null + */ + public function getManagedServerCa() + { + return $this->readOneof(2); + } + + public function hasManagedServerCa() + { + return $this->hasOneof(2); + } + + /** + * A managed server certificate authority. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; + * @param \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority $var + * @return $this + */ + public function setManagedServerCa($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Identifier. Unique name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * + * 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 certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance} + * + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php new file mode 100644 index 000000000000..6bfca468f5a0 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority + */ +class ManagedCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * PEM encoded CA certificate chains for managed server authentication. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $ca_certs + * PEM encoded CA certificate chains for managed server authentication. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * PEM encoded CA certificate chains for managed server authentication. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain> + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * PEM encoded CA certificate chains for managed server authentication. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; + * @param \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain::class); + $this->ca_certs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php new file mode 100644 index 000000000000..3304391c27e7 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain + */ +class CertChain extends \Google\Protobuf\Internal\Message +{ + /** + * The certificates that form the CA chain in order of leaf to root. + * + * 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 in order of leaf to root. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * The certificates that form the CA chain in order of leaf to root. + * + * Generated from protobuf field repeated string certificates = 1; + * @return RepeatedField + */ + public function getCertificates() + { + return $this->certificates; + } + + /** + * The certificates that form the CA chain in order of leaf to root. + * + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php new file mode 100644 index 000000000000..de509bd3c016 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1beta.ConnectionType + */ +class ConnectionType +{ + /** + * Connection Type is not set + * + * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; + */ + const CONNECTION_TYPE_UNSPECIFIED = 0; + /** + * Connection that will be used for topology discovery. + * + * Generated from protobuf enum CONNECTION_TYPE_DISCOVERY = 1; + */ + const CONNECTION_TYPE_DISCOVERY = 1; + /** + * Connection that will be used as primary endpoint to access primary. + * + * Generated from protobuf enum CONNECTION_TYPE_PRIMARY = 2; + */ + const CONNECTION_TYPE_PRIMARY = 2; + /** + * Connection 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php new file mode 100644 index 000000000000..d9f62dd543bb --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php @@ -0,0 +1,279 @@ +google.cloud.memorystore.v1beta.CreateInstanceRequest + */ +class CreateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * Please see {@see MemorystoreClient::locationName()} for help formatting this field. + * @param \Google\Cloud\Memorystore\V1beta\Instance $instance Required. The instance to create. + * @param string $instanceId Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * + * This value is subject to the following restrictions: + * + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * @return \Google\Cloud\Memorystore\V1beta\CreateInstanceRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Memorystore\V1beta\Instance $instance, string $instanceId): self + { + return (new self()) + ->setParent($parent) + ->setInstance($instance) + ->setInstanceId($instanceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * @type string $instance_id + * Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * @type \Google\Cloud\Memorystore\V1beta\Instance $instance + * Required. The instance to create. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * + * 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 parent resource where this instance will be created. + * Format: projects/{project}/locations/{location} + * + * 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 ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The ID to use for the instance, which will become the final + * component of the instance's resource name. + * This value is subject to the following restrictions: + * * Must be 4-63 characters in length + * * Must begin with a letter or digit + * * Must contain only lowercase letters, digits, and hyphens + * * Must not end with a hyphen + * * Must be unique within a location + * + * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memorystore\V1beta\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to create. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memorystore\V1beta\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php new file mode 100644 index 000000000000..5fc8f43a6c0b --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php @@ -0,0 +1,160 @@ +google.cloud.memorystore.v1beta.DeleteInstanceRequest + */ +class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $name Required. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1beta\DeleteInstanceRequest + * + * @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. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. The name of the instance to delete. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * 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. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php new file mode 100644 index 000000000000..a3d0464ab08d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php @@ -0,0 +1,143 @@ +google.cloud.memorystore.v1beta.DiscoveryEndpoint + */ +class DiscoveryEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. IP address of the exposed endpoint clients connect to. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $address = ''; + /** + * Output only. The port number of the exposed endpoint. + * + * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $port = 0; + /** + * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $network = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $address + * Output only. IP address of the exposed endpoint clients connect to. + * @type int $port + * Output only. The port number of the exposed endpoint. + * @type string $network + * Output only. 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\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. IP address of the exposed endpoint clients connect to. + * + * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getAddress() + { + return $this->address; + } + + /** + * Output only. IP address of the exposed endpoint clients connect to. + * + * 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 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 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. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setNetwork($var) + { + GPBUtil::checkString($var, True); + $this->network = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php new file mode 100644 index 000000000000..4923d57d11ac --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php @@ -0,0 +1,91 @@ +google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest + */ +class GetCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1beta\GetCertificateAuthorityRequest + * + * @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. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * + * 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. The name of the certificate authority. + * Format: + * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority + * + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php new file mode 100644 index 000000000000..a0478e7c8395 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php @@ -0,0 +1,86 @@ +google.cloud.memorystore.v1beta.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1beta\GetInstanceRequest + * + * @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. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. The name of the instance to retrieve. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php new file mode 100644 index 000000000000..3c606395ea23 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php @@ -0,0 +1,92 @@ +google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest + */ +class GetSharedRegionalCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project}/locations/{location}/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}/locations/{location}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. Please see + * {@see MemorystoreClient::sharedRegionalCertificateAuthorityName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1beta\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}/locations/{location}/sharedRegionalCertificateAuthority` + * where `location_id` refers to a Google Cloud region. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Regional certificate authority resource name using the form: + * `projects/{project}/locations/{location}/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}/locations/{location}/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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php new file mode 100644 index 000000000000..bd3ad66c08fd --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php @@ -0,0 +1,1021 @@ +google.cloud.memorystore.v1beta.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Unique name of the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Creation timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Latest update timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Optional. Labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Additional information about the state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state_info = null; + /** + * Output only. System assigned, unique identifier for the instance. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $uid = ''; + /** + * Optional. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * + * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $replica_count = null; + /** + * Optional. Immutable. Authorization mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $authorization_mode = 0; + /** + * Optional. Immutable. In-transit encryption mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $transit_encryption_mode = 0; + /** + * Optional. Number of shards for the instance. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shard_count = 0; + /** + * Output only. Endpoints clients can connect to the instance through. + * Currently only one discovery endpoint is supported. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $discovery_endpoints; + /** + * Optional. Immutable. Machine type for individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $node_type = 0; + /** + * Optional. Persistence configuration of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $persistence_config = null; + /** + * Optional. Immutable. Engine version of the instance. + * + * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $engine_version = ''; + /** + * Optional. User-provided engine configurations for the instance. + * + * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $engine_configs; + /** + * Output only. Configuration of individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $node_config = null; + /** + * Optional. Immutable. Zone distribution configuration of the instance for + * node allocation. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $zone_distribution_config = null; + /** + * Optional. If set to true deletion of the instance will fail. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $deletion_protection_enabled = null; + /** + * Required. Immutable. User inputs and resource details of the auto-created + * PSC connections. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + private $psc_auto_connections; + /** + * Optional. Endpoints for the instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $endpoints; + /** + * Optional. The mode config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + /** + * Optional. Immutable. The Server CA mode for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $server_ca_mode = null; + /** + * Optional. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + * "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $rotate_server_certificate = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Unique name of the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Creation timestamp of the instance. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Latest update timestamp of the instance. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Labels to represent user-provided metadata. + * @type int $state + * Output only. Current state of the instance. + * @type \Google\Cloud\Memorystore\V1beta\Instance\StateInfo $state_info + * Output only. Additional information about the state of the instance. + * @type string $uid + * Output only. System assigned, unique identifier for the instance. + * @type int $replica_count + * Optional. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * @type int $authorization_mode + * Optional. Immutable. Authorization mode of the instance. + * @type int $transit_encryption_mode + * Optional. Immutable. In-transit encryption mode of the instance. + * @type int $shard_count + * Optional. Number of shards for the instance. + * @type \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint[] $discovery_endpoints + * Output only. Endpoints clients can connect to the instance through. + * Currently only one discovery endpoint is supported. + * @type int $node_type + * Optional. Immutable. Machine type for individual nodes of the instance. + * @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig $persistence_config + * Optional. Persistence configuration of the instance. + * @type string $engine_version + * Optional. Immutable. Engine version of the instance. + * @type array|\Google\Protobuf\Internal\MapField $engine_configs + * Optional. User-provided engine configurations for the instance. + * @type \Google\Cloud\Memorystore\V1beta\NodeConfig $node_config + * Output only. Configuration of individual nodes of the instance. + * @type \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig $zone_distribution_config + * Optional. Immutable. Zone distribution configuration of the instance for + * node allocation. + * @type bool $deletion_protection_enabled + * Optional. If set to true deletion of the instance will fail. + * @type \Google\Cloud\Memorystore\V1beta\PscAutoConnection[] $psc_auto_connections + * Required. Immutable. User inputs and resource details of the auto-created + * PSC connections. + * @type \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint[] $endpoints + * Optional. Endpoints for the instance. + * @type int $mode + * Optional. The mode config for the instance. + * @type int $server_ca_mode + * Optional. Immutable. The Server CA mode for the instance. + * @type string $server_ca_pool + * Optional. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is 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\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Unique name of the instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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 instance. + * Format: projects/{project}/locations/{location}/instances/{instance} + * + * 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. Creation timestamp of the instance. + * + * 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. Creation timestamp of the instance. + * + * 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. Latest update timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Latest update timestamp of the instance. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Labels to represent user-provided metadata. + * + * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Additional information about the state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1beta\Instance\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 state of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1beta\Instance\StateInfo $var + * @return $this + */ + public function setStateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance\StateInfo::class); + $this->state_info = $var; + + return $this; + } + + /** + * Output only. System assigned, unique identifier for the instance. + * + * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. System assigned, unique identifier for the instance. + * + * Generated from protobuf field string uid = 7 [(.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; + } + + /** + * Optional. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * + * 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. Number of replica nodes per shard. If omitted the default is 0 + * replicas. + * + * 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. Immutable. Authorization mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getAuthorizationMode() + { + return $this->authorization_mode; + } + + /** + * Optional. Immutable. Authorization mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setAuthorizationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\AuthorizationMode::class); + $this->authorization_mode = $var; + + return $this; + } + + /** + * Optional. Immutable. In-transit encryption mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getTransitEncryptionMode() + { + return $this->transit_encryption_mode; + } + + /** + * Optional. Immutable. In-transit encryption mode of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setTransitEncryptionMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\TransitEncryptionMode::class); + $this->transit_encryption_mode = $var; + + return $this; + } + + /** + * Optional. Number of shards for the instance. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Optional. Number of shards for the instance. + * + * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt32($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Output only. Endpoints clients can connect to the instance through. + * Currently only one discovery endpoint is supported. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint> + */ + public function getDiscoveryEndpoints() + { + return $this->discovery_endpoints; + } + + /** + * Output only. Endpoints clients can connect to the instance through. + * Currently only one discovery endpoint is supported. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint[] $var + * @return $this + */ + public function setDiscoveryEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint::class); + $this->discovery_endpoints = $arr; + + return $this; + } + + /** + * Optional. Immutable. Machine type for individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getNodeType() + { + return $this->node_type; + } + + /** + * Optional. Immutable. Machine type for individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setNodeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\NodeType::class); + $this->node_type = $var; + + return $this; + } + + /** + * Optional. Persistence configuration of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig|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 configuration of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig $var + * @return $this + */ + public function setPersistenceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig::class); + $this->persistence_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Engine version of the instance. + * + * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getEngineVersion() + { + return $this->engine_version; + } + + /** + * Optional. Immutable. Engine version of the instance. + * + * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setEngineVersion($var) + { + GPBUtil::checkString($var, True); + $this->engine_version = $var; + + return $this; + } + + /** + * Optional. User-provided engine configurations for the instance. + * + * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEngineConfigs() + { + return $this->engine_configs; + } + + /** + * Optional. User-provided engine configurations for the instance. + * + * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEngineConfigs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->engine_configs = $arr; + + return $this; + } + + /** + * Output only. Configuration of individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1beta\NodeConfig|null + */ + public function getNodeConfig() + { + return $this->node_config; + } + + public function hasNodeConfig() + { + return isset($this->node_config); + } + + public function clearNodeConfig() + { + unset($this->node_config); + } + + /** + * Output only. Configuration of individual nodes of the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1beta\NodeConfig $var + * @return $this + */ + public function setNodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\NodeConfig::class); + $this->node_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Zone distribution configuration of the instance for + * node allocation. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\Memorystore\V1beta\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. Immutable. Zone distribution configuration of the instance for + * node allocation. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig $var + * @return $this + */ + public function setZoneDistributionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig::class); + $this->zone_distribution_config = $var; + + return $this; + } + + /** + * Optional. If set to true deletion of the instance will fail. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.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. If set to true deletion of the instance will fail. + * + * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDeletionProtectionEnabled($var) + { + GPBUtil::checkBool($var); + $this->deletion_protection_enabled = $var; + + return $this; + } + + /** + * Required. Immutable. User inputs and resource details of the auto-created + * PSC connections. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\PscAutoConnection> + */ + public function getPscAutoConnections() + { + return $this->psc_auto_connections; + } + + /** + * Required. Immutable. User inputs and resource details of the auto-created + * PSC connections. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\Memorystore\V1beta\PscAutoConnection[] $var + * @return $this + */ + public function setPscAutoConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\PscAutoConnection::class); + $this->psc_auto_connections = $arr; + + return $this; + } + + /** + * Optional. Endpoints for the instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint> + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * Optional. Endpoints for the instance. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint[] $var + * @return $this + */ + public function setEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint::class); + $this->endpoints = $arr; + + return $this; + } + + /** + * Optional. The mode config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. The mode config for the instance. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\Mode::class); + $this->mode = $var; + + return $this; + } + + /** + * Optional. Immutable. The Server CA mode for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @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. Immutable. The Server CA mode for the instance. + * + * Generated from protobuf field optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setServerCaMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\ServerCaMode::class); + $this->server_ca_mode = $var; + + return $this; + } + + /** + * Optional. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + * "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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. Immutable. The customer-managed CA pool for the instance. Only + * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: + * "projects/{project}/locations/{region}/caPools/{ca_pool}". + * + * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.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 = 58 [(.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; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php new file mode 100644 index 000000000000..a69a466d84a8 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.v1beta.Instance.AuthorizationMode + */ +class AuthorizationMode +{ + /** + * Not set. + * + * Generated from protobuf enum AUTHORIZATION_MODE_UNSPECIFIED = 0; + */ + const AUTHORIZATION_MODE_UNSPECIFIED = 0; + /** + * Authorization disabled. + * + * Generated from protobuf enum AUTH_DISABLED = 1; + */ + const AUTH_DISABLED = 1; + /** + * IAM basic authorization. + * + * Generated from protobuf enum IAM_AUTH = 2; + */ + const IAM_AUTH = 2; + + private static $valueToName = [ + self::AUTHORIZATION_MODE_UNSPECIFIED => 'AUTHORIZATION_MODE_UNSPECIFIED', + self::AUTH_DISABLED => 'AUTH_DISABLED', + self::IAM_AUTH => 'IAM_AUTH', + ]; + + 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php new file mode 100644 index 000000000000..238f18cb18f1 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php @@ -0,0 +1,111 @@ +google.cloud.memorystore.v1beta.Instance.ConnectionDetail + */ +class ConnectionDetail extends \Google\Protobuf\Internal\Message +{ + protected $connection; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1beta\PscAutoConnection $psc_auto_connection + * Detailed information of a PSC connection that is created through + * service connectivity automation. + * @type \Google\Cloud\Memorystore\V1beta\PscConnection $psc_connection + * Detailed information of a PSC connection that is created by the user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Detailed information of a PSC connection that is created through + * service connectivity automation. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connection = 1; + * @return \Google\Cloud\Memorystore\V1beta\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.memorystore.v1beta.PscAutoConnection psc_auto_connection = 1; + * @param \Google\Cloud\Memorystore\V1beta\PscAutoConnection $var + * @return $this + */ + public function setPscAutoConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PscAutoConnection::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Detailed information of a PSC connection that is created by the user. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnection psc_connection = 2; + * @return \Google\Cloud\Memorystore\V1beta\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 user. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnection psc_connection = 2; + * @param \Google\Cloud\Memorystore\V1beta\PscConnection $var + * @return $this + */ + public function setPscConnection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PscConnection::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConnection() + { + return $this->whichOneof("connection"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php new file mode 100644 index 000000000000..c075e14c01e7 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php @@ -0,0 +1,73 @@ +google.cloud.memorystore.v1beta.Instance.InstanceEndpoint + */ +class InstanceEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. 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.memorystore.v1beta.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $connections; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail[] $connections + * Optional. 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\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. 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.memorystore.v1beta.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail> + */ + public function getConnections() + { + return $this->connections; + } + + /** + * Optional. 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.memorystore.v1beta.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail[] $var + * @return $this + */ + public function setConnections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail::class); + $this->connections = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php new file mode 100644 index 000000000000..15ca51ac5b54 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1beta.Instance.Mode + */ +class Mode +{ + /** + * Mode is not specified. + * + * Generated from protobuf enum MODE_UNSPECIFIED = 0; + */ + const MODE_UNSPECIFIED = 0; + /** + * Deprecated: Use CLUSTER_DISABLED instead. + * + * Generated from protobuf enum STANDALONE = 1 [deprecated = true]; + */ + const STANDALONE = 1; + /** + * Instance is in cluster mode. + * + * Generated from protobuf enum CLUSTER = 2; + */ + const CLUSTER = 2; + /** + * Cluster mode is disabled for the instance. + * + * Generated from protobuf enum CLUSTER_DISABLED = 4; + */ + const CLUSTER_DISABLED = 4; + + private static $valueToName = [ + self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', + self::STANDALONE => 'STANDALONE', + self::CLUSTER => 'CLUSTER', + self::CLUSTER_DISABLED => 'CLUSTER_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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php new file mode 100644 index 000000000000..b5381475265e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php @@ -0,0 +1,119 @@ +google.cloud.memorystore.v1beta.Instance.NodeType + */ +class NodeType +{ + /** + * Not set. + * + * Generated from protobuf enum NODE_TYPE_UNSPECIFIED = 0; + */ + const NODE_TYPE_UNSPECIFIED = 0; + /** + * Shared core nano. + * + * Generated from protobuf enum SHARED_CORE_NANO = 1; + */ + const SHARED_CORE_NANO = 1; + /** + * High memory medium. + * + * Generated from protobuf enum HIGHMEM_MEDIUM = 2; + */ + const HIGHMEM_MEDIUM = 2; + /** + * High memory extra large. + * + * Generated from protobuf enum HIGHMEM_XLARGE = 3; + */ + const HIGHMEM_XLARGE = 3; + /** + * Standard small. + * + * Generated from protobuf enum STANDARD_SMALL = 4; + */ + const STANDARD_SMALL = 4; + /** + * Custom micro. + * + * Generated from protobuf enum CUSTOM_MICRO = 5; + */ + const CUSTOM_MICRO = 5; + /** + * Custom mini. + * + * Generated from protobuf enum CUSTOM_MINI = 6; + */ + const CUSTOM_MINI = 6; + /** + * High cpu medium. + * + * Generated from protobuf enum HIGHCPU_MEDIUM = 7; + */ + const HIGHCPU_MEDIUM = 7; + /** + * Standard large. + * + * Generated from protobuf enum STANDARD_LARGE = 8; + */ + const STANDARD_LARGE = 8; + /** + * High memory 2xlarge. + * + * Generated from protobuf enum HIGHMEM_2XLARGE = 9; + */ + const HIGHMEM_2XLARGE = 9; + /** + * Custom pico. + * + * Generated from protobuf enum CUSTOM_PICO = 10; + */ + const CUSTOM_PICO = 10; + + private static $valueToName = [ + self::NODE_TYPE_UNSPECIFIED => 'NODE_TYPE_UNSPECIFIED', + self::SHARED_CORE_NANO => 'SHARED_CORE_NANO', + self::HIGHMEM_MEDIUM => 'HIGHMEM_MEDIUM', + self::HIGHMEM_XLARGE => 'HIGHMEM_XLARGE', + self::STANDARD_SMALL => 'STANDARD_SMALL', + self::CUSTOM_MICRO => 'CUSTOM_MICRO', + self::CUSTOM_MINI => 'CUSTOM_MINI', + self::HIGHCPU_MEDIUM => 'HIGHCPU_MEDIUM', + self::STANDARD_LARGE => 'STANDARD_LARGE', + self::HIGHMEM_2XLARGE => 'HIGHMEM_2XLARGE', + self::CUSTOM_PICO => 'CUSTOM_PICO', + ]; + + 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php new file mode 100644 index 000000000000..41b461ead10d --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php @@ -0,0 +1,89 @@ +google.cloud.memorystore.v1beta.Instance.ServerCaMode + */ +class ServerCaMode +{ + /** + * Server CA mode not specified. + * + * Generated from protobuf enum SERVER_CA_MODE_UNSPECIFIED = 0; + */ + const SERVER_CA_MODE_UNSPECIFIED = 0; + /** + * Each instance has its own Google-managed CA. + * + * Generated from protobuf enum GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + */ + const GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + /** + * The instance uses a Google-managed shared CA for the instance's region. + * + * Generated from protobuf enum GOOGLE_MANAGED_SHARED_CA = 2; + */ + const GOOGLE_MANAGED_SHARED_CA = 2; + /** + * The instance uses a customer-managed CA from CAS. + * + * Generated from protobuf enum CUSTOMER_MANAGED_CAS_CA = 3; + */ + const CUSTOMER_MANAGED_CAS_CA = 3; + /** + * Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. + * + * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 [deprecated = true]; + */ + const SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1; + /** + * Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. + * + * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 [deprecated = true]; + */ + const SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2; + /** + * Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. + * + * Generated from protobuf enum SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 [deprecated = true]; + */ + const SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3; + + private static $valueToName = [ + self::SERVER_CA_MODE_UNSPECIFIED => 'SERVER_CA_MODE_UNSPECIFIED', + self::GOOGLE_MANAGED_PER_INSTANCE_CA => 'GOOGLE_MANAGED_PER_INSTANCE_CA', + self::GOOGLE_MANAGED_SHARED_CA => 'GOOGLE_MANAGED_SHARED_CA', + self::CUSTOMER_MANAGED_CAS_CA => 'CUSTOMER_MANAGED_CAS_CA', + 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php new file mode 100644 index 000000000000..d712db16ad7e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php @@ -0,0 +1,75 @@ +google.cloud.memorystore.v1beta.Instance.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Instance is being created. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Instance has been created and is usable. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Instance is being updated. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * Instance 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php new file mode 100644 index 000000000000..e126053b19eb --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php @@ -0,0 +1,75 @@ +google.cloud.memorystore.v1beta.Instance.StateInfo + */ +class StateInfo extends \Google\Protobuf\Internal\Message +{ + protected $info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo $update_info + * Output only. Describes ongoing update when instance state is UPDATING. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Describes ongoing update when instance state is UPDATING. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo|null + */ + public function getUpdateInfo() + { + return $this->readOneof(1); + } + + public function hasUpdateInfo() + { + return $this->hasOneof(1); + } + + /** + * Output only. Describes ongoing update when instance state is UPDATING. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo $var + * @return $this + */ + public function setUpdateInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getInfo() + { + return $this->whichOneof("info"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php new file mode 100644 index 000000000000..d693cc36e0ac --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php @@ -0,0 +1,121 @@ +google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfo + */ +class UpdateInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Target number of shards for the instance. + * + * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_shard_count = null; + /** + * Output only. Target number of replica nodes per shard for the instance. + * + * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target_replica_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_shard_count + * Output only. Target number of shards for the instance. + * @type int $target_replica_count + * Output only. Target number of replica nodes per shard for the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Target number of shards for the instance. + * + * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Target number of shards for the instance. + * + * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setTargetShardCount($var) + { + GPBUtil::checkInt32($var); + $this->target_shard_count = $var; + + return $this; + } + + /** + * Output only. Target number of replica nodes per shard for the instance. + * + * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. Target number of replica nodes per shard for the instance. + * + * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php new file mode 100644 index 000000000000..6ff12f592e75 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode + */ +class TransitEncryptionMode +{ + /** + * Not set. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + */ + const TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; + /** + * In-transit encryption is disabled. + * + * Generated from protobuf enum TRANSIT_ENCRYPTION_DISABLED = 1; + */ + const TRANSIT_ENCRYPTION_DISABLED = 1; + /** + * Server-managed encryption is used for in-transit encryption. + * + * Generated from protobuf enum SERVER_AUTHENTICATION = 2; + */ + const SERVER_AUTHENTICATION = 2; + + private static $valueToName = [ + self::TRANSIT_ENCRYPTION_MODE_UNSPECIFIED => 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', + self::TRANSIT_ENCRYPTION_DISABLED => 'TRANSIT_ENCRYPTION_DISABLED', + self::SERVER_AUTHENTICATION => '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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php new file mode 100644 index 000000000000..c49d8b11cbc3 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php @@ -0,0 +1,230 @@ +google.cloud.memorystore.v1beta.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent to list instances from. + * Format: projects/{project}/locations/{location} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. Expression for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. The parent to list instances from. + * Format: projects/{project}/locations/{location} + * Please see {@see MemorystoreClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Memorystore\V1beta\ListInstancesRequest + * + * @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 parent to list instances from. + * Format: projects/{project}/locations/{location} + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. Expression for filtering results. + * @type string $order_by + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent to list instances from. + * Format: projects/{project}/locations/{location} + * + * 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 parent to list instances from. + * Format: projects/{project}/locations/{location} + * + * 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. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * + * 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. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Optional. Expression for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Expression for filtering results. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Sort results by a defined order. Supported values: "name", + * "create_time". + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php new file mode 100644 index 000000000000..40e5e6a44bce --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php @@ -0,0 +1,147 @@ +google.cloud.memorystore.v1beta.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance instances = 1; + */ + private $instances; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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\Memorystore\V1beta\Instance[] $instances + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance instances = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\Instance> + */ + public function getInstances() + { + return $this->instances; + } + + /** + * If the {location} requested was "-" the response contains a list of + * instances from all locations. Instances in unreachable locations will be + * omitted. + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance instances = 1; + * @param \Google\Cloud\Memorystore\V1beta\Instance[] $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php new file mode 100644 index 000000000000..4da5b6013cf1 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1beta.NodeConfig + */ +class NodeConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Memory size in GB of the node. + * + * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gb = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $size_gb + * Output only. Memory size in GB of the node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Memory size in GB of the node. + * + * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return float + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Output only. Memory size in GB of the node. + * + * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param float $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkDouble($var); + $this->size_gb = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php new file mode 100644 index 000000000000..a5831d479b7e --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.memorystore.v1beta.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 been cancelled successfully + * 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 been cancelled successfully + * 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\Memorystore\V1Beta\Memorystore::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 been cancelled successfully + * 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 been cancelled successfully + * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php new file mode 100644 index 000000000000..5790ba4a39e6 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php @@ -0,0 +1,155 @@ +google.cloud.memorystore.v1beta.PersistenceConfig + */ +class PersistenceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Current persistence mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.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.memorystore.v1beta.PersistenceConfig.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.memorystore.v1beta.PersistenceConfig.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. Current persistence mode. + * @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig\RDBConfig $rdb_config + * Optional. RDB configuration. This field will be ignored if mode is not RDB. + * @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig $aof_config + * Optional. AOF configuration. This field will be ignored if mode is not AOF. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Current persistence mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. Current persistence mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig\RDBConfig $var + * @return $this + */ + public function setRdbConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig $var + * @return $this + */ + public function setAofConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig::class); + $this->aof_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php new file mode 100644 index 000000000000..c46e26013dbc --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig + */ +class AOFConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The fsync mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.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. The fsync mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The fsync mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAppendFsync() + { + return $this->append_fsync; + } + + /** + * Optional. The fsync mode. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAppendFsync($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig\AppendFsync::class); + $this->append_fsync = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php new file mode 100644 index 000000000000..6063555086e2 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php @@ -0,0 +1,71 @@ +google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig.AppendFsync + */ +class AppendFsync +{ + /** + * Not set. Default: EVERY_SEC + * + * 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 NEVER = 1; + */ + const NEVER = 1; + /** + * Fsync every second. You may lose 1 second of data if there is a + * disaster. + * + * Generated from protobuf enum EVERY_SEC = 2; + */ + const EVERY_SEC = 2; + /** + * Fsync every time new write commands are appended to the AOF. 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::NEVER => 'NEVER', + self::EVERY_SEC => 'EVERY_SEC', + 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php new file mode 100644 index 000000000000..7ef8d67864d3 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php @@ -0,0 +1,68 @@ +google.cloud.memorystore.v1beta.PersistenceConfig.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php new file mode 100644 index 000000000000..8f6be2c39f84 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php @@ -0,0 +1,119 @@ +google.cloud.memorystore.v1beta.PersistenceConfig.RDBConfig + */ +class RDBConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $rdb_snapshot_period = 0; + /** + * Optional. 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. 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\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Period between RDB snapshots. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.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.memorystore.v1beta.PersistenceConfig.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\Memorystore\V1beta\PersistenceConfig\RDBConfig\SnapshotPeriod::class); + $this->rdb_snapshot_period = $var; + + return $this; + } + + /** + * Optional. 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. 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php new file mode 100644 index 000000000000..6b5969449a70 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php @@ -0,0 +1,75 @@ +google.cloud.memorystore.v1beta.PersistenceConfig.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php new file mode 100644 index 000000000000..da7fda788bf3 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php @@ -0,0 +1,394 @@ +google.cloud.memorystore.v1beta.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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + */ + protected $ip_address = ''; + /** + * Output only. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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 PSC connections are established. + * This should be the same project_id that the instance is being created in. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. The network where the PSC endpoints are created, 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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_status = 0; + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $connection_type = 0; + protected $ports; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $port + * Optional. Output only. port will only be set for Primary/Reader or + * Discovery endpoint. + * @type string $psc_connection_id + * Output only. The PSC connection id of the forwarding rule connected to the + * service attachment. + * @type string $ip_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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * @type string $project_id + * Required. The consumer project_id where PSC connections are established. + * This should be the same project_id that the instance is being created in. + * @type string $network + * Required. The network where the PSC endpoints are created, 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: whether a connection exists + * and ACTIVE or it no longer exists. 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\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Output only. port will only be set for Primary/Reader or + * Discovery endpoint. + * + * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPort() + { + return $this->readOneof(9); + } + + public function hasPort() + { + return $this->hasOneof(9); + } + + /** + * Optional. Output only. port will only be set for Primary/Reader or + * Discovery endpoint. + * + * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPort($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * 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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Output only. The IP allocated on the consumer network for the PSC + * forwarding rule. + * + * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Output only. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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 PSC connections are established. + * This should be the same project_id that the instance is being created in. + * + * 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 PSC connections are established. + * This should be the same project_id that the instance is being created in. + * + * 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 network where the PSC endpoints are created, 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 network where the PSC endpoints are created, 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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPscConnectionStatus() + { + return $this->psc_connection_status; + } + + /** + * Output only. The status of the PSC connection: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPscConnectionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PscConnectionStatus::class); + $this->psc_connection_status = $var; + + return $this; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.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.memorystore.v1beta.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getPorts() + { + return $this->whichOneof("ports"); + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php new file mode 100644 index 000000000000..75f74f05672a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php @@ -0,0 +1,349 @@ +google.cloud.memorystore.v1beta.PscConnection + */ +class PscConnection 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 = ''; + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + */ + protected $ip_address = ''; + /** + * Required. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $forwarding_rule = ''; + /** + * Output only. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + 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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_connection_status = 0; + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.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 $ip_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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * @type string $project_id + * Output only. 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 + * 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: whether a connection exists + * and ACTIVE or it no longer exists. 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\Memorystore\V1Beta\Memorystore::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; + } + + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @return string + */ + public function getIpAddress() + { + return $this->ip_address; + } + + /** + * Required. The IP allocated on the consumer network for the PSC forwarding + * rule. + * + * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { + * @param string $var + * @return $this + */ + public function setIpAddress($var) + { + GPBUtil::checkString($var, True); + $this->ip_address = $var; + + return $this; + } + + /** + * Required. The URI of the consumer side forwarding rule. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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. + * Format: + * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * + * 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; + } + + /** + * Output only. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Output only. The consumer project_id where the forwarding rule is created + * from. + * + * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getPscConnectionStatus() + { + return $this->psc_connection_status; + } + + /** + * Output only. The status of the PSC connection: whether a connection exists + * and ACTIVE or it no longer exists. Please note that this value is updated + * periodically. Please use Private Service Connect APIs for the latest + * status. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setPscConnectionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PscConnectionStatus::class); + $this->psc_connection_status = $var; + + return $this; + } + + /** + * Output only. Type of the PSC connection. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.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.memorystore.v1beta.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setConnectionType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\ConnectionType::class); + $this->connection_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php new file mode 100644 index 000000000000..7dfef0dbb920 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php @@ -0,0 +1,61 @@ +google.cloud.memorystore.v1beta.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 ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * Connection not found + * + * Generated from protobuf enum NOT_FOUND = 2; + */ + const NOT_FOUND = 2; + + private static $valueToName = [ + self::PSC_CONNECTION_STATUS_UNSPECIFIED => 'PSC_CONNECTION_STATUS_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::NOT_FOUND => '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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php new file mode 100644 index 000000000000..0f307e238478 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php @@ -0,0 +1,117 @@ +google.cloud.memorystore.v1beta.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\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $managed_server_ca + * CA certificate chains for memorystore 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\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * CA certificate chains for memorystore managed server authentication. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * @return \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority|null + */ + public function getManagedServerCa() + { + return $this->readOneof(2); + } + + public function hasManagedServerCa() + { + return $this->hasOneof(2); + } + + /** + * CA certificate chains for memorystore managed server authentication. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; + * @param \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $var + * @return $this + */ + public function setManagedServerCa($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php new file mode 100644 index 000000000000..fd3c9ae8c416 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php @@ -0,0 +1,71 @@ +google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority + */ +class RegionalManagedCertificateAuthority extends \Google\Protobuf\Internal\Message +{ + /** + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + */ + private $ca_certs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $ca_certs + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain> + */ + public function getCaCerts() + { + return $this->ca_certs; + } + + /** + * The PEM encoded CA certificate chains for memorystore managed + * server authentication + * + * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; + * @param \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $var + * @return $this + */ + public function setCaCerts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain::class); + $this->ca_certs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php new file mode 100644 index 000000000000..01d162d0a93a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php @@ -0,0 +1,67 @@ +google.cloud.memorystore.v1beta.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\Memorystore\V1Beta\Memorystore::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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php new file mode 100644 index 000000000000..a1cb89dd003b --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php @@ -0,0 +1,215 @@ +google.cloud.memorystore.v1beta.UpdateInstanceRequest + */ +class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\Memorystore\V1beta\Instance $instance Required. The instance to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * @return \Google\Cloud\Memorystore\V1beta\UpdateInstanceRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Memorystore\V1beta\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setInstance($instance) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * @type \Google\Cloud\Memorystore\V1beta\Instance $instance + * Required. The instance to update. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. The list of fields to be updated on the instance. At least one + * field must be specified. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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. The instance to update. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Memorystore\V1beta\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The instance to update. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Memorystore\V1beta\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php new file mode 100644 index 000000000000..4514bd652c0f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php @@ -0,0 +1,105 @@ +google.cloud.memorystore.v1beta.ZoneDistributionConfig + */ +class ZoneDistributionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $zone = ''; + /** + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $zone + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * @type int $mode + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Optional. Defines zone where all resources will be allocated with + * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. + * + * 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; + } + + /** + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMode() + { + return $this->mode; + } + + /** + * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. + * + * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig\ZoneDistributionMode::class); + $this->mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php new file mode 100644 index 000000000000..bc9b6f706530 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php @@ -0,0 +1,62 @@ +google.cloud.memorystore.v1beta.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 resources across 3 zones picked at random within the + * region. + * + * Generated from protobuf enum MULTI_ZONE = 1; + */ + const MULTI_ZONE = 1; + /** + * Provision resources in a single zone. Zone field must be specified. + * + * 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/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php new file mode 100644 index 000000000000..658a91c89377 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php @@ -0,0 +1,123 @@ +setProjectId($instancePscAutoConnectionsProjectId) + ->setNetwork($formattedInstancePscAutoConnectionsNetwork); + $instancePscAutoConnections = [$pscAutoConnection,]; + $instance = (new Instance()) + ->setPscAutoConnections($instancePscAutoConnections); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->createInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); + $instanceId = '[INSTANCE_ID]'; + $instancePscAutoConnectionsProjectId = '[PROJECT_ID]'; + $formattedInstancePscAutoConnectionsNetwork = MemorystoreClient::networkName( + '[PROJECT]', + '[NETWORK]' + ); + + create_instance_sample( + $formattedParent, + $instanceId, + $instancePscAutoConnectionsProjectId, + $formattedInstancePscAutoConnectionsNetwork + ); +} +// [END memorystore_v1beta_generated_Memorystore_CreateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php new file mode 100644 index 000000000000..986ed029233f --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php @@ -0,0 +1,81 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->deleteInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + delete_instance_sample($formattedName); +} +// [END memorystore_v1beta_generated_Memorystore_DeleteInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php new file mode 100644 index 000000000000..9f823bb1908a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CertificateAuthority $response */ + $response = $memorystoreClient->getCertificateAuthority($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_certificate_authority_sample($formattedName); +} +// [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php new file mode 100644 index 000000000000..7388d674d3f5 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $memorystoreClient->getInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + + get_instance_sample($formattedName); +} +// [END memorystore_v1beta_generated_Memorystore_GetInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_location.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_location.php new file mode 100644 index 000000000000..a4200d237fb0 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/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 memorystore_v1beta_generated_Memorystore_GetLocation_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php new file mode 100644 index 000000000000..959fe842e326 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/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 = $memorystoreClient->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 = MemorystoreClient::sharedRegionalCertificateAuthorityName( + '[PROJECT]', + '[LOCATION]' + ); + + get_shared_regional_certificate_authority_sample($formattedName); +} +// [END memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php new file mode 100644 index 000000000000..80f0f934e3bd --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $memorystoreClient->listInstances($request); + + /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); + + list_instances_sample($formattedParent); +} +// [END memorystore_v1beta_generated_Memorystore_ListInstances_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_locations.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_locations.php new file mode 100644 index 000000000000..667e67505e7a --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/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 memorystore_v1beta_generated_Memorystore_ListLocations_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php new file mode 100644 index 000000000000..28cd508defbf --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php @@ -0,0 +1,102 @@ +setProjectId($instancePscAutoConnectionsProjectId) + ->setNetwork($formattedInstancePscAutoConnectionsNetwork); + $instancePscAutoConnections = [$pscAutoConnection,]; + $instance = (new Instance()) + ->setPscAutoConnections($instancePscAutoConnections); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $memorystoreClient->updateInstance($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Instance $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 +{ + $instancePscAutoConnectionsProjectId = '[PROJECT_ID]'; + $formattedInstancePscAutoConnectionsNetwork = MemorystoreClient::networkName( + '[PROJECT]', + '[NETWORK]' + ); + + update_instance_sample( + $instancePscAutoConnectionsProjectId, + $formattedInstancePscAutoConnectionsNetwork + ); +} +// [END memorystore_v1beta_generated_Memorystore_UpdateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php b/owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php new file mode 100644 index 000000000000..e806224e6862 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php @@ -0,0 +1,697 @@ + createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCertificateAuthorityAsync(GetCertificateAuthorityRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSharedRegionalCertificateAuthorityAsync(GetSharedRegionalCertificateAuthorityRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class MemorystoreClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.memorystore.v1beta.Memorystore'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'memorystore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'memorystore.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/memorystore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/memorystore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/memorystore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/memorystore_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + * + * @experimental + */ + 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 + * + * @experimental + */ + 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 ca_pool + * resource. + * + * @param string $project + * @param string $location + * @param string $caPool + * + * @return string The formatted ca_pool resource. + * + * @experimental + */ + 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 + * forwarding_rule resource. + * + * @param string $project + * @param string $region + * @param string $forwardingRule + * + * @return string The formatted forwarding_rule resource. + * + * @experimental + */ + 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 instance + * resource. + * + * @param string $project + * @param string $location + * @param string $instance + * + * @return string The formatted instance resource. + * + * @experimental + */ + public static function instanceName(string $project, string $location, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'instance' => $instance, + ]); + } + + /** + * 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. + * + * @experimental + */ + 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. + * + * @experimental + */ + 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. + * + * @experimental + */ + 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. + * + * @experimental + */ + 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 + * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} + * - forwardingRule: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} + * - instance: projects/{project}/locations/{location}/instances/{instance} + * - 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. + * + * @experimental + */ + 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 'memorystore.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\Memorystore\V1beta\MemorystoreClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MemorystoreClient(['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 + * + * @experimental + */ + 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); + } + + /** + * Creates a new Instance in a given project and location. + * + * The async variant is {@see MemorystoreClient::createInstanceAsync()} . + * + * @example samples/V1beta/MemorystoreClient/create_instance.php + * + * @param CreateInstanceRequest $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. + * + * @experimental + */ + public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Instance. + * + * The async variant is {@see MemorystoreClient::deleteInstanceAsync()} . + * + * @example samples/V1beta/MemorystoreClient/delete_instance.php + * + * @param DeleteInstanceRequest $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. + * + * @experimental + */ + public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); + } + + /** + * Gets details about the certificate authority for an Instance. + * + * The async variant is {@see MemorystoreClient::getCertificateAuthorityAsync()} . + * + * @example samples/V1beta/MemorystoreClient/get_certificate_authority.php + * + * @param GetCertificateAuthorityRequest $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. + * + * @experimental + */ + public function getCertificateAuthority(GetCertificateAuthorityRequest $request, array $callOptions = []): CertificateAuthority + { + return $this->startApiCall('GetCertificateAuthority', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Instance. + * + * The async variant is {@see MemorystoreClient::getInstanceAsync()} . + * + * @example samples/V1beta/MemorystoreClient/get_instance.php + * + * @param GetInstanceRequest $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 Instance + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance + { + return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); + } + + /** + * Gets the details of shared regional certificate authority information for + * Memorystore instance. + * + * The async variant is + * {@see MemorystoreClient::getSharedRegionalCertificateAuthorityAsync()} . + * + * @example samples/V1beta/MemorystoreClient/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. + * + * @experimental + */ + public function getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest $request, array $callOptions = []): SharedRegionalCertificateAuthority + { + return $this->startApiCall('GetSharedRegionalCertificateAuthority', $request, $callOptions)->wait(); + } + + /** + * Lists Instances in a given project and location. + * + * The async variant is {@see MemorystoreClient::listInstancesAsync()} . + * + * @example samples/V1beta/MemorystoreClient/list_instances.php + * + * @param ListInstancesRequest $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. + * + * @experimental + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * Updates the parameters of a single Instance. + * + * The async variant is {@see MemorystoreClient::updateInstanceAsync()} . + * + * @example samples/V1beta/MemorystoreClient/update_instance.php + * + * @param UpdateInstanceRequest $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. + * + * @experimental + */ + public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see MemorystoreClient::getLocationAsync()} . + * + * @example samples/V1beta/MemorystoreClient/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. + * + * @experimental + */ + 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 MemorystoreClient::listLocationsAsync()} . + * + * @example samples/V1beta/MemorystoreClient/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. + * + * @experimental + */ + public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json b/owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json new file mode 100644 index 000000000000..7bb767fcd547 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.memorystore.v1beta", + "libraryPackage": "Google\\Cloud\\Memorystore\\V1beta", + "services": { + "Memorystore": { + "clients": { + "grpc": { + "libraryClient": "MemorystoreGapicClient", + "rpcs": { + "CreateInstance": { + "methods": [ + "createInstance" + ] + }, + "DeleteInstance": { + "methods": [ + "deleteInstance" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "getCertificateAuthority" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "GetSharedRegionalCertificateAuthority": { + "methods": [ + "getSharedRegionalCertificateAuthority" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "UpdateInstance": { + "methods": [ + "updateInstance" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json new file mode 100644 index 000000000000..3b49c09b15db --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json @@ -0,0 +1,89 @@ +{ + "interfaces": { + "google.cloud.memorystore.v1beta.Memorystore": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "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 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "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": { + "CreateInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteInstance": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSharedRegionalCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateInstance": { + "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/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php new file mode 100644 index 000000000000..743450130fcb --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php @@ -0,0 +1,185 @@ + [ + 'google.cloud.memorystore.v1beta.Memorystore' => [ + 'CreateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memorystore\V1beta\Instance', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Memorystore\V1beta\Instance', + 'metadataReturnType' => '\Google\Cloud\Memorystore\V1beta\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'instance.name', + 'fieldAccessors' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + 'GetCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1beta\CertificateAuthority', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1beta\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSharedRegionalCertificateAuthority' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Memorystore\V1beta\ListInstancesResponse', + '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' => [ + 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', + 'forwardingRule' => 'projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}', + 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', + '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/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php new file mode 100644 index 000000000000..1bf1756656d1 --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php @@ -0,0 +1,182 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.memorystore.v1beta.Memorystore' => [ + 'CreateInstance' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', + 'body' => 'instance', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'instance_id', + ], + ], + 'DeleteInstance' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCertificateAuthority' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}/certificateAuthority', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSharedRegionalCertificateAuthority' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateInstance' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1beta/{instance.name=projects/*/locations/*/instances/*}', + 'body' => 'instance', + 'placeholders' => [ + 'instance.name' => [ + 'getters' => [ + 'getInstance', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php b/owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php new file mode 100644 index 000000000000..0f3e765d4adb --- /dev/null +++ b/owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php @@ -0,0 +1,987 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MemorystoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MemorystoreClient($options); + } + + /** @test */ + public function createInstanceTest() + { + $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/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instancePscAutoConnections = []; + $instance->setPscAutoConnections($instancePscAutoConnections); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($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.memorystore.v1beta.Memorystore/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $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 createInstanceExceptionTest() + { + $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/createInstanceTest'); + $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]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instancePscAutoConnections = []; + $instance->setPscAutoConnections($instancePscAutoConnections); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + 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 deleteInstanceTest() + { + $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/deleteInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($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.memorystore.v1beta.Memorystore/DeleteInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + $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 deleteInstanceExceptionTest() + { + $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/deleteInstanceTest'); + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new DeleteInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); + 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 getCertificateAuthorityTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetCertificateAuthorityRequest()) + ->setName($formattedName); + $response = $gapicClient->getCertificateAuthority($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.memorystore.v1beta.Memorystore/GetCertificateAuthority', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCertificateAuthorityExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetCertificateAuthorityRequest()) + ->setName($formattedName); + try { + $gapicClient->getCertificateAuthority($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 getInstanceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + $response = $gapicClient->getInstance($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.memorystore.v1beta.Memorystore/GetInstance', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getInstanceExceptionTest() + { + $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); + $request = (new GetInstanceRequest()) + ->setName($formattedName); + try { + $gapicClient->getInstance($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.memorystore.v1beta.Memorystore/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 listInstancesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.memorystore.v1beta.Memorystore/ListInstances', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listInstancesExceptionTest() + { + $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 ListInstancesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listInstances($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 updateInstanceTest() + { + $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/updateInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $instance = new Instance(); + $instancePscAutoConnections = []; + $instance->setPscAutoConnections($instancePscAutoConnections); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + $response = $gapicClient->updateInstance($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.memorystore.v1beta.Memorystore/UpdateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + $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 updateInstanceExceptionTest() + { + $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/updateInstanceTest'); + $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 + $instance = new Instance(); + $instancePscAutoConnections = []; + $instance->setPscAutoConnections($instancePscAutoConnections); + $request = (new UpdateInstanceRequest()) + ->setInstance($instance); + $response = $gapicClient->updateInstance($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); + 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 createInstanceAsyncTest() + { + $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/createInstanceTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $replicaCount = 564075208; + $shardCount = 495377042; + $engineVersion = 'engineVersion-618177573'; + $deletionProtectionEnabled = true; + $serverCaPool = 'serverCaPool-1294323103'; + $rotateServerCertificate = false; + $expectedResponse = new Instance(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setReplicaCount($replicaCount); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setEngineVersion($engineVersion); + $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); + $expectedResponse->setServerCaPool($serverCaPool); + $expectedResponse->setRotateServerCertificate($rotateServerCertificate); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createInstanceTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $instanceId = 'instanceId-2101995259'; + $instance = new Instance(); + $instancePscAutoConnections = []; + $instance->setPscAutoConnections($instancePscAutoConnections); + $request = (new CreateInstanceRequest()) + ->setParent($formattedParent) + ->setInstanceId($instanceId) + ->setInstance($instance); + $response = $gapicClient->createInstanceAsync($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.memorystore.v1beta.Memorystore/CreateInstance', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceId(); + $this->assertProtobufEquals($instanceId, $actualValue); + $actualValue = $actualApiRequestObject->getInstance(); + $this->assertProtobufEquals($instance, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createInstanceTest'); + $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 e28c3cd253e04bcb3e1c9ded91a2f3747dc12f49 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 1 May 2026 21:49:56 +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 --- .../list_backup_collections.php | 2 + .../V1/MemorystoreClient/list_backups.php | 2 + .../V1/MemorystoreClient/list_instances.php | 2 + .../V1/MemorystoreClient/list_locations.php | 2 + .../MemorystoreClient/list_instances.php | 2 + .../MemorystoreClient/list_locations.php | 2 + .../src/V1/Client/MemorystoreClient.php | 23 +- .../src/V1beta/Client/MemorystoreClient.php | 23 +- .../Cloud/Memorystore/V1/Memorystore.php | 36 - .../Memorystore/V1/AutomatedBackupConfig.php | 165 -- .../AutomatedBackupMode.php | 61 - .../FixedFrequencySchedule.php | 82 - .../Google/Cloud/Memorystore/V1/Backup.php | 585 ----- .../Memorystore/V1/Backup/BackupType.php | 61 - .../Cloud/Memorystore/V1/Backup/State.php | 76 - .../Cloud/Memorystore/V1/BackupCollection.php | 371 ---- .../Cloud/Memorystore/V1/BackupFile.php | 145 -- .../Memorystore/V1/BackupInstanceRequest.php | 187 -- .../Memorystore/V1/CertificateAuthority.php | 117 - .../ManagedCertificateAuthority.php | 67 - .../ManagedCertificateAuthority/CertChain.php | 67 - .../Cloud/Memorystore/V1/ConnectionType.php | 68 - .../Memorystore/V1/CreateInstanceRequest.php | 279 --- .../V1/CrossInstanceReplicationConfig.php | 285 --- .../InstanceRole.php | 73 - .../Membership.php | 120 - .../RemoteInstance.php | 106 - .../Memorystore/V1/DeleteBackupRequest.php | 120 - .../Memorystore/V1/DeleteInstanceRequest.php | 160 -- .../Memorystore/V1/DiscoveryEndpoint.php | 143 -- .../Cloud/Memorystore/V1/EncryptionInfo.php | 187 -- .../V1/EncryptionInfo/KmsKeyState.php | 104 - .../Memorystore/V1/EncryptionInfo/Type.php | 63 - .../Memorystore/V1/ExportBackupRequest.php | 113 - .../V1/GetBackupCollectionRequest.php | 91 - .../Cloud/Memorystore/V1/GetBackupRequest.php | 86 - .../V1/GetCertificateAuthorityRequest.php | 91 - .../Memorystore/V1/GetInstanceRequest.php | 86 - ...redRegionalCertificateAuthorityRequest.php | 92 - .../Google/Cloud/Memorystore/V1/Instance.php | 1918 ---------------- .../V1/Instance/AuthorizationMode.php | 61 - .../V1/Instance/ConnectionDetail.php | 111 - .../V1/Instance/GcsBackupSource.php | 68 - .../V1/Instance/InstanceEndpoint.php | 73 - .../V1/Instance/ManagedBackupSource.php | 87 - .../Cloud/Memorystore/V1/Instance/Mode.php | 68 - .../Memorystore/V1/Instance/NodeType.php | 119 - .../Memorystore/V1/Instance/ServerCaMode.php | 89 - .../Cloud/Memorystore/V1/Instance/State.php | 75 - .../Memorystore/V1/Instance/StateInfo.php | 75 - .../V1/Instance/StateInfo/UpdateInfo.php | 209 -- .../V1/Instance/TransitEncryptionMode.php | 61 - .../V1/ListBackupCollectionsRequest.php | 188 -- .../V1/ListBackupCollectionsResponse.php | 171 -- .../Memorystore/V1/ListBackupsRequest.php | 178 -- .../Memorystore/V1/ListBackupsResponse.php | 139 -- .../Memorystore/V1/ListInstancesRequest.php | 230 -- .../Memorystore/V1/ListInstancesResponse.php | 147 -- .../Memorystore/V1/MaintenancePolicy.php | 163 -- .../Memorystore/V1/MaintenanceSchedule.php | 129 -- .../Cloud/Memorystore/V1/NodeConfig.php | 67 - .../Memorystore/V1/OperationMetadata.php | 307 --- .../Memorystore/V1/PersistenceConfig.php | 155 -- .../V1/PersistenceConfig/AOFConfig.php | 67 - .../AOFConfig/AppendFsync.php | 71 - .../V1/PersistenceConfig/PersistenceMode.php | 68 - .../V1/PersistenceConfig/RDBConfig.php | 119 - .../RDBConfig/SnapshotPeriod.php | 75 - .../Memorystore/V1/PscAttachmentDetail.php | 106 - .../Memorystore/V1/PscAutoConnection.php | 391 ---- .../Cloud/Memorystore/V1/PscConnection.php | 391 ---- .../Memorystore/V1/PscConnectionStatus.php | 61 - .../V1/RescheduleMaintenanceRequest.php | 179 -- .../RescheduleType.php | 61 - .../V1/SharedRegionalCertificateAuthority.php | 117 - .../RegionalManagedCertificateAuthority.php | 71 - .../RegionalCertChain.php | 67 - .../Memorystore/V1/UpdateInstanceRequest.php | 215 -- .../V1/WeeklyMaintenanceWindow.php | 111 - .../Memorystore/V1/ZoneDistributionConfig.php | 105 - .../ZoneDistributionMode.php | 62 - .../V1/MemorystoreClient/backup_instance.php | 96 - .../V1/MemorystoreClient/create_instance.php | 98 - .../V1/MemorystoreClient/delete_backup.php | 86 - .../V1/MemorystoreClient/delete_instance.php | 81 - .../V1/MemorystoreClient/export_backup.php | 89 - .../V1/MemorystoreClient/get_backup.php | 77 - .../get_backup_collection.php | 77 - .../get_certificate_authority.php | 73 - .../V1/MemorystoreClient/get_instance.php | 72 - .../V1/MemorystoreClient/get_location.php | 57 - ..._shared_regional_certificate_authority.php | 77 - .../list_backup_collections.php | 83 - .../V1/MemorystoreClient/list_backups.php | 81 - .../V1/MemorystoreClient/list_instances.php | 77 - .../V1/MemorystoreClient/list_locations.php | 62 - .../reschedule_maintenance.php | 88 - .../V1/MemorystoreClient/update_instance.php | 71 - .../v1/src/V1/Client/MemorystoreClient.php | 982 --------- .../Memorystore/v1/src/V1/gapic_metadata.json | 103 - .../resources/memorystore_client_config.json | 129 -- .../memorystore_descriptor_config.php | 329 --- .../memorystore_rest_client_config.php | 273 --- .../Unit/V1/Client/MemorystoreClientTest.php | 1938 ----------------- .../Cloud/Memorystore/V1Beta/Memorystore.php | 33 - .../V1beta/CertificateAuthority.php | 117 - .../ManagedCertificateAuthority.php | 67 - .../ManagedCertificateAuthority/CertChain.php | 67 - .../Memorystore/V1beta/ConnectionType.php | 68 - .../V1beta/CreateInstanceRequest.php | 279 --- .../V1beta/DeleteInstanceRequest.php | 160 -- .../Memorystore/V1beta/DiscoveryEndpoint.php | 143 -- .../V1beta/GetCertificateAuthorityRequest.php | 91 - .../Memorystore/V1beta/GetInstanceRequest.php | 86 - ...redRegionalCertificateAuthorityRequest.php | 92 - .../Cloud/Memorystore/V1beta/Instance.php | 1021 --------- .../V1beta/Instance/AuthorizationMode.php | 61 - .../V1beta/Instance/ConnectionDetail.php | 111 - .../V1beta/Instance/InstanceEndpoint.php | 73 - .../Memorystore/V1beta/Instance/Mode.php | 68 - .../Memorystore/V1beta/Instance/NodeType.php | 119 - .../V1beta/Instance/ServerCaMode.php | 89 - .../Memorystore/V1beta/Instance/State.php | 75 - .../Memorystore/V1beta/Instance/StateInfo.php | 75 - .../V1beta/Instance/StateInfo/UpdateInfo.php | 121 - .../V1beta/Instance/TransitEncryptionMode.php | 61 - .../V1beta/ListInstancesRequest.php | 230 -- .../V1beta/ListInstancesResponse.php | 147 -- .../Cloud/Memorystore/V1beta/NodeConfig.php | 67 - .../Memorystore/V1beta/OperationMetadata.php | 307 --- .../Memorystore/V1beta/PersistenceConfig.php | 155 -- .../V1beta/PersistenceConfig/AOFConfig.php | 67 - .../AOFConfig/AppendFsync.php | 71 - .../PersistenceConfig/PersistenceMode.php | 68 - .../V1beta/PersistenceConfig/RDBConfig.php | 119 - .../RDBConfig/SnapshotPeriod.php | 75 - .../Memorystore/V1beta/PscAutoConnection.php | 394 ---- .../Memorystore/V1beta/PscConnection.php | 349 --- .../V1beta/PscConnectionStatus.php | 61 - .../SharedRegionalCertificateAuthority.php | 117 - .../RegionalManagedCertificateAuthority.php | 71 - .../RegionalCertChain.php | 67 - .../V1beta/UpdateInstanceRequest.php | 215 -- .../V1beta/ZoneDistributionConfig.php | 105 - .../ZoneDistributionMode.php | 62 - .../MemorystoreClient/create_instance.php | 123 -- .../MemorystoreClient/delete_instance.php | 81 - .../get_certificate_authority.php | 73 - .../V1beta/MemorystoreClient/get_instance.php | 72 - .../V1beta/MemorystoreClient/get_location.php | 57 - ..._shared_regional_certificate_authority.php | 77 - .../MemorystoreClient/list_instances.php | 77 - .../MemorystoreClient/list_locations.php | 62 - .../MemorystoreClient/update_instance.php | 102 - .../src/V1beta/Client/MemorystoreClient.php | 697 ------ .../v1beta/src/V1beta/gapic_metadata.json | 63 - .../resources/memorystore_client_config.json | 89 - .../memorystore_descriptor_config.php | 185 -- .../memorystore_rest_client_config.php | 182 -- .../V1beta/Client/MemorystoreClientTest.php | 987 --------- 160 files changed, 26 insertions(+), 25394 deletions(-) delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_location.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_locations.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php delete mode 100644 owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php delete mode 100644 owl-bot-staging/Memorystore/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json delete mode 100644 owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php delete mode 100644 owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php delete mode 100644 owl-bot-staging/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_location.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_locations.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json delete mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php delete mode 100644 owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php diff --git a/Memorystore/samples/V1/MemorystoreClient/list_backup_collections.php b/Memorystore/samples/V1/MemorystoreClient/list_backup_collections.php index 247523161866..69a6f19a988a 100644 --- a/Memorystore/samples/V1/MemorystoreClient/list_backup_collections.php +++ b/Memorystore/samples/V1/MemorystoreClient/list_backup_collections.php @@ -25,6 +25,7 @@ // [START memorystore_v1_generated_Memorystore_ListBackupCollections_sync] use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; +use Google\Cloud\Memorystore\V1\BackupCollection; use Google\Cloud\Memorystore\V1\Client\MemorystoreClient; use Google\Cloud\Memorystore\V1\ListBackupCollectionsRequest; @@ -55,6 +56,7 @@ function list_backup_collections_sample(string $formattedParent): void /** @var PagedListResponse $response */ $response = $memorystoreClient->listBackupCollections($request); + /** @var BackupCollection $element */ foreach ($response as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); } diff --git a/Memorystore/samples/V1/MemorystoreClient/list_backups.php b/Memorystore/samples/V1/MemorystoreClient/list_backups.php index 3f58de5af3b3..b8fecda96003 100644 --- a/Memorystore/samples/V1/MemorystoreClient/list_backups.php +++ b/Memorystore/samples/V1/MemorystoreClient/list_backups.php @@ -25,6 +25,7 @@ // [START memorystore_v1_generated_Memorystore_ListBackups_sync] use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; +use Google\Cloud\Memorystore\V1\Backup; use Google\Cloud\Memorystore\V1\Client\MemorystoreClient; use Google\Cloud\Memorystore\V1\ListBackupsRequest; @@ -49,6 +50,7 @@ function list_backups_sample(string $formattedParent): void /** @var PagedListResponse $response */ $response = $memorystoreClient->listBackups($request); + /** @var Backup $element */ foreach ($response as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); } diff --git a/Memorystore/samples/V1/MemorystoreClient/list_instances.php b/Memorystore/samples/V1/MemorystoreClient/list_instances.php index 9b85db8fe6d8..addf717a6193 100644 --- a/Memorystore/samples/V1/MemorystoreClient/list_instances.php +++ b/Memorystore/samples/V1/MemorystoreClient/list_instances.php @@ -26,6 +26,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; use Google\Cloud\Memorystore\V1\Client\MemorystoreClient; +use Google\Cloud\Memorystore\V1\Instance; use Google\Cloud\Memorystore\V1\ListInstancesRequest; /** @@ -49,6 +50,7 @@ function list_instances_sample(string $formattedParent): void /** @var PagedListResponse $response */ $response = $memorystoreClient->listInstances($request); + /** @var Instance $element */ foreach ($response as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); } diff --git a/Memorystore/samples/V1/MemorystoreClient/list_locations.php b/Memorystore/samples/V1/MemorystoreClient/list_locations.php index 6b2a92cce2d2..0f96705f49dd 100644 --- a/Memorystore/samples/V1/MemorystoreClient/list_locations.php +++ b/Memorystore/samples/V1/MemorystoreClient/list_locations.php @@ -26,6 +26,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; use Google\Cloud\Location\ListLocationsRequest; +use Google\Cloud\Location\Location; use Google\Cloud\Memorystore\V1\Client\MemorystoreClient; /** @@ -50,6 +51,7 @@ function list_locations_sample(): void /** @var PagedListResponse $response */ $response = $memorystoreClient->listLocations($request); + /** @var Location $element */ foreach ($response as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); } diff --git a/Memorystore/samples/V1beta/MemorystoreClient/list_instances.php b/Memorystore/samples/V1beta/MemorystoreClient/list_instances.php index df2eb462d0e1..782cb8db5e8a 100644 --- a/Memorystore/samples/V1beta/MemorystoreClient/list_instances.php +++ b/Memorystore/samples/V1beta/MemorystoreClient/list_instances.php @@ -26,6 +26,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; use Google\Cloud\Memorystore\V1beta\Client\MemorystoreClient; +use Google\Cloud\Memorystore\V1beta\Instance; use Google\Cloud\Memorystore\V1beta\ListInstancesRequest; /** @@ -49,6 +50,7 @@ function list_instances_sample(string $formattedParent): void /** @var PagedListResponse $response */ $response = $memorystoreClient->listInstances($request); + /** @var Instance $element */ foreach ($response as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); } diff --git a/Memorystore/samples/V1beta/MemorystoreClient/list_locations.php b/Memorystore/samples/V1beta/MemorystoreClient/list_locations.php index 12993b3a7e91..60fd00ef769b 100644 --- a/Memorystore/samples/V1beta/MemorystoreClient/list_locations.php +++ b/Memorystore/samples/V1beta/MemorystoreClient/list_locations.php @@ -26,6 +26,7 @@ use Google\ApiCore\ApiException; use Google\ApiCore\PagedListResponse; use Google\Cloud\Location\ListLocationsRequest; +use Google\Cloud\Location\Location; use Google\Cloud\Memorystore\V1beta\Client\MemorystoreClient; /** @@ -50,6 +51,7 @@ function list_locations_sample(): void /** @var PagedListResponse $response */ $response = $memorystoreClient->listLocations($request); + /** @var Location $element */ foreach ($response as $element) { printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); } diff --git a/Memorystore/src/V1/Client/MemorystoreClient.php b/Memorystore/src/V1/Client/MemorystoreClient.php index 8a4d6226b160..8afbcb926f98 100644 --- a/Memorystore/src/V1/Client/MemorystoreClient.php +++ b/Memorystore/src/V1/Client/MemorystoreClient.php @@ -128,9 +128,9 @@ private static function getClientDefaults() 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, 'clientConfig' => __DIR__ . '/../resources/memorystore_client_config.json', 'descriptorsConfigPath' => __DIR__ . '/../resources/memorystore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/memorystore_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, - 'useJwtAccessWithScope' => false, ], 'transportConfig' => [ 'rest' => [ @@ -140,18 +140,6 @@ private static function getClientDefaults() ]; } - /** Implements GapicClientTrait::defaultTransport. */ - private static function defaultTransport() - { - return 'rest'; - } - - /** Implements ClientOptionsTrait::supportedTransports. */ - private static function supportedTransports() - { - return ['rest']; - } - /** * Return an OperationsClient object with the same endpoint as $this. * @@ -493,8 +481,9 @@ public static function parseName(string $formattedName, ?string $template = null * 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. At the moment, supports only - * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * 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. @@ -503,9 +492,11 @@ public static function parseName(string $formattedName, ?string $template = null * each supported transport type should be passed in a key for that transport. For * example: * $transportConfig = [ + * 'grpc' => [...], * 'rest' => [...], * ]; - * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * 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 diff --git a/Memorystore/src/V1beta/Client/MemorystoreClient.php b/Memorystore/src/V1beta/Client/MemorystoreClient.php index ddc12e564ccf..2aa46757d4a4 100644 --- a/Memorystore/src/V1beta/Client/MemorystoreClient.php +++ b/Memorystore/src/V1beta/Client/MemorystoreClient.php @@ -114,9 +114,9 @@ private static function getClientDefaults() 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, 'clientConfig' => __DIR__ . '/../resources/memorystore_client_config.json', 'descriptorsConfigPath' => __DIR__ . '/../resources/memorystore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/memorystore_grpc_config.json', 'credentialsConfig' => [ 'defaultScopes' => self::$serviceScopes, - 'useJwtAccessWithScope' => false, ], 'transportConfig' => [ 'rest' => [ @@ -126,18 +126,6 @@ private static function getClientDefaults() ]; } - /** Implements GapicClientTrait::defaultTransport. */ - private static function defaultTransport() - { - return 'rest'; - } - - /** Implements ClientOptionsTrait::supportedTransports. */ - private static function supportedTransports() - { - return ['rest']; - } - /** * Return an OperationsClient object with the same endpoint as $this. * @@ -402,8 +390,9 @@ public static function parseName(string $formattedName, ?string $template = null * 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. At the moment, supports only - * `rest`. *Advanced usage*: Additionally, it is possible to pass in an already + * 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. @@ -412,9 +401,11 @@ public static function parseName(string $formattedName, ?string $template = null * each supported transport type should be passed in a key for that transport. For * example: * $transportConfig = [ + * 'grpc' => [...], * 'rest' => [...], * ]; - * See the {@see \Google\ApiCore\Transport\RestTransport::build()} method for the + * 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 diff --git a/owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php b/owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php deleted file mode 100644 index b82ab78b451b..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1/Memorystore.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xAF\xA2\x01\x0A-google/cloud/memorystore/v1/memorystore.proto\x12\x1Bgoogle.cloud.memorystore.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\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\"\xDB(\x0A\x08Instance\x12S\x0A\x0Agcs_source\x18\x17 \x01(\x0B25.google.cloud.memorystore.v1.Instance.GcsBackupSourceB\x06\xE0A\x01\xE0A\x05H\x00\x12b\x0A\x15managed_backup_source\x18\x18 \x01(\x0B29.google.cloud.memorystore.v1.Instance.ManagedBackupSourceB\x06\xE0A\x01\xE0A\x05H\x00\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\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12F\x0A\x06labels\x18\x04 \x03(\x0B21.google.cloud.memorystore.v1.Instance.LabelsEntryB\x03\xE0A\x01\x12?\x0A\x05state\x18\x05 \x01(\x0E2+.google.cloud.memorystore.v1.Instance.StateB\x03\xE0A\x03\x12H\x0A\x0Astate_info\x18\x06 \x01(\x0B2/.google.cloud.memorystore.v1.Instance.StateInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x07 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x01\x88\x01\x01\x12[\x0A\x12authorization_mode\x18\x09 \x01(\x0E27.google.cloud.memorystore.v1.Instance.AuthorizationModeB\x06\xE0A\x01\xE0A\x05\x12d\x0A\x17transit_encryption_mode\x18\x0A \x01(\x0E2;.google.cloud.memorystore.v1.Instance.TransitEncryptionModeB\x06\xE0A\x01\xE0A\x05\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x01\x12R\x0A\x13discovery_endpoints\x18\x0C \x03(\x0B2..google.cloud.memorystore.v1.DiscoveryEndpointB\x05\x18\x01\xE0A\x03\x12F\x0A\x09node_type\x18\x0D \x01(\x0E2..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xE0A\x01\x12O\x0A\x12persistence_config\x18\x0E \x01(\x0B2..google.cloud.memorystore.v1.PersistenceConfigB\x03\xE0A\x01\x12\x1B\x0A\x0Eengine_version\x18\x0F \x01(\x09B\x03\xE0A\x01\x12U\x0A\x0Eengine_configs\x18\x10 \x03(\x0B28.google.cloud.memorystore.v1.Instance.EngineConfigsEntryB\x03\xE0A\x01\x12A\x0A\x0Bnode_config\x18\x11 \x01(\x0B2'.google.cloud.memorystore.v1.NodeConfigB\x03\xE0A\x03\x12]\x0A\x18zone_distribution_config\x18\x12 \x01(\x0B23.google.cloud.memorystore.v1.ZoneDistributionConfigB\x06\xE0A\x01\xE0A\x05\x12-\x0A\x1Bdeletion_protection_enabled\x18\x13 \x01(\x08B\x03\xE0A\x01H\x02\x88\x01\x01\x12V\x0A\x14psc_auto_connections\x18\x14 \x03(\x0B2..google.cloud.memorystore.v1.PscAutoConnectionB\x08\x18\x01\xE0A\x01\xE0A\x05\x12U\x0A\x16psc_attachment_details\x18\x15 \x03(\x0B20.google.cloud.memorystore.v1.PscAttachmentDetailB\x03\xE0A\x03\x12N\x0A\x09endpoints\x18\x19 \x03(\x0B26.google.cloud.memorystore.v1.Instance.InstanceEndpointB\x03\xE0A\x01\x12=\x0A\x04mode\x18\x1A \x01(\x0E2*.google.cloud.memorystore.v1.Instance.ModeB\x03\xE0A\x01\x12/\x0A\x1Asimulate_maintenance_event\x18\x1B \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x03\x88\x01\x01\x12+\x0A\x14ondemand_maintenance\x18\x1C \x01(\x08B\x08\x18\x01\xE0A\x01\xE0A\x04H\x04\x88\x01\x01\x12\"\x0A\x0Dsatisfies_pzs\x18\x1D \x01(\x08B\x06\xE0A\x03\xE0A\x01H\x05\x88\x01\x01\x12\"\x0A\x0Dsatisfies_pzi\x18\x1E \x01(\x08B\x06\xE0A\x03\xE0A\x01H\x06\x88\x01\x01\x12O\x0A\x12maintenance_policy\x18\x1F \x01(\x0B2..google.cloud.memorystore.v1.MaintenancePolicyB\x03\xE0A\x01\x12S\x0A\x14maintenance_schedule\x18 \x01(\x0B20.google.cloud.memorystore.v1.MaintenanceScheduleB\x03\xE0A\x03\x12k\x0A!cross_instance_replication_config\x18! \x01(\x0B2;.google.cloud.memorystore.v1.CrossInstanceReplicationConfigB\x03\xE0A\x01\x12;\x0A)async_instance_endpoints_deletion_enabled\x18, \x01(\x08B\x03\xE0A\x01H\x07\x88\x01\x01\x12?\x0A\x07kms_key\x18- \x01(\x09B)\xE0A\x01\xFAA#\x0A!cloudkms.googleapis.com/CryptoKeyH\x08\x88\x01\x01\x12I\x0A\x0Fencryption_info\x18. \x01(\x0B2+.google.cloud.memorystore.v1.EncryptionInfoB\x03\xE0A\x03\x12S\x0A\x11backup_collection\x18/ \x01(\x09B3\xE0A\x03\xFAA-\x0A+memorystore.googleapis.com/BackupCollectionH\x09\x88\x01\x01\x12X\x0A\x17automated_backup_config\x180 \x01(\x0B22.google.cloud.memorystore.v1.AutomatedBackupConfigB\x03\xE0A\x01\x12%\x0A\x13maintenance_version\x181 \x01(\x09B\x03\xE0A\x01H\x0A\x88\x01\x01\x12/\x0A\x1Deffective_maintenance_version\x182 \x01(\x09B\x03\xE0A\x03H\x0B\x88\x01\x01\x12+\x0A\x1Eavailable_maintenance_versions\x183 \x03(\x09B\x03\xE0A\x03\x12.\x0A\x1Callow_fewer_zones_deployment\x186 \x01(\x08B\x08\x18\x01\xE0A\x01\xE0A\x05\x12W\x0A\x0Eserver_ca_mode\x188 \x01(\x0E22.google.cloud.memorystore.v1.Instance.ServerCaModeB\x06\xE0A\x01\xE0A\x05H\x0C\x88\x01\x01\x12G\x0A\x0Eserver_ca_pool\x189 \x01(\x09B*\xE0A\x01\xE0A\x05\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x0D\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x18: \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x0E\x88\x01\x01\x1A\xA4\x03\x0A\x09StateInfo\x12V\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2:.google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfoB\x03\xE0A\x03H\x00\x1A\xB6\x02\x0A\x0AUpdateInfo\x12\$\x0A\x12target_shard_count\x18\x01 \x01(\x05B\x03\xE0A\x03H\x00\x88\x01\x01\x12&\x0A\x14target_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x03H\x01\x88\x01\x01\x12'\x0A\x15target_engine_version\x18\x03 \x01(\x09B\x03\xE0A\x03H\x02\x88\x01\x01\x12R\x0A\x10target_node_type\x18\x04 \x01(\x0E2..google.cloud.memorystore.v1.Instance.NodeTypeB\x03\xE0A\x03H\x03\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x18\x0A\x16_target_engine_versionB\x13\x0A\x11_target_node_typeB\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\x1Ad\x0A\x10InstanceEndpoint\x12P\x0A\x0Bconnections\x18\x01 \x03(\x0B26.google.cloud.memorystore.v1.Instance.ConnectionDetailB\x03\xE0A\x01\x1A\xBA\x01\x0A\x10ConnectionDetail\x12R\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B2..google.cloud.memorystore.v1.PscAutoConnectionB\x03\xE0A\x05H\x00\x12D\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2*.google.cloud.memorystore.v1.PscConnectionH\x00B\x0C\x0A\x0Aconnection\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A4\x0A\x12EngineConfigsEntry\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\"X\x0A\x11AuthorizationMode\x12\"\x0A\x1EAUTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DAUTH_DISABLED\x10\x01\x12\x0C\x0A\x08IAM_AUTH\x10\x02\"|\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\x0A\x15SERVER_AUTHENTICATION\x10\x02\"\xE8\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10SHARED_CORE_NANO\x10\x01\x12\x12\x0A\x0EHIGHMEM_MEDIUM\x10\x02\x12\x12\x0A\x0EHIGHMEM_XLARGE\x10\x03\x12\x12\x0A\x0ESTANDARD_SMALL\x10\x04\x12\x10\x0A\x0CCUSTOM_MICRO\x10\x05\x12\x0F\x0A\x0BCUSTOM_MINI\x10\x06\x12\x12\x0A\x0EHIGHCPU_MEDIUM\x10\x07\x12\x12\x0A\x0ESTANDARD_LARGE\x10\x08\x12\x13\x0A\x0FHIGHMEM_2XLARGE\x10\x09\x12\x0F\x0A\x0BCUSTOM_PICO\x10\x0A\"S\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ASTANDALONE\x10\x01\x1A\x02\x08\x01\x12\x0B\x0A\x07CLUSTER\x10\x02\x12\x14\x0A\x10CLUSTER_DISABLED\x10\x04\"\xA9\x02\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\x0A\x1EGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1C\x0A\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1B\x0A\x17CUSTOMER_MANAGED_CAS_CA\x10\x03\x125\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1A\x02\x08\x01\x12/\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1A\x02\x08\x01\x12.\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1A\x02\x08\x01\x1A\x02\x10\x01:{\xEAAx\x0A#memorystore.googleapis.com/Instance\x12.google.cloud.memorystore.v1.PersistenceConfig.PersistenceModeB\x03\xE0A\x01\x12Q\x0A\x0Ardb_config\x18\x02 \x01(\x0B28.google.cloud.memorystore.v1.PersistenceConfig.RDBConfigB\x03\xE0A\x01\x12Q\x0A\x0Aaof_config\x18\x03 \x01(\x0B28.google.cloud.memorystore.v1.PersistenceConfig.AOFConfigB\x03\xE0A\x01\x1A\xB1\x02\x0A\x09RDBConfig\x12i\x0A\x13rdb_snapshot_period\x18\x01 \x01(\x0E2G.google.cloud.memorystore.v1.PersistenceConfig.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\xBF\x01\x0A\x09AOFConfig\x12_\x0A\x0Cappend_fsync\x18\x01 \x01(\x0E2D.google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsyncB\x03\xE0A\x01\"Q\x0A\x0BAppendFsync\x12\x1C\x0A\x18APPEND_FSYNC_UNSPECIFIED\x10\x00\x12\x09\x0A\x05NEVER\x10\x01\x12\x0D\x0A\x09EVERY_SEC\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\"\"\x0A\x0ANodeConfig\x12\x14\x0A\x07size_gb\x18\x01 \x01(\x01B\x03\xE0A\x03\"\xE9\x01\x0A\x16ZoneDistributionConfig\x12\x11\x0A\x04zone\x18\x02 \x01(\x09B\x03\xE0A\x01\x12[\x0A\x04mode\x18\x01 \x01(\x0E2H.google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionModeB\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\"\xCE\x02\x0A\x1CRescheduleMaintenanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\x12f\x0A\x0Freschedule_type\x18\x02 \x01(\x0E2H.google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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\"\xB0\x01\x0A\x14ListInstancesRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#memorystore.googleapis.com/Instance\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\x7F\x0A\x15ListInstancesResponse\x128\x0A\x09instances\x18\x01 \x03(\x0B2%.google.cloud.memorystore.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"O\x0A\x12GetInstanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\"\xCD\x01\x0A\x15CreateInstanceRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#memorystore.googleapis.com/Instance\x12\x18\x0A\x0Binstance_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12<\x0A\x08instance\x18\x03 \x01(\x0B2%.google.cloud.memorystore.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\xAC\x01\x0A\x15UpdateInstanceRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12<\x0A\x08instance\x18\x02 \x01(\x0B2%.google.cloud.memorystore.v1.InstanceB\x03\xE0A\x02\x12\x1F\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"s\x0A\x15DeleteInstanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"\x94\x01\x0A\x1CListBackupCollectionsRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x12+memorystore.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\"\x98\x01\x0A\x1DListBackupCollectionsResponse\x12I\x0A\x12backup_collections\x18\x01 \x03(\x0B2-.google.cloud.memorystore.v1.BackupCollection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"_\x0A\x1AGetBackupCollectionRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+memorystore.googleapis.com/BackupCollection\"\x80\x01\x0A\x12ListBackupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!memorystore.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\"y\x0A\x13ListBackupsResponse\x124\x0A\x07backups\x18\x01 \x03(\x0B2#.google.cloud.memorystore.v1.Backup\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"K\x0A\x10GetBackupRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!memorystore.googleapis.com/Backup\"o\x0A\x13DeleteBackupRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!memorystore.googleapis.com/Backup\x12\x1F\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x0B\xE0A\x01\xE2\x8C\xCF\xD7\x08\x02\x08\x01\"s\x0A\x13ExportBackupRequest\x12\x14\x0A\x0Agcs_bucket\x18\x02 \x01(\x09H\x00\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!memorystore.googleapis.com/BackupB\x0D\x0A\x0Bdestination\"\xAA\x01\x0A\x15BackupInstanceRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\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\"[\x0A\x1EGetCertificateAuthorityRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#memorystore.googleapis.com/Instance\"\x89\x04\x0A\x14CertificateAuthority\x12j\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2M.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xAB\x01\x0A\x1BManagedCertificateAuthority\x12i\x0A\x08ca_certs\x18\x01 \x03(\x0B2W.google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain\x1A!\x0A\x09CertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xB6\x01\xEAA\xB2\x01\x0A/memorystore.googleapis.com/CertificateAuthority\x12Qprojects/{project}/locations/{location}/instances/{instance}/certificateAuthority*\x16certificateAuthorities2\x14certificateAuthorityB\x0B\x0A\x09server_ca\"\x80\x05\x0A\"SharedRegionalCertificateAuthority\x12\x80\x01\x0A\x11managed_server_ca\x18\x02 \x01(\x0B2c.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthorityH\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x1A\xDA\x01\x0A#RegionalManagedCertificateAuthority\x12\x87\x01\x0A\x08ca_certs\x18\x01 \x03(\x0B2u.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain\x1A)\x0A\x11RegionalCertChain\x12\x14\x0A\x0Ccertificates\x18\x01 \x03(\x09:\xD9\x01\xEAA\xD5\x01\x0A=memorystore.googleapis.com/SharedRegionalCertificateAuthority\x12Jprojects/{project}/locations/{location}/sharedRegionalCertificateAuthority*\$sharedRegionalCertificateAuthorities2\"sharedRegionalCertificateAuthorityB\x0B\x0A\x09server_ca\"\x83\x01\x0A,GetSharedRegionalCertificateAuthorityRequest\x12S\x0A\x04name\x18\x01 \x01(\x09BE\xE0A\x02\xFAA?\x0A=memorystore.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\"\xF6\x04\x0A\x0EEncryptionInfo\x12N\x0A\x0Fencryption_type\x18\x01 \x01(\x0E20.google.cloud.memorystore.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(\x0E27.google.cloud.memorystore.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*W\x0A\x13PscConnectionStatus\x12%\x0A!PSC_CONNECTION_STATUS_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x0D\x0A\x09NOT_FOUND\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\xE3\x19\x0A\x0BMemorystore\x12\xB6\x01\x0A\x0DListInstances\x121.google.cloud.memorystore.v1.ListInstancesRequest\x1A2.google.cloud.memorystore.v1.ListInstancesResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xA3\x01\x0A\x0BGetInstance\x12/.google.cloud.memorystore.v1.GetInstanceRequest\x1A%.google.cloud.memorystore.v1.Instance\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xE2\x01\x0A\x0ECreateInstance\x122.google.cloud.memorystore.v1.CreateInstanceRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x1Bparent,instance,instance_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xE4\x01\x0A\x0EUpdateInstance\x122.google.cloud.memorystore.v1.UpdateInstanceRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x14instance,update_mask\x82\xD3\xE4\x93\x02B26/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xCE\x01\x0A\x0EDeleteInstance\x122.google.cloud.memorystore.v1.DeleteInstanceRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xDC\x01\x0A\x17GetCertificateAuthority\x12;.google.cloud.memorystore.v1.GetCertificateAuthorityRequest\x1A1.google.cloud.memorystore.v1.CertificateAuthority\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority\x12\x88\x02\x0A%GetSharedRegionalCertificateAuthority\x12I.google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest\x1A?.google.cloud.memorystore.v1.SharedRegionalCertificateAuthority\"S\xDAA\x04name\x82\xD3\xE4\x93\x02F\x12D/v1/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}\x12\x87\x02\x0A\x15RescheduleMaintenance\x129.google.cloud.memorystore.v1.RescheduleMaintenanceRequest\x1A\x1D.google.longrunning.Operation\"\x93\x01\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\"name,reschedule_type,schedule_time\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance:\x01*\x12\xD6\x01\x0A\x15ListBackupCollections\x129.google.cloud.memorystore.v1.ListBackupCollectionsRequest\x1A:.google.cloud.memorystore.v1.ListBackupCollectionsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*}/backupCollections\x12\xC3\x01\x0A\x13GetBackupCollection\x127.google.cloud.memorystore.v1.GetBackupCollectionRequest\x1A-.google.cloud.memorystore.v1.BackupCollection\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/backupCollections/*}\x12\xC2\x01\x0A\x0BListBackups\x12/.google.cloud.memorystore.v1.ListBackupsRequest\x1A0.google.cloud.memorystore.v1.ListBackupsResponse\"P\xDAA\x06parent\x82\xD3\xE4\x93\x02A\x12?/v1/{parent=projects/*/locations/*/backupCollections/*}/backups\x12\xAF\x01\x0A\x09GetBackup\x12-.google.cloud.memorystore.v1.GetBackupRequest\x1A#.google.cloud.memorystore.v1.Backup\"N\xDAA\x04name\x82\xD3\xE4\x93\x02A\x12?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xDC\x01\x0A\x0CDeleteBackup\x120.google.cloud.memorystore.v1.DeleteBackupRequest\x1A\x1D.google.longrunning.Operation\"{\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02A*?/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}\x12\xD0\x01\x0A\x0CExportBackup\x120.google.cloud.memorystore.v1.ExportBackupRequest\x1A\x1D.google.longrunning.Operation\"o\xCAA\x1B\x0A\x06Backup\x12\x11OperationMetadata\x82\xD3\xE4\x93\x02K\"F/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}:export:\x01*\x12\xCB\x01\x0A\x0EBackupInstance\x122.google.cloud.memorystore.v1.BackupInstanceRequest\x1A\x1D.google.longrunning.Operation\"f\xCAA\x1D\x0A\x08Instance\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x029\"4/v1/{name=projects/*/locations/*/instances/*}:backup:\x01*\x1AN\xCAA\x1Amemorystore.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x90\x07\x0A\x1Fcom.google.cloud.memorystore.v1B\x0BV1mainProtoP\x01ZAcloud.google.com/go/memorystore/apiv1/memorystorepb;memorystorepb\xAA\x02\x1BGoogle.Cloud.Memorystore.V1\xCA\x02\x1BGoogle\\Cloud\\Memorystore\\V1\xEA\x02\x1EGoogle::Cloud::Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php deleted file mode 100644 index 8b96cfc1b4da..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.memorystore.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.memorystore.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 .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\Memorystore\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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Trigger automated backups at a fixed frequency. - * - * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\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.memorystore.v1.AutomatedBackupConfig.FixedFrequencySchedule fixed_frequency_schedule = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\AutomatedBackupConfig\FixedFrequencySchedule $var - * @return $this - */ - public function setFixedFrequencySchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\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.memorystore.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.memorystore.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\Memorystore\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 .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 .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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php deleted file mode 100644 index d916286078c4..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/AutomatedBackupMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php deleted file mode 100644 index dc5d8690a63e..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/AutomatedBackupConfig/FixedFrequencySchedule.php +++ /dev/null @@ -1,82 +0,0 @@ -google.cloud.memorystore.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 .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\Memorystore\V1\Memorystore::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 .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 .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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php deleted file mode 100644 index 1d09ea1856cc..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup.php +++ /dev/null @@ -1,585 +0,0 @@ -google.cloud.memorystore.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 Instance - * UID] OR customer specified while backup instance. 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. Instance resource path of this backup. - * - * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * Output only. Instance uid of this backup. - * - * Generated from protobuf field string instance_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $instance_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. valkey-7.5/valkey-8.0, etc. - * - * 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.memorystore.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $backup_files; - /** - * Output only. Node type of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_type = 0; - /** - * Output only. Number of replicas for the instance. - * - * 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 instance. - * - * 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.memorystore.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.memorystore.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.memorystore.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 Instance - * UID] OR customer specified while backup instance. Example: - * 20240515123000_1234 - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup was created. - * @type string $instance - * Output only. Instance resource path of this backup. - * @type string $instance_uid - * Output only. Instance 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. valkey-7.5/valkey-8.0, etc. - * @type \Google\Cloud\Memorystore\V1\BackupFile[] $backup_files - * Output only. List of backup files of the backup. - * @type int $node_type - * Output only. Node type of the instance. - * @type int $replica_count - * Output only. Number of replicas for the instance. - * @type int $shard_count - * Output only. Number of shards for the instance. - * @type int $backup_type - * Output only. Type of the backup. - * @type int $state - * Output only. State of the backup. - * @type \Google\Cloud\Memorystore\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\Memorystore\V1\Memorystore::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 Instance - * UID] OR customer specified while backup instance. 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 Instance - * UID] OR customer specified while backup instance. 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. Instance resource path of this backup. - * - * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Output only. Instance resource path of this backup. - * - * Generated from protobuf field string instance = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Output only. Instance uid of this backup. - * - * Generated from protobuf field string instance_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getInstanceUid() - { - return $this->instance_uid; - } - - /** - * Output only. Instance uid of this backup. - * - * Generated from protobuf field string instance_uid = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setInstanceUid($var) - { - GPBUtil::checkString($var, True); - $this->instance_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. valkey-7.5/valkey-8.0, etc. - * - * 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. valkey-7.5/valkey-8.0, etc. - * - * 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.memorystore.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Memorystore\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.memorystore.v1.BackupFile backup_files = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\BackupFile[] $var - * @return $this - */ - public function setBackupFiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\BackupFile::class); - $this->backup_files = $arr; - - return $this; - } - - /** - * Output only. Node type of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.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 instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setNodeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\NodeType::class); - $this->node_type = $var; - - return $this; - } - - /** - * Output only. Number of replicas for the instance. - * - * 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 instance. - * - * 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 instance. - * - * 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 instance. - * - * 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.memorystore.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.memorystore.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\Memorystore\V1\Backup\BackupType::class); - $this->backup_type = $var; - - return $this; - } - - /** - * Output only. State of the backup. - * - * Generated from protobuf field .google.cloud.memorystore.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.memorystore.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\Memorystore\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Encryption information of the backup. - * - * Generated from protobuf field .google.cloud.memorystore.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\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.memorystore.v1.EncryptionInfo encryption_info = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\EncryptionInfo $var - * @return $this - */ - public function setEncryptionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php deleted file mode 100644 index 580d320c0689..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/BackupType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php deleted file mode 100644 index 508e35abe74a..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Backup/State.php +++ /dev/null @@ -1,76 +0,0 @@ -google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php deleted file mode 100644 index e58b229dafcc..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupCollection.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.memorystore.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 instance uid of the backup collection. - * - * Generated from protobuf field string instance_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $instance_uid = ''; - /** - * Output only. The full resource path of the instance the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * 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 = ''; - /** - * Output only. The time when the backup collection was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Total size of all backups in the backup collection. - * - * Generated from protobuf field int64 total_backup_size_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_backup_size_bytes = 0; - /** - * Output only. Total number of backups in the backup collection. - * - * Generated from protobuf field int64 total_backup_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $total_backup_count = 0; - /** - * Output only. The last time a backup was created in the backup collection. - * - * Generated from protobuf field .google.protobuf.Timestamp last_backup_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_backup_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Full resource path of the backup collection. - * @type string $instance_uid - * Output only. The instance uid of the backup collection. - * @type string $instance - * Output only. The full resource path of the instance the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/instances/{instance} - * @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. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the backup collection was created. - * @type int|string $total_backup_size_bytes - * Output only. Total size of all backups in the backup collection. - * @type int|string $total_backup_count - * Output only. Total number of backups in the backup collection. - * @type \Google\Protobuf\Timestamp $last_backup_time - * Output only. The last time a backup was created in the backup collection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::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 instance uid of the backup collection. - * - * Generated from protobuf field string instance_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getInstanceUid() - { - return $this->instance_uid; - } - - /** - * Output only. The instance uid of the backup collection. - * - * Generated from protobuf field string instance_uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setInstanceUid($var) - { - GPBUtil::checkString($var, True); - $this->instance_uid = $var; - - return $this; - } - - /** - * Output only. The full resource path of the instance the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Output only. The full resource path of the instance the backup collection - * belongs to. Example: - * projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string instance = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $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; - } - - /** - * Output only. The time when the backup collection was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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 collection was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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. Total size of all backups in the backup collection. - * - * Generated from protobuf field int64 total_backup_size_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTotalBackupSizeBytes() - { - return $this->total_backup_size_bytes; - } - - /** - * Output only. Total size of all backups in the backup collection. - * - * Generated from protobuf field int64 total_backup_size_bytes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTotalBackupSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->total_backup_size_bytes = $var; - - return $this; - } - - /** - * Output only. Total number of backups in the backup collection. - * - * Generated from protobuf field int64 total_backup_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getTotalBackupCount() - { - return $this->total_backup_count; - } - - /** - * Output only. Total number of backups in the backup collection. - * - * Generated from protobuf field int64 total_backup_count = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setTotalBackupCount($var) - { - GPBUtil::checkInt64($var); - $this->total_backup_count = $var; - - return $this; - } - - /** - * Output only. The last time a backup was created in the backup collection. - * - * Generated from protobuf field .google.protobuf.Timestamp last_backup_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastBackupTime() - { - return $this->last_backup_time; - } - - public function hasLastBackupTime() - { - return isset($this->last_backup_time); - } - - public function clearLastBackupTime() - { - unset($this->last_backup_time); - } - - /** - * Output only. The last time a backup was created in the backup collection. - * - * Generated from protobuf field .google.protobuf.Timestamp last_backup_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastBackupTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_backup_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php deleted file mode 100644 index eb1c7ef6f4d9..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupFile.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.memorystore.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\Memorystore\V1\Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php deleted file mode 100644 index 2b259029c3bc..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/BackupInstanceRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.memorystore.v1.BackupInstanceRequest - */ -class BackupInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * 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 = ''; - /** - * 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 Instance 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. Instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a Google Cloud region. Please see - * {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1\BackupInstanceRequest - * - * @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. Instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * where `location_id` refers to a Google Cloud 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 Instance UID] is used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * 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. Instance resource name using the form: - * `projects/{project_id}/locations/{location_id}/instances/{instance_id}` - * 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; - } - - /** - * 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 Instance 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 Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php deleted file mode 100644 index 09b458ecd2ea..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.memorystore.v1.CertificateAuthority - */ -class CertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * - * 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\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority $managed_server_ca - * A managed server certificate authority. - * @type string $name - * Identifier. Unique name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * A managed server certificate authority. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; - * @return \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority|null - */ - public function getManagedServerCa() - { - return $this->readOneof(2); - } - - public function hasManagedServerCa() - { - return $this->hasOneof(2); - } - - /** - * A managed server certificate authority. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; - * @param \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority $var - * @return $this - */ - public function setManagedServerCa($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Identifier. Unique name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * - * 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 certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php deleted file mode 100644 index 272d095f6b6e..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority - */ -class ManagedCertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * PEM encoded CA certificate chains for managed server authentication. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - */ - private $ca_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $ca_certs - * PEM encoded CA certificate chains for managed server authentication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * PEM encoded CA certificate chains for managed server authentication. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain> - */ - public function getCaCerts() - { - return $this->ca_certs; - } - - /** - * PEM encoded CA certificate chains for managed server authentication. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - * @param \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $var - * @return $this - */ - public function setCaCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\CertificateAuthority\ManagedCertificateAuthority\CertChain::class); - $this->ca_certs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php deleted file mode 100644 index 23088d04e0ac..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CertificateAuthority/ManagedCertificateAuthority/CertChain.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1.CertificateAuthority.ManagedCertificateAuthority.CertChain - */ -class CertChain extends \Google\Protobuf\Internal\Message -{ - /** - * The certificates that form the CA chain in order of leaf to root. - * - * 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 in order of leaf to root. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * The certificates that form the CA chain in order of leaf to root. - * - * Generated from protobuf field repeated string certificates = 1; - * @return RepeatedField - */ - public function getCertificates() - { - return $this->certificates; - } - - /** - * The certificates that form the CA chain in order of leaf to root. - * - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php deleted file mode 100644 index 64a1b5bfe162..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ConnectionType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1.ConnectionType - */ -class ConnectionType -{ - /** - * Connection Type is not set - * - * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; - */ - const CONNECTION_TYPE_UNSPECIFIED = 0; - /** - * Connection that will be used for topology discovery. - * - * Generated from protobuf enum CONNECTION_TYPE_DISCOVERY = 1; - */ - const CONNECTION_TYPE_DISCOVERY = 1; - /** - * Connection that will be used as primary endpoint to access primary. - * - * Generated from protobuf enum CONNECTION_TYPE_PRIMARY = 2; - */ - const CONNECTION_TYPE_PRIMARY = 2; - /** - * Connection 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php deleted file mode 100644 index fe9396611a54..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CreateInstanceRequest.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.memorystore.v1.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * Please see {@see MemorystoreClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Memorystore\V1\Instance $instance Required. The instance to create. - * @param string $instanceId Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * - * This value is subject to the following restrictions: - * - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * @return \Google\Cloud\Memorystore\V1\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Memorystore\V1\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * @type string $instance_id - * Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * @type \Google\Cloud\Memorystore\V1\Instance $instance - * Required. The instance to create. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * - * 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 parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * - * 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 ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memorystore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memorystore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php deleted file mode 100644 index 0871270c1dfa..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig.php +++ /dev/null @@ -1,285 +0,0 @@ -google.cloud.memorystore.v1.CrossInstanceReplicationConfig - */ -class CrossInstanceReplicationConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The role of the instance in cross instance replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole instance_role = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_role = 0; - /** - * Optional. Details of the primary instance that is used as the replication - * source for this secondary instance. - * This field is only set for a secondary instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $primary_instance = null; - /** - * Optional. List of secondary instances that are replicating from this - * primary instance. - * This field is only set for a primary instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $secondary_instances; - /** - * Output only. The last time cross instance 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 instances participating - * in the cross instance replication. This view will be provided by every - * member instance irrespective of its instance role(primary or secondary). - * A primary instance can provide information about all the secondary - * instances replicating from it. However, a secondary instance only knows - * about the primary instance from which it is replicating. However, for - * scenarios, where the primary instance is unavailable(e.g. regional outage), - * a Getinstance request can be sent to any other member instance and this - * field will list all the member instances participating in cross instance - * replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.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 $instance_role - * Required. The role of the instance in cross instance replication. - * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $primary_instance - * Optional. Details of the primary instance that is used as the replication - * source for this secondary instance. - * This field is only set for a secondary instance. - * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $secondary_instances - * Optional. List of secondary instances that are replicating from this - * primary instance. - * This field is only set for a primary instance. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last time cross instance replication config was updated. - * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\Membership $membership - * Output only. An output only view of all the member instances participating - * in the cross instance replication. This view will be provided by every - * member instance irrespective of its instance role(primary or secondary). - * A primary instance can provide information about all the secondary - * instances replicating from it. However, a secondary instance only knows - * about the primary instance from which it is replicating. However, for - * scenarios, where the primary instance is unavailable(e.g. regional outage), - * a Getinstance request can be sent to any other member instance and this - * field will list all the member instances participating in cross instance - * replication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The role of the instance in cross instance replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole instance_role = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getInstanceRole() - { - return $this->instance_role; - } - - /** - * Required. The role of the instance in cross instance replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole instance_role = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setInstanceRole($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\InstanceRole::class); - $this->instance_role = $var; - - return $this; - } - - /** - * Optional. Details of the primary instance that is used as the replication - * source for this secondary instance. - * This field is only set for a secondary instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance|null - */ - public function getPrimaryInstance() - { - return $this->primary_instance; - } - - public function hasPrimaryInstance() - { - return isset($this->primary_instance); - } - - public function clearPrimaryInstance() - { - unset($this->primary_instance); - } - - /** - * Optional. Details of the primary instance that is used as the replication - * source for this secondary instance. - * This field is only set for a secondary instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $var - * @return $this - */ - public function setPrimaryInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); - $this->primary_instance = $var; - - return $this; - } - - /** - * Optional. List of secondary instances that are replicating from this - * primary instance. - * This field is only set for a primary instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance> - */ - public function getSecondaryInstances() - { - return $this->secondary_instances; - } - - /** - * Optional. List of secondary instances that are replicating from this - * primary instance. - * This field is only set for a primary instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $var - * @return $this - */ - public function setSecondaryInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); - $this->secondary_instances = $arr; - - return $this; - } - - /** - * Output only. The last time cross instance 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 instance 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 instances participating - * in the cross instance replication. This view will be provided by every - * member instance irrespective of its instance role(primary or secondary). - * A primary instance can provide information about all the secondary - * instances replicating from it. However, a secondary instance only knows - * about the primary instance from which it is replicating. However, for - * scenarios, where the primary instance is unavailable(e.g. regional outage), - * a Getinstance request can be sent to any other member instance and this - * field will list all the member instances participating in cross instance - * replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\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 instances participating - * in the cross instance replication. This view will be provided by every - * member instance irrespective of its instance role(primary or secondary). - * A primary instance can provide information about all the secondary - * instances replicating from it. However, a secondary instance only knows - * about the primary instance from which it is replicating. However, for - * scenarios, where the primary instance is unavailable(e.g. regional outage), - * a Getinstance request can be sent to any other member instance and this - * field will list all the member instances participating in cross instance - * replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership membership = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\Membership::class); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php deleted file mode 100644 index 2ec06fcd820c..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/InstanceRole.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.memorystore.v1.CrossInstanceReplicationConfig.InstanceRole - */ -class InstanceRole -{ - /** - * instance role is not set. - * The behavior is equivalent to NONE. - * - * Generated from protobuf enum INSTANCE_ROLE_UNSPECIFIED = 0; - */ - const INSTANCE_ROLE_UNSPECIFIED = 0; - /** - * This instance does not participate in cross instance replication. It is - * an independent instance and does not replicate to or from any other - * instances. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - /** - * A instance that allows both reads and writes. Any data written to this - * instance is also replicated to the attached secondary instances. - * - * Generated from protobuf enum PRIMARY = 2; - */ - const PRIMARY = 2; - /** - * A instance that allows only reads and replicates data from a primary - * instance. - * - * Generated from protobuf enum SECONDARY = 3; - */ - const SECONDARY = 3; - - private static $valueToName = [ - self::INSTANCE_ROLE_UNSPECIFIED => 'INSTANCE_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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php deleted file mode 100644 index c0c8e2d43d85..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/Membership.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.memorystore.v1.CrossInstanceReplicationConfig.Membership - */ -class Membership extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The primary instance that acts as the source of replication - * for the secondary instances. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $primary_instance = null; - /** - * Output only. The list of secondary instances replicating from the primary - * instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $secondary_instances; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $primary_instance - * Output only. The primary instance that acts as the source of replication - * for the secondary instances. - * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $secondary_instances - * Output only. The list of secondary instances replicating from the primary - * instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The primary instance that acts as the source of replication - * for the secondary instances. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance|null - */ - public function getPrimaryInstance() - { - return $this->primary_instance; - } - - public function hasPrimaryInstance() - { - return isset($this->primary_instance); - } - - public function clearPrimaryInstance() - { - unset($this->primary_instance); - } - - /** - * Output only. The primary instance that acts as the source of replication - * for the secondary instances. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance primary_instance = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance $var - * @return $this - */ - public function setPrimaryInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); - $this->primary_instance = $var; - - return $this; - } - - /** - * Output only. The list of secondary instances replicating from the primary - * instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance> - */ - public function getSecondaryInstances() - { - return $this->secondary_instances; - } - - /** - * Output only. The list of secondary instances replicating from the primary - * instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance secondary_instances = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance[] $var - * @return $this - */ - public function setSecondaryInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig\RemoteInstance::class); - $this->secondary_instances = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php deleted file mode 100644 index e87aa7674832..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/CrossInstanceReplicationConfig/RemoteInstance.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance - */ -class RemoteInstance extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The full resource path of the remote instance in - * the format: projects//locations//instances/ - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $instance = ''; - /** - * Output only. The unique identifier of the remote instance. - * - * Generated from protobuf field string uid = 2 [(.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 $instance - * Optional. The full resource path of the remote instance in - * the format: projects//locations//instances/ - * @type string $uid - * Output only. The unique identifier of the remote instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The full resource path of the remote instance in - * the format: projects//locations//instances/ - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getInstance() - { - return $this->instance; - } - - /** - * Optional. The full resource path of the remote instance in - * the format: projects//locations//instances/ - * - * Generated from protobuf field string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkString($var, True); - $this->instance = $var; - - return $this; - } - - /** - * Output only. The unique identifier of the remote instance. - * - * Generated from protobuf field string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The unique identifier of the remote instance. - * - * Generated from protobuf field string uid = 2 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php deleted file mode 100644 index bb934821fa4d..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.memorystore.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Instance 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. Instance backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * Please see {@see MemorystoreClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\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. Instance 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Instance 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. Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php deleted file mode 100644 index 73a414e222bf..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DeleteInstanceRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.memorystore.v1.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1\DeleteInstanceRequest - * - * @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. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php deleted file mode 100644 index a429b20e773e..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/DiscoveryEndpoint.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.memorystore.v1.DiscoveryEndpoint - */ -class DiscoveryEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. IP address of the exposed endpoint clients connect to. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $address = ''; - /** - * Output only. The port number of the exposed endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $port = 0; - /** - * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * Output only. IP address of the exposed endpoint clients connect to. - * @type int $port - * Output only. The port number of the exposed endpoint. - * @type string $network - * Output only. 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. IP address of the exposed endpoint clients connect to. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Output only. IP address of the exposed endpoint clients connect to. - * - * 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 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 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. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php deleted file mode 100644 index c0cce3354968..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo.php +++ /dev/null @@ -1,187 +0,0 @@ -google.cloud.memorystore.v1.EncryptionInfo - */ -class EncryptionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Type of encryption. - * - * Generated from protobuf field .google.cloud.memorystore.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.memorystore.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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Type of encryption. - * - * Generated from protobuf field .google.cloud.memorystore.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.memorystore.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\Memorystore\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.memorystore.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.memorystore.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\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php deleted file mode 100644 index 1dfa01c07bba..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/KmsKeyState.php +++ /dev/null @@ -1,104 +0,0 @@ -google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php deleted file mode 100644 index 91ff312f5edf..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/EncryptionInfo/Type.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php deleted file mode 100644 index c6cd8faafd5d..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ExportBackupRequest.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.memorystore.v1.ExportBackupRequest - */ -class ExportBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Instance 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. Instance 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Google Cloud Storage bucket, like "my-bucket". - * - * Generated from protobuf field string gcs_bucket = 2; - * @return string - */ - public function getGcsBucket() - { - return $this->readOneof(2); - } - - public function hasGcsBucket() - { - return $this->hasOneof(2); - } - - /** - * Google Cloud Storage bucket, like "my-bucket". - * - * Generated from protobuf field string gcs_bucket = 2; - * @param string $var - * @return $this - */ - public function setGcsBucket($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. Instance 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. Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php deleted file mode 100644 index fd609e85ed19..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupCollectionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.memorystore.v1.GetBackupCollectionRequest - */ -class GetBackupCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Instance backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * 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. Instance backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a Google Cloud region. Please see - * {@see MemorystoreClient::backupCollectionName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\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. Instance backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * where `location_id` refers to a Google Cloud region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Instance backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * 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. Instance backupCollection resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}` - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php deleted file mode 100644 index 504718f3ca4f..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetBackupRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.memorystore.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Instance 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. Instance backup resource name using the form: - * `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}` - * Please see {@see MemorystoreClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\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. Instance 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Instance 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. Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php deleted file mode 100644 index 54bf38e768fa..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetCertificateAuthorityRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.memorystore.v1.GetCertificateAuthorityRequest - */ -class GetCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1\GetCertificateAuthorityRequest - * - * @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. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * - * 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. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php deleted file mode 100644 index 916c14b637ff..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.memorystore.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1\GetInstanceRequest - * - * @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. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php deleted file mode 100644 index 2246b8a965f5..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/GetSharedRegionalCertificateAuthorityRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.memorystore.v1.GetSharedRegionalCertificateAuthorityRequest - */ -class GetSharedRegionalCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Regional certificate authority resource name using the form: - * `projects/{project}/locations/{location}/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}/locations/{location}/sharedRegionalCertificateAuthority` - * where `location_id` refers to a Google Cloud region. Please see - * {@see MemorystoreClient::sharedRegionalCertificateAuthorityName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\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}/locations/{location}/sharedRegionalCertificateAuthority` - * where `location_id` refers to a Google Cloud region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Regional certificate authority resource name using the form: - * `projects/{project}/locations/{location}/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}/locations/{location}/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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php deleted file mode 100644 index a6034e26f0a5..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance.php +++ /dev/null @@ -1,1918 +0,0 @@ -google.cloud.memorystore.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique name of the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Creation timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Latest update timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_info = null; - /** - * Output only. System assigned, unique identifier for the instance. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - /** - * Optional. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * - * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $replica_count = null; - /** - * Optional. Immutable. Authorization mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $authorization_mode = 0; - /** - * Optional. Immutable. In-transit encryption mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $transit_encryption_mode = 0; - /** - * Optional. Number of shards for the instance. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shard_count = 0; - /** - * Output only. Deprecated: The discovery_endpoints parameter is deprecated. - * As a result, it will not be populated if the connections are created using - * endpoints parameter. Instead of this parameter, for discovery, use - * endpoints.connections.pscConnection and - * endpoints.connections.pscAutoConnection - * with connectionType CONNECTION_TYPE_DISCOVERY. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.DiscoveryEndpoint discovery_endpoints = 12 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - private $discovery_endpoints; - /** - * Optional. Machine type for individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $node_type = 0; - /** - * Optional. Persistence configuration of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $persistence_config = null; - /** - * Optional. Engine version of the instance. - * - * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $engine_version = ''; - /** - * Optional. User-provided engine configurations for the instance. - * - * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $engine_configs; - /** - * Output only. Configuration of individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_config = null; - /** - * Optional. Immutable. Zone distribution configuration of the instance for - * node allocation. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $zone_distribution_config = null; - /** - * Optional. If set to true deletion of the instance will fail. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deletion_protection_enabled = null; - /** - * Optional. Immutable. Deprecated: Use the - * endpoints.connections.psc_auto_connection value instead. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connections = 20 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @deprecated - */ - private $psc_auto_connections; - /** - * Output only. Service attachment details to configure PSC connections. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAttachmentDetail psc_attachment_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $psc_attachment_details; - /** - * Optional. Endpoints for the instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $endpoints; - /** - * Optional. The mode config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - /** - * Optional. Input only. Simulate a maintenance event. - * - * Generated from protobuf field optional bool simulate_maintenance_event = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $simulate_maintenance_event = null; - /** - * Optional. Input only. Ondemand maintenance for the instance. - * - * Generated from protobuf field optional bool ondemand_maintenance = 28 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @deprecated - */ - protected $ondemand_maintenance = null; - /** - * Optional. Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 29 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $satisfies_pzs = null; - /** - * Optional. Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $satisfies_pzi = null; - /** - * Optional. The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * - * Generated from protobuf field .google.cloud.memorystore.v1.MaintenancePolicy maintenance_policy = 31 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $maintenance_policy = null; - /** - * Output only. Published maintenance schedule. - * - * Generated from protobuf field .google.cloud.memorystore.v1.MaintenanceSchedule maintenance_schedule = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $maintenance_schedule = null; - /** - * Optional. The config for cross instance replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig cross_instance_replication_config = 33 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cross_instance_replication_config = null; - /** - * Optional. If true, instance endpoints that are created and registered by - * customers can be deleted asynchronously. That is, such an instance endpoint - * can be de-registered before the forwarding rules in the instance endpoint - * are deleted. - * - * Generated from protobuf field optional bool async_instance_endpoints_deletion_enabled = 44 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $async_instance_endpoints_deletion_enabled = null; - /** - * Optional. The KMS key used to encrypt the at-rest data of the cluster. - * - * Generated from protobuf field optional string kms_key = 45 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $kms_key = null; - /** - * Output only. Encryption information of the data at rest of the cluster. - * - * Generated from protobuf field .google.cloud.memorystore.v1.EncryptionInfo encryption_info = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_info = null; - /** - * Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * - * Generated from protobuf field optional string backup_collection = 47 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $backup_collection = null; - /** - * Optional. The automated backup config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig automated_backup_config = 48 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $automated_backup_config = null; - /** - * Optional. This field can be used to trigger self service update to indicate - * the desired maintenance version. The input to this field can be determined - * by the available_maintenance_versions field. - * - * Generated from protobuf field optional string maintenance_version = 49 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $maintenance_version = null; - /** - * Output only. This field represents the actual maintenance version of the - * instance. - * - * Generated from protobuf field optional string effective_maintenance_version = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $effective_maintenance_version = null; - /** - * Output only. This field is used to determine the available maintenance - * versions for the self service update. - * - * Generated from protobuf field repeated string available_maintenance_versions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $available_maintenance_versions; - /** - * Optional. Immutable. Deprecated, do not use. - * - * Generated from protobuf field bool allow_fewer_zones_deployment = 54 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @deprecated - */ - protected $allow_fewer_zones_deployment = false; - /** - * Optional. Immutable. The Server CA mode for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $server_ca_mode = null; - /** - * Optional. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - * "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.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\Memorystore\V1\Instance\GcsBackupSource $gcs_source - * Optional. Immutable. Backups that stored in Cloud Storage buckets. - * The Cloud Storage buckets need to be the same region as the instances. - * Read permission is required to import from the provided Cloud Storage - * Objects. - * @type \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource $managed_backup_source - * Optional. Immutable. Backups that generated and managed by memorystore - * service. - * @type string $name - * Identifier. Unique name of the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp of the instance. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Latest update timestamp of the instance. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to represent user-provided metadata. - * @type int $state - * Output only. Current state of the instance. - * @type \Google\Cloud\Memorystore\V1\Instance\StateInfo $state_info - * Output only. Additional information about the state of the instance. - * @type string $uid - * Output only. System assigned, unique identifier for the instance. - * @type int $replica_count - * Optional. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * @type int $authorization_mode - * Optional. Immutable. Authorization mode of the instance. - * @type int $transit_encryption_mode - * Optional. Immutable. In-transit encryption mode of the instance. - * @type int $shard_count - * Optional. Number of shards for the instance. - * @type \Google\Cloud\Memorystore\V1\DiscoveryEndpoint[] $discovery_endpoints - * Output only. Deprecated: The discovery_endpoints parameter is deprecated. - * As a result, it will not be populated if the connections are created using - * endpoints parameter. Instead of this parameter, for discovery, use - * endpoints.connections.pscConnection and - * endpoints.connections.pscAutoConnection - * with connectionType CONNECTION_TYPE_DISCOVERY. - * @type int $node_type - * Optional. Machine type for individual nodes of the instance. - * @type \Google\Cloud\Memorystore\V1\PersistenceConfig $persistence_config - * Optional. Persistence configuration of the instance. - * @type string $engine_version - * Optional. Engine version of the instance. - * @type array|\Google\Protobuf\Internal\MapField $engine_configs - * Optional. User-provided engine configurations for the instance. - * @type \Google\Cloud\Memorystore\V1\NodeConfig $node_config - * Output only. Configuration of individual nodes of the instance. - * @type \Google\Cloud\Memorystore\V1\ZoneDistributionConfig $zone_distribution_config - * Optional. Immutable. Zone distribution configuration of the instance for - * node allocation. - * @type bool $deletion_protection_enabled - * Optional. If set to true deletion of the instance will fail. - * @type \Google\Cloud\Memorystore\V1\PscAutoConnection[] $psc_auto_connections - * Optional. Immutable. Deprecated: Use the - * endpoints.connections.psc_auto_connection value instead. - * @type \Google\Cloud\Memorystore\V1\PscAttachmentDetail[] $psc_attachment_details - * Output only. Service attachment details to configure PSC connections. - * @type \Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint[] $endpoints - * Optional. Endpoints for the instance. - * @type int $mode - * Optional. The mode config for the instance. - * @type bool $simulate_maintenance_event - * Optional. Input only. Simulate a maintenance event. - * @type bool $ondemand_maintenance - * Optional. Input only. Ondemand maintenance for the instance. - * @type bool $satisfies_pzs - * Optional. Output only. Reserved for future use. - * @type bool $satisfies_pzi - * Optional. Output only. Reserved for future use. - * @type \Google\Cloud\Memorystore\V1\MaintenancePolicy $maintenance_policy - * Optional. The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * @type \Google\Cloud\Memorystore\V1\MaintenanceSchedule $maintenance_schedule - * Output only. Published maintenance schedule. - * @type \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig $cross_instance_replication_config - * Optional. The config for cross instance replication. - * @type bool $async_instance_endpoints_deletion_enabled - * Optional. If true, instance endpoints that are created and registered by - * customers can be deleted asynchronously. That is, such an instance endpoint - * can be de-registered before the forwarding rules in the instance endpoint - * are deleted. - * @type string $kms_key - * Optional. The KMS key used to encrypt the at-rest data of the cluster. - * @type \Google\Cloud\Memorystore\V1\EncryptionInfo $encryption_info - * Output only. Encryption information of the data at rest of the cluster. - * @type string $backup_collection - * Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * @type \Google\Cloud\Memorystore\V1\AutomatedBackupConfig $automated_backup_config - * Optional. The automated backup config for the instance. - * @type string $maintenance_version - * Optional. This field can be used to trigger self service update to indicate - * the desired maintenance version. The input to this field can be determined - * by the available_maintenance_versions field. - * @type string $effective_maintenance_version - * Output only. This field represents the actual maintenance version of the - * instance. - * @type string[] $available_maintenance_versions - * Output only. This field is used to determine the available maintenance - * versions for the self service update. - * @type bool $allow_fewer_zones_deployment - * Optional. Immutable. Deprecated, do not use. - * @type int $server_ca_mode - * Optional. Immutable. The Server CA mode for the instance. - * @type string $server_ca_pool - * Optional. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Immutable. Backups that stored in Cloud Storage buckets. - * The Cloud Storage buckets need to be the same region as the instances. - * Read permission is required to import from the provided Cloud Storage - * Objects. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.GcsBackupSource gcs_source = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Memorystore\V1\Instance\GcsBackupSource|null - */ - public function getGcsSource() - { - return $this->readOneof(23); - } - - public function hasGcsSource() - { - return $this->hasOneof(23); - } - - /** - * Optional. Immutable. Backups that stored in Cloud Storage buckets. - * The Cloud Storage buckets need to be the same region as the instances. - * Read permission is required to import from the provided Cloud Storage - * Objects. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.GcsBackupSource gcs_source = 23 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1\Instance\GcsBackupSource $var - * @return $this - */ - public function setGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\GcsBackupSource::class); - $this->writeOneof(23, $var); - - return $this; - } - - /** - * Optional. Immutable. Backups that generated and managed by memorystore - * service. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.ManagedBackupSource managed_backup_source = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource|null - */ - public function getManagedBackupSource() - { - return $this->readOneof(24); - } - - public function hasManagedBackupSource() - { - return $this->hasOneof(24); - } - - /** - * Optional. Immutable. Backups that generated and managed by memorystore - * service. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.ManagedBackupSource managed_backup_source = 24 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource $var - * @return $this - */ - public function setManagedBackupSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\ManagedBackupSource::class); - $this->writeOneof(24, $var); - - return $this; - } - - /** - * Identifier. Unique name of the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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 instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. Creation timestamp of the instance. - * - * 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. Creation timestamp of the instance. - * - * 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. Latest update timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Latest update timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1\Instance\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 state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\Instance\StateInfo $var - * @return $this - */ - public function setStateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\StateInfo::class); - $this->state_info = $var; - - return $this; - } - - /** - * Output only. System assigned, unique identifier for the instance. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System assigned, unique identifier for the instance. - * - * Generated from protobuf field string uid = 7 [(.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; - } - - /** - * Optional. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * - * 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. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * - * 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. Immutable. Authorization mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getAuthorizationMode() - { - return $this->authorization_mode; - } - - /** - * Optional. Immutable. Authorization mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setAuthorizationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\AuthorizationMode::class); - $this->authorization_mode = $var; - - return $this; - } - - /** - * Optional. Immutable. In-transit encryption mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getTransitEncryptionMode() - { - return $this->transit_encryption_mode; - } - - /** - * Optional. Immutable. In-transit encryption mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setTransitEncryptionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\TransitEncryptionMode::class); - $this->transit_encryption_mode = $var; - - return $this; - } - - /** - * Optional. Number of shards for the instance. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Optional. Number of shards for the instance. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt32($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Output only. Deprecated: The discovery_endpoints parameter is deprecated. - * As a result, it will not be populated if the connections are created using - * endpoints parameter. Instead of this parameter, for discovery, use - * endpoints.connections.pscConnection and - * endpoints.connections.pscAutoConnection - * with connectionType CONNECTION_TYPE_DISCOVERY. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.DiscoveryEndpoint discovery_endpoints = 12 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\DiscoveryEndpoint> - * @deprecated - */ - public function getDiscoveryEndpoints() - { - if ($this->discovery_endpoints->count() !== 0) { - @trigger_error('discovery_endpoints is deprecated.', E_USER_DEPRECATED); - } - return $this->discovery_endpoints; - } - - /** - * Output only. Deprecated: The discovery_endpoints parameter is deprecated. - * As a result, it will not be populated if the connections are created using - * endpoints parameter. Instead of this parameter, for discovery, use - * endpoints.connections.pscConnection and - * endpoints.connections.pscAutoConnection - * with connectionType CONNECTION_TYPE_DISCOVERY. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.DiscoveryEndpoint discovery_endpoints = 12 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\DiscoveryEndpoint[] $var - * @return $this - * @deprecated - */ - public function setDiscoveryEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\DiscoveryEndpoint::class); - if ($arr->count() !== 0) { - @trigger_error('discovery_endpoints is deprecated.', E_USER_DEPRECATED); - } - $this->discovery_endpoints = $arr; - - return $this; - } - - /** - * Optional. Machine type for individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNodeType() - { - return $this->node_type; - } - - /** - * Optional. Machine type for individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNodeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\NodeType::class); - $this->node_type = $var; - - return $this; - } - - /** - * Optional. Persistence configuration of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1\PersistenceConfig|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 configuration of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\PersistenceConfig $var - * @return $this - */ - public function setPersistenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PersistenceConfig::class); - $this->persistence_config = $var; - - return $this; - } - - /** - * Optional. Engine version of the instance. - * - * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEngineVersion() - { - return $this->engine_version; - } - - /** - * Optional. Engine version of the instance. - * - * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEngineVersion($var) - { - GPBUtil::checkString($var, True); - $this->engine_version = $var; - - return $this; - } - - /** - * Optional. User-provided engine configurations for the instance. - * - * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEngineConfigs() - { - return $this->engine_configs; - } - - /** - * Optional. User-provided engine configurations for the instance. - * - * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEngineConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->engine_configs = $arr; - - return $this; - } - - /** - * Output only. Configuration of individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1\NodeConfig|null - */ - public function getNodeConfig() - { - return $this->node_config; - } - - public function hasNodeConfig() - { - return isset($this->node_config); - } - - public function clearNodeConfig() - { - unset($this->node_config); - } - - /** - * Output only. Configuration of individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\NodeConfig $var - * @return $this - */ - public function setNodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\NodeConfig::class); - $this->node_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Zone distribution configuration of the instance for - * node allocation. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Memorystore\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. Immutable. Zone distribution configuration of the instance for - * node allocation. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1\ZoneDistributionConfig $var - * @return $this - */ - public function setZoneDistributionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\ZoneDistributionConfig::class); - $this->zone_distribution_config = $var; - - return $this; - } - - /** - * Optional. If set to true deletion of the instance will fail. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.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. If set to true deletion of the instance will fail. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.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. Immutable. Deprecated: Use the - * endpoints.connections.psc_auto_connection value instead. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connections = 20 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\PscAutoConnection> - * @deprecated - */ - public function getPscAutoConnections() - { - if ($this->psc_auto_connections->count() !== 0) { - @trigger_error('psc_auto_connections is deprecated.', E_USER_DEPRECATED); - } - return $this->psc_auto_connections; - } - - /** - * Optional. Immutable. Deprecated: Use the - * endpoints.connections.psc_auto_connection value instead. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connections = 20 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1\PscAutoConnection[] $var - * @return $this - * @deprecated - */ - public function setPscAutoConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\PscAutoConnection::class); - if ($arr->count() !== 0) { - @trigger_error('psc_auto_connections is deprecated.', E_USER_DEPRECATED); - } - $this->psc_auto_connections = $arr; - - return $this; - } - - /** - * Output only. Service attachment details to configure PSC connections. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAttachmentDetail psc_attachment_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\PscAttachmentDetail> - */ - public function getPscAttachmentDetails() - { - return $this->psc_attachment_details; - } - - /** - * Output only. Service attachment details to configure PSC connections. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.PscAttachmentDetail psc_attachment_details = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\PscAttachmentDetail[] $var - * @return $this - */ - public function setPscAttachmentDetails($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\PscAttachmentDetail::class); - $this->psc_attachment_details = $arr; - - return $this; - } - - /** - * Optional. Endpoints for the instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint> - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * Optional. Endpoints for the instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint[] $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\Instance\InstanceEndpoint::class); - $this->endpoints = $arr; - - return $this; - } - - /** - * Optional. The mode config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The mode config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Input only. Simulate a maintenance event. - * - * Generated from protobuf field optional bool simulate_maintenance_event = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @return bool - */ - public function getSimulateMaintenanceEvent() - { - return isset($this->simulate_maintenance_event) ? $this->simulate_maintenance_event : false; - } - - public function hasSimulateMaintenanceEvent() - { - return isset($this->simulate_maintenance_event); - } - - public function clearSimulateMaintenanceEvent() - { - unset($this->simulate_maintenance_event); - } - - /** - * Optional. Input only. Simulate a maintenance event. - * - * Generated from protobuf field optional bool simulate_maintenance_event = 27 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSimulateMaintenanceEvent($var) - { - GPBUtil::checkBool($var); - $this->simulate_maintenance_event = $var; - - return $this; - } - - /** - * Optional. Input only. Ondemand maintenance for the instance. - * - * Generated from protobuf field optional bool ondemand_maintenance = 28 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @return bool - * @deprecated - */ - public function getOndemandMaintenance() - { - if (isset($this->ondemand_maintenance)) { - @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->ondemand_maintenance) ? $this->ondemand_maintenance : false; - } - - public function hasOndemandMaintenance() - { - if (isset($this->ondemand_maintenance)) { - @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); - } - return isset($this->ondemand_maintenance); - } - - public function clearOndemandMaintenance() - { - @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); - unset($this->ondemand_maintenance); - } - - /** - * Optional. Input only. Ondemand maintenance for the instance. - * - * Generated from protobuf field optional bool ondemand_maintenance = 28 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setOndemandMaintenance($var) - { - @trigger_error('ondemand_maintenance is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->ondemand_maintenance = $var; - - return $this; - } - - /** - * Optional. Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 29 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSatisfiesPzs() - { - return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Optional. Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 29 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Optional. Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSatisfiesPzi() - { - return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Optional. Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzi = 30 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * Optional. The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * - * Generated from protobuf field .google.cloud.memorystore.v1.MaintenancePolicy maintenance_policy = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1\MaintenancePolicy|null - */ - public function getMaintenancePolicy() - { - return $this->maintenance_policy; - } - - public function hasMaintenancePolicy() - { - return isset($this->maintenance_policy); - } - - public function clearMaintenancePolicy() - { - unset($this->maintenance_policy); - } - - /** - * Optional. The maintenance policy for the instance. If not provided, - * the maintenance event will be performed based on Memorystore - * internal rollout schedule. - * - * Generated from protobuf field .google.cloud.memorystore.v1.MaintenancePolicy maintenance_policy = 31 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\MaintenancePolicy $var - * @return $this - */ - public function setMaintenancePolicy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\MaintenancePolicy::class); - $this->maintenance_policy = $var; - - return $this; - } - - /** - * Output only. Published maintenance schedule. - * - * Generated from protobuf field .google.cloud.memorystore.v1.MaintenanceSchedule maintenance_schedule = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1\MaintenanceSchedule|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. Published maintenance schedule. - * - * Generated from protobuf field .google.cloud.memorystore.v1.MaintenanceSchedule maintenance_schedule = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\MaintenanceSchedule $var - * @return $this - */ - public function setMaintenanceSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\MaintenanceSchedule::class); - $this->maintenance_schedule = $var; - - return $this; - } - - /** - * Optional. The config for cross instance replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig cross_instance_replication_config = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig|null - */ - public function getCrossInstanceReplicationConfig() - { - return $this->cross_instance_replication_config; - } - - public function hasCrossInstanceReplicationConfig() - { - return isset($this->cross_instance_replication_config); - } - - public function clearCrossInstanceReplicationConfig() - { - unset($this->cross_instance_replication_config); - } - - /** - * Optional. The config for cross instance replication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.CrossInstanceReplicationConfig cross_instance_replication_config = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig $var - * @return $this - */ - public function setCrossInstanceReplicationConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig::class); - $this->cross_instance_replication_config = $var; - - return $this; - } - - /** - * Optional. If true, instance endpoints that are created and registered by - * customers can be deleted asynchronously. That is, such an instance endpoint - * can be de-registered before the forwarding rules in the instance endpoint - * are deleted. - * - * Generated from protobuf field optional bool async_instance_endpoints_deletion_enabled = 44 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAsyncInstanceEndpointsDeletionEnabled() - { - return isset($this->async_instance_endpoints_deletion_enabled) ? $this->async_instance_endpoints_deletion_enabled : false; - } - - public function hasAsyncInstanceEndpointsDeletionEnabled() - { - return isset($this->async_instance_endpoints_deletion_enabled); - } - - public function clearAsyncInstanceEndpointsDeletionEnabled() - { - unset($this->async_instance_endpoints_deletion_enabled); - } - - /** - * Optional. If true, instance endpoints that are created and registered by - * customers can be deleted asynchronously. That is, such an instance endpoint - * can be de-registered before the forwarding rules in the instance endpoint - * are deleted. - * - * Generated from protobuf field optional bool async_instance_endpoints_deletion_enabled = 44 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAsyncInstanceEndpointsDeletionEnabled($var) - { - GPBUtil::checkBool($var); - $this->async_instance_endpoints_deletion_enabled = $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 = 45 [(.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 = 45 [(.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; - } - - /** - * Output only. Encryption information of the data at rest of the cluster. - * - * Generated from protobuf field .google.cloud.memorystore.v1.EncryptionInfo encryption_info = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\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.memorystore.v1.EncryptionInfo encryption_info = 46 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\EncryptionInfo $var - * @return $this - */ - public function setEncryptionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\EncryptionInfo::class); - $this->encryption_info = $var; - - return $this; - } - - /** - * Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * - * Generated from protobuf field optional string backup_collection = 47 [(.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); - } - - /** - * Output only. The backup collection full resource name. Example: - * projects/{project}/locations/{location}/backupCollections/{collection} - * - * Generated from protobuf field optional string backup_collection = 47 [(.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 automated backup config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig automated_backup_config = 48 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\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 instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1.AutomatedBackupConfig automated_backup_config = 48 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\AutomatedBackupConfig $var - * @return $this - */ - public function setAutomatedBackupConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\AutomatedBackupConfig::class); - $this->automated_backup_config = $var; - - return $this; - } - - /** - * Optional. This field can be used to trigger self service update to indicate - * the desired maintenance version. The input to this field can be determined - * by the available_maintenance_versions field. - * - * Generated from protobuf field optional string maintenance_version = 49 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMaintenanceVersion() - { - return isset($this->maintenance_version) ? $this->maintenance_version : ''; - } - - public function hasMaintenanceVersion() - { - return isset($this->maintenance_version); - } - - public function clearMaintenanceVersion() - { - unset($this->maintenance_version); - } - - /** - * Optional. This field can be used to trigger self service update to indicate - * the desired maintenance version. The input to this field can be determined - * by the available_maintenance_versions field. - * - * Generated from protobuf field optional string maintenance_version = 49 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMaintenanceVersion($var) - { - GPBUtil::checkString($var, True); - $this->maintenance_version = $var; - - return $this; - } - - /** - * Output only. This field represents the actual maintenance version of the - * instance. - * - * Generated from protobuf field optional string effective_maintenance_version = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getEffectiveMaintenanceVersion() - { - return isset($this->effective_maintenance_version) ? $this->effective_maintenance_version : ''; - } - - public function hasEffectiveMaintenanceVersion() - { - return isset($this->effective_maintenance_version); - } - - public function clearEffectiveMaintenanceVersion() - { - unset($this->effective_maintenance_version); - } - - /** - * Output only. This field represents the actual maintenance version of the - * instance. - * - * Generated from protobuf field optional string effective_maintenance_version = 50 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setEffectiveMaintenanceVersion($var) - { - GPBUtil::checkString($var, True); - $this->effective_maintenance_version = $var; - - return $this; - } - - /** - * Output only. This field is used to determine the available maintenance - * versions for the self service update. - * - * Generated from protobuf field repeated string available_maintenance_versions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getAvailableMaintenanceVersions() - { - return $this->available_maintenance_versions; - } - - /** - * Output only. This field is used to determine the available maintenance - * versions for the self service update. - * - * Generated from protobuf field repeated string available_maintenance_versions = 51 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setAvailableMaintenanceVersions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->available_maintenance_versions = $arr; - - return $this; - } - - /** - * Optional. Immutable. Deprecated, do not use. - * - * Generated from protobuf field bool allow_fewer_zones_deployment = 54 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return bool - * @deprecated - */ - public function getAllowFewerZonesDeployment() - { - if ($this->allow_fewer_zones_deployment !== false) { - @trigger_error('allow_fewer_zones_deployment is deprecated.', E_USER_DEPRECATED); - } - return $this->allow_fewer_zones_deployment; - } - - /** - * Optional. Immutable. Deprecated, do not use. - * - * Generated from protobuf field bool allow_fewer_zones_deployment = 54 [deprecated = true, (.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setAllowFewerZonesDeployment($var) - { - @trigger_error('allow_fewer_zones_deployment is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->allow_fewer_zones_deployment = $var; - - return $this; - } - - /** - * Optional. Immutable. The Server CA mode for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @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. Immutable. The Server CA mode for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setServerCaMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\ServerCaMode::class); - $this->server_ca_mode = $var; - - return $this; - } - - /** - * Optional. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - * "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - * "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.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 = 58 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php deleted file mode 100644 index d697ecffc273..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/AuthorizationMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.v1.Instance.AuthorizationMode - */ -class AuthorizationMode -{ - /** - * Not set. - * - * Generated from protobuf enum AUTHORIZATION_MODE_UNSPECIFIED = 0; - */ - const AUTHORIZATION_MODE_UNSPECIFIED = 0; - /** - * Authorization disabled. - * - * Generated from protobuf enum AUTH_DISABLED = 1; - */ - const AUTH_DISABLED = 1; - /** - * IAM basic authorization. - * - * Generated from protobuf enum IAM_AUTH = 2; - */ - const IAM_AUTH = 2; - - private static $valueToName = [ - self::AUTHORIZATION_MODE_UNSPECIFIED => 'AUTHORIZATION_MODE_UNSPECIFIED', - self::AUTH_DISABLED => 'AUTH_DISABLED', - self::IAM_AUTH => 'IAM_AUTH', - ]; - - 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php deleted file mode 100644 index 002552c6b4ed..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ConnectionDetail.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.memorystore.v1.Instance.ConnectionDetail - */ -class ConnectionDetail extends \Google\Protobuf\Internal\Message -{ - protected $connection; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1\PscAutoConnection $psc_auto_connection - * Immutable. Detailed information of a PSC connection that is created - * through service connectivity automation. - * @type \Google\Cloud\Memorystore\V1\PscConnection $psc_connection - * Detailed information of a PSC connection that is created by the user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. Detailed information of a PSC connection that is created - * through service connectivity automation. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connection = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Memorystore\V1\PscAutoConnection|null - */ - public function getPscAutoConnection() - { - return $this->readOneof(1); - } - - public function hasPscAutoConnection() - { - return $this->hasOneof(1); - } - - /** - * Immutable. Detailed information of a PSC connection that is created - * through service connectivity automation. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscAutoConnection psc_auto_connection = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1\PscAutoConnection $var - * @return $this - */ - public function setPscAutoConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PscAutoConnection::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Detailed information of a PSC connection that is created by the user. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnection psc_connection = 2; - * @return \Google\Cloud\Memorystore\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 user. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnection psc_connection = 2; - * @param \Google\Cloud\Memorystore\V1\PscConnection $var - * @return $this - */ - public function setPscConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PscConnection::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConnection() - { - return $this->whichOneof("connection"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php deleted file mode 100644 index 6f95c2ecc994..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/GcsBackupSource.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1.Instance.GcsBackupSource - */ -class GcsBackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. 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. Example: gs://bucket1/object1, gs://bucket2/folder2/object2 - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. 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. 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php deleted file mode 100644 index 4a2d7f8ef725..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/InstanceEndpoint.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.memorystore.v1.Instance.InstanceEndpoint - */ -class InstanceEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. 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.memorystore.v1.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $connections; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1\Instance\ConnectionDetail[] $connections - * Optional. 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. 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.memorystore.v1.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\Instance\ConnectionDetail> - */ - public function getConnections() - { - return $this->connections; - } - - /** - * Optional. 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.memorystore.v1.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\Instance\ConnectionDetail[] $var - * @return $this - */ - public function setConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\Instance\ConnectionDetail::class); - $this->connections = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php deleted file mode 100644 index f7998235807f..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ManagedBackupSource.php +++ /dev/null @@ -1,87 +0,0 @@ -google.cloud.memorystore.v1.Instance.ManagedBackupSource - */ -class ManagedBackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Example: - * //memorystore.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 memorystore.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: - * //memorystore.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 memorystore.googleapis.com. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Example: - * //memorystore.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 memorystore.googleapis.com. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Optional. Example: - * //memorystore.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 memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php deleted file mode 100644 index 5f2e2c41cd9d..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/Mode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1.Instance.Mode - */ -class Mode -{ - /** - * Mode is not specified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Deprecated: Use CLUSTER_DISABLED instead. - * - * Generated from protobuf enum STANDALONE = 1 [deprecated = true]; - */ - const STANDALONE = 1; - /** - * Instance is in cluster mode. - * - * Generated from protobuf enum CLUSTER = 2; - */ - const CLUSTER = 2; - /** - * Cluster mode is disabled for the instance. - * - * Generated from protobuf enum CLUSTER_DISABLED = 4; - */ - const CLUSTER_DISABLED = 4; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::STANDALONE => 'STANDALONE', - self::CLUSTER => 'CLUSTER', - self::CLUSTER_DISABLED => 'CLUSTER_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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php deleted file mode 100644 index 3df9494ce796..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/NodeType.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.memorystore.v1.Instance.NodeType - */ -class NodeType -{ - /** - * Not set. - * - * Generated from protobuf enum NODE_TYPE_UNSPECIFIED = 0; - */ - const NODE_TYPE_UNSPECIFIED = 0; - /** - * Shared core nano. - * - * Generated from protobuf enum SHARED_CORE_NANO = 1; - */ - const SHARED_CORE_NANO = 1; - /** - * High memory medium. - * - * Generated from protobuf enum HIGHMEM_MEDIUM = 2; - */ - const HIGHMEM_MEDIUM = 2; - /** - * High memory extra large. - * - * Generated from protobuf enum HIGHMEM_XLARGE = 3; - */ - const HIGHMEM_XLARGE = 3; - /** - * Standard small. - * - * Generated from protobuf enum STANDARD_SMALL = 4; - */ - const STANDARD_SMALL = 4; - /** - * Custom micro. - * - * Generated from protobuf enum CUSTOM_MICRO = 5; - */ - const CUSTOM_MICRO = 5; - /** - * Custom mini. - * - * Generated from protobuf enum CUSTOM_MINI = 6; - */ - const CUSTOM_MINI = 6; - /** - * High cpu medium. - * - * Generated from protobuf enum HIGHCPU_MEDIUM = 7; - */ - const HIGHCPU_MEDIUM = 7; - /** - * Standard large. - * - * Generated from protobuf enum STANDARD_LARGE = 8; - */ - const STANDARD_LARGE = 8; - /** - * High memory 2x large. - * - * Generated from protobuf enum HIGHMEM_2XLARGE = 9; - */ - const HIGHMEM_2XLARGE = 9; - /** - * Custom pico. - * - * Generated from protobuf enum CUSTOM_PICO = 10; - */ - const CUSTOM_PICO = 10; - - private static $valueToName = [ - self::NODE_TYPE_UNSPECIFIED => 'NODE_TYPE_UNSPECIFIED', - self::SHARED_CORE_NANO => 'SHARED_CORE_NANO', - self::HIGHMEM_MEDIUM => 'HIGHMEM_MEDIUM', - self::HIGHMEM_XLARGE => 'HIGHMEM_XLARGE', - self::STANDARD_SMALL => 'STANDARD_SMALL', - self::CUSTOM_MICRO => 'CUSTOM_MICRO', - self::CUSTOM_MINI => 'CUSTOM_MINI', - self::HIGHCPU_MEDIUM => 'HIGHCPU_MEDIUM', - self::STANDARD_LARGE => 'STANDARD_LARGE', - self::HIGHMEM_2XLARGE => 'HIGHMEM_2XLARGE', - self::CUSTOM_PICO => 'CUSTOM_PICO', - ]; - - 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php deleted file mode 100644 index 5f3fb269cc28..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/ServerCaMode.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.memorystore.v1.Instance.ServerCaMode - */ -class ServerCaMode -{ - /** - * Server CA mode not specified. - * - * Generated from protobuf enum SERVER_CA_MODE_UNSPECIFIED = 0; - */ - const SERVER_CA_MODE_UNSPECIFIED = 0; - /** - * Each instance has its own Google-managed CA. - * - * Generated from protobuf enum GOOGLE_MANAGED_PER_INSTANCE_CA = 1; - */ - const GOOGLE_MANAGED_PER_INSTANCE_CA = 1; - /** - * The instance uses a Google-managed shared CA for the instance's region. - * - * Generated from protobuf enum GOOGLE_MANAGED_SHARED_CA = 2; - */ - const GOOGLE_MANAGED_SHARED_CA = 2; - /** - * The instance uses a customer-managed CA from CAS. - * - * Generated from protobuf enum CUSTOMER_MANAGED_CAS_CA = 3; - */ - const CUSTOMER_MANAGED_CAS_CA = 3; - /** - * Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. - * - * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 [deprecated = true]; - */ - const SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1; - /** - * Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. - * - * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 [deprecated = true]; - */ - const SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2; - /** - * Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. - * - * Generated from protobuf enum SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 [deprecated = true]; - */ - const SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3; - - private static $valueToName = [ - self::SERVER_CA_MODE_UNSPECIFIED => 'SERVER_CA_MODE_UNSPECIFIED', - self::GOOGLE_MANAGED_PER_INSTANCE_CA => 'GOOGLE_MANAGED_PER_INSTANCE_CA', - self::GOOGLE_MANAGED_SHARED_CA => 'GOOGLE_MANAGED_SHARED_CA', - self::CUSTOMER_MANAGED_CAS_CA => 'CUSTOMER_MANAGED_CAS_CA', - 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php deleted file mode 100644 index e39b52e6e858..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memorystore.v1.Instance.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Instance is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Instance has been created and is usable. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Instance is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Instance 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php deleted file mode 100644 index 54baa08f079f..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memorystore.v1.Instance.StateInfo - */ -class StateInfo extends \Google\Protobuf\Internal\Message -{ - protected $info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo $update_info - * Output only. Describes ongoing update when instance state is UPDATING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Describes ongoing update when instance state is UPDATING. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo|null - */ - public function getUpdateInfo() - { - return $this->readOneof(1); - } - - public function hasUpdateInfo() - { - return $this->hasOneof(1); - } - - /** - * Output only. Describes ongoing update when instance state is UPDATING. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo $var - * @return $this - */ - public function setUpdateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance\StateInfo\UpdateInfo::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getInfo() - { - return $this->whichOneof("info"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php deleted file mode 100644 index 55849fe67f8a..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/StateInfo/UpdateInfo.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.memorystore.v1.Instance.StateInfo.UpdateInfo - */ -class UpdateInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Target number of shards for the instance. - * - * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_shard_count = null; - /** - * Output only. Target number of replica nodes per shard for the instance. - * - * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_replica_count = null; - /** - * Output only. Target engine version for the instance. - * - * Generated from protobuf field optional string target_engine_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_engine_version = null; - /** - * Output only. Target node type for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.NodeType target_node_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_node_type = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_shard_count - * Output only. Target number of shards for the instance. - * @type int $target_replica_count - * Output only. Target number of replica nodes per shard for the instance. - * @type string $target_engine_version - * Output only. Target engine version for the instance. - * @type int $target_node_type - * Output only. Target node type for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Target number of shards for the instance. - * - * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. Target number of shards for the instance. - * - * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTargetShardCount($var) - { - GPBUtil::checkInt32($var); - $this->target_shard_count = $var; - - return $this; - } - - /** - * Output only. Target number of replica nodes per shard for the instance. - * - * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. Target number of replica nodes per shard for the instance. - * - * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTargetReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->target_replica_count = $var; - - return $this; - } - - /** - * Output only. Target engine version for the instance. - * - * Generated from protobuf field optional string target_engine_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTargetEngineVersion() - { - return isset($this->target_engine_version) ? $this->target_engine_version : ''; - } - - public function hasTargetEngineVersion() - { - return isset($this->target_engine_version); - } - - public function clearTargetEngineVersion() - { - unset($this->target_engine_version); - } - - /** - * Output only. Target engine version for the instance. - * - * Generated from protobuf field optional string target_engine_version = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTargetEngineVersion($var) - { - GPBUtil::checkString($var, True); - $this->target_engine_version = $var; - - return $this; - } - - /** - * Output only. Target node type for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.NodeType target_node_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getTargetNodeType() - { - return isset($this->target_node_type) ? $this->target_node_type : 0; - } - - public function hasTargetNodeType() - { - return isset($this->target_node_type); - } - - public function clearTargetNodeType() - { - unset($this->target_node_type); - } - - /** - * Output only. Target node type for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1.Instance.NodeType target_node_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTargetNodeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\Instance\NodeType::class); - $this->target_node_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php deleted file mode 100644 index 49b50b653c49..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/Instance/TransitEncryptionMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.v1.Instance.TransitEncryptionMode - */ -class TransitEncryptionMode -{ - /** - * Not set. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; - */ - const TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; - /** - * In-transit encryption is disabled. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_DISABLED = 1; - */ - const TRANSIT_ENCRYPTION_DISABLED = 1; - /** - * Server-managed encryption is used for in-transit encryption. - * - * Generated from protobuf enum SERVER_AUTHENTICATION = 2; - */ - const SERVER_AUTHENTICATION = 2; - - private static $valueToName = [ - self::TRANSIT_ENCRYPTION_MODE_UNSPECIFIED => 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', - self::TRANSIT_ENCRYPTION_DISABLED => 'TRANSIT_ENCRYPTION_DISABLED', - self::SERVER_AUTHENTICATION => '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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php deleted file mode 100644 index c4a5108dc7e9..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.memorystore.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 Google Cloud 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.memorystore.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 Google Cloud region. Please see - * {@see MemorystoreClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\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 Google Cloud 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.memorystore.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\Memorystore\V1\Memorystore::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 Google Cloud 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 Google Cloud 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.memorystore.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.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php deleted file mode 100644 index 6280a6c8f152..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupCollectionsResponse.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.memorystore.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.memorystore.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\Memorystore\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\Memorystore\V1\Memorystore::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.memorystore.v1.BackupCollection backup_collections = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\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.memorystore.v1.BackupCollection backup_collections = 1; - * @param \Google\Cloud\Memorystore\V1\BackupCollection[] $var - * @return $this - */ - public function setBackupCollections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php deleted file mode 100644 index a4d5e9efa418..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.memorystore.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.memorystore.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 MemorystoreClient::backupCollectionName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\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.memorystore.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\Memorystore\V1\Memorystore::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.memorystore.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.memorystore.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php deleted file mode 100644 index affa37699ac6..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListBackupsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.memorystore.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.memorystore.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\Memorystore\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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Backup backups = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\Backup> - */ - public function getBackups() - { - return $this->backups; - } - - /** - * A list of backups in the project. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Backup backups = 1; - * @param \Google\Cloud\Memorystore\V1\Backup[] $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php deleted file mode 100644 index 72c0c06fb17c..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.memorystore.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent to list instances from. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Expression for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent to list instances from. - * Format: projects/{project}/locations/{location} - * Please see {@see MemorystoreClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1\ListInstancesRequest - * - * @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 parent to list instances from. - * Format: projects/{project}/locations/{location} - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Expression for filtering results. - * @type string $order_by - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent to list instances from. - * Format: projects/{project}/locations/{location} - * - * 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 parent to list instances from. - * Format: projects/{project}/locations/{location} - * - * 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. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * 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. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Optional. Expression for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Expression for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php deleted file mode 100644 index 5fcb221e5ec9..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ListInstancesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.memorystore.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance instances = 1; - */ - private $instances; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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\Memorystore\V1\Instance[] $instances - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance instances = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\Instance> - */ - public function getInstances() - { - return $this->instances; - } - - /** - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.Instance instances = 1; - * @param \Google\Cloud\Memorystore\V1\Instance[] $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php deleted file mode 100644 index e7829c311621..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenancePolicy.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.memorystore.v1.MaintenancePolicy - */ -class MaintenancePolicy extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time when the policy 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 when the policy 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_window is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time when the policy was updated. - * @type \Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow[] $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_window is expected to be one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time when the policy 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 when the policy 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 when the policy 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. - * - * 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_window is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow> - */ - 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_window is expected to be one. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.WeeklyMaintenanceWindow weekly_maintenance_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow[] $var - * @return $this - */ - public function setWeeklyMaintenanceWindow($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\WeeklyMaintenanceWindow::class); - $this->weekly_maintenance_window = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php deleted file mode 100644 index 3981c8b8b533..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/MaintenanceSchedule.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.memorystore.v1.MaintenanceSchedule - */ -class MaintenanceSchedule 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\Memorystore\V1\Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php deleted file mode 100644 index 92d0a5c1b096..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/NodeConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1.NodeConfig - */ -class NodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Memory size in GB of the node. - * - * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_gb = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $size_gb - * Output only. Memory size in GB of the node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Memory size in GB of the node. - * - * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * Output only. Memory size in GB of the node. - * - * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkDouble($var); - $this->size_gb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php deleted file mode 100644 index 772507c4b45a..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.memorystore.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 been cancelled successfully - * 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 been cancelled successfully - * 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\Memorystore\V1\Memorystore::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 been cancelled successfully - * 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 been cancelled successfully - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php deleted file mode 100644 index dd2f39022e55..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.memorystore.v1.PersistenceConfig - */ -class PersistenceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Current persistence mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.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.memorystore.v1.PersistenceConfig.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.memorystore.v1.PersistenceConfig.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. Current persistence mode. - * @type \Google\Cloud\Memorystore\V1\PersistenceConfig\RDBConfig $rdb_config - * Optional. RDB configuration. This field will be ignored if mode is not RDB. - * @type \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig $aof_config - * Optional. AOF configuration. This field will be ignored if mode is not AOF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Current persistence mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. Current persistence mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\PersistenceConfig\RDBConfig $var - * @return $this - */ - public function setRdbConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1\PersistenceConfig\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.memorystore.v1.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig $var - * @return $this - */ - public function setAofConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig::class); - $this->aof_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php deleted file mode 100644 index a12e75f50387..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1.PersistenceConfig.AOFConfig - */ -class AOFConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The fsync mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.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. The fsync mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The fsync mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAppendFsync() - { - return $this->append_fsync; - } - - /** - * Optional. The fsync mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAppendFsync($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PersistenceConfig\AOFConfig\AppendFsync::class); - $this->append_fsync = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php deleted file mode 100644 index 28be57fb620f..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/AOFConfig/AppendFsync.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.memorystore.v1.PersistenceConfig.AOFConfig.AppendFsync - */ -class AppendFsync -{ - /** - * Not set. Default: EVERY_SEC - * - * 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 NEVER = 1; - */ - const NEVER = 1; - /** - * Fsync every second. You may lose 1 second of data if there is a - * disaster. - * - * Generated from protobuf enum EVERY_SEC = 2; - */ - const EVERY_SEC = 2; - /** - * Fsync every time new write commands are appended to the AOF. 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::NEVER => 'NEVER', - self::EVERY_SEC => 'EVERY_SEC', - 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php deleted file mode 100644 index 8fadb8e6ea7a..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/PersistenceMode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1.PersistenceConfig.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php deleted file mode 100644 index 97581786fdac..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.memorystore.v1.PersistenceConfig.RDBConfig - */ -class RDBConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rdb_snapshot_period = 0; - /** - * Optional. 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. 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PersistenceConfig.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.memorystore.v1.PersistenceConfig.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\Memorystore\V1\PersistenceConfig\RDBConfig\SnapshotPeriod::class); - $this->rdb_snapshot_period = $var; - - return $this; - } - - /** - * Optional. 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. 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php deleted file mode 100644 index 4159b0d8ea5d..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PersistenceConfig/RDBConfig/SnapshotPeriod.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memorystore.v1.PersistenceConfig.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php deleted file mode 100644 index f4f98e33da93..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAttachmentDetail.php +++ /dev/null @@ -1,106 +0,0 @@ -google.cloud.memorystore.v1.PscAttachmentDetail - */ -class PscAttachmentDetail 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, (.google.api.resource_reference) = { - */ - protected $service_attachment = ''; - /** - * Output only. Type of Psc endpoint. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 4 [(.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 Psc endpoint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::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, (.google.api.resource_reference) = { - * @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, (.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. Type of Psc endpoint. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getConnectionType() - { - return $this->connection_type; - } - - /** - * Output only. Type of Psc endpoint. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php deleted file mode 100644 index e2984dcb1718..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscAutoConnection.php +++ /dev/null @@ -1,391 +0,0 @@ -google.cloud.memorystore.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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * Output only. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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 PSC connections are established. - * This should be the same project_id that the instance is being created in. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The network where the PSC endpoints are created, 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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_status = 0; - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_type = 0; - protected $ports; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $port - * Optional. port will only be set for Primary/Reader or Discovery endpoint. - * @type string $psc_connection_id - * Output only. The PSC connection id of the forwarding rule connected to the - * service attachment. - * @type string $ip_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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * @type string $project_id - * Required. The consumer project_id where PSC connections are established. - * This should be the same project_id that the instance is being created in. - * @type string $network - * Required. The network where the PSC endpoints are created, 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: whether a connection exists - * and ACTIVE or it no longer exists. 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. port will only be set for Primary/Reader or Discovery endpoint. - * - * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->readOneof(9); - } - - public function hasPort() - { - return $this->hasOneof(9); - } - - /** - * Optional. port will only be set for Primary/Reader or Discovery endpoint. - * - * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * 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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Output only. The IP allocated on the consumer network for the PSC - * forwarding rule. - * - * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Output only. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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 PSC connections are established. - * This should be the same project_id that the instance is being created in. - * - * 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 PSC connections are established. - * This should be the same project_id that the instance is being created in. - * - * 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 network where the PSC endpoints are created, 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 network where the PSC endpoints are created, 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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPscConnectionStatus() - { - return $this->psc_connection_status; - } - - /** - * Output only. The status of the PSC connection: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPscConnectionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PscConnectionStatus::class); - $this->psc_connection_status = $var; - - return $this; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.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.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getPorts() - { - return $this->whichOneof("ports"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php deleted file mode 100644 index 2023a0defd6d..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnection.php +++ /dev/null @@ -1,391 +0,0 @@ -google.cloud.memorystore.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 ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * Required. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $forwarding_rule = ''; - /** - * Output only. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_status = 0; - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_type = 0; - protected $ports; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $port - * Optional. port will only be set for Primary/Reader or Discovery endpoint. - * @type string $psc_connection_id - * Required. The PSC connection id of the forwarding rule connected to the - * service attachment. - * @type string $ip_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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * @type string $project_id - * Output only. 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 - * 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: whether a connection exists - * and ACTIVE or it no longer exists. 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. port will only be set for Primary/Reader or Discovery endpoint. - * - * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->readOneof(9); - } - - public function hasPort() - { - return $this->hasOneof(9); - } - - /** - * Optional. port will only be set for Primary/Reader or Discovery endpoint. - * - * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * 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 ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Required. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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; - } - - /** - * Output only. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Output only. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPscConnectionStatus() - { - return $this->psc_connection_status; - } - - /** - * Output only. The status of the PSC connection: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPscConnectionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\PscConnectionStatus::class); - $this->psc_connection_status = $var; - - return $this; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ConnectionType connection_type = 8 [(.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.memorystore.v1.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getPorts() - { - return $this->whichOneof("ports"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php deleted file mode 100644 index f23a484d2065..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/PscConnectionStatus.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.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 ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Connection not found - * - * Generated from protobuf enum NOT_FOUND = 2; - */ - const NOT_FOUND = 2; - - private static $valueToName = [ - self::PSC_CONNECTION_STATUS_UNSPECIFIED => 'PSC_CONNECTION_STATUS_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::NOT_FOUND => '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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php deleted file mode 100644 index 8a4e17be3c7f..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.memorystore.v1.RescheduleMaintenanceRequest - */ -class RescheduleMaintenanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the instance to reschedule maintenance for: - * `projects/{project}/locations/{location_id}/instances/{instance}` - * - * 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, schedule_time must be set. - * - * Generated from protobuf field .google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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. - * 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. Name of the instance to reschedule maintenance for: - * `projects/{project}/locations/{location_id}/instances/{instance}` - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * @param int $rescheduleType Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. - * For allowed values, use constants defined on {@see \Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest\RescheduleType} - * @param \Google\Protobuf\Timestamp $scheduleTime Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format. - * Example: `2012-11-15T16:19:00.094Z`. - * - * @return \Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest - * - * @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. Name of the instance to reschedule maintenance for: - * `projects/{project}/locations/{location_id}/instances/{instance}` - * @type int $reschedule_type - * Required. If reschedule type is SPECIFIC_TIME, schedule_time must be set. - * @type \Google\Protobuf\Timestamp $schedule_time - * Optional. Timestamp when the maintenance shall be rescheduled to if - * reschedule_type=SPECIFIC_TIME, in RFC 3339 format. - * Example: `2012-11-15T16:19:00.094Z`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the instance to reschedule maintenance for: - * `projects/{project}/locations/{location_id}/instances/{instance}` - * - * 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. Name of the instance to reschedule maintenance for: - * `projects/{project}/locations/{location_id}/instances/{instance}` - * - * 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, schedule_time must be set. - * - * Generated from protobuf field .google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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, schedule_time must be set. - * - * Generated from protobuf field .google.cloud.memorystore.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setRescheduleType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\RescheduleMaintenanceRequest\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. - * 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. - * 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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php deleted file mode 100644 index bae3f3f8f4b7..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/RescheduleMaintenanceRequest/RescheduleType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.v1.RescheduleMaintenanceRequest.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php deleted file mode 100644 index 692201feb3b1..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.memorystore.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\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $managed_server_ca - * CA certificate chains for memorystore 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\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * CA certificate chains for memorystore managed server authentication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; - * @return \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority|null - */ - public function getManagedServerCa() - { - return $this->readOneof(2); - } - - public function hasManagedServerCa() - { - return $this->hasOneof(2); - } - - /** - * CA certificate chains for memorystore managed server authentication. - * - * Generated from protobuf field .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; - * @param \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $var - * @return $this - */ - public function setManagedServerCa($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php deleted file mode 100644 index f3acb7621354..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority - */ -class RegionalManagedCertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; - */ - private $ca_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $ca_certs - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain> - */ - public function getCaCerts() - { - return $this->ca_certs; - } - - /** - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; - * @param \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $var - * @return $this - */ - public function setCaCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain::class); - $this->ca_certs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php deleted file mode 100644 index 63fc055f0169..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.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\Memorystore\V1\Memorystore::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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php deleted file mode 100644 index 7e33c64befb8..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/UpdateInstanceRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.memorystore.v1.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Memorystore\V1\Instance $instance Required. The instance to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * @return \Google\Cloud\Memorystore\V1\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Memorystore\V1\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * @type \Google\Cloud\Memorystore\V1\Instance $instance - * Required. The instance to update. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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. The instance to update. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memorystore\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.memorystore.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memorystore\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php deleted file mode 100644 index d52a979d1c06..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/WeeklyMaintenanceWindow.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.memorystore.v1.WeeklyMaintenanceWindow - */ -class WeeklyMaintenanceWindow extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $day = 0; - /** - * Optional. Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day - * Optional. Allows to define schedule that runs specified day of the week. - * @type \Google\Type\TimeOfDay $start_time - * Optional. Start time of the window in UTC. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getDay() - { - return $this->day; - } - - /** - * Optional. Allows to define schedule that runs specified day of the week. - * - * Generated from protobuf field .google.type.DayOfWeek day = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day = $var; - - return $this; - } - - /** - * Optional. Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Start time of the window in UTC. - * - * Generated from protobuf field .google.type.TimeOfDay start_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php deleted file mode 100644 index ac605c0cfae6..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.memorystore.v1.ZoneDistributionConfig - */ -class ZoneDistributionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone = ''; - /** - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * @type int $mode - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * - * 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; - } - - /** - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * - * Generated from protobuf field .google.cloud.memorystore.v1.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1\ZoneDistributionConfig\ZoneDistributionMode::class); - $this->mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php b/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php deleted file mode 100644 index 868017e3436d..000000000000 --- a/owl-bot-staging/Memorystore/v1/proto/src/Google/Cloud/Memorystore/V1/ZoneDistributionConfig/ZoneDistributionMode.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.memorystore.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 resources across 3 zones picked at random within the - * region. - * - * Generated from protobuf enum MULTI_ZONE = 1; - */ - const MULTI_ZONE = 1; - /** - * Provision resources in a single zone. Zone field must be specified. - * - * 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/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php deleted file mode 100644 index 175a5ea66f9a..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/backup_instance.php +++ /dev/null @@ -1,96 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->backupInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - backup_instance_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_BackupInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php deleted file mode 100644 index 67206ae89a72..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/create_instance.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - - create_instance_sample($formattedParent, $instanceId); -} -// [END memorystore_v1_generated_Memorystore_CreateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php deleted file mode 100644 index 5694ee621660..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_backup.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->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 = MemorystoreClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]', - '[BACKUP]' - ); - - delete_backup_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_DeleteBackup_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php deleted file mode 100644 index ffc1d5ed5e23..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/delete_instance.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->deleteInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_DeleteInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php deleted file mode 100644 index 56ae1d36d418..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/export_backup.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->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 = MemorystoreClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]', - '[BACKUP]' - ); - - export_backup_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_ExportBackup_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php deleted file mode 100644 index 8bb6d02959a9..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $memorystoreClient->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 = MemorystoreClient::backupName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]', - '[BACKUP]' - ); - - get_backup_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_GetBackup_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_backup_collection.php deleted file mode 100644 index 031b1df71a5a..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 = $memorystoreClient->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 = MemorystoreClient::backupCollectionName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]' - ); - - get_backup_collection_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_GetBackupCollection_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php deleted file mode 100644 index cc1ad90d86ee..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_certificate_authority.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CertificateAuthority $response */ - $response = $memorystoreClient->getCertificateAuthority($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_certificate_authority_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php deleted file mode 100644 index fb24db5221ca..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $memorystoreClient->getInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_GetInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_location.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_location.php deleted file mode 100644 index 1ddecc2889fc..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 memorystore_v1_generated_Memorystore_GetLocation_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php deleted file mode 100644 index c51788ef4bda..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/get_shared_regional_certificate_authority.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SharedRegionalCertificateAuthority $response */ - $response = $memorystoreClient->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 = MemorystoreClient::sharedRegionalCertificateAuthorityName( - '[PROJECT]', - '[LOCATION]' - ); - - get_shared_regional_certificate_authority_sample($formattedName); -} -// [END memorystore_v1_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backup_collections.php deleted file mode 100644 index 9ca0805b32e1..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 = $memorystoreClient->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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backup_collections_sample($formattedParent); -} -// [END memorystore_v1_generated_Memorystore_ListBackupCollections_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php deleted file mode 100644 index 01e3569e2ad4..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_backups.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $memorystoreClient->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 = MemorystoreClient::backupCollectionName( - '[PROJECT]', - '[LOCATION]', - '[BACKUP_COLLECTION]' - ); - - list_backups_sample($formattedParent); -} -// [END memorystore_v1_generated_Memorystore_ListBackups_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php deleted file mode 100644 index c45b6a6ffcd9..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_instances.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $memorystoreClient->listInstances($request); - - /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END memorystore_v1_generated_Memorystore_ListInstances_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_locations.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/list_locations.php deleted file mode 100644 index 94d43d1aacba..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/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 memorystore_v1_generated_Memorystore_ListLocations_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php deleted file mode 100644 index f798a47473de..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/reschedule_maintenance.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName) - ->setRescheduleType($rescheduleType); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->rescheduleMaintenance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - - reschedule_maintenance_sample($formattedName, $rescheduleType); -} -// [END memorystore_v1_generated_Memorystore_RescheduleMaintenance_sync] diff --git a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php b/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php deleted file mode 100644 index 4cd7b00a6604..000000000000 --- a/owl-bot-staging/Memorystore/v1/samples/V1/MemorystoreClient/update_instance.php +++ /dev/null @@ -1,71 +0,0 @@ -setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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()); - } -} -// [END memorystore_v1_generated_Memorystore_UpdateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php b/owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php deleted file mode 100644 index b3bfc7759a0b..000000000000 --- a/owl-bot-staging/Memorystore/v1/src/V1/Client/MemorystoreClient.php +++ /dev/null @@ -1,982 +0,0 @@ - backupInstanceAsync(BackupInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $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 getCertificateAuthorityAsync(GetCertificateAuthorityRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $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 listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface rescheduleMaintenanceAsync(RescheduleMaintenanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class MemorystoreClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.memorystore.v1.Memorystore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'memorystore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'memorystore.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/memorystore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/memorystore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/memorystore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/memorystore_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 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 instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * 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} - * - 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} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - 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 'memorystore.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\Memorystore\V1\MemorystoreClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new MemorystoreClient(['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 Instance. - * 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 instance'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 MemorystoreClient::backupInstanceAsync()} . - * - * @example samples/V1/MemorystoreClient/backup_instance.php - * - * @param BackupInstanceRequest $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 backupInstance(BackupInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BackupInstance', $request, $callOptions)->wait(); - } - - /** - * Creates a new Instance in a given project and location. - * - * The async variant is {@see MemorystoreClient::createInstanceAsync()} . - * - * @example samples/V1/MemorystoreClient/create_instance.php - * - * @param CreateInstanceRequest $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 createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a specific backup. - * - * The async variant is {@see MemorystoreClient::deleteBackupAsync()} . - * - * @example samples/V1/MemorystoreClient/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 single Instance. - * - * The async variant is {@see MemorystoreClient::deleteInstanceAsync()} . - * - * @example samples/V1/MemorystoreClient/delete_instance.php - * - * @param DeleteInstanceRequest $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 deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Exports a specific backup to a customer target Cloud Storage URI. - * - * The async variant is {@see MemorystoreClient::exportBackupAsync()} . - * - * @example samples/V1/MemorystoreClient/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 MemorystoreClient::getBackupAsync()} . - * - * @example samples/V1/MemorystoreClient/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 MemorystoreClient::getBackupCollectionAsync()} . - * - * @example samples/V1/MemorystoreClient/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 details about the certificate authority for an Instance. - * - * The async variant is {@see MemorystoreClient::getCertificateAuthorityAsync()} . - * - * @example samples/V1/MemorystoreClient/get_certificate_authority.php - * - * @param GetCertificateAuthorityRequest $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 getCertificateAuthority(GetCertificateAuthorityRequest $request, array $callOptions = []): CertificateAuthority - { - return $this->startApiCall('GetCertificateAuthority', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Instance. - * - * The async variant is {@see MemorystoreClient::getInstanceAsync()} . - * - * @example samples/V1/MemorystoreClient/get_instance.php - * - * @param GetInstanceRequest $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 Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Gets the details of shared regional certificate authority information for - * Memorystore instance. - * - * The async variant is - * {@see MemorystoreClient::getSharedRegionalCertificateAuthorityAsync()} . - * - * @example samples/V1/MemorystoreClient/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 MemorystoreClient::listBackupCollectionsAsync()} . - * - * @example samples/V1/MemorystoreClient/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 MemorystoreClient::listBackupsAsync()} . - * - * @example samples/V1/MemorystoreClient/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 Instances in a given project and location. - * - * The async variant is {@see MemorystoreClient::listInstancesAsync()} . - * - * @example samples/V1/MemorystoreClient/list_instances.php - * - * @param ListInstancesRequest $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 listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Reschedules upcoming maintenance event. - * - * The async variant is {@see MemorystoreClient::rescheduleMaintenanceAsync()} . - * - * @example samples/V1/MemorystoreClient/reschedule_maintenance.php - * - * @param RescheduleMaintenanceRequest $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 rescheduleMaintenance(RescheduleMaintenanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RescheduleMaintenance', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Instance. - * - * The async variant is {@see MemorystoreClient::updateInstanceAsync()} . - * - * @example samples/V1/MemorystoreClient/update_instance.php - * - * @param UpdateInstanceRequest $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 updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see MemorystoreClient::getLocationAsync()} . - * - * @example samples/V1/MemorystoreClient/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 MemorystoreClient::listLocationsAsync()} . - * - * @example samples/V1/MemorystoreClient/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/Memorystore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Memorystore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index f203e3b7f2d1..000000000000 --- a/owl-bot-staging/Memorystore/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.memorystore.v1", - "libraryPackage": "Google\\Cloud\\Memorystore\\V1", - "services": { - "Memorystore": { - "clients": { - "grpc": { - "libraryClient": "MemorystoreGapicClient", - "rpcs": { - "BackupInstance": { - "methods": [ - "backupInstance" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "ExportBackup": { - "methods": [ - "exportBackup" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupCollection": { - "methods": [ - "getBackupCollection" - ] - }, - "GetCertificateAuthority": { - "methods": [ - "getCertificateAuthority" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetSharedRegionalCertificateAuthority": { - "methods": [ - "getSharedRegionalCertificateAuthority" - ] - }, - "ListBackupCollections": { - "methods": [ - "listBackupCollections" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "RescheduleMaintenance": { - "methods": [ - "rescheduleMaintenance" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json deleted file mode 100644 index d78b061c5ab7..000000000000 --- a/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_client_config.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "interfaces": { - "google.cloud.memorystore.v1.Memorystore": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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": { - "BackupInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateInstance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteInstance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ExportBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBackupCollection": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetCertificateAuthority": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSharedRegionalCertificateAuthority": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackupCollections": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RescheduleMaintenance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateInstance": { - "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/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php deleted file mode 100644 index cf864fedcf4e..000000000000 --- a/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_descriptor_config.php +++ /dev/null @@ -1,329 +0,0 @@ - [ - 'google.cloud.memorystore.v1.Memorystore' => [ - 'BackupInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', - '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\Cloud\Memorystore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', - '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\Memorystore\V1\Backup', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RescheduleMaintenance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memorystore\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupCollection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1\BackupCollection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateAuthority' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1\CertificateAuthority', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSharedRegionalCertificateAuthority' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\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\Memorystore\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\Memorystore\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1\ListInstancesResponse', - '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}', - '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}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - '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/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php b/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php deleted file mode 100644 index 4466095dcb1e..000000000000 --- a/owl-bot-staging/Memorystore/v1/src/V1/resources/memorystore_rest_client_config.php +++ /dev/null @@ -1,273 +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.memorystore.v1.Memorystore' => [ - 'BackupInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:backup', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backupCollections/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - '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', - ], - ], - ], - ], - 'GetCertificateAuthority' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}/certificateAuthority', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}', - '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', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RescheduleMaintenance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/instances/*}:rescheduleMaintenance', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - ], - '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/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php b/owl-bot-staging/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php deleted file mode 100644 index 6f7bc4612c3c..000000000000 --- a/owl-bot-staging/Memorystore/v1/tests/Unit/V1/Client/MemorystoreClientTest.php +++ /dev/null @@ -1,1938 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MemorystoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MemorystoreClient($options); - } - - /** @test */ - public function backupInstanceTest() - { - $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/backupInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $simulateMaintenanceEvent = false; - $ondemandMaintenance = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $asyncInstanceEndpointsDeletionEnabled = true; - $kmsKey = 'kmsKey-591635343'; - $backupCollection = 'backupCollection-1182285509'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; - $allowFewerZonesDeployment = false; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); - $expectedResponse->setOndemandMaintenance($ondemandMaintenance); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); - $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/backupInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new BackupInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->backupInstance($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.memorystore.v1.Memorystore/BackupInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/backupInstanceTest'); - $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 backupInstanceExceptionTest() - { - $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/backupInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new BackupInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->backupInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/backupInstanceTest'); - 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 createInstanceTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $simulateMaintenanceEvent = false; - $ondemandMaintenance = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $asyncInstanceEndpointsDeletionEnabled = true; - $kmsKey = 'kmsKey-591635343'; - $backupCollection = 'backupCollection-1182285509'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; - $allowFewerZonesDeployment = false; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); - $expectedResponse->setOndemandMaintenance($ondemandMaintenance); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); - $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($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.memorystore.v1.Memorystore/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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 createInstanceExceptionTest() - { - $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/createInstanceTest'); - $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]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - 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.memorystore.v1.Memorystore/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 deleteInstanceTest() - { - $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/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($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.memorystore.v1.Memorystore/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $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 deleteInstanceExceptionTest() - { - $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/deleteInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - 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'; - $instance = 'instance555127957'; - $instanceUid = 'instanceUid-737331802'; - $totalSizeBytes = 115423608; - $engineVersion = 'engineVersion-618177573'; - $replicaCount = 564075208; - $shardCount = 495377042; - $uid = 'uid115792'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setInstance($instance); - $expectedResponse->setInstanceUid($instanceUid); - $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.memorystore.v1.Memorystore/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'; - $instance = 'instance555127957'; - $instanceUid = 'instanceUid-737331802'; - $totalSizeBytes = 115423608; - $engineVersion = 'engineVersion-618177573'; - $replicaCount = 564075208; - $shardCount = 495377042; - $uid = 'uid115792'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setInstance($instance); - $expectedResponse->setInstanceUid($instanceUid); - $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.memorystore.v1.Memorystore/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'; - $instanceUid = 'instanceUid-737331802'; - $instance = 'instance555127957'; - $kmsKey = 'kmsKey-591635343'; - $uid = 'uid115792'; - $totalBackupSizeBytes = 665105137; - $totalBackupCount = 775900525; - $expectedResponse = new BackupCollection(); - $expectedResponse->setName($name2); - $expectedResponse->setInstanceUid($instanceUid); - $expectedResponse->setInstance($instance); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setUid($uid); - $expectedResponse->setTotalBackupSizeBytes($totalBackupSizeBytes); - $expectedResponse->setTotalBackupCount($totalBackupCount); - $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.memorystore.v1.Memorystore/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 getCertificateAuthorityTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetCertificateAuthorityRequest()) - ->setName($formattedName); - $response = $gapicClient->getCertificateAuthority($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.memorystore.v1.Memorystore/GetCertificateAuthority', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateAuthorityExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetCertificateAuthorityRequest()) - ->setName($formattedName); - try { - $gapicClient->getCertificateAuthority($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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $simulateMaintenanceEvent = false; - $ondemandMaintenance = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $asyncInstanceEndpointsDeletionEnabled = true; - $kmsKey = 'kmsKey-591635343'; - $backupCollection = 'backupCollection-1182285509'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; - $allowFewerZonesDeployment = false; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); - $expectedResponse->setOndemandMaintenance($ondemandMaintenance); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); - $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($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.memorystore.v1.Memorystore/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($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.memorystore.v1.Memorystore/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.memorystore.v1.Memorystore/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.memorystore.v1.Memorystore/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 listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memorystore.v1.Memorystore/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $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 ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($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 rescheduleMaintenanceTest() - { - $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/rescheduleMaintenanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $simulateMaintenanceEvent = false; - $ondemandMaintenance = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $asyncInstanceEndpointsDeletionEnabled = true; - $kmsKey = 'kmsKey-591635343'; - $backupCollection = 'backupCollection-1182285509'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; - $allowFewerZonesDeployment = false; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); - $expectedResponse->setOndemandMaintenance($ondemandMaintenance); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); - $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/rescheduleMaintenanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - $request = (new RescheduleMaintenanceRequest()) - ->setName($formattedName) - ->setRescheduleType($rescheduleType); - $response = $gapicClient->rescheduleMaintenance($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.memorystore.v1.Memorystore/RescheduleMaintenance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getRescheduleType(); - $this->assertProtobufEquals($rescheduleType, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); - $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 rescheduleMaintenanceExceptionTest() - { - $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/rescheduleMaintenanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $rescheduleType = RescheduleType::RESCHEDULE_TYPE_UNSPECIFIED; - $request = (new RescheduleMaintenanceRequest()) - ->setName($formattedName) - ->setRescheduleType($rescheduleType); - $response = $gapicClient->rescheduleMaintenance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/rescheduleMaintenanceTest'); - 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 updateInstanceTest() - { - $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/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $simulateMaintenanceEvent = false; - $ondemandMaintenance = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $asyncInstanceEndpointsDeletionEnabled = true; - $kmsKey = 'kmsKey-591635343'; - $backupCollection = 'backupCollection-1182285509'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; - $allowFewerZonesDeployment = false; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); - $expectedResponse->setOndemandMaintenance($ondemandMaintenance); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); - $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - $response = $gapicClient->updateInstance($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.memorystore.v1.Memorystore/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $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 updateInstanceExceptionTest() - { - $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/updateInstanceTest'); - $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 - $instance = new Instance(); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - 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 backupInstanceAsyncTest() - { - $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/backupInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $simulateMaintenanceEvent = false; - $ondemandMaintenance = true; - $satisfiesPzs = false; - $satisfiesPzi = false; - $asyncInstanceEndpointsDeletionEnabled = true; - $kmsKey = 'kmsKey-591635343'; - $backupCollection = 'backupCollection-1182285509'; - $maintenanceVersion = 'maintenanceVersion-588975188'; - $effectiveMaintenanceVersion = 'effectiveMaintenanceVersion1518555412'; - $allowFewerZonesDeployment = false; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setSimulateMaintenanceEvent($simulateMaintenanceEvent); - $expectedResponse->setOndemandMaintenance($ondemandMaintenance); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $expectedResponse->setAsyncInstanceEndpointsDeletionEnabled($asyncInstanceEndpointsDeletionEnabled); - $expectedResponse->setKmsKey($kmsKey); - $expectedResponse->setBackupCollection($backupCollection); - $expectedResponse->setMaintenanceVersion($maintenanceVersion); - $expectedResponse->setEffectiveMaintenanceVersion($effectiveMaintenanceVersion); - $expectedResponse->setAllowFewerZonesDeployment($allowFewerZonesDeployment); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/backupInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new BackupInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->backupInstanceAsync($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.memorystore.v1.Memorystore/BackupInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/backupInstanceTest'); - $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()); - } -} diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php b/owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php deleted file mode 100644 index e7a96f51fe16..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/GPBMetadata/Google/Cloud/Memorystore/V1Beta/Memorystore.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF6W\x0A1google/cloud/memorystore/v1beta/memorystore.proto\x12\x1Fgoogle.cloud.memorystore.v1beta\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\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB8\x1B\x0A\x08Instance\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\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12J\x0A\x06labels\x18\x04 \x03(\x0B25.google.cloud.memorystore.v1beta.Instance.LabelsEntryB\x03\xE0A\x01\x12C\x0A\x05state\x18\x05 \x01(\x0E2/.google.cloud.memorystore.v1beta.Instance.StateB\x03\xE0A\x03\x12L\x0A\x0Astate_info\x18\x06 \x01(\x0B23.google.cloud.memorystore.v1beta.Instance.StateInfoB\x03\xE0A\x03\x12\x18\x0A\x03uid\x18\x07 \x01(\x09B\x0B\xE0A\x03\xE2\x8C\xCF\xD7\x08\x02\x08\x01\x12\x1F\x0A\x0Dreplica_count\x18\x08 \x01(\x05B\x03\xE0A\x01H\x00\x88\x01\x01\x12_\x0A\x12authorization_mode\x18\x09 \x01(\x0E2;.google.cloud.memorystore.v1beta.Instance.AuthorizationModeB\x06\xE0A\x01\xE0A\x05\x12h\x0A\x17transit_encryption_mode\x18\x0A \x01(\x0E2?.google.cloud.memorystore.v1beta.Instance.TransitEncryptionModeB\x06\xE0A\x01\xE0A\x05\x12\x18\x0A\x0Bshard_count\x18\x0B \x01(\x05B\x03\xE0A\x01\x12T\x0A\x13discovery_endpoints\x18\x0C \x03(\x0B22.google.cloud.memorystore.v1beta.DiscoveryEndpointB\x03\xE0A\x03\x12M\x0A\x09node_type\x18\x0D \x01(\x0E22.google.cloud.memorystore.v1beta.Instance.NodeTypeB\x06\xE0A\x01\xE0A\x05\x12S\x0A\x12persistence_config\x18\x0E \x01(\x0B22.google.cloud.memorystore.v1beta.PersistenceConfigB\x03\xE0A\x01\x12\x1E\x0A\x0Eengine_version\x18\x0F \x01(\x09B\x06\xE0A\x01\xE0A\x05\x12Y\x0A\x0Eengine_configs\x18\x10 \x03(\x0B2<.google.cloud.memorystore.v1beta.Instance.EngineConfigsEntryB\x03\xE0A\x01\x12E\x0A\x0Bnode_config\x18\x11 \x01(\x0B2+.google.cloud.memorystore.v1beta.NodeConfigB\x03\xE0A\x03\x12a\x0A\x18zone_distribution_config\x18\x12 \x01(\x0B27.google.cloud.memorystore.v1beta.ZoneDistributionConfigB\x06\xE0A\x01\xE0A\x05\x12-\x0A\x1Bdeletion_protection_enabled\x18\x13 \x01(\x08B\x03\xE0A\x01H\x01\x88\x01\x01\x12X\x0A\x14psc_auto_connections\x18\x14 \x03(\x0B22.google.cloud.memorystore.v1beta.PscAutoConnectionB\x06\xE0A\x02\xE0A\x05\x12R\x0A\x09endpoints\x18\x19 \x03(\x0B2:.google.cloud.memorystore.v1beta.Instance.InstanceEndpointB\x03\xE0A\x01\x12A\x0A\x04mode\x18\x1A \x01(\x0E2..google.cloud.memorystore.v1beta.Instance.ModeB\x03\xE0A\x01\x12[\x0A\x0Eserver_ca_mode\x188 \x01(\x0E26.google.cloud.memorystore.v1beta.Instance.ServerCaModeB\x06\xE0A\x01\xE0A\x05H\x02\x88\x01\x01\x12G\x0A\x0Eserver_ca_pool\x189 \x01(\x09B*\xE0A\x01\xE0A\x05\xFAA!\x0A\x1Fprivateca.googleapis.com/CaPoolH\x03\x88\x01\x01\x12.\x0A\x19rotate_server_certificate\x18: \x01(\x08B\x06\xE0A\x01\xE0A\x04H\x04\x88\x01\x01\x1A\xFC\x01\x0A\x09StateInfo\x12Z\x0A\x0Bupdate_info\x18\x01 \x01(\x0B2>.google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfoB\x03\xE0A\x03H\x00\x1A\x8A\x01\x0A\x0AUpdateInfo\x12\$\x0A\x12target_shard_count\x18\x01 \x01(\x05B\x03\xE0A\x03H\x00\x88\x01\x01\x12&\x0A\x14target_replica_count\x18\x02 \x01(\x05B\x03\xE0A\x03H\x01\x88\x01\x01B\x15\x0A\x13_target_shard_countB\x17\x0A\x15_target_replica_countB\x06\x0A\x04info\x1Ah\x0A\x10InstanceEndpoint\x12T\x0A\x0Bconnections\x18\x01 \x03(\x0B2:.google.cloud.memorystore.v1beta.Instance.ConnectionDetailB\x03\xE0A\x01\x1A\xBD\x01\x0A\x10ConnectionDetail\x12Q\x0A\x13psc_auto_connection\x18\x01 \x01(\x0B22.google.cloud.memorystore.v1beta.PscAutoConnectionH\x00\x12H\x0A\x0Epsc_connection\x18\x02 \x01(\x0B2..google.cloud.memorystore.v1beta.PscConnectionH\x00B\x0C\x0A\x0Aconnection\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A4\x0A\x12EngineConfigsEntry\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\"X\x0A\x11AuthorizationMode\x12\"\x0A\x1EAUTHORIZATION_MODE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DAUTH_DISABLED\x10\x01\x12\x0C\x0A\x08IAM_AUTH\x10\x02\"|\x0A\x15TransitEncryptionMode\x12'\x0A#TRANSIT_ENCRYPTION_MODE_UNSPECIFIED\x10\x00\x12\x1F\x0A\x1BTRANSIT_ENCRYPTION_DISABLED\x10\x01\x12\x19\x0A\x15SERVER_AUTHENTICATION\x10\x02\"\xE8\x01\x0A\x08NodeType\x12\x19\x0A\x15NODE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10SHARED_CORE_NANO\x10\x01\x12\x12\x0A\x0EHIGHMEM_MEDIUM\x10\x02\x12\x12\x0A\x0EHIGHMEM_XLARGE\x10\x03\x12\x12\x0A\x0ESTANDARD_SMALL\x10\x04\x12\x10\x0A\x0CCUSTOM_MICRO\x10\x05\x12\x0F\x0A\x0BCUSTOM_MINI\x10\x06\x12\x12\x0A\x0EHIGHCPU_MEDIUM\x10\x07\x12\x12\x0A\x0ESTANDARD_LARGE\x10\x08\x12\x13\x0A\x0FHIGHMEM_2XLARGE\x10\x09\x12\x0F\x0A\x0BCUSTOM_PICO\x10\x0A\"S\x0A\x04Mode\x12\x14\x0A\x10MODE_UNSPECIFIED\x10\x00\x12\x12\x0A\x0ASTANDALONE\x10\x01\x1A\x02\x08\x01\x12\x0B\x0A\x07CLUSTER\x10\x02\x12\x14\x0A\x10CLUSTER_DISABLED\x10\x04\"\xA9\x02\x0A\x0CServerCaMode\x12\x1E\x0A\x1ASERVER_CA_MODE_UNSPECIFIED\x10\x00\x12\"\x0A\x1EGOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x12\x1C\x0A\x18GOOGLE_MANAGED_SHARED_CA\x10\x02\x12\x1B\x0A\x17CUSTOMER_MANAGED_CAS_CA\x10\x03\x125\x0A-SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA\x10\x01\x1A\x02\x08\x01\x12/\x0A'SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA\x10\x02\x1A\x02\x08\x01\x12.\x0A&SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA\x10\x03\x1A\x02\x08\x01\x1A\x02\x10\x01:{\xEAAx\x0A#memorystore.googleapis.com/Instance\x12google.cloud.memorystore.v1beta.CertificateAuthority - */ -class CertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * - * 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\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority $managed_server_ca - * A managed server certificate authority. - * @type string $name - * Identifier. Unique name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * A managed server certificate authority. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; - * @return \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority|null - */ - public function getManagedServerCa() - { - return $this->readOneof(2); - } - - public function hasManagedServerCa() - { - return $this->hasOneof(2); - } - - /** - * A managed server certificate authority. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority managed_server_ca = 2; - * @param \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority $var - * @return $this - */ - public function setManagedServerCa($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Identifier. Unique name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * - * 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 certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance} - * - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php deleted file mode 100644 index 6bfca468f5a0..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority - */ -class ManagedCertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * PEM encoded CA certificate chains for managed server authentication. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - */ - private $ca_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $ca_certs - * PEM encoded CA certificate chains for managed server authentication. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * PEM encoded CA certificate chains for managed server authentication. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain> - */ - public function getCaCerts() - { - return $this->ca_certs; - } - - /** - * PEM encoded CA certificate chains for managed server authentication. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain ca_certs = 1; - * @param \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain[] $var - * @return $this - */ - public function setCaCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority\CertChain::class); - $this->ca_certs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php deleted file mode 100644 index 3304391c27e7..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CertificateAuthority/ManagedCertificateAuthority/CertChain.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain - */ -class CertChain extends \Google\Protobuf\Internal\Message -{ - /** - * The certificates that form the CA chain in order of leaf to root. - * - * 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 in order of leaf to root. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * The certificates that form the CA chain in order of leaf to root. - * - * Generated from protobuf field repeated string certificates = 1; - * @return RepeatedField - */ - public function getCertificates() - { - return $this->certificates; - } - - /** - * The certificates that form the CA chain in order of leaf to root. - * - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php deleted file mode 100644 index de509bd3c016..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ConnectionType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1beta.ConnectionType - */ -class ConnectionType -{ - /** - * Connection Type is not set - * - * Generated from protobuf enum CONNECTION_TYPE_UNSPECIFIED = 0; - */ - const CONNECTION_TYPE_UNSPECIFIED = 0; - /** - * Connection that will be used for topology discovery. - * - * Generated from protobuf enum CONNECTION_TYPE_DISCOVERY = 1; - */ - const CONNECTION_TYPE_DISCOVERY = 1; - /** - * Connection that will be used as primary endpoint to access primary. - * - * Generated from protobuf enum CONNECTION_TYPE_PRIMARY = 2; - */ - const CONNECTION_TYPE_PRIMARY = 2; - /** - * Connection 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php deleted file mode 100644 index d9f62dd543bb..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/CreateInstanceRequest.php +++ /dev/null @@ -1,279 +0,0 @@ -google.cloud.memorystore.v1beta.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $parent Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * Please see {@see MemorystoreClient::locationName()} for help formatting this field. - * @param \Google\Cloud\Memorystore\V1beta\Instance $instance Required. The instance to create. - * @param string $instanceId Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * - * This value is subject to the following restrictions: - * - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * @return \Google\Cloud\Memorystore\V1beta\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Memorystore\V1beta\Instance $instance, string $instanceId): self - { - return (new self()) - ->setParent($parent) - ->setInstance($instance) - ->setInstanceId($instanceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * @type string $instance_id - * Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * @type \Google\Cloud\Memorystore\V1beta\Instance $instance - * Required. The instance to create. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * - * 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 parent resource where this instance will be created. - * Format: projects/{project}/locations/{location} - * - * 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 ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The ID to use for the instance, which will become the final - * component of the instance's resource name. - * This value is subject to the following restrictions: - * * Must be 4-63 characters in length - * * Must begin with a letter or digit - * * Must contain only lowercase letters, digits, and hyphens - * * Must not end with a hyphen - * * Must be unique within a location - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memorystore\V1beta\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to create. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memorystore\V1beta\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php deleted file mode 100644 index 5fc8f43a6c0b..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DeleteInstanceRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.cloud.memorystore.v1beta.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param string $name Required. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1beta\DeleteInstanceRequest - * - * @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. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. The name of the instance to delete. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * 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. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php deleted file mode 100644 index a3d0464ab08d..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/DiscoveryEndpoint.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.memorystore.v1beta.DiscoveryEndpoint - */ -class DiscoveryEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. IP address of the exposed endpoint clients connect to. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $address = ''; - /** - * Output only. The port number of the exposed endpoint. - * - * Generated from protobuf field int32 port = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $port = 0; - /** - * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $network = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $address - * Output only. IP address of the exposed endpoint clients connect to. - * @type int $port - * Output only. The port number of the exposed endpoint. - * @type string $network - * Output only. 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\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. IP address of the exposed endpoint clients connect to. - * - * Generated from protobuf field string address = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * Output only. IP address of the exposed endpoint clients connect to. - * - * 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 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 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. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Output only. 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 = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setNetwork($var) - { - GPBUtil::checkString($var, True); - $this->network = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php deleted file mode 100644 index 4923d57d11ac..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetCertificateAuthorityRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.memorystore.v1beta.GetCertificateAuthorityRequest - */ -class GetCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1beta\GetCertificateAuthorityRequest - * - * @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. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * - * 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. The name of the certificate authority. - * Format: - * projects/{project}/locations/{location}/instances/{instance}/certificateAuthority - * - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php deleted file mode 100644 index a0478e7c8395..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.memorystore.v1beta.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * Please see {@see MemorystoreClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1beta\GetInstanceRequest - * - * @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. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. The name of the instance to retrieve. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php deleted file mode 100644 index 3c606395ea23..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/GetSharedRegionalCertificateAuthorityRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.cloud.memorystore.v1beta.GetSharedRegionalCertificateAuthorityRequest - */ -class GetSharedRegionalCertificateAuthorityRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Regional certificate authority resource name using the form: - * `projects/{project}/locations/{location}/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}/locations/{location}/sharedRegionalCertificateAuthority` - * where `location_id` refers to a Google Cloud region. Please see - * {@see MemorystoreClient::sharedRegionalCertificateAuthorityName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1beta\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}/locations/{location}/sharedRegionalCertificateAuthority` - * where `location_id` refers to a Google Cloud region. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Regional certificate authority resource name using the form: - * `projects/{project}/locations/{location}/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}/locations/{location}/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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php deleted file mode 100644 index bd3ad66c08fd..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance.php +++ /dev/null @@ -1,1021 +0,0 @@ -google.cloud.memorystore.v1beta.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Unique name of the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Creation timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Latest update timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Optional. Labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Additional information about the state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state_info = null; - /** - * Output only. System assigned, unique identifier for the instance. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $uid = ''; - /** - * Optional. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * - * Generated from protobuf field optional int32 replica_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $replica_count = null; - /** - * Optional. Immutable. Authorization mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $authorization_mode = 0; - /** - * Optional. Immutable. In-transit encryption mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $transit_encryption_mode = 0; - /** - * Optional. Number of shards for the instance. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shard_count = 0; - /** - * Output only. Endpoints clients can connect to the instance through. - * Currently only one discovery endpoint is supported. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $discovery_endpoints; - /** - * Optional. Immutable. Machine type for individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $node_type = 0; - /** - * Optional. Persistence configuration of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $persistence_config = null; - /** - * Optional. Immutable. Engine version of the instance. - * - * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $engine_version = ''; - /** - * Optional. User-provided engine configurations for the instance. - * - * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $engine_configs; - /** - * Output only. Configuration of individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_config = null; - /** - * Optional. Immutable. Zone distribution configuration of the instance for - * node allocation. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $zone_distribution_config = null; - /** - * Optional. If set to true deletion of the instance will fail. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $deletion_protection_enabled = null; - /** - * Required. Immutable. User inputs and resource details of the auto-created - * PSC connections. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - private $psc_auto_connections; - /** - * Optional. Endpoints for the instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $endpoints; - /** - * Optional. The mode config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - /** - * Optional. Immutable. The Server CA mode for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $server_ca_mode = null; - /** - * Optional. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - * "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $rotate_server_certificate = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Unique name of the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Creation timestamp of the instance. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Latest update timestamp of the instance. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Labels to represent user-provided metadata. - * @type int $state - * Output only. Current state of the instance. - * @type \Google\Cloud\Memorystore\V1beta\Instance\StateInfo $state_info - * Output only. Additional information about the state of the instance. - * @type string $uid - * Output only. System assigned, unique identifier for the instance. - * @type int $replica_count - * Optional. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * @type int $authorization_mode - * Optional. Immutable. Authorization mode of the instance. - * @type int $transit_encryption_mode - * Optional. Immutable. In-transit encryption mode of the instance. - * @type int $shard_count - * Optional. Number of shards for the instance. - * @type \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint[] $discovery_endpoints - * Output only. Endpoints clients can connect to the instance through. - * Currently only one discovery endpoint is supported. - * @type int $node_type - * Optional. Immutable. Machine type for individual nodes of the instance. - * @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig $persistence_config - * Optional. Persistence configuration of the instance. - * @type string $engine_version - * Optional. Immutable. Engine version of the instance. - * @type array|\Google\Protobuf\Internal\MapField $engine_configs - * Optional. User-provided engine configurations for the instance. - * @type \Google\Cloud\Memorystore\V1beta\NodeConfig $node_config - * Output only. Configuration of individual nodes of the instance. - * @type \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig $zone_distribution_config - * Optional. Immutable. Zone distribution configuration of the instance for - * node allocation. - * @type bool $deletion_protection_enabled - * Optional. If set to true deletion of the instance will fail. - * @type \Google\Cloud\Memorystore\V1beta\PscAutoConnection[] $psc_auto_connections - * Required. Immutable. User inputs and resource details of the auto-created - * PSC connections. - * @type \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint[] $endpoints - * Optional. Endpoints for the instance. - * @type int $mode - * Optional. The mode config for the instance. - * @type int $server_ca_mode - * Optional. Immutable. The Server CA mode for the instance. - * @type string $server_ca_pool - * Optional. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is 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\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Unique name of the instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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 instance. - * Format: projects/{project}/locations/{location}/instances/{instance} - * - * 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. Creation timestamp of the instance. - * - * 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. Creation timestamp of the instance. - * - * 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. Latest update timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Latest update timestamp of the instance. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.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. Labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Labels to represent user-provided metadata. - * - * Generated from protobuf field map labels = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Current state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Additional information about the state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1beta\Instance\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 state of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo state_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1beta\Instance\StateInfo $var - * @return $this - */ - public function setStateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance\StateInfo::class); - $this->state_info = $var; - - return $this; - } - - /** - * Output only. System assigned, unique identifier for the instance. - * - * Generated from protobuf field string uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. System assigned, unique identifier for the instance. - * - * Generated from protobuf field string uid = 7 [(.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; - } - - /** - * Optional. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * - * 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. Number of replica nodes per shard. If omitted the default is 0 - * replicas. - * - * 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. Immutable. Authorization mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getAuthorizationMode() - { - return $this->authorization_mode; - } - - /** - * Optional. Immutable. Authorization mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.AuthorizationMode authorization_mode = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setAuthorizationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\AuthorizationMode::class); - $this->authorization_mode = $var; - - return $this; - } - - /** - * Optional. Immutable. In-transit encryption mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getTransitEncryptionMode() - { - return $this->transit_encryption_mode; - } - - /** - * Optional. Immutable. In-transit encryption mode of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode transit_encryption_mode = 10 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setTransitEncryptionMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\TransitEncryptionMode::class); - $this->transit_encryption_mode = $var; - - return $this; - } - - /** - * Optional. Number of shards for the instance. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Optional. Number of shards for the instance. - * - * Generated from protobuf field int32 shard_count = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt32($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Output only. Endpoints clients can connect to the instance through. - * Currently only one discovery endpoint is supported. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint> - */ - public function getDiscoveryEndpoints() - { - return $this->discovery_endpoints; - } - - /** - * Output only. Endpoints clients can connect to the instance through. - * Currently only one discovery endpoint is supported. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.DiscoveryEndpoint discovery_endpoints = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint[] $var - * @return $this - */ - public function setDiscoveryEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\DiscoveryEndpoint::class); - $this->discovery_endpoints = $arr; - - return $this; - } - - /** - * Optional. Immutable. Machine type for individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getNodeType() - { - return $this->node_type; - } - - /** - * Optional. Immutable. Machine type for individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.NodeType node_type = 13 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setNodeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\NodeType::class); - $this->node_type = $var; - - return $this; - } - - /** - * Optional. Persistence configuration of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig|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 configuration of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig persistence_config = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig $var - * @return $this - */ - public function setPersistenceConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig::class); - $this->persistence_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Engine version of the instance. - * - * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getEngineVersion() - { - return $this->engine_version; - } - - /** - * Optional. Immutable. Engine version of the instance. - * - * Generated from protobuf field string engine_version = 15 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setEngineVersion($var) - { - GPBUtil::checkString($var, True); - $this->engine_version = $var; - - return $this; - } - - /** - * Optional. User-provided engine configurations for the instance. - * - * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEngineConfigs() - { - return $this->engine_configs; - } - - /** - * Optional. User-provided engine configurations for the instance. - * - * Generated from protobuf field map engine_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEngineConfigs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->engine_configs = $arr; - - return $this; - } - - /** - * Output only. Configuration of individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1beta\NodeConfig|null - */ - public function getNodeConfig() - { - return $this->node_config; - } - - public function hasNodeConfig() - { - return isset($this->node_config); - } - - public function clearNodeConfig() - { - unset($this->node_config); - } - - /** - * Output only. Configuration of individual nodes of the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.NodeConfig node_config = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1beta\NodeConfig $var - * @return $this - */ - public function setNodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\NodeConfig::class); - $this->node_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Zone distribution configuration of the instance for - * node allocation. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Memorystore\V1beta\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. Immutable. Zone distribution configuration of the instance for - * node allocation. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig zone_distribution_config = 18 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig $var - * @return $this - */ - public function setZoneDistributionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig::class); - $this->zone_distribution_config = $var; - - return $this; - } - - /** - * Optional. If set to true deletion of the instance will fail. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.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. If set to true deletion of the instance will fail. - * - * Generated from protobuf field optional bool deletion_protection_enabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDeletionProtectionEnabled($var) - { - GPBUtil::checkBool($var); - $this->deletion_protection_enabled = $var; - - return $this; - } - - /** - * Required. Immutable. User inputs and resource details of the auto-created - * PSC connections. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\PscAutoConnection> - */ - public function getPscAutoConnections() - { - return $this->psc_auto_connections; - } - - /** - * Required. Immutable. User inputs and resource details of the auto-created - * PSC connections. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connections = 20 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Memorystore\V1beta\PscAutoConnection[] $var - * @return $this - */ - public function setPscAutoConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\PscAutoConnection::class); - $this->psc_auto_connections = $arr; - - return $this; - } - - /** - * Optional. Endpoints for the instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint> - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * Optional. Endpoints for the instance. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance.InstanceEndpoint endpoints = 25 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint[] $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance\InstanceEndpoint::class); - $this->endpoints = $arr; - - return $this; - } - - /** - * Optional. The mode config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. The mode config for the instance. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.Mode mode = 26 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\Mode::class); - $this->mode = $var; - - return $this; - } - - /** - * Optional. Immutable. The Server CA mode for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @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. Immutable. The Server CA mode for the instance. - * - * Generated from protobuf field optional .google.cloud.memorystore.v1beta.Instance.ServerCaMode server_ca_mode = 56 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setServerCaMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\Instance\ServerCaMode::class); - $this->server_ca_mode = $var; - - return $this; - } - - /** - * Optional. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - * "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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. Immutable. The customer-managed CA pool for the instance. Only - * applicable if the Server CA mode is CUSTOMER_MANAGED_CAS_CA. Format: - * "projects/{project}/locations/{region}/caPools/{ca_pool}". - * - * Generated from protobuf field optional string server_ca_pool = 57 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE, (.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 = 58 [(.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 = 58 [(.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; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php deleted file mode 100644 index a69a466d84a8..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/AuthorizationMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.AuthorizationMode - */ -class AuthorizationMode -{ - /** - * Not set. - * - * Generated from protobuf enum AUTHORIZATION_MODE_UNSPECIFIED = 0; - */ - const AUTHORIZATION_MODE_UNSPECIFIED = 0; - /** - * Authorization disabled. - * - * Generated from protobuf enum AUTH_DISABLED = 1; - */ - const AUTH_DISABLED = 1; - /** - * IAM basic authorization. - * - * Generated from protobuf enum IAM_AUTH = 2; - */ - const IAM_AUTH = 2; - - private static $valueToName = [ - self::AUTHORIZATION_MODE_UNSPECIFIED => 'AUTHORIZATION_MODE_UNSPECIFIED', - self::AUTH_DISABLED => 'AUTH_DISABLED', - self::IAM_AUTH => 'IAM_AUTH', - ]; - - 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php deleted file mode 100644 index 238f18cb18f1..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ConnectionDetail.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.ConnectionDetail - */ -class ConnectionDetail extends \Google\Protobuf\Internal\Message -{ - protected $connection; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1beta\PscAutoConnection $psc_auto_connection - * Detailed information of a PSC connection that is created through - * service connectivity automation. - * @type \Google\Cloud\Memorystore\V1beta\PscConnection $psc_connection - * Detailed information of a PSC connection that is created by the user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Detailed information of a PSC connection that is created through - * service connectivity automation. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscAutoConnection psc_auto_connection = 1; - * @return \Google\Cloud\Memorystore\V1beta\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.memorystore.v1beta.PscAutoConnection psc_auto_connection = 1; - * @param \Google\Cloud\Memorystore\V1beta\PscAutoConnection $var - * @return $this - */ - public function setPscAutoConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PscAutoConnection::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Detailed information of a PSC connection that is created by the user. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnection psc_connection = 2; - * @return \Google\Cloud\Memorystore\V1beta\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 user. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnection psc_connection = 2; - * @param \Google\Cloud\Memorystore\V1beta\PscConnection $var - * @return $this - */ - public function setPscConnection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PscConnection::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConnection() - { - return $this->whichOneof("connection"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php deleted file mode 100644 index c075e14c01e7..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/InstanceEndpoint.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.InstanceEndpoint - */ -class InstanceEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. 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.memorystore.v1beta.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $connections; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail[] $connections - * Optional. 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\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. 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.memorystore.v1beta.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail> - */ - public function getConnections() - { - return $this->connections; - } - - /** - * Optional. 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.memorystore.v1beta.Instance.ConnectionDetail connections = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail[] $var - * @return $this - */ - public function setConnections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance\ConnectionDetail::class); - $this->connections = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php deleted file mode 100644 index 15ca51ac5b54..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/Mode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.Mode - */ -class Mode -{ - /** - * Mode is not specified. - * - * Generated from protobuf enum MODE_UNSPECIFIED = 0; - */ - const MODE_UNSPECIFIED = 0; - /** - * Deprecated: Use CLUSTER_DISABLED instead. - * - * Generated from protobuf enum STANDALONE = 1 [deprecated = true]; - */ - const STANDALONE = 1; - /** - * Instance is in cluster mode. - * - * Generated from protobuf enum CLUSTER = 2; - */ - const CLUSTER = 2; - /** - * Cluster mode is disabled for the instance. - * - * Generated from protobuf enum CLUSTER_DISABLED = 4; - */ - const CLUSTER_DISABLED = 4; - - private static $valueToName = [ - self::MODE_UNSPECIFIED => 'MODE_UNSPECIFIED', - self::STANDALONE => 'STANDALONE', - self::CLUSTER => 'CLUSTER', - self::CLUSTER_DISABLED => 'CLUSTER_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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php deleted file mode 100644 index b5381475265e..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/NodeType.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.NodeType - */ -class NodeType -{ - /** - * Not set. - * - * Generated from protobuf enum NODE_TYPE_UNSPECIFIED = 0; - */ - const NODE_TYPE_UNSPECIFIED = 0; - /** - * Shared core nano. - * - * Generated from protobuf enum SHARED_CORE_NANO = 1; - */ - const SHARED_CORE_NANO = 1; - /** - * High memory medium. - * - * Generated from protobuf enum HIGHMEM_MEDIUM = 2; - */ - const HIGHMEM_MEDIUM = 2; - /** - * High memory extra large. - * - * Generated from protobuf enum HIGHMEM_XLARGE = 3; - */ - const HIGHMEM_XLARGE = 3; - /** - * Standard small. - * - * Generated from protobuf enum STANDARD_SMALL = 4; - */ - const STANDARD_SMALL = 4; - /** - * Custom micro. - * - * Generated from protobuf enum CUSTOM_MICRO = 5; - */ - const CUSTOM_MICRO = 5; - /** - * Custom mini. - * - * Generated from protobuf enum CUSTOM_MINI = 6; - */ - const CUSTOM_MINI = 6; - /** - * High cpu medium. - * - * Generated from protobuf enum HIGHCPU_MEDIUM = 7; - */ - const HIGHCPU_MEDIUM = 7; - /** - * Standard large. - * - * Generated from protobuf enum STANDARD_LARGE = 8; - */ - const STANDARD_LARGE = 8; - /** - * High memory 2xlarge. - * - * Generated from protobuf enum HIGHMEM_2XLARGE = 9; - */ - const HIGHMEM_2XLARGE = 9; - /** - * Custom pico. - * - * Generated from protobuf enum CUSTOM_PICO = 10; - */ - const CUSTOM_PICO = 10; - - private static $valueToName = [ - self::NODE_TYPE_UNSPECIFIED => 'NODE_TYPE_UNSPECIFIED', - self::SHARED_CORE_NANO => 'SHARED_CORE_NANO', - self::HIGHMEM_MEDIUM => 'HIGHMEM_MEDIUM', - self::HIGHMEM_XLARGE => 'HIGHMEM_XLARGE', - self::STANDARD_SMALL => 'STANDARD_SMALL', - self::CUSTOM_MICRO => 'CUSTOM_MICRO', - self::CUSTOM_MINI => 'CUSTOM_MINI', - self::HIGHCPU_MEDIUM => 'HIGHCPU_MEDIUM', - self::STANDARD_LARGE => 'STANDARD_LARGE', - self::HIGHMEM_2XLARGE => 'HIGHMEM_2XLARGE', - self::CUSTOM_PICO => 'CUSTOM_PICO', - ]; - - 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php deleted file mode 100644 index 41b461ead10d..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/ServerCaMode.php +++ /dev/null @@ -1,89 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.ServerCaMode - */ -class ServerCaMode -{ - /** - * Server CA mode not specified. - * - * Generated from protobuf enum SERVER_CA_MODE_UNSPECIFIED = 0; - */ - const SERVER_CA_MODE_UNSPECIFIED = 0; - /** - * Each instance has its own Google-managed CA. - * - * Generated from protobuf enum GOOGLE_MANAGED_PER_INSTANCE_CA = 1; - */ - const GOOGLE_MANAGED_PER_INSTANCE_CA = 1; - /** - * The instance uses a Google-managed shared CA for the instance's region. - * - * Generated from protobuf enum GOOGLE_MANAGED_SHARED_CA = 2; - */ - const GOOGLE_MANAGED_SHARED_CA = 2; - /** - * The instance uses a customer-managed CA from CAS. - * - * Generated from protobuf enum CUSTOMER_MANAGED_CAS_CA = 3; - */ - const CUSTOMER_MANAGED_CAS_CA = 3; - /** - * Deprecated: Use GOOGLE_MANAGED_PER_INSTANCE_CA instead. - * - * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1 [deprecated = true]; - */ - const SERVER_CA_MODE_GOOGLE_MANAGED_PER_INSTANCE_CA = 1; - /** - * Deprecated: Use GOOGLE_MANAGED_SHARED_CA instead. - * - * Generated from protobuf enum SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2 [deprecated = true]; - */ - const SERVER_CA_MODE_GOOGLE_MANAGED_SHARED_CA = 2; - /** - * Deprecated: Use CUSTOMER_MANAGED_CAS_CA instead. - * - * Generated from protobuf enum SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3 [deprecated = true]; - */ - const SERVER_CA_MODE_CUSTOMER_MANAGED_CAS_CA = 3; - - private static $valueToName = [ - self::SERVER_CA_MODE_UNSPECIFIED => 'SERVER_CA_MODE_UNSPECIFIED', - self::GOOGLE_MANAGED_PER_INSTANCE_CA => 'GOOGLE_MANAGED_PER_INSTANCE_CA', - self::GOOGLE_MANAGED_SHARED_CA => 'GOOGLE_MANAGED_SHARED_CA', - self::CUSTOMER_MANAGED_CAS_CA => 'CUSTOMER_MANAGED_CAS_CA', - 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php deleted file mode 100644 index d712db16ad7e..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Instance is being created. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Instance has been created and is usable. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Instance is being updated. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * Instance 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php deleted file mode 100644 index e126053b19eb..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.StateInfo - */ -class StateInfo extends \Google\Protobuf\Internal\Message -{ - protected $info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo $update_info - * Output only. Describes ongoing update when instance state is UPDATING. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Describes ongoing update when instance state is UPDATING. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo|null - */ - public function getUpdateInfo() - { - return $this->readOneof(1); - } - - public function hasUpdateInfo() - { - return $this->hasOneof(1); - } - - /** - * Output only. Describes ongoing update when instance state is UPDATING. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfo update_info = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo $var - * @return $this - */ - public function setUpdateInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance\StateInfo\UpdateInfo::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getInfo() - { - return $this->whichOneof("info"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php deleted file mode 100644 index d693cc36e0ac..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/StateInfo/UpdateInfo.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.StateInfo.UpdateInfo - */ -class UpdateInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Target number of shards for the instance. - * - * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_shard_count = null; - /** - * Output only. Target number of replica nodes per shard for the instance. - * - * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target_replica_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_shard_count - * Output only. Target number of shards for the instance. - * @type int $target_replica_count - * Output only. Target number of replica nodes per shard for the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Target number of shards for the instance. - * - * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. Target number of shards for the instance. - * - * Generated from protobuf field optional int32 target_shard_count = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setTargetShardCount($var) - { - GPBUtil::checkInt32($var); - $this->target_shard_count = $var; - - return $this; - } - - /** - * Output only. Target number of replica nodes per shard for the instance. - * - * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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); - } - - /** - * Output only. Target number of replica nodes per shard for the instance. - * - * Generated from protobuf field optional int32 target_replica_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php deleted file mode 100644 index 6ff12f592e75..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/Instance/TransitEncryptionMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.v1beta.Instance.TransitEncryptionMode - */ -class TransitEncryptionMode -{ - /** - * Not set. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; - */ - const TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; - /** - * In-transit encryption is disabled. - * - * Generated from protobuf enum TRANSIT_ENCRYPTION_DISABLED = 1; - */ - const TRANSIT_ENCRYPTION_DISABLED = 1; - /** - * Server-managed encryption is used for in-transit encryption. - * - * Generated from protobuf enum SERVER_AUTHENTICATION = 2; - */ - const SERVER_AUTHENTICATION = 2; - - private static $valueToName = [ - self::TRANSIT_ENCRYPTION_MODE_UNSPECIFIED => 'TRANSIT_ENCRYPTION_MODE_UNSPECIFIED', - self::TRANSIT_ENCRYPTION_DISABLED => 'TRANSIT_ENCRYPTION_DISABLED', - self::SERVER_AUTHENTICATION => '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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php deleted file mode 100644 index c49d8b11cbc3..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.memorystore.v1beta.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent to list instances from. - * Format: projects/{project}/locations/{location} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. Expression for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. The parent to list instances from. - * Format: projects/{project}/locations/{location} - * Please see {@see MemorystoreClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Memorystore\V1beta\ListInstancesRequest - * - * @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 parent to list instances from. - * Format: projects/{project}/locations/{location} - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. Expression for filtering results. - * @type string $order_by - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent to list instances from. - * Format: projects/{project}/locations/{location} - * - * 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 parent to list instances from. - * Format: projects/{project}/locations/{location} - * - * 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. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. If unspecified, server will pick an appropriate default. - * - * 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. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Optional. Expression for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Expression for filtering results. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Sort results by a defined order. Supported values: "name", - * "create_time". - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php deleted file mode 100644 index 40e5e6a44bce..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ListInstancesResponse.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.memorystore.v1beta.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance instances = 1; - */ - private $instances; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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\Memorystore\V1beta\Instance[] $instances - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance instances = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\Instance> - */ - public function getInstances() - { - return $this->instances; - } - - /** - * If the {location} requested was "-" the response contains a list of - * instances from all locations. Instances in unreachable locations will be - * omitted. - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.Instance instances = 1; - * @param \Google\Cloud\Memorystore\V1beta\Instance[] $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php deleted file mode 100644 index 4da5b6013cf1..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/NodeConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1beta.NodeConfig - */ -class NodeConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Memory size in GB of the node. - * - * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_gb = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $size_gb - * Output only. Memory size in GB of the node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Memory size in GB of the node. - * - * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getSizeGb() - { - return $this->size_gb; - } - - /** - * Output only. Memory size in GB of the node. - * - * Generated from protobuf field double size_gb = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setSizeGb($var) - { - GPBUtil::checkDouble($var); - $this->size_gb = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php deleted file mode 100644 index a5831d479b7e..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.memorystore.v1beta.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 been cancelled successfully - * 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 been cancelled successfully - * 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\Memorystore\V1Beta\Memorystore::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 been cancelled successfully - * 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 been cancelled successfully - * 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php deleted file mode 100644 index 5790ba4a39e6..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.memorystore.v1beta.PersistenceConfig - */ -class PersistenceConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Current persistence mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.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.memorystore.v1beta.PersistenceConfig.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.memorystore.v1beta.PersistenceConfig.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. Current persistence mode. - * @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig\RDBConfig $rdb_config - * Optional. RDB configuration. This field will be ignored if mode is not RDB. - * @type \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig $aof_config - * Optional. AOF configuration. This field will be ignored if mode is not AOF. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Current persistence mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. Current persistence mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.PersistenceMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.RDBConfig rdb_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig\RDBConfig $var - * @return $this - */ - public function setRdbConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Memorystore\V1beta\PersistenceConfig\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.memorystore.v1beta.PersistenceConfig.AOFConfig aof_config = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig $var - * @return $this - */ - public function setAofConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig::class); - $this->aof_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php deleted file mode 100644 index c46e26013dbc..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig - */ -class AOFConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The fsync mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.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. The fsync mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The fsync mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAppendFsync() - { - return $this->append_fsync; - } - - /** - * Optional. The fsync mode. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig.AppendFsync append_fsync = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAppendFsync($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PersistenceConfig\AOFConfig\AppendFsync::class); - $this->append_fsync = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php deleted file mode 100644 index 6063555086e2..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/AOFConfig/AppendFsync.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.memorystore.v1beta.PersistenceConfig.AOFConfig.AppendFsync - */ -class AppendFsync -{ - /** - * Not set. Default: EVERY_SEC - * - * 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 NEVER = 1; - */ - const NEVER = 1; - /** - * Fsync every second. You may lose 1 second of data if there is a - * disaster. - * - * Generated from protobuf enum EVERY_SEC = 2; - */ - const EVERY_SEC = 2; - /** - * Fsync every time new write commands are appended to the AOF. 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::NEVER => 'NEVER', - self::EVERY_SEC => 'EVERY_SEC', - 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php deleted file mode 100644 index 7ef8d67864d3..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/PersistenceMode.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.memorystore.v1beta.PersistenceConfig.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php deleted file mode 100644 index 8f6be2c39f84..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.memorystore.v1beta.PersistenceConfig.RDBConfig - */ -class RDBConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.RDBConfig.SnapshotPeriod rdb_snapshot_period = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $rdb_snapshot_period = 0; - /** - * Optional. 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. 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\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Period between RDB snapshots. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PersistenceConfig.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.memorystore.v1beta.PersistenceConfig.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\Memorystore\V1beta\PersistenceConfig\RDBConfig\SnapshotPeriod::class); - $this->rdb_snapshot_period = $var; - - return $this; - } - - /** - * Optional. 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. 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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php deleted file mode 100644 index 6b5969449a70..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PersistenceConfig/RDBConfig/SnapshotPeriod.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.memorystore.v1beta.PersistenceConfig.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php deleted file mode 100644 index da7fda788bf3..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscAutoConnection.php +++ /dev/null @@ -1,394 +0,0 @@ -google.cloud.memorystore.v1beta.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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * Output only. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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 PSC connections are established. - * This should be the same project_id that the instance is being created in. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The network where the PSC endpoints are created, 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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_status = 0; - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $connection_type = 0; - protected $ports; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $port - * Optional. Output only. port will only be set for Primary/Reader or - * Discovery endpoint. - * @type string $psc_connection_id - * Output only. The PSC connection id of the forwarding rule connected to the - * service attachment. - * @type string $ip_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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * @type string $project_id - * Required. The consumer project_id where PSC connections are established. - * This should be the same project_id that the instance is being created in. - * @type string $network - * Required. The network where the PSC endpoints are created, 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: whether a connection exists - * and ACTIVE or it no longer exists. 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\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Output only. port will only be set for Primary/Reader or - * Discovery endpoint. - * - * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPort() - { - return $this->readOneof(9); - } - - public function hasPort() - { - return $this->hasOneof(9); - } - - /** - * Optional. Output only. port will only be set for Primary/Reader or - * Discovery endpoint. - * - * Generated from protobuf field int32 port = 9 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPort($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * 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 ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Output only. The IP allocated on the consumer network for the PSC - * forwarding rule. - * - * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Output only. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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 PSC connections are established. - * This should be the same project_id that the instance is being created in. - * - * 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 PSC connections are established. - * This should be the same project_id that the instance is being created in. - * - * 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 network where the PSC endpoints are created, 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 network where the PSC endpoints are created, 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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPscConnectionStatus() - { - return $this->psc_connection_status; - } - - /** - * Output only. The status of the PSC connection: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPscConnectionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PscConnectionStatus::class); - $this->psc_connection_status = $var; - - return $this; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.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.memorystore.v1beta.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getPorts() - { - return $this->whichOneof("ports"); - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php deleted file mode 100644 index 75f74f05672a..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnection.php +++ /dev/null @@ -1,349 +0,0 @@ -google.cloud.memorystore.v1beta.PscConnection - */ -class PscConnection 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 = ''; - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - */ - protected $ip_address = ''; - /** - * Required. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * Generated from protobuf field string forwarding_rule = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $forwarding_rule = ''; - /** - * Output only. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_connection_status = 0; - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.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 $ip_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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * @type string $project_id - * Output only. 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 - * 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: whether a connection exists - * and ACTIVE or it no longer exists. 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\Memorystore\V1Beta\Memorystore::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; - } - - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @return string - */ - public function getIpAddress() - { - return $this->ip_address; - } - - /** - * Required. The IP allocated on the consumer network for the PSC forwarding - * rule. - * - * Generated from protobuf field string ip_address = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_info) = { - * @param string $var - * @return $this - */ - public function setIpAddress($var) - { - GPBUtil::checkString($var, True); - $this->ip_address = $var; - - return $this; - } - - /** - * Required. The URI of the consumer side forwarding rule. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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. - * Format: - * projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - * 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; - } - - /** - * Output only. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Output only. The consumer project_id where the forwarding rule is created - * from. - * - * Generated from protobuf field string project_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @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: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getPscConnectionStatus() - { - return $this->psc_connection_status; - } - - /** - * Output only. The status of the PSC connection: whether a connection exists - * and ACTIVE or it no longer exists. Please note that this value is updated - * periodically. Please use Private Service Connect APIs for the latest - * status. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.PscConnectionStatus psc_connection_status = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setPscConnectionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\PscConnectionStatus::class); - $this->psc_connection_status = $var; - - return $this; - } - - /** - * Output only. Type of the PSC connection. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ConnectionType connection_type = 8 [(.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.memorystore.v1beta.ConnectionType connection_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setConnectionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\ConnectionType::class); - $this->connection_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php deleted file mode 100644 index 7dfef0dbb920..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/PscConnectionStatus.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.memorystore.v1beta.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 ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * Connection not found - * - * Generated from protobuf enum NOT_FOUND = 2; - */ - const NOT_FOUND = 2; - - private static $valueToName = [ - self::PSC_CONNECTION_STATUS_UNSPECIFIED => 'PSC_CONNECTION_STATUS_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::NOT_FOUND => '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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php deleted file mode 100644 index 0f307e238478..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.memorystore.v1beta.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\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $managed_server_ca - * CA certificate chains for memorystore 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\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * CA certificate chains for memorystore managed server authentication. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; - * @return \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority|null - */ - public function getManagedServerCa() - { - return $this->readOneof(2); - } - - public function hasManagedServerCa() - { - return $this->hasOneof(2); - } - - /** - * CA certificate chains for memorystore managed server authentication. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority managed_server_ca = 2; - * @param \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority $var - * @return $this - */ - public function setManagedServerCa($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php deleted file mode 100644 index fd3c9ae8c416..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority - */ -class RegionalManagedCertificateAuthority extends \Google\Protobuf\Internal\Message -{ - /** - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; - */ - private $ca_certs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $ca_certs - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; - * @return RepeatedField<\Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain> - */ - public function getCaCerts() - { - return $this->ca_certs; - } - - /** - * The PEM encoded CA certificate chains for memorystore managed - * server authentication - * - * Generated from protobuf field repeated .google.cloud.memorystore.v1beta.SharedRegionalCertificateAuthority.RegionalManagedCertificateAuthority.RegionalCertChain ca_certs = 1; - * @param \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain[] $var - * @return $this - */ - public function setCaCerts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority\RegionalManagedCertificateAuthority\RegionalCertChain::class); - $this->ca_certs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php deleted file mode 100644 index 01d162d0a93a..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/SharedRegionalCertificateAuthority/RegionalManagedCertificateAuthority/RegionalCertChain.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.memorystore.v1beta.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\Memorystore\V1Beta\Memorystore::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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php deleted file mode 100644 index a1cb89dd003b..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/UpdateInstanceRequest.php +++ /dev/null @@ -1,215 +0,0 @@ -google.cloud.memorystore.v1beta.UpdateInstanceRequest - */ -class UpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\Memorystore\V1beta\Instance $instance Required. The instance to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * @return \Google\Cloud\Memorystore\V1beta\UpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Memorystore\V1beta\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * @type \Google\Cloud\Memorystore\V1beta\Instance $instance - * Required. The instance to update. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. The list of fields to be updated on the instance. At least one - * field must be specified. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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. The instance to update. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Memorystore\V1beta\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to update. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Memorystore\V1beta\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Memorystore\V1beta\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_info) = { - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.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/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php deleted file mode 100644 index 4514bd652c0f..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.memorystore.v1beta.ZoneDistributionConfig - */ -class ZoneDistributionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $zone = ''; - /** - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * @type int $mode - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * - * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getZone() - { - return $this->zone; - } - - /** - * Optional. Defines zone where all resources will be allocated with - * SINGLE_ZONE mode. Ignored for MULTI_ZONE mode. - * - * 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; - } - - /** - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMode() - { - return $this->mode; - } - - /** - * Optional. Current zone distribution mode. Defaults to MULTI_ZONE. - * - * Generated from protobuf field .google.cloud.memorystore.v1beta.ZoneDistributionConfig.ZoneDistributionMode mode = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Memorystore\V1beta\ZoneDistributionConfig\ZoneDistributionMode::class); - $this->mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php b/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php deleted file mode 100644 index bc9b6f706530..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/proto/src/Google/Cloud/Memorystore/V1beta/ZoneDistributionConfig/ZoneDistributionMode.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.memorystore.v1beta.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 resources across 3 zones picked at random within the - * region. - * - * Generated from protobuf enum MULTI_ZONE = 1; - */ - const MULTI_ZONE = 1; - /** - * Provision resources in a single zone. Zone field must be specified. - * - * 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/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php deleted file mode 100644 index 658a91c89377..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/create_instance.php +++ /dev/null @@ -1,123 +0,0 @@ -setProjectId($instancePscAutoConnectionsProjectId) - ->setNetwork($formattedInstancePscAutoConnectionsNetwork); - $instancePscAutoConnections = [$pscAutoConnection,]; - $instance = (new Instance()) - ->setPscAutoConnections($instancePscAutoConnections); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->createInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); - $instanceId = '[INSTANCE_ID]'; - $instancePscAutoConnectionsProjectId = '[PROJECT_ID]'; - $formattedInstancePscAutoConnectionsNetwork = MemorystoreClient::networkName( - '[PROJECT]', - '[NETWORK]' - ); - - create_instance_sample( - $formattedParent, - $instanceId, - $instancePscAutoConnectionsProjectId, - $formattedInstancePscAutoConnectionsNetwork - ); -} -// [END memorystore_v1beta_generated_Memorystore_CreateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php deleted file mode 100644 index 986ed029233f..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/delete_instance.php +++ /dev/null @@ -1,81 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->deleteInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END memorystore_v1beta_generated_Memorystore_DeleteInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php deleted file mode 100644 index 9f823bb1908a..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_certificate_authority.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CertificateAuthority $response */ - $response = $memorystoreClient->getCertificateAuthority($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_certificate_authority_sample($formattedName); -} -// [END memorystore_v1beta_generated_Memorystore_GetCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php deleted file mode 100644 index 7388d674d3f5..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_instance.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $memorystoreClient->getInstance($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 = MemorystoreClient::instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END memorystore_v1beta_generated_Memorystore_GetInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_location.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_location.php deleted file mode 100644 index a4200d237fb0..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/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 memorystore_v1beta_generated_Memorystore_GetLocation_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php deleted file mode 100644 index 959fe842e326..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/get_shared_regional_certificate_authority.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SharedRegionalCertificateAuthority $response */ - $response = $memorystoreClient->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 = MemorystoreClient::sharedRegionalCertificateAuthorityName( - '[PROJECT]', - '[LOCATION]' - ); - - get_shared_regional_certificate_authority_sample($formattedName); -} -// [END memorystore_v1beta_generated_Memorystore_GetSharedRegionalCertificateAuthority_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php deleted file mode 100644 index 80f0f934e3bd..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_instances.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $memorystoreClient->listInstances($request); - - /** @var Instance $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 = MemorystoreClient::locationName('[PROJECT]', '[LOCATION]'); - - list_instances_sample($formattedParent); -} -// [END memorystore_v1beta_generated_Memorystore_ListInstances_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_locations.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/list_locations.php deleted file mode 100644 index 667e67505e7a..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/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 memorystore_v1beta_generated_Memorystore_ListLocations_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php b/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php deleted file mode 100644 index 28cd508defbf..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/samples/V1beta/MemorystoreClient/update_instance.php +++ /dev/null @@ -1,102 +0,0 @@ -setProjectId($instancePscAutoConnectionsProjectId) - ->setNetwork($formattedInstancePscAutoConnectionsNetwork); - $instancePscAutoConnections = [$pscAutoConnection,]; - $instance = (new Instance()) - ->setPscAutoConnections($instancePscAutoConnections); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $memorystoreClient->updateInstance($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 -{ - $instancePscAutoConnectionsProjectId = '[PROJECT_ID]'; - $formattedInstancePscAutoConnectionsNetwork = MemorystoreClient::networkName( - '[PROJECT]', - '[NETWORK]' - ); - - update_instance_sample( - $instancePscAutoConnectionsProjectId, - $formattedInstancePscAutoConnectionsNetwork - ); -} -// [END memorystore_v1beta_generated_Memorystore_UpdateInstance_sync] diff --git a/owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php b/owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php deleted file mode 100644 index e806224e6862..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/src/V1beta/Client/MemorystoreClient.php +++ /dev/null @@ -1,697 +0,0 @@ - createInstanceAsync(CreateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteInstanceAsync(DeleteInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCertificateAuthorityAsync(GetCertificateAuthorityRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSharedRegionalCertificateAuthorityAsync(GetSharedRegionalCertificateAuthorityRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateInstanceAsync(UpdateInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class MemorystoreClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.memorystore.v1beta.Memorystore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'memorystore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'memorystore.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/memorystore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/memorystore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/memorystore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/memorystore_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - * - * @experimental - */ - 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 - * - * @experimental - */ - 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 ca_pool - * resource. - * - * @param string $project - * @param string $location - * @param string $caPool - * - * @return string The formatted ca_pool resource. - * - * @experimental - */ - 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 - * forwarding_rule resource. - * - * @param string $project - * @param string $region - * @param string $forwardingRule - * - * @return string The formatted forwarding_rule resource. - * - * @experimental - */ - 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 instance - * resource. - * - * @param string $project - * @param string $location - * @param string $instance - * - * @return string The formatted instance resource. - * - * @experimental - */ - public static function instanceName(string $project, string $location, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'instance' => $instance, - ]); - } - - /** - * 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. - * - * @experimental - */ - 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. - * - * @experimental - */ - 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. - * - * @experimental - */ - 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. - * - * @experimental - */ - 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 - * - caPool: projects/{project}/locations/{location}/caPools/{ca_pool} - * - forwardingRule: projects/{project}/regions/{region}/forwardingRules/{forwarding_rule} - * - instance: projects/{project}/locations/{location}/instances/{instance} - * - 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. - * - * @experimental - */ - 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 'memorystore.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\Memorystore\V1beta\MemorystoreClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new MemorystoreClient(['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 - * - * @experimental - */ - 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); - } - - /** - * Creates a new Instance in a given project and location. - * - * The async variant is {@see MemorystoreClient::createInstanceAsync()} . - * - * @example samples/V1beta/MemorystoreClient/create_instance.php - * - * @param CreateInstanceRequest $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. - * - * @experimental - */ - public function createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Instance. - * - * The async variant is {@see MemorystoreClient::deleteInstanceAsync()} . - * - * @example samples/V1beta/MemorystoreClient/delete_instance.php - * - * @param DeleteInstanceRequest $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. - * - * @experimental - */ - public function deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Gets details about the certificate authority for an Instance. - * - * The async variant is {@see MemorystoreClient::getCertificateAuthorityAsync()} . - * - * @example samples/V1beta/MemorystoreClient/get_certificate_authority.php - * - * @param GetCertificateAuthorityRequest $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. - * - * @experimental - */ - public function getCertificateAuthority(GetCertificateAuthorityRequest $request, array $callOptions = []): CertificateAuthority - { - return $this->startApiCall('GetCertificateAuthority', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Instance. - * - * The async variant is {@see MemorystoreClient::getInstanceAsync()} . - * - * @example samples/V1beta/MemorystoreClient/get_instance.php - * - * @param GetInstanceRequest $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 Instance - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Gets the details of shared regional certificate authority information for - * Memorystore instance. - * - * The async variant is - * {@see MemorystoreClient::getSharedRegionalCertificateAuthorityAsync()} . - * - * @example samples/V1beta/MemorystoreClient/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. - * - * @experimental - */ - public function getSharedRegionalCertificateAuthority(GetSharedRegionalCertificateAuthorityRequest $request, array $callOptions = []): SharedRegionalCertificateAuthority - { - return $this->startApiCall('GetSharedRegionalCertificateAuthority', $request, $callOptions)->wait(); - } - - /** - * Lists Instances in a given project and location. - * - * The async variant is {@see MemorystoreClient::listInstancesAsync()} . - * - * @example samples/V1beta/MemorystoreClient/list_instances.php - * - * @param ListInstancesRequest $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. - * - * @experimental - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * Updates the parameters of a single Instance. - * - * The async variant is {@see MemorystoreClient::updateInstanceAsync()} . - * - * @example samples/V1beta/MemorystoreClient/update_instance.php - * - * @param UpdateInstanceRequest $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. - * - * @experimental - */ - public function updateInstance(UpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see MemorystoreClient::getLocationAsync()} . - * - * @example samples/V1beta/MemorystoreClient/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. - * - * @experimental - */ - 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 MemorystoreClient::listLocationsAsync()} . - * - * @example samples/V1beta/MemorystoreClient/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. - * - * @experimental - */ - public function listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json b/owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json deleted file mode 100644 index 7bb767fcd547..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/src/V1beta/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.memorystore.v1beta", - "libraryPackage": "Google\\Cloud\\Memorystore\\V1beta", - "services": { - "Memorystore": { - "clients": { - "grpc": { - "libraryClient": "MemorystoreGapicClient", - "rpcs": { - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "GetCertificateAuthority": { - "methods": [ - "getCertificateAuthority" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetSharedRegionalCertificateAuthority": { - "methods": [ - "getSharedRegionalCertificateAuthority" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json deleted file mode 100644 index 3b49c09b15db..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_client_config.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "interfaces": { - "google.cloud.memorystore.v1beta.Memorystore": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "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 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "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": { - "CreateInstance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteInstance": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCertificateAuthority": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSharedRegionalCertificateAuthority": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateInstance": { - "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/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php deleted file mode 100644 index 743450130fcb..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_descriptor_config.php +++ /dev/null @@ -1,185 +0,0 @@ - [ - 'google.cloud.memorystore.v1beta.Memorystore' => [ - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memorystore\V1beta\Instance', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Memorystore\V1beta\Instance', - 'metadataReturnType' => '\Google\Cloud\Memorystore\V1beta\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'GetCertificateAuthority' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1beta\CertificateAuthority', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1beta\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSharedRegionalCertificateAuthority' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1beta\SharedRegionalCertificateAuthority', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Memorystore\V1beta\ListInstancesResponse', - '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' => [ - 'caPool' => 'projects/{project}/locations/{location}/caPools/{ca_pool}', - 'forwardingRule' => 'projects/{project}/regions/{region}/forwardingRules/{forwarding_rule}', - 'instance' => 'projects/{project}/locations/{location}/instances/{instance}', - '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/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php b/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php deleted file mode 100644 index 1bf1756656d1..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/src/V1beta/resources/memorystore_rest_client_config.php +++ /dev/null @@ -1,182 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.memorystore.v1beta.Memorystore' => [ - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', - 'body' => 'instance', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'instance_id', - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCertificateAuthority' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}/certificateAuthority', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSharedRegionalCertificateAuthority' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/sharedRegionalCertificateAuthority}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{parent=projects/*/locations/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1beta/{instance.name=projects/*/locations/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php b/owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php deleted file mode 100644 index 0f3e765d4adb..000000000000 --- a/owl-bot-staging/Memorystore/v1beta/tests/Unit/V1beta/Client/MemorystoreClientTest.php +++ /dev/null @@ -1,987 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MemorystoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MemorystoreClient($options); - } - - /** @test */ - public function createInstanceTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instancePscAutoConnections = []; - $instance->setPscAutoConnections($instancePscAutoConnections); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($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.memorystore.v1beta.Memorystore/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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 createInstanceExceptionTest() - { - $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/createInstanceTest'); - $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]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instancePscAutoConnections = []; - $instance->setPscAutoConnections($instancePscAutoConnections); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - 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 deleteInstanceTest() - { - $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/deleteInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($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.memorystore.v1beta.Memorystore/DeleteInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - $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 deleteInstanceExceptionTest() - { - $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/deleteInstanceTest'); - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteInstanceTest'); - 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 getCertificateAuthorityTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetCertificateAuthorityRequest()) - ->setName($formattedName); - $response = $gapicClient->getCertificateAuthority($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.memorystore.v1beta.Memorystore/GetCertificateAuthority', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCertificateAuthorityExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetCertificateAuthorityRequest()) - ->setName($formattedName); - try { - $gapicClient->getCertificateAuthority($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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($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.memorystore.v1beta.Memorystore/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[LOCATION]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($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.memorystore.v1beta.Memorystore/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 listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.memorystore.v1beta.Memorystore/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $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 ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($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 updateInstanceTest() - { - $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/updateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $instancePscAutoConnections = []; - $instance->setPscAutoConnections($instancePscAutoConnections); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - $response = $gapicClient->updateInstance($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.memorystore.v1beta.Memorystore/UpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - $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 updateInstanceExceptionTest() - { - $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/updateInstanceTest'); - $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 - $instance = new Instance(); - $instancePscAutoConnections = []; - $instance->setPscAutoConnections($instancePscAutoConnections); - $request = (new UpdateInstanceRequest()) - ->setInstance($instance); - $response = $gapicClient->updateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateInstanceTest'); - 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 createInstanceAsyncTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $replicaCount = 564075208; - $shardCount = 495377042; - $engineVersion = 'engineVersion-618177573'; - $deletionProtectionEnabled = true; - $serverCaPool = 'serverCaPool-1294323103'; - $rotateServerCertificate = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setReplicaCount($replicaCount); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setEngineVersion($engineVersion); - $expectedResponse->setDeletionProtectionEnabled($deletionProtectionEnabled); - $expectedResponse->setServerCaPool($serverCaPool); - $expectedResponse->setRotateServerCertificate($rotateServerCertificate); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instancePscAutoConnections = []; - $instance->setPscAutoConnections($instancePscAutoConnections); - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance); - $response = $gapicClient->createInstanceAsync($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.memorystore.v1beta.Memorystore/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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()); - } -}